kenso 0.1.91 → 0.1.93
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 +213 -129
- package/dist/operations.json +1 -1
- package/docs/crm.md +21 -0
- package/docs/reference.md +147 -16
- package/package.json +2 -2
package/dist/kenso.js
CHANGED
|
@@ -2477,7 +2477,7 @@ var VERSION;
|
|
|
2477
2477
|
var init_version = __esm({
|
|
2478
2478
|
"src/core/version.ts"() {
|
|
2479
2479
|
"use strict";
|
|
2480
|
-
VERSION = true ? "0.1.
|
|
2480
|
+
VERSION = true ? "0.1.93" : "0.0.0-dev";
|
|
2481
2481
|
}
|
|
2482
2482
|
});
|
|
2483
2483
|
|
|
@@ -4174,9 +4174,9 @@ async function readRunDir(dir) {
|
|
|
4174
4174
|
return null;
|
|
4175
4175
|
}
|
|
4176
4176
|
if (!raw) return null;
|
|
4177
|
-
const { runId, command:
|
|
4177
|
+
const { runId, command: command61, createdAt, status } = raw;
|
|
4178
4178
|
if (typeof runId !== "string" || !RUN_ID_PATTERN.test(runId)) return null;
|
|
4179
|
-
if (typeof
|
|
4179
|
+
if (typeof command61 !== "string" || typeof createdAt !== "string") return null;
|
|
4180
4180
|
if (typeof status !== "string" || !STATUSES.includes(status)) return null;
|
|
4181
4181
|
let chunksDone = chunkList(raw.chunksDone) ?? [];
|
|
4182
4182
|
try {
|
|
@@ -4187,7 +4187,7 @@ async function readRunDir(dir) {
|
|
|
4187
4187
|
const record = {
|
|
4188
4188
|
...raw,
|
|
4189
4189
|
runId,
|
|
4190
|
-
command:
|
|
4190
|
+
command: command61,
|
|
4191
4191
|
args: asRecord3(raw.args) ?? {},
|
|
4192
4192
|
createdAt,
|
|
4193
4193
|
status,
|
|
@@ -4242,11 +4242,11 @@ async function loadRun(runId, env = process.env) {
|
|
|
4242
4242
|
}
|
|
4243
4243
|
return run;
|
|
4244
4244
|
}
|
|
4245
|
-
async function findIdentical(
|
|
4245
|
+
async function findIdentical(command61, args, inputSha256, env, workspaceId, anyWorkspace = false) {
|
|
4246
4246
|
const identity = argsIdentity(args);
|
|
4247
4247
|
const runs = await listRuns(env);
|
|
4248
4248
|
return runs.filter(
|
|
4249
|
-
(run) => run.command ===
|
|
4249
|
+
(run) => run.command === command61 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
|
|
4250
4250
|
);
|
|
4251
4251
|
}
|
|
4252
4252
|
function isOtherLiveProcess(pid) {
|
|
@@ -7177,6 +7177,12 @@ function eachConcurrency(raw) {
|
|
|
7177
7177
|
function secretParams(op) {
|
|
7178
7178
|
return operationFlags(op).flatMap((f) => f.param && f.location === "body" && isSecretFlag(f.flag, f.type) ? [{ flag: f.flag, name: f.param.name }] : []);
|
|
7179
7179
|
}
|
|
7180
|
+
function printWarnings(ctx, body2) {
|
|
7181
|
+
if (!isRecord3(body2) || !Array.isArray(body2.warnings)) return;
|
|
7182
|
+
for (const warning of body2.warnings) {
|
|
7183
|
+
if (isRecord3(warning) && typeof warning.message === "string") ctx.output.warn(warning.message);
|
|
7184
|
+
}
|
|
7185
|
+
}
|
|
7180
7186
|
async function runOperation(ctx, op, flags) {
|
|
7181
7187
|
const secrets = secretParams(op);
|
|
7182
7188
|
checkSecretSources(flags, secrets.map((s) => s.flag));
|
|
@@ -7213,6 +7219,7 @@ async function runOperation(ctx, op, flags) {
|
|
|
7213
7219
|
return ExitCode.Ok;
|
|
7214
7220
|
}
|
|
7215
7221
|
if (res.status === 204 || res.body === null || res.body === "") return ExitCode.Ok;
|
|
7222
|
+
printWarnings(ctx, res.body);
|
|
7216
7223
|
if (op.list && isRecord3(res.body) && Array.isArray(res.body.data)) {
|
|
7217
7224
|
if (res.body.counts !== void 0) {
|
|
7218
7225
|
ctx.output.object({ data: res.body.data, pagination: res.body.pagination, counts: res.body.counts });
|
|
@@ -7451,8 +7458,8 @@ function idValue(value, field) {
|
|
|
7451
7458
|
function shellQuote3(arg) {
|
|
7452
7459
|
return /^[A-Za-z0-9_./:=@%+,-]+$/.test(arg) ? arg : `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
7453
7460
|
}
|
|
7454
|
-
function commandLine2(ctx,
|
|
7455
|
-
const parts2 = ["kenso", ...
|
|
7461
|
+
function commandLine2(ctx, command61, args, extra = []) {
|
|
7462
|
+
const parts2 = ["kenso", ...command61.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
|
|
7456
7463
|
for (const [name, value] of Object.entries(args.flags)) {
|
|
7457
7464
|
if (value === void 0 || value === false) continue;
|
|
7458
7465
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -7784,7 +7791,7 @@ var init_connect = __esm({
|
|
|
7784
7791
|
var crm_default;
|
|
7785
7792
|
var init_crm = __esm({
|
|
7786
7793
|
"docs/crm.md"() {
|
|
7787
|
-
crm_default = '# CRM (beta)\n\nThe CRM commands work on Kenso\'s Accounts lane: accounts (companies), the people on them, and opportunities. They are beta: they need the `accounts` feature flag on your workspace (opportunities need `opportunities`, CRM sync needs `ingestion`). Help and `kenso describe` hide them until your workspace has the flag; `--all-commands` shows them.\n\n| Command | What it does |\n|---|---|\n| `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |\n| `people import` | Create or match people from a file, optionally onto accounts |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `deleted-accounts list`, `accounts restore <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved Accounts view, or what the filters match |\n| `capture status` | Your captured mailbox, its backfill progress and what teammates see of a captured email. Needs the `crm_capture` flag |\n| `capture connect` | Turn capture on for your own mailbox. `--private` starts it hidden from teammates; `--provider google` prints a sign-in link when no account is connected yet |\n| `capture private on\\|off` | Hide your captured email from teammates, or show it again. Email only: meetings stay visible. `--thread <id>` sets the switch for one thread |\n| `capture thread <threadId>` | One captured email thread: subject, people, time, Ken\'s summary, and each body you may open. The id is `capturedThread.id` on a timeline row |\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| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n| `tasks add`, `tasks done`, `tasks assign`, `tasks queue` | Add a to-do for a member on an account, person or deal, complete it, hand it on, or read your open work (needs `tasks`) |\n\nImport accounts first, then people: `people import` never creates an account.\n\n## Import accounts\n\n```bash\nkenso accounts import --file accounts.csv\nkenso accounts import --file accounts.csv --yes\n```\n\n```csv\nname,domain,industry,employeeCount\nAcme,acme.io,Software,120\nGlobex,globex.com,Manufacturing,"1,200"\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `name` (or `company`, `companyName`, `accountName`), `domains` (several, split on `,` or `;`) or one `domain` (or `website`, `companyDomain`), `industry`, `employeeCount`, `hqLocation`, `linkedinUrl`, `stage`, `angle`, `whyNow`, `fitScore`, `fundingRound`, `cadenceDays`, `ownerMemberId`, `kenCompanyId`, `sendsFromInboxId`, `sendsFromLinkedInAccountId` and `source`.\n- **A domain is required.** A file with no domain column is a usage error, and a row without a domain is `invalid` (`domain_required`).\n- **The dry run prices the research.** It asks for a credit estimate per 1,000 accounts and puts the sum in the plan: `kind`, `accountCount`, `totalMillicredits`, `availableMillicredits` and `sufficient`.\n- **Rows go 100 per call** to `POST /v1/accounts/bulk-create`.\n\nEach row comes back `created` (`id` is the new account; its research is queued, `researchQueued`, or waits for credits, `researchWaitingCredits`), `skipped` with reason `domain_taken` (already an account; `id` is that account) or `failed` (`reason` is the API\'s code, `error` names the field; an item Kenso failed to save is sent once more first). Rerunning the same file is safe: accounts that exist come back `domain_taken`.\n\n## Import people\n\n```bash\nkenso people import --file people.csv\nkenso people import --file people.csv --find-emails --yes\nkenso people import --file people.jsonl --dry-run\n```\n\n```csv\nfullName,email,title,accountDomain,role\nAnn Lee,ann@acme.io,VP Sales,acme.io,champion\nBob Ray,,CTO,acme.io,\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `email`, `fullName` (or `name`), `firstName`, `lastName`, `title`, `linkedinUrl` (or `linkedin`, `profileUrl`), `accountDomain` (or `domain`, `website`, `companyDomain`), `accountId`, `role` and `priority`. Other columns are ignored with one warning.\n- **A person needs a name:** `fullName`, or `firstName`, `lastName` or both (the CLI joins them). A row with none of them is `invalid` (`name_required`).\n- **To put a person on an account,** give `accountDomain` or `accountId`. A row with both sends only `accountId`.\n- **`--find-emails`** queues an email find (charged in credits) for each person without an email.\n- **Rows go 200 per call** to `POST /v1/people/batch`.\n\nPeople already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nobody twice. A row comes back `created` (a new person), `updated` (an existing person added to the account), `skipped` with reason `already_on_account`, `matched` (no account asked) or `previously_removed`, or `failed`: `account_not_found` saves the person without an account (import the account, then rerun to place them), any other reason is the API\'s. The summary adds `matched`, `addedToAccounts` and `emailFindsQueued`.\n\n## List and search accounts\n\n`accounts list` and `accounts search` sort and page on the server, so they reach every account in the workspace, however many there are.\n\n```bash\nkenso accounts list --sort score:desc --limit 100 # one page; the output\'s next: line is the following one\nkenso accounts list --sort score:desc --limit 100 --all # every page, to the end\nkenso accounts search --search hiring --sort latestSignalAt:desc --data \'{"qFields": ["name", "latestSignal"]}\'\nkenso accounts search --limit 1 --data \'{"countBy": ["stage"]}\' # how many accounts sit in each stage\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}]}, "sort": "tier,-pipelineAmount"}\' --all\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "hqLocation", "operator": "contains", "values": ["Germany"]}]}}\' --all\n# tier 1 accounts with no meeting in 30 days: none since then, or none ever\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}, {"match": "any", "conditions": [{"field": "lastMeeting", "operator": "older_than_days", "values": ["30"]}, {"field": "lastMeeting", "operator": "is_empty"}]}]}}\' --all\n```\n\n- **`--sort`** takes up to 3 comma-separated keys, each `field` (ascending), `field:asc` or `field:desc`. The API\'s `-field` form needs the equals sign here, `--sort=-score`, because a value that starts with a dash reads as a flag. Fields: `createdAt`, `name`, `score`, `tier` (ascending is tier 1 first), `latestSignalAt`, `committee`, `pipelineAmount`, `nextTouchAt`, `lastTouchAt`. An account with no value for a key comes last in both directions. The default is `-createdAt`.\n- **`--limit`** is 1 to 1000 (default 50). `--cursor` takes the previous page\'s `nextCursor` with the same filters and sort; `--all` follows the cursors for you.\n- **`--search`** (also `--q`) matches the name or a domain.\n- **Lists and objects go in `--data`** on `search`, as the API takes them (`kenso describe accounts search`); a flag beside it sets or replaces one key:\n - `qFields` picks where the search text looks: `name`, `domain`, `latestSignal` (the latest signal\'s title).\n - `countBy` (`stage`, `stageGroup`) adds `counts` to the output: every value with the number of matching accounts that hold it, whatever the page. The output is then one object: `data`, `pagination` and `counts`.\n - `filters` and `where` narrow the accounts.\n\nAn account\'s timeline pages the same way. `kenso accounts activity 812` returns the newest 100 earlier rows and, when older ones exist, `data.nextCursor`. Pass it back as `--cursor` (with the same `--category`) for the rows before them, until a page comes without one.\n\n## Edit accounts, people and opportunities\n\nApart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command\'s flags by API name or flag name, and the id column fills the route:\n\n```bash\nkenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes\nkenso people update --each people-edit.csv --dry-run\nkenso opportunities update --each deals.csv --dry-run\n```\n\n```csv\naccountId,stage,ownerMemberId,overwritePinned\n501,engaged,42,true\n502,customer,42,true\n```\n\nA row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person\'s OK). Every flag of an update command: `kenso accounts update --help`.\n\n## Search opportunities\n\n`kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.\n\n```bash\nkenso opportunities search --data \'{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}\' --all\nkenso opportunities search --data \'{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}\'\nkenso opportunities search --limit 1 --data \'{"countBy": ["stage", "ownerMemberId"]}\' # how many opportunities hold each value\n```\n\n- **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.\n- **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.\n- `--account-id` keeps the search to one account. `closeDate` counts days in the member\'s app time zone.\n\nOne person\'s deals, meetings and campaign contacts, as their person page lists them:\n\n```bash\nkenso opportunities list --person-id 9001 # the deals they are on, or are the primary person of\nkenso meetings list --person-id 9001 # the meetings they attend, among the ones you can see\nkenso contacts list --person-id 9001 # their contact in each campaign they are in\n```\n\n## Write research you gathered\n\n`accounts write-research` and `people write-research` store research you gathered outside Kenso as the record\'s latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account\'s own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.\n\nThe body is the research block `accounts get --expand research` (or `people get-research`) returns, without its read-only fields: leave out `id`, `status`, `trigger`, `errorCode`, `researchedAt`, `isStale` and `appliedPrompt` (for a person also `mode`, `requestedAt`, `researchedMode`, `firecrawlCredits` and `webNote`), or the write fails with `unknown_field`. Pass it with `--data @file`:\n\n```bash\nkenso accounts write-research --account-id 501 --data @acme-dossier.json\nkenso people write-research --person-id 9001 --data @jane.json\n```\n\n```json\n{\n "tagline": { "text": "Payroll for EU contractors", "sourceUrls": ["https://acme.example"] },\n "description": { "text": "Acme runs payroll and compliance for companies hiring contractors in 30 EU countries.", "sourceUrls": ["https://acme.example"] },\n "links": { "website": "https://acme.example" },\n "whyNow": { "text": "Raised a $40M Series B in October", "sourceUrls": ["https://news.example/acme-b"], "date": "2026-10" },\n "fitScore": 82,\n "angle": "Lead with contractor onboarding time."\n}\n```\n\nMany records: one JSONL line per record, with the id next to the block\'s fields. Nested objects are sent as written. Use JSONL, not CSV: the block\'s fields are objects and lists, which a CSV cell cannot carry.\n\n```bash\nkenso accounts write-research --each dossiers.jsonl --dry-run # then the same with --yes\nkenso people write-research --each people-research.jsonl --yes --concurrency 8\n```\n\n```jsonl\n{"accountId": 501, "tagline": {"text": "Payroll for EU contractors"}, "links": {"website": "https://acme.example"}}\n{"accountId": 502, "description": {"text": "Cloud cost tooling for retailers."}, "links": {"website": "https://beta.example"}}\n```\n\nA row fails as a whole with the API\'s code: `validation_failed` (an unknown field is `unknown_field`, and `error.details` names every bad field), `research_in_progress` (`409`: Ken is researching that record now, write it again once the run ends; an account run waiting for credits counts too: it runs once the workspace has credits, and the write stays refused until that run ends) or `not_found`. Rerunning a file is safe: each write replaces the record\'s research shown.\n\n## CRM sync\n\nCRM sync has generated commands only: read connections, preview, start an import, and work through sync issues. Connect the CRM itself in the app.\n\n```bash\nkenso crm-connections list\nkenso crm-connections get --connection-id 7\nkenso crm-imports create --connection-id 7 --dry-run\nkenso crm-sync-issues list --connection-id 7 --all\n```\n\nRun `kenso crm-connections --help` (or add `--all-commands` when the actions are hidden) to see every action.\n\n## Pipelines\n\nA workspace with the `pipelines` flag on can run several deal pipelines, each with its own stages. These are generated commands (beta):\n\n```bash\nkenso pipelines list\nkenso pipelines list --query "[].{id: id, name: name, default: isDefault, stages: stages[].key}"\nkenso pipelines get --pipeline-id 5\n```\n\n`list` prints every pipeline in display order, archived ones included: `id`, `name`, `routingRule` (the one sentence Ken reads to decide whether a new deal belongs there), `isDefault`, `isArchived`, `position`, `opportunityCount`, `amountTotal` and `stages`, each stage as `kenso opportunity-stages list` prints it. A stage key is unique in the workspace, across pipelines, so a deal\'s `stage` names its pipeline and its `pipelineId` repeats it. The first read turns the workspace\'s stage list into its default pipeline, named Sales, with every deal in it. The same rows as the MCP\'s `pipelines(operation="list")`.\n\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\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- **`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## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore 812\n```\n\nA deleted account can be restored for 30 days. `deleted-accounts list` shows each one with who deleted it, `expiresAt` (restore works until then) and what comes back: `personCount`, `opportunityCount` and `touchCount`. `accounts restore <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. A domain another account took since stays with that account and is listed in `domainsTaken`. A merged account is not listed and cannot be restored: a merge has no undo. Both commands are behind the `crm_import_export` feature flag (`404` while it is off).\n\n## Export accounts, people or deals\n\n```bash\nkenso export accounts --out accounts.csv\nkenso export accounts --view 12 --out tier-1.csv\nkenso export deals --filters \'[{"field":"stageCategory","operator":"is","values":["open"]}]\' > open-deals.csv\n```\n\nIt writes the CSV that `POST /v1/accounts/export`, `/v1/people/export` or `/v1/opportunities/export` returns, to stdout or to `--out` (then it prints the file and its row count). With no filter it exports every record. More than 50,000 rows is refused: narrow the filters. `--view <id>` exports a saved Accounts view (`kenso account-views list` shows the ids). `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields, so a deals or people view exports with its filters and sort. The accounts and deals files start with `id` and import back as they are. Each export writes an audit-log entry and needs the export permission. Accounts and deals also need the `crm_import_export` flag while it is in beta.\n\n## A deal\'s stage history\n\n```bash\nkenso opportunities stage-history 77\nkenso opportunities stage-history 77 --query "entries[].{to: stageLabel, at: enteredAt, by: changedBy}"\n```\n\nIt prints `GET /v1/opportunities/{id}/stage-history` as it is, the same rows as the deal page and the MCP\'s `opportunities(operation="get-stage-history")`: the stage now, `isComplete` and `entries`, oldest first, each with `fromStage`, `stage`, `stageLabel`, `enteredAt`, `leftAt`, `durationSeconds`, `actorKind`, `actorMemberId` and Ken\'s `reason` on a move its stage judge made. With the `deal_stage_rules` flag on, each entry also has `changedBy` (`member`, `agent`, `api_key`, `workflow`, `stage_judge`, `crm_sync` or `ken_automation`), `crmProvider` on a CRM sync, and on a move `fromStageLabel` and `fromStageDurationSeconds`, how long the deal sat in the stage it left. `isComplete` false means Kenso has no record of part of the history.\n\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier\nkenso pipelines stage-rules proposal --none\nkenso pipelines stage-rules lost --default\n```\n\nWith the `deal_stage_rules` flag on, each stage can name the fields a deal should have in it. Without a stage the command prints every stage\'s `key`, `label`, `category`, `isArchived`, `requiredFields` and `isDefault`, plus `requirableFields`: `amount`, `closeDate`, `ownerMemberId`, `primaryPersonId`, `nextStep`, `lostReasonKey`, `wonReasonKey` and `custom.<key>` for each custom deal field. `--require` sets the stage\'s whole list, in order, at most 10. `--none` requires nothing, and `--default` goes back to the default: a lost stage asks for `lostReasonKey`, any other stage nothing. Setting a rule needs the `workspace_settings` permission. The same as the MCP\'s `opportunities(operation="stages-set-required-fields")`.\n\nA missing field never stops a move. The deal moves, and it is flagged Missing on the board, the list and the deal page until the field is filled. A rule also applies to deals already in the stage.\n\n## Tasks\n\nTasks are to-dos a member owes: a title, an optional due day or time, an assignee and at most one account, person or deal. They need the `tasks` flag. The app calls deals "Deals"; the CLI keeps `--deal` for an opportunity id.\n\n```bash\nkenso tasks add "Send the deck" --due tomorrow --account 812\nkenso tasks add "Call Ada back" --due friday --at 16:00 --person 501 --assignee ada@acme.com\nkenso tasks list --assignee me --due overdue,today\nkenso tasks queue --scope mine\nkenso tasks assign 7 me\nkenso tasks done 7 8 9\nkenso tasks done 7 --undo\n```\n\n- `tasks add` sends `POST /v1/tasks`. `--due` takes `today`, `tomorrow`, a weekday (the next one: `friday` or `fri`), a day (`2026-11-20`) or an ISO 8601 time; `--at HH:MM` puts a time on that day (today without `--due`). Day words and `--at` read this computer\'s clock and time zone (`TZ`); a time\'s day is read in the assignee\'s app time zone. `--assignee` takes `me`, a member id or an email; without it the task is yours.\n- `tasks done` completes each task it names, in order (`PATCH /v1/tasks/{id}` with `status: done`); `--undo` reopens them. `tasks assign` gives a task to `me`, a member id or a member\'s email; that member gets a `task_assigned` notification.\n- `tasks queue` is `task-queue list` under the name you would try: the Tasks screen\'s open work by due day, with `--scope mine|assigned_by_me|everyone`. It lists tasks, manual touches, call tasks, inbox threads with a reminder due (when you can view the Inbox) and Ken\'s follow-ups to you, each with 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';
|
|
7794
|
+
crm_default = '# CRM (beta)\n\nThe CRM commands work on Kenso\'s Accounts lane: accounts (companies), the people on them, and opportunities. They are beta: they need the `accounts` feature flag on your workspace (opportunities need `opportunities`, CRM sync needs `ingestion`). Help and `kenso describe` hide them until your workspace has the flag; `--all-commands` shows them.\n\n| Command | What it does |\n|---|---|\n| `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |\n| `people import` | Create or match people from a file, optionally onto accounts |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities move <id> --stage <key> [--reason <key>]` | Move a deal, 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| `deleted-accounts list`, `accounts restore <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved Accounts view, or what the filters match |\n| `capture status` | Your captured mailbox, its backfill progress and what teammates see of a captured email. Needs the `crm_capture` flag |\n| `capture connect` | Turn capture on for your own mailbox. `--private` starts it hidden from teammates; `--provider google` prints a sign-in link when no account is connected yet |\n| `capture private on\\|off` | Hide your captured email from teammates, or show it again. Email only: meetings stay visible. `--thread <id>` sets the switch for one thread |\n| `capture thread <threadId>` | One captured email thread: subject, people, time, Ken\'s summary, and each body you may open. The id is `capturedThread.id` on a timeline row |\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| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n| `tasks add`, `tasks done`, `tasks assign`, `tasks queue` | Add a to-do for a member on an account, person or deal, complete it, hand it on, or read your open work (needs `tasks`) |\n\nImport accounts first, then people: `people import` never creates an account.\n\n## Import accounts\n\n```bash\nkenso accounts import --file accounts.csv\nkenso accounts import --file accounts.csv --yes\n```\n\n```csv\nname,domain,industry,employeeCount\nAcme,acme.io,Software,120\nGlobex,globex.com,Manufacturing,"1,200"\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `name` (or `company`, `companyName`, `accountName`), `domains` (several, split on `,` or `;`) or one `domain` (or `website`, `companyDomain`), `industry`, `employeeCount`, `hqLocation`, `linkedinUrl`, `stage`, `angle`, `whyNow`, `fitScore`, `fundingRound`, `cadenceDays`, `ownerMemberId`, `kenCompanyId`, `sendsFromInboxId`, `sendsFromLinkedInAccountId` and `source`.\n- **A domain is required.** A file with no domain column is a usage error, and a row without a domain is `invalid` (`domain_required`).\n- **The dry run prices the research.** It asks for a credit estimate per 1,000 accounts and puts the sum in the plan: `kind`, `accountCount`, `totalMillicredits`, `availableMillicredits` and `sufficient`.\n- **Rows go 100 per call** to `POST /v1/accounts/bulk-create`.\n\nEach row comes back `created` (`id` is the new account; its research is queued, `researchQueued`, or waits for credits, `researchWaitingCredits`), `skipped` with reason `domain_taken` (already an account; `id` is that account) or `failed` (`reason` is the API\'s code, `error` names the field; an item Kenso failed to save is sent once more first). Rerunning the same file is safe: accounts that exist come back `domain_taken`.\n\n## Import people\n\n```bash\nkenso people import --file people.csv\nkenso people import --file people.csv --find-emails --yes\nkenso people import --file people.jsonl --dry-run\n```\n\n```csv\nfullName,email,title,accountDomain,role\nAnn Lee,ann@acme.io,VP Sales,acme.io,champion\nBob Ray,,CTO,acme.io,\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `email`, `fullName` (or `name`), `firstName`, `lastName`, `title`, `linkedinUrl` (or `linkedin`, `profileUrl`), `accountDomain` (or `domain`, `website`, `companyDomain`), `accountId`, `role` and `priority`. Other columns are ignored with one warning.\n- **A person needs a name:** `fullName`, or `firstName`, `lastName` or both (the CLI joins them). A row with none of them is `invalid` (`name_required`).\n- **To put a person on an account,** give `accountDomain` or `accountId`. A row with both sends only `accountId`.\n- **`--find-emails`** queues an email find (charged in credits) for each person without an email.\n- **Rows go 200 per call** to `POST /v1/people/batch`.\n\nPeople already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nobody twice. A row comes back `created` (a new person), `updated` (an existing person added to the account), `skipped` with reason `already_on_account`, `matched` (no account asked) or `previously_removed`, or `failed`: `account_not_found` saves the person without an account (import the account, then rerun to place them), any other reason is the API\'s. The summary adds `matched`, `addedToAccounts` and `emailFindsQueued`.\n\n## List and search accounts\n\n`accounts list` and `accounts search` sort and page on the server, so they reach every account in the workspace, however many there are.\n\n```bash\nkenso accounts list --sort score:desc --limit 100 # one page; the output\'s next: line is the following one\nkenso accounts list --sort score:desc --limit 100 --all # every page, to the end\nkenso accounts search --search hiring --sort latestSignalAt:desc --data \'{"qFields": ["name", "latestSignal"]}\'\nkenso accounts search --limit 1 --data \'{"countBy": ["stage"]}\' # how many accounts sit in each stage\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}]}, "sort": "tier,-pipelineAmount"}\' --all\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "hqLocation", "operator": "contains", "values": ["Germany"]}]}}\' --all\n# tier 1 accounts with no meeting in 30 days: none since then, or none ever\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}, {"match": "any", "conditions": [{"field": "lastMeeting", "operator": "older_than_days", "values": ["30"]}, {"field": "lastMeeting", "operator": "is_empty"}]}]}}\' --all\n```\n\n- **`--sort`** takes up to 3 comma-separated keys, each `field` (ascending), `field:asc` or `field:desc`. The API\'s `-field` form needs the equals sign here, `--sort=-score`, because a value that starts with a dash reads as a flag. Fields: `createdAt`, `name`, `score`, `tier` (ascending is tier 1 first), `latestSignalAt`, `committee`, `pipelineAmount`, `nextTouchAt`, `lastTouchAt`. An account with no value for a key comes last in both directions. The default is `-createdAt`.\n- **`--limit`** is 1 to 1000 (default 50). `--cursor` takes the previous page\'s `nextCursor` with the same filters and sort; `--all` follows the cursors for you.\n- **`--search`** (also `--q`) matches the name or a domain.\n- **Lists and objects go in `--data`** on `search`, as the API takes them (`kenso describe accounts search`); a flag beside it sets or replaces one key:\n - `qFields` picks where the search text looks: `name`, `domain`, `latestSignal` (the latest signal\'s title).\n - `countBy` (`stage`, `stageGroup`) adds `counts` to the output: every value with the number of matching accounts that hold it, whatever the page. The output is then one object: `data`, `pagination` and `counts`.\n - `filters` and `where` narrow the accounts.\n\nAn account\'s timeline pages the same way. `kenso accounts activity 812` returns the newest 100 earlier rows and, when older ones exist, `data.nextCursor`. Pass it back as `--cursor` (with the same `--category`) for the rows before them, until a page comes without one.\n\n## Edit accounts, people and opportunities\n\nApart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command\'s flags by API name or flag name, and the id column fills the route:\n\n```bash\nkenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes\nkenso people update --each people-edit.csv --dry-run\nkenso opportunities update --each deals.csv --dry-run\n```\n\n```csv\naccountId,stage,ownerMemberId,overwritePinned\n501,engaged,42,true\n502,customer,42,true\n```\n\nA row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person\'s OK). Every flag of an update command: `kenso accounts update --help`.\n\n## Search opportunities\n\n`kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.\n\n```bash\nkenso opportunities search --data \'{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}\' --all\nkenso opportunities search --data \'{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}\'\nkenso opportunities search --limit 1 --data \'{"countBy": ["stage", "ownerMemberId"]}\' # how many opportunities hold each value\n```\n\n- **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.\n- **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.\n- `--account-id` keeps the search to one account. `closeDate` counts days in the member\'s app time zone.\n\nOne person\'s deals, meetings and campaign contacts, as their person page lists them:\n\n```bash\nkenso opportunities list --person-id 9001 # the deals they are on, or are the primary person of\nkenso meetings list --person-id 9001 # the meetings they attend, among the ones you can see\nkenso contacts list --person-id 9001 # their contact in each campaign they are in\n```\n\n## Write research you gathered\n\n`accounts write-research` and `people write-research` store research you gathered outside Kenso as the record\'s latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account\'s own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.\n\nThe body is the research block `accounts get --expand research` (or `people get-research`) returns, without its read-only fields: leave out `id`, `status`, `trigger`, `errorCode`, `researchedAt`, `isStale` and `appliedPrompt` (for a person also `mode`, `requestedAt`, `researchedMode`, `firecrawlCredits` and `webNote`), or the write fails with `unknown_field`. Pass it with `--data @file`:\n\n```bash\nkenso accounts write-research --account-id 501 --data @acme-dossier.json\nkenso people write-research --person-id 9001 --data @jane.json\n```\n\n```json\n{\n "tagline": { "text": "Payroll for EU contractors", "sourceUrls": ["https://acme.example"] },\n "description": { "text": "Acme runs payroll and compliance for companies hiring contractors in 30 EU countries.", "sourceUrls": ["https://acme.example"] },\n "links": { "website": "https://acme.example" },\n "whyNow": { "text": "Raised a $40M Series B in October", "sourceUrls": ["https://news.example/acme-b"], "date": "2026-10" },\n "fitScore": 82,\n "angle": "Lead with contractor onboarding time."\n}\n```\n\nMany records: one JSONL line per record, with the id next to the block\'s fields. Nested objects are sent as written. Use JSONL, not CSV: the block\'s fields are objects and lists, which a CSV cell cannot carry.\n\n```bash\nkenso accounts write-research --each dossiers.jsonl --dry-run # then the same with --yes\nkenso people write-research --each people-research.jsonl --yes --concurrency 8\n```\n\n```jsonl\n{"accountId": 501, "tagline": {"text": "Payroll for EU contractors"}, "links": {"website": "https://acme.example"}}\n{"accountId": 502, "description": {"text": "Cloud cost tooling for retailers."}, "links": {"website": "https://beta.example"}}\n```\n\nA row fails as a whole with the API\'s code: `validation_failed` (an unknown field is `unknown_field`, and `error.details` names every bad field), `research_in_progress` (`409`: Ken is researching that record now, write it again once the run ends; an account run waiting for credits counts too: it runs once the workspace has credits, and the write stays refused until that run ends) or `not_found`. Rerunning a file is safe: each write replaces the record\'s research shown.\n\n## CRM sync\n\nCRM sync has generated commands only: read connections, preview, start an import, and work through sync issues. Connect the CRM itself in the app.\n\n```bash\nkenso crm-connections list\nkenso crm-connections get --connection-id 7\nkenso crm-imports create --connection-id 7 --dry-run\nkenso crm-sync-issues list --connection-id 7 --all\n```\n\nRun `kenso crm-connections --help` (or add `--all-commands` when the actions are hidden) to see every action.\n\n## Pipelines\n\nA workspace with the `pipelines` flag on can run several deal pipelines, each with its own stages. These are generated commands (beta):\n\n```bash\nkenso pipelines list\nkenso pipelines list --query "[].{id: id, name: name, default: isDefault, stages: stages[].key}"\nkenso pipelines get --pipeline-id 5\n```\n\n`list` prints every pipeline in display order, archived ones included: `id`, `name`, `routingRule` (the one sentence Ken reads to decide whether a new deal belongs there), `isDefault`, `isArchived`, `position`, `opportunityCount`, `amountTotal` and `stages`, each stage as `kenso opportunity-stages list` prints it. A stage key is unique in the workspace, across pipelines, so a deal\'s `stage` names its pipeline and its `pipelineId` repeats it. The first read turns the workspace\'s stage list into its default pipeline, named Sales, with every deal in it. The same rows as the MCP\'s `pipelines(operation="list")`.\n\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\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- **`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## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore 812\n```\n\nA deleted account can be restored for 30 days. `deleted-accounts list` shows each one with who deleted it, `expiresAt` (restore works until then) and what comes back: `personCount`, `opportunityCount` and `touchCount`. `accounts restore <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. A domain another account took since stays with that account and is listed in `domainsTaken`. A merged account is not listed and cannot be restored: a merge has no undo. Both commands are behind the `crm_import_export` feature flag (`404` while it is off).\n\n## Export accounts, people or deals\n\n```bash\nkenso export accounts --out accounts.csv\nkenso export accounts --view 12 --out tier-1.csv\nkenso export deals --filters \'[{"field":"stageCategory","operator":"is","values":["open"]}]\' > open-deals.csv\n```\n\nIt writes the CSV that `POST /v1/accounts/export`, `/v1/people/export` or `/v1/opportunities/export` returns, to stdout or to `--out` (then it prints the file and its row count). With no filter it exports every record. More than 50,000 rows is refused: narrow the filters. `--view <id>` exports a saved Accounts view (`kenso account-views list` shows the ids). `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields, so a deals or people view exports with its filters and sort. The accounts and deals files start with `id` and import back as they are. Each export writes an audit-log entry and needs the export permission. Accounts and deals also need the `crm_import_export` flag while it is in beta.\n\n## A deal\'s stage history\n\n```bash\nkenso opportunities stage-history 77\nkenso opportunities stage-history 77 --query "entries[].{to: stageLabel, at: enteredAt, by: changedBy}"\n```\n\nIt prints `GET /v1/opportunities/{id}/stage-history` as it is, the same rows as the deal page and the MCP\'s `opportunities(operation="get-stage-history")`: the stage now, `isComplete` and `entries`, oldest first, each with `fromStage`, `stage`, `stageLabel`, `enteredAt`, `leftAt`, `durationSeconds`, `actorKind`, `actorMemberId` and Ken\'s `reason` on a move its stage judge made. With the `deal_stage_rules` flag on, each entry also has `changedBy` (`member`, `agent`, `api_key`, `workflow`, `stage_judge`, `crm_sync` or `ken_automation`), `crmProvider` on a CRM sync, and on a move `fromStageLabel` and `fromStageDurationSeconds`, how long the deal sat in the stage it left. `isComplete` false means Kenso has no record of part of the history.\n\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier\nkenso pipelines stage-rules proposal --none\nkenso pipelines stage-rules lost --default\n```\n\nWith the `deal_stage_rules` flag on, each stage can name the fields a deal should have in it. Without a stage the command prints every stage\'s `key`, `label`, `category`, `isArchived`, `requiredFields` and `isDefault`, plus `requirableFields`: `amount`, `closeDate`, `ownerMemberId`, `primaryPersonId`, `nextStep`, `lostReasonKey`, `wonReasonKey` and `custom.<key>` for each custom deal field. `--require` sets the stage\'s whole list, in order, at most 10. `--none` requires nothing, and `--default` goes back to the default: a lost stage asks for `lostReasonKey`, any other stage nothing. Setting a rule needs the `workspace_settings` permission. The same as the MCP\'s `opportunities(operation="stages-set-required-fields")`.\n\nA missing field never stops a move. The deal moves, and it is flagged Missing on the board, the list and the deal page until the field is filled. A rule also applies to deals already in the stage.\n\n```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## Tasks\n\nTasks are to-dos a member owes: a title, an optional due day or time, an assignee and at most one account, person or deal. They need the `tasks` flag. The app calls deals "Deals"; the CLI keeps `--deal` for an opportunity id.\n\n```bash\nkenso tasks add "Send the deck" --due tomorrow --account 812\nkenso tasks add "Call Ada back" --due friday --at 16:00 --person 501 --assignee ada@acme.com\nkenso tasks list --assignee me --due overdue,today\nkenso tasks queue --scope mine\nkenso tasks assign 7 me\nkenso tasks done 7 8 9\nkenso tasks done 7 --undo\n```\n\n- `tasks add` sends `POST /v1/tasks`. `--due` takes `today`, `tomorrow`, a weekday (the next one: `friday` or `fri`), a day (`2026-11-20`) or an ISO 8601 time; `--at HH:MM` puts a time on that day (today without `--due`). Day words and `--at` read this computer\'s clock and time zone (`TZ`); a time\'s day is read in the assignee\'s app time zone. `--assignee` takes `me`, a member id or an email; without it the task is yours.\n- `tasks done` completes each task it names, in order (`PATCH /v1/tasks/{id}` with `status: done`); `--undo` reopens them. `tasks assign` gives a task to `me`, a member id or a member\'s email; that member gets a `task_assigned` notification.\n- `tasks queue` is `task-queue list` under the name you would try: the Tasks screen\'s open work by due day, with `--scope mine|assigned_by_me|everyone`. It lists tasks, manual touches, call tasks, inbox threads with a reminder due (when you can view the Inbox) and Ken\'s follow-ups to you, each with 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';
|
|
7788
7795
|
}
|
|
7789
7796
|
});
|
|
7790
7797
|
|
|
@@ -8976,8 +8983,8 @@ var init_browser_login = __esm({
|
|
|
8976
8983
|
defaultDeps = {
|
|
8977
8984
|
sleep: (ms, signal) => delay2(ms, void 0, signal ? { signal } : void 0),
|
|
8978
8985
|
now: () => Date.now(),
|
|
8979
|
-
spawn: (
|
|
8980
|
-
const child = nodeSpawn(
|
|
8986
|
+
spawn: (command61, args) => {
|
|
8987
|
+
const child = nodeSpawn(command61, args, { detached: true, stdio: "ignore" });
|
|
8981
8988
|
child.on("error", () => {
|
|
8982
8989
|
});
|
|
8983
8990
|
child.unref();
|
|
@@ -10241,8 +10248,8 @@ var init_run = __esm({
|
|
|
10241
10248
|
defaultDeps2 = {
|
|
10242
10249
|
sleep: (ms, signal) => delay3(ms, void 0, signal ? { signal } : void 0),
|
|
10243
10250
|
now: () => Date.now(),
|
|
10244
|
-
spawn: (
|
|
10245
|
-
const child = nodeSpawn2(
|
|
10251
|
+
spawn: (command61, args) => {
|
|
10252
|
+
const child = nodeSpawn2(command61, args, { detached: true, stdio: "ignore" });
|
|
10246
10253
|
child.on("error", () => {
|
|
10247
10254
|
});
|
|
10248
10255
|
child.unref();
|
|
@@ -10283,9 +10290,9 @@ function stringFlag2(flags, name) {
|
|
|
10283
10290
|
const text4 = value.trim();
|
|
10284
10291
|
return text4 === "" ? void 0 : text4;
|
|
10285
10292
|
}
|
|
10286
|
-
function requireFlag(flags, name,
|
|
10293
|
+
function requireFlag(flags, name, command61, hint) {
|
|
10287
10294
|
const value = stringFlag2(flags, name);
|
|
10288
|
-
if (value === void 0) throw usageError(`--${name} is required for ${
|
|
10295
|
+
if (value === void 0) throw usageError(`--${name} is required for ${command61}.`, { field: name, next: `${command61} --help`, ...hint ? { hint } : {} });
|
|
10289
10296
|
return value;
|
|
10290
10297
|
}
|
|
10291
10298
|
function positiveId(value) {
|
|
@@ -10294,8 +10301,8 @@ function positiveId(value) {
|
|
|
10294
10301
|
const id = Number(text4);
|
|
10295
10302
|
return Number.isSafeInteger(id) && id > 0 ? id : void 0;
|
|
10296
10303
|
}
|
|
10297
|
-
function idFlag(flags, name,
|
|
10298
|
-
const raw = requireFlag(flags, name,
|
|
10304
|
+
function idFlag(flags, name, command61) {
|
|
10305
|
+
const raw = requireFlag(flags, name, command61);
|
|
10299
10306
|
const id = positiveId(raw);
|
|
10300
10307
|
if (id === void 0) throw usageError(`--${name} must be a positive whole number (got "${raw}").`, { field: name });
|
|
10301
10308
|
return id;
|
|
@@ -10315,8 +10322,8 @@ function isDryRun(ctx) {
|
|
|
10315
10322
|
function shellQuote4(value) {
|
|
10316
10323
|
return /^[A-Za-z0-9_\-.,:/@=+%]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
|
|
10317
10324
|
}
|
|
10318
|
-
function sameCommand2(
|
|
10319
|
-
const parts2 = [
|
|
10325
|
+
function sameCommand2(command61, flags, ctx, extra = []) {
|
|
10326
|
+
const parts2 = [command61];
|
|
10320
10327
|
for (const [name, value] of Object.entries(flags)) {
|
|
10321
10328
|
if (value === void 0 || value === false) continue;
|
|
10322
10329
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -11453,12 +11460,12 @@ import { join as join11 } from "node:path";
|
|
|
11453
11460
|
function whereDir(env) {
|
|
11454
11461
|
return join11(runsRoot(env), WHERE_DIR);
|
|
11455
11462
|
}
|
|
11456
|
-
async function unfinishedWhereIds(ctx,
|
|
11463
|
+
async function unfinishedWhereIds(ctx, command61, args) {
|
|
11457
11464
|
const dir = whereDir(ctx.env);
|
|
11458
11465
|
const identity = argsIdentity(args);
|
|
11459
11466
|
const workspaceId = ctx.client.workspaceId ?? ctx.auth.workspaceId;
|
|
11460
11467
|
for (const run of await listRuns(ctx.env)) {
|
|
11461
|
-
if (run.command !==
|
|
11468
|
+
if (run.command !== command61 || run.status === "done" || run.status === "planned") continue;
|
|
11462
11469
|
if ((run.workspaceId || void 0) !== (workspaceId || void 0) || argsIdentity(run.args) !== identity) continue;
|
|
11463
11470
|
if (run.inputPath?.startsWith(`${dir}/`) && existsSync6(run.inputPath)) return run.inputPath;
|
|
11464
11471
|
}
|
|
@@ -11604,14 +11611,14 @@ async function idsFromRun(ctx, runId) {
|
|
|
11604
11611
|
return { ...idItems(ids2), source: "run" };
|
|
11605
11612
|
}
|
|
11606
11613
|
async function collectIds(ctx, flags, kind, dryRun2) {
|
|
11607
|
-
const
|
|
11614
|
+
const command61 = `kenso contacts ${kind}`;
|
|
11608
11615
|
const ids2 = stringFlag2(flags, "ids");
|
|
11609
11616
|
const where = kind === "restore" ? void 0 : stringFlag2(flags, "where");
|
|
11610
11617
|
const run = kind === "restore" ? stringFlag2(flags, "run") : void 0;
|
|
11611
11618
|
const given = [ids2, where, run].filter((v) => v !== void 0).length;
|
|
11612
11619
|
if (given !== 1) {
|
|
11613
11620
|
const choices = kind === "restore" ? "--ids <file|-> or --run <runId>" : "--ids <file|-> or --where '<json>'";
|
|
11614
|
-
throw usageError(`${
|
|
11621
|
+
throw usageError(`${command61} needs exactly one of ${choices}.`, { field: "ids", next: `${command61} --help` });
|
|
11615
11622
|
}
|
|
11616
11623
|
if (ids2 !== void 0) return idsFromFile(ctx, ids2);
|
|
11617
11624
|
if (where !== void 0) return idsFromWhere(ctx, kind, flags, where, dryRun2);
|
|
@@ -12913,19 +12920,95 @@ var init_mcp = __esm({
|
|
|
12913
12920
|
}
|
|
12914
12921
|
});
|
|
12915
12922
|
|
|
12923
|
+
// src/commands/opportunities/move.ts
|
|
12924
|
+
var move_exports = {};
|
|
12925
|
+
__export(move_exports, {
|
|
12926
|
+
default: () => move_default
|
|
12927
|
+
});
|
|
12928
|
+
async function categoryOf(ctx, stage) {
|
|
12929
|
+
const stages = await ctx.client.request({ method: "GET", path: "/v1/opportunity-stages", signal: ctx.signal });
|
|
12930
|
+
const found = (unwrap(stages.body).items ?? []).find((s) => s.key === stage);
|
|
12931
|
+
if (found) return found.category;
|
|
12932
|
+
try {
|
|
12933
|
+
const pipelines = await ctx.client.request({ method: "GET", path: "/v1/pipelines", signal: ctx.signal });
|
|
12934
|
+
const all = (unwrap(pipelines.body).items ?? []).flatMap((p) => p.stages ?? []);
|
|
12935
|
+
return all.find((s) => s.key === stage)?.category;
|
|
12936
|
+
} catch (err) {
|
|
12937
|
+
if (err instanceof KensoError && (err.httpStatus === 403 || err.httpStatus === 404)) return void 0;
|
|
12938
|
+
throw err;
|
|
12939
|
+
}
|
|
12940
|
+
}
|
|
12941
|
+
var KEY, command28, move_default;
|
|
12942
|
+
var init_move = __esm({
|
|
12943
|
+
"src/commands/opportunities/move.ts"() {
|
|
12944
|
+
"use strict";
|
|
12945
|
+
init_errors();
|
|
12946
|
+
init_exit_codes();
|
|
12947
|
+
init_http();
|
|
12948
|
+
KEY = /^[a-z][a-z0-9_]{0,62}$/;
|
|
12949
|
+
command28 = {
|
|
12950
|
+
resource: "opportunities",
|
|
12951
|
+
action: "move",
|
|
12952
|
+
summary: "Move a deal to a stage, with its won or lost reason",
|
|
12953
|
+
description: "Sends PATCH /v1/opportunities/{opportunityId} with stage, and with --reason the reason key as wonReasonKey for a won stage or lostReasonKey for a lost stage (it reads GET /v1/opportunity-stages, and GET /v1/pipelines for a stage of another pipeline, to tell which; an open stage takes no reason). Reason keys come from kenso opportunity-reasons get. Prints the deal. A move never waits for a field the stage asks for: the deal moves, each missing field prints a warning on stderr, and the deal is flagged Missing until the field is filled (kenso opportunities list --missing-fields).",
|
|
12954
|
+
flags: {
|
|
12955
|
+
stage: { type: "string", description: "The stage key to move to (kenso opportunity-stages list lists them)" },
|
|
12956
|
+
reason: { type: "string", description: "A won or lost reason key (kenso opportunity-reasons get)" }
|
|
12957
|
+
},
|
|
12958
|
+
positionals: [{ name: "opportunityId", description: "The deal's id" }],
|
|
12959
|
+
examples: [
|
|
12960
|
+
"kenso opportunities move 4401 --stage proposal",
|
|
12961
|
+
"kenso opportunities move 4401 --stage lost --reason no_budget"
|
|
12962
|
+
],
|
|
12963
|
+
beta: { featureGates: { all: ["opportunities"] } },
|
|
12964
|
+
operationIds: ["opportunities.update", "opportunity-stages.list", "pipelines.list"],
|
|
12965
|
+
async run(ctx, { flags, positionals }) {
|
|
12966
|
+
const id = (positionals[0] ?? "").trim();
|
|
12967
|
+
const stage = typeof flags.stage === "string" ? flags.stage.trim() : "";
|
|
12968
|
+
const reason = typeof flags.reason === "string" ? flags.reason.trim() : void 0;
|
|
12969
|
+
const next = "kenso opportunities move <opportunityId> --stage <key> [--reason <key>]";
|
|
12970
|
+
if (!/^[1-9]\d*$/.test(id)) throw usageError("Pass the deal's id: " + next, { field: "opportunityId", next });
|
|
12971
|
+
if (!KEY.test(stage)) throw usageError("Pass --stage with a stage key (kenso opportunity-stages list lists them).", { field: "stage", next });
|
|
12972
|
+
if (reason !== void 0 && !KEY.test(reason)) {
|
|
12973
|
+
throw usageError(`"${reason}" is not a reason key. Read the keys with kenso opportunity-reasons get.`, { field: "reason", next });
|
|
12974
|
+
}
|
|
12975
|
+
const body2 = { stage };
|
|
12976
|
+
if (reason !== void 0) {
|
|
12977
|
+
const category = await categoryOf(ctx, stage);
|
|
12978
|
+
if (category !== "won" && category !== "lost") {
|
|
12979
|
+
throw usageError(`Only a won or lost stage takes a reason; "${stage}" is ${category ? "an open stage" : "not a stage"}.`, {
|
|
12980
|
+
field: "reason",
|
|
12981
|
+
next
|
|
12982
|
+
});
|
|
12983
|
+
}
|
|
12984
|
+
body2[category === "won" ? "wonReasonKey" : "lostReasonKey"] = reason;
|
|
12985
|
+
}
|
|
12986
|
+
const res = await ctx.client.request({ method: "PATCH", path: `/v1/opportunities/${id}`, body: body2, signal: ctx.signal });
|
|
12987
|
+
const answer = res.body;
|
|
12988
|
+
for (const warning of answer?.warnings ?? []) {
|
|
12989
|
+
if (typeof warning?.message === "string") ctx.output.warn(warning.message);
|
|
12990
|
+
}
|
|
12991
|
+
ctx.output.object(unwrap(res.body));
|
|
12992
|
+
return ExitCode.Ok;
|
|
12993
|
+
}
|
|
12994
|
+
};
|
|
12995
|
+
move_default = command28;
|
|
12996
|
+
}
|
|
12997
|
+
});
|
|
12998
|
+
|
|
12916
12999
|
// src/commands/opportunities/stage-history.ts
|
|
12917
13000
|
var stage_history_exports = {};
|
|
12918
13001
|
__export(stage_history_exports, {
|
|
12919
13002
|
default: () => stage_history_default
|
|
12920
13003
|
});
|
|
12921
|
-
var
|
|
13004
|
+
var command29, stage_history_default;
|
|
12922
13005
|
var init_stage_history = __esm({
|
|
12923
13006
|
"src/commands/opportunities/stage-history.ts"() {
|
|
12924
13007
|
"use strict";
|
|
12925
13008
|
init_errors();
|
|
12926
13009
|
init_exit_codes();
|
|
12927
13010
|
init_http();
|
|
12928
|
-
|
|
13011
|
+
command29 = {
|
|
12929
13012
|
resource: "opportunities",
|
|
12930
13013
|
action: "stage-history",
|
|
12931
13014
|
summary: "Show a deal's stage history: each stage, when, who moved it and how long it sat there",
|
|
@@ -12949,7 +13032,7 @@ var init_stage_history = __esm({
|
|
|
12949
13032
|
return ExitCode.Ok;
|
|
12950
13033
|
}
|
|
12951
13034
|
};
|
|
12952
|
-
stage_history_default =
|
|
13035
|
+
stage_history_default = command29;
|
|
12953
13036
|
}
|
|
12954
13037
|
});
|
|
12955
13038
|
|
|
@@ -12959,6 +13042,7 @@ var init_opportunities = __esm({
|
|
|
12959
13042
|
"src/commands/opportunities/index.ts"() {
|
|
12960
13043
|
"use strict";
|
|
12961
13044
|
actions17 = {
|
|
13045
|
+
move: () => Promise.resolve().then(() => (init_move(), move_exports)).then((m) => m.default),
|
|
12962
13046
|
"stage-history": () => Promise.resolve().then(() => (init_stage_history(), stage_history_exports)).then((m) => m.default)
|
|
12963
13047
|
};
|
|
12964
13048
|
}
|
|
@@ -13035,7 +13119,7 @@ function summarize3(results) {
|
|
|
13035
13119
|
}
|
|
13036
13120
|
return { matched, addedToAccounts, emailFindsQueued };
|
|
13037
13121
|
}
|
|
13038
|
-
var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND,
|
|
13122
|
+
var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND, command30, import_default3;
|
|
13039
13123
|
var init_import3 = __esm({
|
|
13040
13124
|
"src/commands/people/import.ts"() {
|
|
13041
13125
|
"use strict";
|
|
@@ -13067,7 +13151,7 @@ var init_import3 = __esm({
|
|
|
13067
13151
|
};
|
|
13068
13152
|
PERSON_FIELDS = ["email", "fullName", "firstName", "lastName", "linkedinUrl", "title"];
|
|
13069
13153
|
ACCOUNT_NOT_FOUND = "No account in this workspace has that domain. The person was saved without an account: add the account (kenso accounts import) and run the same command again.";
|
|
13070
|
-
|
|
13154
|
+
command30 = {
|
|
13071
13155
|
resource: "people",
|
|
13072
13156
|
action: "import",
|
|
13073
13157
|
summary: "Create or match people from a CSV or JSONL file, optionally onto accounts",
|
|
@@ -13132,7 +13216,7 @@ var init_import3 = __esm({
|
|
|
13132
13216
|
return outcome.exitCode;
|
|
13133
13217
|
}
|
|
13134
13218
|
};
|
|
13135
|
-
import_default3 =
|
|
13219
|
+
import_default3 = command30;
|
|
13136
13220
|
}
|
|
13137
13221
|
});
|
|
13138
13222
|
|
|
@@ -13162,14 +13246,14 @@ function rule(stage) {
|
|
|
13162
13246
|
isDefault: stage.isDefaultRequiredFields
|
|
13163
13247
|
};
|
|
13164
13248
|
}
|
|
13165
|
-
var
|
|
13249
|
+
var command31, stage_rules_default;
|
|
13166
13250
|
var init_stage_rules = __esm({
|
|
13167
13251
|
"src/commands/pipelines/stage-rules.ts"() {
|
|
13168
13252
|
"use strict";
|
|
13169
13253
|
init_errors();
|
|
13170
13254
|
init_exit_codes();
|
|
13171
13255
|
init_http();
|
|
13172
|
-
|
|
13256
|
+
command31 = {
|
|
13173
13257
|
resource: "pipelines",
|
|
13174
13258
|
action: "stage-rules",
|
|
13175
13259
|
summary: "List or set the fields a deal should have in each stage",
|
|
@@ -13222,7 +13306,7 @@ var init_stage_rules = __esm({
|
|
|
13222
13306
|
return ExitCode.Ok;
|
|
13223
13307
|
}
|
|
13224
13308
|
};
|
|
13225
|
-
stage_rules_default =
|
|
13309
|
+
stage_rules_default = command31;
|
|
13226
13310
|
}
|
|
13227
13311
|
});
|
|
13228
13312
|
|
|
@@ -13242,7 +13326,7 @@ var run_exports2 = {};
|
|
|
13242
13326
|
__export(run_exports2, {
|
|
13243
13327
|
default: () => run_default
|
|
13244
13328
|
});
|
|
13245
|
-
var REPORTS,
|
|
13329
|
+
var REPORTS, command32, run_default;
|
|
13246
13330
|
var init_run2 = __esm({
|
|
13247
13331
|
"src/commands/reports/run.ts"() {
|
|
13248
13332
|
"use strict";
|
|
@@ -13250,7 +13334,7 @@ var init_run2 = __esm({
|
|
|
13250
13334
|
init_exit_codes();
|
|
13251
13335
|
init_http();
|
|
13252
13336
|
REPORTS = ["pipeline_by_stage", "won_by_month", "stage_conversion", "time_in_stage", "won_by_source_campaign", "activity_by_member"];
|
|
13253
|
-
|
|
13337
|
+
command32 = {
|
|
13254
13338
|
resource: "reports",
|
|
13255
13339
|
action: "run",
|
|
13256
13340
|
summary: "Run a stock pipeline report and print its table",
|
|
@@ -13312,7 +13396,7 @@ var init_run2 = __esm({
|
|
|
13312
13396
|
return ExitCode.Ok;
|
|
13313
13397
|
}
|
|
13314
13398
|
};
|
|
13315
|
-
run_default =
|
|
13399
|
+
run_default = command32;
|
|
13316
13400
|
}
|
|
13317
13401
|
});
|
|
13318
13402
|
|
|
@@ -13321,14 +13405,14 @@ var summary_exports = {};
|
|
|
13321
13405
|
__export(summary_exports, {
|
|
13322
13406
|
default: () => summary_default
|
|
13323
13407
|
});
|
|
13324
|
-
var
|
|
13408
|
+
var command33, summary_default;
|
|
13325
13409
|
var init_summary = __esm({
|
|
13326
13410
|
"src/commands/reports/summary.ts"() {
|
|
13327
13411
|
"use strict";
|
|
13328
13412
|
init_errors();
|
|
13329
13413
|
init_exit_codes();
|
|
13330
13414
|
init_http();
|
|
13331
|
-
|
|
13415
|
+
command33 = {
|
|
13332
13416
|
resource: "reports",
|
|
13333
13417
|
action: "summary",
|
|
13334
13418
|
summary: "Read where the period stands and what needs you",
|
|
@@ -13383,7 +13467,7 @@ var init_summary = __esm({
|
|
|
13383
13467
|
return ExitCode.Ok;
|
|
13384
13468
|
}
|
|
13385
13469
|
};
|
|
13386
|
-
summary_default =
|
|
13470
|
+
summary_default = command33;
|
|
13387
13471
|
}
|
|
13388
13472
|
});
|
|
13389
13473
|
|
|
@@ -13404,14 +13488,14 @@ var list_exports = {};
|
|
|
13404
13488
|
__export(list_exports, {
|
|
13405
13489
|
default: () => list_default
|
|
13406
13490
|
});
|
|
13407
|
-
var
|
|
13491
|
+
var command34, list_default;
|
|
13408
13492
|
var init_list = __esm({
|
|
13409
13493
|
"src/commands/runs/list.ts"() {
|
|
13410
13494
|
"use strict";
|
|
13411
13495
|
init_runs();
|
|
13412
13496
|
init_errors();
|
|
13413
13497
|
init_exit_codes();
|
|
13414
|
-
|
|
13498
|
+
command34 = {
|
|
13415
13499
|
resource: "runs",
|
|
13416
13500
|
action: "list",
|
|
13417
13501
|
summary: "List batch runs, newest first (finds an interrupted run)",
|
|
@@ -13432,7 +13516,7 @@ var init_list = __esm({
|
|
|
13432
13516
|
return ExitCode.Ok;
|
|
13433
13517
|
}
|
|
13434
13518
|
};
|
|
13435
|
-
list_default =
|
|
13519
|
+
list_default = command34;
|
|
13436
13520
|
}
|
|
13437
13521
|
});
|
|
13438
13522
|
|
|
@@ -13443,7 +13527,7 @@ __export(show_exports2, {
|
|
|
13443
13527
|
});
|
|
13444
13528
|
import { existsSync as existsSync7, readFileSync as readFileSync9 } from "node:fs";
|
|
13445
13529
|
import { join as join12 } from "node:path";
|
|
13446
|
-
var FILES,
|
|
13530
|
+
var FILES, command35, show_default2;
|
|
13447
13531
|
var init_show2 = __esm({
|
|
13448
13532
|
"src/commands/runs/show.ts"() {
|
|
13449
13533
|
"use strict";
|
|
@@ -13458,7 +13542,7 @@ var init_show2 = __esm({
|
|
|
13458
13542
|
["plan", "plan.json"],
|
|
13459
13543
|
["summary", "summary.json"]
|
|
13460
13544
|
];
|
|
13461
|
-
|
|
13545
|
+
command35 = {
|
|
13462
13546
|
resource: "runs",
|
|
13463
13547
|
action: "show",
|
|
13464
13548
|
summary: "Show one batch run and its files",
|
|
@@ -13485,7 +13569,7 @@ var init_show2 = __esm({
|
|
|
13485
13569
|
return ExitCode.Ok;
|
|
13486
13570
|
}
|
|
13487
13571
|
};
|
|
13488
|
-
show_default2 =
|
|
13572
|
+
show_default2 = command35;
|
|
13489
13573
|
}
|
|
13490
13574
|
});
|
|
13491
13575
|
|
|
@@ -13544,14 +13628,14 @@ function resumeArgv(run, globals = {}) {
|
|
|
13544
13628
|
async function sha256(path) {
|
|
13545
13629
|
return createHash5("sha256").update(await readFile9(path)).digest("hex");
|
|
13546
13630
|
}
|
|
13547
|
-
var SKIPPED_KEYS,
|
|
13631
|
+
var SKIPPED_KEYS, command36, resume_default;
|
|
13548
13632
|
var init_resume = __esm({
|
|
13549
13633
|
"src/commands/runs/resume.ts"() {
|
|
13550
13634
|
"use strict";
|
|
13551
13635
|
init_runs();
|
|
13552
13636
|
init_errors();
|
|
13553
13637
|
SKIPPED_KEYS = /* @__PURE__ */ new Set(["positionals", "yes", "dryRun", "dry-run", "help", "version"]);
|
|
13554
|
-
|
|
13638
|
+
command36 = {
|
|
13555
13639
|
resource: "runs",
|
|
13556
13640
|
action: "resume",
|
|
13557
13641
|
summary: "Continue an interrupted batch run (its command with --yes, no dry run)",
|
|
@@ -13606,7 +13690,7 @@ var init_resume = __esm({
|
|
|
13606
13690
|
}
|
|
13607
13691
|
}
|
|
13608
13692
|
};
|
|
13609
|
-
resume_default =
|
|
13693
|
+
resume_default = command36;
|
|
13610
13694
|
}
|
|
13611
13695
|
});
|
|
13612
13696
|
|
|
@@ -13714,7 +13798,7 @@ var create_exports = {};
|
|
|
13714
13798
|
__export(create_exports, {
|
|
13715
13799
|
default: () => create_default
|
|
13716
13800
|
});
|
|
13717
|
-
var
|
|
13801
|
+
var command37, create_default;
|
|
13718
13802
|
var init_create = __esm({
|
|
13719
13803
|
"src/commands/sandbox/create.ts"() {
|
|
13720
13804
|
"use strict";
|
|
@@ -13722,7 +13806,7 @@ var init_create = __esm({
|
|
|
13722
13806
|
init_exit_codes();
|
|
13723
13807
|
init_http();
|
|
13724
13808
|
init_shared();
|
|
13725
|
-
|
|
13809
|
+
command37 = {
|
|
13726
13810
|
resource: "sandbox",
|
|
13727
13811
|
action: "create",
|
|
13728
13812
|
summary: "Create your developer sandbox and save its test key as the sandbox profile",
|
|
@@ -13764,7 +13848,7 @@ var init_create = __esm({
|
|
|
13764
13848
|
return ExitCode.Ok;
|
|
13765
13849
|
}
|
|
13766
13850
|
};
|
|
13767
|
-
create_default =
|
|
13851
|
+
create_default = command37;
|
|
13768
13852
|
}
|
|
13769
13853
|
});
|
|
13770
13854
|
|
|
@@ -13773,7 +13857,7 @@ var delete_exports = {};
|
|
|
13773
13857
|
__export(delete_exports, {
|
|
13774
13858
|
default: () => delete_default
|
|
13775
13859
|
});
|
|
13776
|
-
var
|
|
13860
|
+
var command38, delete_default;
|
|
13777
13861
|
var init_delete = __esm({
|
|
13778
13862
|
"src/commands/sandbox/delete.ts"() {
|
|
13779
13863
|
"use strict";
|
|
@@ -13781,7 +13865,7 @@ var init_delete = __esm({
|
|
|
13781
13865
|
init_confirm();
|
|
13782
13866
|
init_exit_codes();
|
|
13783
13867
|
init_shared();
|
|
13784
|
-
|
|
13868
|
+
command38 = {
|
|
13785
13869
|
resource: "sandbox",
|
|
13786
13870
|
action: "delete",
|
|
13787
13871
|
summary: "Delete your sandbox and its test keys",
|
|
@@ -13808,7 +13892,7 @@ var init_delete = __esm({
|
|
|
13808
13892
|
return ExitCode.Ok;
|
|
13809
13893
|
}
|
|
13810
13894
|
};
|
|
13811
|
-
delete_default =
|
|
13895
|
+
delete_default = command38;
|
|
13812
13896
|
}
|
|
13813
13897
|
});
|
|
13814
13898
|
|
|
@@ -13817,14 +13901,14 @@ var key_exports = {};
|
|
|
13817
13901
|
__export(key_exports, {
|
|
13818
13902
|
default: () => key_default
|
|
13819
13903
|
});
|
|
13820
|
-
var
|
|
13904
|
+
var command39, key_default;
|
|
13821
13905
|
var init_key = __esm({
|
|
13822
13906
|
"src/commands/sandbox/key.ts"() {
|
|
13823
13907
|
"use strict";
|
|
13824
13908
|
init_exit_codes();
|
|
13825
13909
|
init_http();
|
|
13826
13910
|
init_shared();
|
|
13827
|
-
|
|
13911
|
+
command39 = {
|
|
13828
13912
|
resource: "sandbox",
|
|
13829
13913
|
action: "key",
|
|
13830
13914
|
summary: "Create a new test key for your sandbox and save it as the sandbox profile",
|
|
@@ -13844,7 +13928,7 @@ var init_key = __esm({
|
|
|
13844
13928
|
return ExitCode.Ok;
|
|
13845
13929
|
}
|
|
13846
13930
|
};
|
|
13847
|
-
key_default =
|
|
13931
|
+
key_default = command39;
|
|
13848
13932
|
}
|
|
13849
13933
|
});
|
|
13850
13934
|
|
|
@@ -13853,13 +13937,13 @@ var list_exports2 = {};
|
|
|
13853
13937
|
__export(list_exports2, {
|
|
13854
13938
|
default: () => list_default2
|
|
13855
13939
|
});
|
|
13856
|
-
var
|
|
13940
|
+
var command40, list_default2;
|
|
13857
13941
|
var init_list2 = __esm({
|
|
13858
13942
|
"src/commands/sandbox/list.ts"() {
|
|
13859
13943
|
"use strict";
|
|
13860
13944
|
init_exit_codes();
|
|
13861
13945
|
init_shared();
|
|
13862
|
-
|
|
13946
|
+
command40 = {
|
|
13863
13947
|
resource: "sandbox",
|
|
13864
13948
|
action: "list",
|
|
13865
13949
|
summary: "List your developer sandbox",
|
|
@@ -13875,7 +13959,7 @@ var init_list2 = __esm({
|
|
|
13875
13959
|
return ExitCode.Ok;
|
|
13876
13960
|
}
|
|
13877
13961
|
};
|
|
13878
|
-
list_default2 =
|
|
13962
|
+
list_default2 = command40;
|
|
13879
13963
|
}
|
|
13880
13964
|
});
|
|
13881
13965
|
|
|
@@ -13884,14 +13968,14 @@ var reset_exports = {};
|
|
|
13884
13968
|
__export(reset_exports, {
|
|
13885
13969
|
default: () => reset_default
|
|
13886
13970
|
});
|
|
13887
|
-
var
|
|
13971
|
+
var command41, reset_default;
|
|
13888
13972
|
var init_reset = __esm({
|
|
13889
13973
|
"src/commands/sandbox/reset.ts"() {
|
|
13890
13974
|
"use strict";
|
|
13891
13975
|
init_exit_codes();
|
|
13892
13976
|
init_http();
|
|
13893
13977
|
init_shared();
|
|
13894
|
-
|
|
13978
|
+
command41 = {
|
|
13895
13979
|
resource: "sandbox",
|
|
13896
13980
|
action: "reset",
|
|
13897
13981
|
summary: "Reset your sandbox to its seed data",
|
|
@@ -13909,7 +13993,7 @@ var init_reset = __esm({
|
|
|
13909
13993
|
return ExitCode.Ok;
|
|
13910
13994
|
}
|
|
13911
13995
|
};
|
|
13912
|
-
reset_default =
|
|
13996
|
+
reset_default = command41;
|
|
13913
13997
|
}
|
|
13914
13998
|
});
|
|
13915
13999
|
|
|
@@ -14169,7 +14253,7 @@ __export(pull_exports, {
|
|
|
14169
14253
|
});
|
|
14170
14254
|
import { mkdir, writeFile as writeFile4 } from "node:fs/promises";
|
|
14171
14255
|
import { dirname as dirname2, resolve as resolve11 } from "node:path";
|
|
14172
|
-
var
|
|
14256
|
+
var command42, pull_default;
|
|
14173
14257
|
var init_pull = __esm({
|
|
14174
14258
|
"src/commands/studio/pull.ts"() {
|
|
14175
14259
|
"use strict";
|
|
@@ -14179,7 +14263,7 @@ var init_pull = __esm({
|
|
|
14179
14263
|
init_common2();
|
|
14180
14264
|
init_folder();
|
|
14181
14265
|
init_transfer2();
|
|
14182
|
-
|
|
14266
|
+
command42 = {
|
|
14183
14267
|
resource: "studio",
|
|
14184
14268
|
action: "pull",
|
|
14185
14269
|
summary: "Write a template version's files to a folder",
|
|
@@ -14226,7 +14310,7 @@ var init_pull = __esm({
|
|
|
14226
14310
|
return ExitCode.Ok;
|
|
14227
14311
|
}
|
|
14228
14312
|
};
|
|
14229
|
-
pull_default =
|
|
14313
|
+
pull_default = command42;
|
|
14230
14314
|
}
|
|
14231
14315
|
});
|
|
14232
14316
|
|
|
@@ -14259,7 +14343,7 @@ var push_exports = {};
|
|
|
14259
14343
|
__export(push_exports, {
|
|
14260
14344
|
default: () => push_default
|
|
14261
14345
|
});
|
|
14262
|
-
var BUILT_BY, DEFAULT_MESSAGE,
|
|
14346
|
+
var BUILT_BY, DEFAULT_MESSAGE, command43, push_default;
|
|
14263
14347
|
var init_push = __esm({
|
|
14264
14348
|
"src/commands/studio/push.ts"() {
|
|
14265
14349
|
"use strict";
|
|
@@ -14271,7 +14355,7 @@ var init_push = __esm({
|
|
|
14271
14355
|
init_read();
|
|
14272
14356
|
BUILT_BY = "customer_agent";
|
|
14273
14357
|
DEFAULT_MESSAGE = "Pushed with the Kenso CLI";
|
|
14274
|
-
|
|
14358
|
+
command43 = {
|
|
14275
14359
|
resource: "studio",
|
|
14276
14360
|
action: "push",
|
|
14277
14361
|
summary: "Save a folder's files to a template's draft and print the validation",
|
|
@@ -14363,7 +14447,7 @@ var init_push = __esm({
|
|
|
14363
14447
|
);
|
|
14364
14448
|
}
|
|
14365
14449
|
};
|
|
14366
|
-
push_default =
|
|
14450
|
+
push_default = command43;
|
|
14367
14451
|
}
|
|
14368
14452
|
});
|
|
14369
14453
|
|
|
@@ -14372,7 +14456,7 @@ var validate_exports = {};
|
|
|
14372
14456
|
__export(validate_exports, {
|
|
14373
14457
|
default: () => validate_default
|
|
14374
14458
|
});
|
|
14375
|
-
var
|
|
14459
|
+
var command44, validate_default;
|
|
14376
14460
|
var init_validate = __esm({
|
|
14377
14461
|
"src/commands/studio/validate.ts"() {
|
|
14378
14462
|
"use strict";
|
|
@@ -14381,7 +14465,7 @@ var init_validate = __esm({
|
|
|
14381
14465
|
init_columns();
|
|
14382
14466
|
init_common2();
|
|
14383
14467
|
init_read();
|
|
14384
|
-
|
|
14468
|
+
command44 = {
|
|
14385
14469
|
resource: "studio",
|
|
14386
14470
|
action: "validate",
|
|
14387
14471
|
summary: "Validate a folder's files against a template without saving them",
|
|
@@ -14410,7 +14494,7 @@ var init_validate = __esm({
|
|
|
14410
14494
|
throw validationFailed(validation, "The files have validation errors", commandLine2(ctx, "studio validate", args));
|
|
14411
14495
|
}
|
|
14412
14496
|
};
|
|
14413
|
-
validate_default =
|
|
14497
|
+
validate_default = command44;
|
|
14414
14498
|
}
|
|
14415
14499
|
});
|
|
14416
14500
|
|
|
@@ -14459,7 +14543,7 @@ function accountIds(value) {
|
|
|
14459
14543
|
}
|
|
14460
14544
|
return ids2.map(Number);
|
|
14461
14545
|
}
|
|
14462
|
-
var SHOWN,
|
|
14546
|
+
var SHOWN, command45, preview_default;
|
|
14463
14547
|
var init_preview = __esm({
|
|
14464
14548
|
"src/commands/studio/preview.ts"() {
|
|
14465
14549
|
"use strict";
|
|
@@ -14471,7 +14555,7 @@ var init_preview = __esm({
|
|
|
14471
14555
|
init_common2();
|
|
14472
14556
|
init_folder();
|
|
14473
14557
|
SHOWN = 5;
|
|
14474
|
-
|
|
14558
|
+
command45 = {
|
|
14475
14559
|
resource: "studio",
|
|
14476
14560
|
action: "preview",
|
|
14477
14561
|
summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
|
|
@@ -14520,7 +14604,7 @@ var init_preview = __esm({
|
|
|
14520
14604
|
return ExitCode.Ok;
|
|
14521
14605
|
}
|
|
14522
14606
|
};
|
|
14523
|
-
preview_default =
|
|
14607
|
+
preview_default = command45;
|
|
14524
14608
|
}
|
|
14525
14609
|
});
|
|
14526
14610
|
|
|
@@ -14721,7 +14805,7 @@ function estimateOutput(templateId, target, estimate2) {
|
|
|
14721
14805
|
...target.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
|
|
14722
14806
|
};
|
|
14723
14807
|
}
|
|
14724
|
-
var COMMAND6, sha2562,
|
|
14808
|
+
var COMMAND6, sha2562, command46, fill_default;
|
|
14725
14809
|
var init_fill = __esm({
|
|
14726
14810
|
"src/commands/studio/fill.ts"() {
|
|
14727
14811
|
"use strict";
|
|
@@ -14737,7 +14821,7 @@ var init_fill = __esm({
|
|
|
14737
14821
|
init_fill_runs();
|
|
14738
14822
|
COMMAND6 = "studio fill";
|
|
14739
14823
|
sha2562 = (data) => createHash8("sha256").update(data).digest("hex");
|
|
14740
|
-
|
|
14824
|
+
command46 = {
|
|
14741
14825
|
resource: "studio",
|
|
14742
14826
|
action: "fill",
|
|
14743
14827
|
summary: "Fill a template on many accounts or campaign leads (estimate first)",
|
|
@@ -14797,7 +14881,7 @@ var init_fill = __esm({
|
|
|
14797
14881
|
return outcome.exitCode;
|
|
14798
14882
|
}
|
|
14799
14883
|
};
|
|
14800
|
-
fill_default =
|
|
14884
|
+
fill_default = command46;
|
|
14801
14885
|
}
|
|
14802
14886
|
});
|
|
14803
14887
|
|
|
@@ -14899,7 +14983,7 @@ var add_exports = {};
|
|
|
14899
14983
|
__export(add_exports, {
|
|
14900
14984
|
default: () => add_default
|
|
14901
14985
|
});
|
|
14902
|
-
var NEXT,
|
|
14986
|
+
var NEXT, command47, add_default;
|
|
14903
14987
|
var init_add = __esm({
|
|
14904
14988
|
"src/commands/tasks/add.ts"() {
|
|
14905
14989
|
"use strict";
|
|
@@ -14908,7 +14992,7 @@ var init_add = __esm({
|
|
|
14908
14992
|
init_http();
|
|
14909
14993
|
init_shared2();
|
|
14910
14994
|
NEXT = 'kenso tasks add "Send the deck" --due tomorrow --account 812';
|
|
14911
|
-
|
|
14995
|
+
command47 = {
|
|
14912
14996
|
resource: "tasks",
|
|
14913
14997
|
action: "add",
|
|
14914
14998
|
summary: "Add a task: a title, an optional due day and time, assignee and the account, person or deal it is about",
|
|
@@ -14943,7 +15027,7 @@ var init_add = __esm({
|
|
|
14943
15027
|
return ExitCode.Ok;
|
|
14944
15028
|
}
|
|
14945
15029
|
};
|
|
14946
|
-
add_default =
|
|
15030
|
+
add_default = command47;
|
|
14947
15031
|
}
|
|
14948
15032
|
});
|
|
14949
15033
|
|
|
@@ -14962,7 +15046,7 @@ async function patchTask(ctx, taskId, change) {
|
|
|
14962
15046
|
return unwrap((await send2()).body);
|
|
14963
15047
|
}
|
|
14964
15048
|
}
|
|
14965
|
-
var
|
|
15049
|
+
var command48, done_default;
|
|
14966
15050
|
var init_done = __esm({
|
|
14967
15051
|
"src/commands/tasks/done.ts"() {
|
|
14968
15052
|
"use strict";
|
|
@@ -14970,7 +15054,7 @@ var init_done = __esm({
|
|
|
14970
15054
|
init_exit_codes();
|
|
14971
15055
|
init_http();
|
|
14972
15056
|
init_shared2();
|
|
14973
|
-
|
|
15057
|
+
command48 = {
|
|
14974
15058
|
resource: "tasks",
|
|
14975
15059
|
action: "done",
|
|
14976
15060
|
summary: "Complete one or more tasks (--undo reopens them)",
|
|
@@ -14993,7 +15077,7 @@ var init_done = __esm({
|
|
|
14993
15077
|
return ExitCode.Ok;
|
|
14994
15078
|
}
|
|
14995
15079
|
};
|
|
14996
|
-
done_default =
|
|
15080
|
+
done_default = command48;
|
|
14997
15081
|
}
|
|
14998
15082
|
});
|
|
14999
15083
|
|
|
@@ -15002,7 +15086,7 @@ var assign_exports = {};
|
|
|
15002
15086
|
__export(assign_exports, {
|
|
15003
15087
|
default: () => assign_default
|
|
15004
15088
|
});
|
|
15005
|
-
var NEXT2,
|
|
15089
|
+
var NEXT2, command49, assign_default;
|
|
15006
15090
|
var init_assign = __esm({
|
|
15007
15091
|
"src/commands/tasks/assign.ts"() {
|
|
15008
15092
|
"use strict";
|
|
@@ -15010,7 +15094,7 @@ var init_assign = __esm({
|
|
|
15010
15094
|
init_done();
|
|
15011
15095
|
init_shared2();
|
|
15012
15096
|
NEXT2 = "kenso tasks assign <taskId> <me|memberId|email>";
|
|
15013
|
-
|
|
15097
|
+
command49 = {
|
|
15014
15098
|
resource: "tasks",
|
|
15015
15099
|
action: "assign",
|
|
15016
15100
|
summary: "Give a task to a member",
|
|
@@ -15030,7 +15114,7 @@ var init_assign = __esm({
|
|
|
15030
15114
|
return ExitCode.Ok;
|
|
15031
15115
|
}
|
|
15032
15116
|
};
|
|
15033
|
-
assign_default =
|
|
15117
|
+
assign_default = command49;
|
|
15034
15118
|
}
|
|
15035
15119
|
});
|
|
15036
15120
|
|
|
@@ -15039,14 +15123,14 @@ var queue_exports = {};
|
|
|
15039
15123
|
__export(queue_exports, {
|
|
15040
15124
|
default: () => queue_default
|
|
15041
15125
|
});
|
|
15042
|
-
var SCOPES,
|
|
15126
|
+
var SCOPES, command50, queue_default;
|
|
15043
15127
|
var init_queue = __esm({
|
|
15044
15128
|
"src/commands/tasks/queue.ts"() {
|
|
15045
15129
|
"use strict";
|
|
15046
15130
|
init_errors();
|
|
15047
15131
|
init_exit_codes();
|
|
15048
15132
|
SCOPES = ["mine", "assigned_by_me", "everyone"];
|
|
15049
|
-
|
|
15133
|
+
command50 = {
|
|
15050
15134
|
resource: "tasks",
|
|
15051
15135
|
action: "queue",
|
|
15052
15136
|
summary: "Your open work by due day: tasks, touches, call tasks, reply reminders and Ken follow-ups",
|
|
@@ -15067,7 +15151,7 @@ var init_queue = __esm({
|
|
|
15067
15151
|
return ExitCode.Ok;
|
|
15068
15152
|
}
|
|
15069
15153
|
};
|
|
15070
|
-
queue_default =
|
|
15154
|
+
queue_default = command50;
|
|
15071
15155
|
}
|
|
15072
15156
|
});
|
|
15073
15157
|
|
|
@@ -15217,7 +15301,7 @@ function readBody(req) {
|
|
|
15217
15301
|
function reply(res, status, body2) {
|
|
15218
15302
|
res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
|
|
15219
15303
|
}
|
|
15220
|
-
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES,
|
|
15304
|
+
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command51, listen_default;
|
|
15221
15305
|
var init_listen = __esm({
|
|
15222
15306
|
"src/commands/webhooks/listen.ts"() {
|
|
15223
15307
|
"use strict";
|
|
@@ -15228,7 +15312,7 @@ var init_listen = __esm({
|
|
|
15228
15312
|
MIN_POLL_MS = 1e3;
|
|
15229
15313
|
MAX_POLL_MS = 6e4;
|
|
15230
15314
|
MAX_TRIGGER_BYTES = 1e6;
|
|
15231
|
-
|
|
15315
|
+
command51 = {
|
|
15232
15316
|
resource: "webhooks",
|
|
15233
15317
|
action: "listen",
|
|
15234
15318
|
summary: "Stream the workspace's events and forward them, signed, to a local handler",
|
|
@@ -15334,7 +15418,7 @@ var init_listen = __esm({
|
|
|
15334
15418
|
return ExitCode.Ok;
|
|
15335
15419
|
}
|
|
15336
15420
|
};
|
|
15337
|
-
listen_default =
|
|
15421
|
+
listen_default = command51;
|
|
15338
15422
|
}
|
|
15339
15423
|
});
|
|
15340
15424
|
|
|
@@ -15353,7 +15437,7 @@ function notRunning() {
|
|
|
15353
15437
|
next: LISTEN_NEXT
|
|
15354
15438
|
});
|
|
15355
15439
|
}
|
|
15356
|
-
var LISTEN_NEXT,
|
|
15440
|
+
var LISTEN_NEXT, command52, trigger_default;
|
|
15357
15441
|
var init_trigger = __esm({
|
|
15358
15442
|
"src/commands/webhooks/trigger.ts"() {
|
|
15359
15443
|
"use strict";
|
|
@@ -15362,7 +15446,7 @@ var init_trigger = __esm({
|
|
|
15362
15446
|
init_http();
|
|
15363
15447
|
init_local();
|
|
15364
15448
|
LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
|
|
15365
|
-
|
|
15449
|
+
command52 = {
|
|
15366
15450
|
resource: "webhooks",
|
|
15367
15451
|
action: "trigger",
|
|
15368
15452
|
summary: "Send a sample event of one type through the running kenso webhooks listen",
|
|
@@ -15419,7 +15503,7 @@ var init_trigger = __esm({
|
|
|
15419
15503
|
return ExitCode.Ok;
|
|
15420
15504
|
}
|
|
15421
15505
|
};
|
|
15422
|
-
trigger_default =
|
|
15506
|
+
trigger_default = command52;
|
|
15423
15507
|
}
|
|
15424
15508
|
});
|
|
15425
15509
|
|
|
@@ -15623,14 +15707,14 @@ var status_exports3 = {};
|
|
|
15623
15707
|
__export(status_exports3, {
|
|
15624
15708
|
default: () => status_default3
|
|
15625
15709
|
});
|
|
15626
|
-
var
|
|
15710
|
+
var command53, status_default3;
|
|
15627
15711
|
var init_status3 = __esm({
|
|
15628
15712
|
"src/commands/work/status.ts"() {
|
|
15629
15713
|
"use strict";
|
|
15630
15714
|
init_exit_codes();
|
|
15631
15715
|
init_http();
|
|
15632
15716
|
init_common3();
|
|
15633
|
-
|
|
15717
|
+
command53 = {
|
|
15634
15718
|
resource: "work",
|
|
15635
15719
|
action: "status",
|
|
15636
15720
|
summary: "Show the Kenso AI work waiting for your own agent, per kind",
|
|
@@ -15664,7 +15748,7 @@ var init_status3 = __esm({
|
|
|
15664
15748
|
return ExitCode.Ok;
|
|
15665
15749
|
}
|
|
15666
15750
|
};
|
|
15667
|
-
status_default3 =
|
|
15751
|
+
status_default3 = command53;
|
|
15668
15752
|
}
|
|
15669
15753
|
});
|
|
15670
15754
|
|
|
@@ -15796,9 +15880,9 @@ var init_files = __esm({
|
|
|
15796
15880
|
import { execFile, spawnSync as spawnSync2 } from "node:child_process";
|
|
15797
15881
|
import { readFileSync as readFileSync12 } from "node:fs";
|
|
15798
15882
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
15799
|
-
function sudoArgs(user,
|
|
15883
|
+
function sudoArgs(user, command61, args, keep = [], set = {}) {
|
|
15800
15884
|
const assignments = Object.entries(set).map(([name, value]) => `${name}=${value}`);
|
|
15801
|
-
return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--",
|
|
15885
|
+
return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command61, ...args];
|
|
15802
15886
|
}
|
|
15803
15887
|
function agentKensoEnv(opts) {
|
|
15804
15888
|
return {
|
|
@@ -15808,12 +15892,12 @@ function agentKensoEnv(opts) {
|
|
|
15808
15892
|
AI_AGENT: opts.agentName
|
|
15809
15893
|
};
|
|
15810
15894
|
}
|
|
15811
|
-
function sudoExec(user,
|
|
15895
|
+
function sudoExec(user, command61, args, opts = {}) {
|
|
15812
15896
|
const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
|
|
15813
15897
|
return new Promise((resolve16) => {
|
|
15814
15898
|
execFile(
|
|
15815
15899
|
sudo,
|
|
15816
|
-
[...lead, ...sudoArgs(user.name,
|
|
15900
|
+
[...lead, ...sudoArgs(user.name, command61, args)],
|
|
15817
15901
|
{ env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
|
|
15818
15902
|
(err, stdout, stderr) => {
|
|
15819
15903
|
const code = err ? err.code : 0;
|
|
@@ -15923,9 +16007,9 @@ var init_folder2 = __esm({
|
|
|
15923
16007
|
init_redact();
|
|
15924
16008
|
init_agent_user();
|
|
15925
16009
|
WorkRunFolder = class {
|
|
15926
|
-
constructor(ctx,
|
|
16010
|
+
constructor(ctx, command61, args, outDir, shared = false) {
|
|
15927
16011
|
this.ctx = ctx;
|
|
15928
|
-
this.command =
|
|
16012
|
+
this.command = command61;
|
|
15929
16013
|
this.args = args;
|
|
15930
16014
|
this.outDir = outDir;
|
|
15931
16015
|
this.shared = shared;
|
|
@@ -16040,7 +16124,7 @@ var pull_exports2 = {};
|
|
|
16040
16124
|
__export(pull_exports2, {
|
|
16041
16125
|
default: () => pull_default2
|
|
16042
16126
|
});
|
|
16043
|
-
var MAX_FILES,
|
|
16127
|
+
var MAX_FILES, command54, pull_default2;
|
|
16044
16128
|
var init_pull2 = __esm({
|
|
16045
16129
|
"src/commands/work/pull.ts"() {
|
|
16046
16130
|
"use strict";
|
|
@@ -16049,7 +16133,7 @@ var init_pull2 = __esm({
|
|
|
16049
16133
|
init_common3();
|
|
16050
16134
|
init_folder2();
|
|
16051
16135
|
MAX_FILES = 100;
|
|
16052
|
-
|
|
16136
|
+
command54 = {
|
|
16053
16137
|
resource: "work",
|
|
16054
16138
|
action: "pull",
|
|
16055
16139
|
summary: "Claim waiting work into local work files, to answer by hand",
|
|
@@ -16127,7 +16211,7 @@ var init_pull2 = __esm({
|
|
|
16127
16211
|
return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
|
|
16128
16212
|
}
|
|
16129
16213
|
};
|
|
16130
|
-
pull_default2 =
|
|
16214
|
+
pull_default2 = command54;
|
|
16131
16215
|
}
|
|
16132
16216
|
});
|
|
16133
16217
|
|
|
@@ -16269,7 +16353,7 @@ __export(submit_exports, {
|
|
|
16269
16353
|
default: () => submit_default
|
|
16270
16354
|
});
|
|
16271
16355
|
import { resolve as resolve14 } from "node:path";
|
|
16272
|
-
var
|
|
16356
|
+
var command55, submit_default;
|
|
16273
16357
|
var init_submit = __esm({
|
|
16274
16358
|
"src/commands/work/submit.ts"() {
|
|
16275
16359
|
"use strict";
|
|
@@ -16278,7 +16362,7 @@ var init_submit = __esm({
|
|
|
16278
16362
|
init_files();
|
|
16279
16363
|
init_answers();
|
|
16280
16364
|
init_common3();
|
|
16281
|
-
|
|
16365
|
+
command55 = {
|
|
16282
16366
|
resource: "work",
|
|
16283
16367
|
action: "submit",
|
|
16284
16368
|
summary: "Send answers files to Kenso and write each one's results",
|
|
@@ -16310,7 +16394,7 @@ var init_submit = __esm({
|
|
|
16310
16394
|
return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
|
|
16311
16395
|
}
|
|
16312
16396
|
};
|
|
16313
|
-
submit_default =
|
|
16397
|
+
submit_default = command55;
|
|
16314
16398
|
}
|
|
16315
16399
|
});
|
|
16316
16400
|
|
|
@@ -16331,7 +16415,7 @@ function claimIdOf(arg) {
|
|
|
16331
16415
|
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..." });
|
|
16332
16416
|
return arg;
|
|
16333
16417
|
}
|
|
16334
|
-
var CLAIM_ID,
|
|
16418
|
+
var CLAIM_ID, command56, release_default;
|
|
16335
16419
|
var init_release = __esm({
|
|
16336
16420
|
"src/commands/work/release.ts"() {
|
|
16337
16421
|
"use strict";
|
|
@@ -16340,7 +16424,7 @@ var init_release = __esm({
|
|
|
16340
16424
|
init_files();
|
|
16341
16425
|
init_common3();
|
|
16342
16426
|
CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
16343
|
-
|
|
16427
|
+
command56 = {
|
|
16344
16428
|
resource: "work",
|
|
16345
16429
|
action: "release",
|
|
16346
16430
|
summary: "Give claimed work back to the queue now",
|
|
@@ -16359,7 +16443,7 @@ var init_release = __esm({
|
|
|
16359
16443
|
return ExitCode.Ok;
|
|
16360
16444
|
}
|
|
16361
16445
|
};
|
|
16362
|
-
release_default =
|
|
16446
|
+
release_default = command56;
|
|
16363
16447
|
}
|
|
16364
16448
|
});
|
|
16365
16449
|
|
|
@@ -16698,12 +16782,12 @@ function plain(text4) {
|
|
|
16698
16782
|
return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
|
|
16699
16783
|
}
|
|
16700
16784
|
function runStatus(bin, args, env, adapter, runAs) {
|
|
16701
|
-
const
|
|
16785
|
+
const command61 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
|
|
16702
16786
|
const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
|
|
16703
16787
|
const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
|
|
16704
16788
|
return new Promise((resolve16) => {
|
|
16705
16789
|
execFile2(
|
|
16706
|
-
|
|
16790
|
+
command61,
|
|
16707
16791
|
commandArgs2,
|
|
16708
16792
|
{ ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
|
|
16709
16793
|
(err, stdout, stderr) => {
|
|
@@ -17785,7 +17869,7 @@ var run_exports3 = {};
|
|
|
17785
17869
|
__export(run_exports3, {
|
|
17786
17870
|
default: () => run_default2
|
|
17787
17871
|
});
|
|
17788
|
-
var FAILURES_IN_A_ROW,
|
|
17872
|
+
var FAILURES_IN_A_ROW, command57, run_default2;
|
|
17789
17873
|
var init_run3 = __esm({
|
|
17790
17874
|
"src/commands/work/run.ts"() {
|
|
17791
17875
|
"use strict";
|
|
@@ -17806,7 +17890,7 @@ var init_run3 = __esm({
|
|
|
17806
17890
|
init_folder2();
|
|
17807
17891
|
init_stop();
|
|
17808
17892
|
FAILURES_IN_A_ROW = 3;
|
|
17809
|
-
|
|
17893
|
+
command57 = {
|
|
17810
17894
|
resource: "work",
|
|
17811
17895
|
action: "run",
|
|
17812
17896
|
summary: "Run your own coding agent on the waiting work until the queue is empty",
|
|
@@ -18131,7 +18215,7 @@ var init_run3 = __esm({
|
|
|
18131
18215
|
return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
|
|
18132
18216
|
}
|
|
18133
18217
|
};
|
|
18134
|
-
run_default2 =
|
|
18218
|
+
run_default2 = command57;
|
|
18135
18219
|
}
|
|
18136
18220
|
});
|
|
18137
18221
|
|
|
@@ -18171,7 +18255,7 @@ function rewrap(err, overrides) {
|
|
|
18171
18255
|
details: err.details
|
|
18172
18256
|
});
|
|
18173
18257
|
}
|
|
18174
|
-
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE,
|
|
18258
|
+
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE, command58, keys_default;
|
|
18175
18259
|
var init_keys = __esm({
|
|
18176
18260
|
"src/commands/workspace/keys.ts"() {
|
|
18177
18261
|
"use strict";
|
|
@@ -18181,7 +18265,7 @@ var init_keys = __esm({
|
|
|
18181
18265
|
TEMPLATES = ["admin", "editor", "viewer"];
|
|
18182
18266
|
APP_NEXT_STEP = "A workspace admin can create it in the app: Settings > API keys > Workspace keys";
|
|
18183
18267
|
NOT_AVAILABLE = "Workspace keys are not available for this workspace yet.";
|
|
18184
|
-
|
|
18268
|
+
command58 = {
|
|
18185
18269
|
resource: "workspace",
|
|
18186
18270
|
action: "keys",
|
|
18187
18271
|
summary: "Create an API key the workspace owns",
|
|
@@ -18242,7 +18326,7 @@ var init_keys = __esm({
|
|
|
18242
18326
|
return ExitCode.Ok;
|
|
18243
18327
|
}
|
|
18244
18328
|
};
|
|
18245
|
-
keys_default =
|
|
18329
|
+
keys_default = command58;
|
|
18246
18330
|
}
|
|
18247
18331
|
});
|
|
18248
18332
|
|
|
@@ -18260,14 +18344,14 @@ function parseLimit(value) {
|
|
|
18260
18344
|
}
|
|
18261
18345
|
return limit;
|
|
18262
18346
|
}
|
|
18263
|
-
var MAX_LIMIT,
|
|
18347
|
+
var MAX_LIMIT, command59, list_default3;
|
|
18264
18348
|
var init_list3 = __esm({
|
|
18265
18349
|
"src/commands/workspace/list.ts"() {
|
|
18266
18350
|
"use strict";
|
|
18267
18351
|
init_errors();
|
|
18268
18352
|
init_exit_codes();
|
|
18269
18353
|
MAX_LIMIT = 200;
|
|
18270
|
-
|
|
18354
|
+
command59 = {
|
|
18271
18355
|
resource: "workspace",
|
|
18272
18356
|
action: "list",
|
|
18273
18357
|
summary: "List the workspaces your key can use",
|
|
@@ -18295,7 +18379,7 @@ var init_list3 = __esm({
|
|
|
18295
18379
|
return ExitCode.Ok;
|
|
18296
18380
|
}
|
|
18297
18381
|
};
|
|
18298
|
-
list_default3 =
|
|
18382
|
+
list_default3 = command59;
|
|
18299
18383
|
}
|
|
18300
18384
|
});
|
|
18301
18385
|
|
|
@@ -18304,7 +18388,7 @@ var use_exports = {};
|
|
|
18304
18388
|
__export(use_exports, {
|
|
18305
18389
|
default: () => use_default
|
|
18306
18390
|
});
|
|
18307
|
-
var
|
|
18391
|
+
var command60, use_default;
|
|
18308
18392
|
var init_use = __esm({
|
|
18309
18393
|
"src/commands/workspace/use.ts"() {
|
|
18310
18394
|
"use strict";
|
|
@@ -18312,7 +18396,7 @@ var init_use = __esm({
|
|
|
18312
18396
|
init_errors();
|
|
18313
18397
|
init_exit_codes();
|
|
18314
18398
|
init_http();
|
|
18315
|
-
|
|
18399
|
+
command60 = {
|
|
18316
18400
|
resource: "workspace",
|
|
18317
18401
|
action: "use",
|
|
18318
18402
|
summary: "Set the profile's default workspace",
|
|
@@ -18369,7 +18453,7 @@ var init_use = __esm({
|
|
|
18369
18453
|
return ExitCode.Ok;
|
|
18370
18454
|
}
|
|
18371
18455
|
};
|
|
18372
|
-
use_default =
|
|
18456
|
+
use_default = command60;
|
|
18373
18457
|
}
|
|
18374
18458
|
});
|
|
18375
18459
|
|
|
@@ -18939,8 +19023,8 @@ function startUpdateNotice(argv, opts = {}) {
|
|
|
18939
19023
|
if (!found) return;
|
|
18940
19024
|
writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
|
|
18941
19025
|
if (isNewer(found, version)) {
|
|
18942
|
-
const
|
|
18943
|
-
stderr.write(`kenso ${found} is out (you have ${version}): ${
|
|
19026
|
+
const command61 = updateCommand(install, opts.platform ?? process.platform);
|
|
19027
|
+
stderr.write(`kenso ${found} is out (you have ${version}): ${command61}
|
|
18944
19028
|
Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
|
|
18945
19029
|
`);
|
|
18946
19030
|
}
|