kenso 0.1.92 → 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 +206 -129
- package/dist/operations.json +1 -1
- package/docs/crm.md +14 -0
- package/docs/reference.md +101 -9
- 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) {
|
|
@@ -7458,8 +7458,8 @@ function idValue(value, field) {
|
|
|
7458
7458
|
function shellQuote3(arg) {
|
|
7459
7459
|
return /^[A-Za-z0-9_./:=@%+,-]+$/.test(arg) ? arg : `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
7460
7460
|
}
|
|
7461
|
-
function commandLine2(ctx,
|
|
7462
|
-
const parts2 = ["kenso", ...
|
|
7461
|
+
function commandLine2(ctx, command61, args, extra = []) {
|
|
7462
|
+
const parts2 = ["kenso", ...command61.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
|
|
7463
7463
|
for (const [name, value] of Object.entries(args.flags)) {
|
|
7464
7464
|
if (value === void 0 || value === false) continue;
|
|
7465
7465
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -7791,7 +7791,7 @@ var init_connect = __esm({
|
|
|
7791
7791
|
var crm_default;
|
|
7792
7792
|
var init_crm = __esm({
|
|
7793
7793
|
"docs/crm.md"() {
|
|
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 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```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## 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';
|
|
7795
7795
|
}
|
|
7796
7796
|
});
|
|
7797
7797
|
|
|
@@ -8983,8 +8983,8 @@ var init_browser_login = __esm({
|
|
|
8983
8983
|
defaultDeps = {
|
|
8984
8984
|
sleep: (ms, signal) => delay2(ms, void 0, signal ? { signal } : void 0),
|
|
8985
8985
|
now: () => Date.now(),
|
|
8986
|
-
spawn: (
|
|
8987
|
-
const child = nodeSpawn(
|
|
8986
|
+
spawn: (command61, args) => {
|
|
8987
|
+
const child = nodeSpawn(command61, args, { detached: true, stdio: "ignore" });
|
|
8988
8988
|
child.on("error", () => {
|
|
8989
8989
|
});
|
|
8990
8990
|
child.unref();
|
|
@@ -10248,8 +10248,8 @@ var init_run = __esm({
|
|
|
10248
10248
|
defaultDeps2 = {
|
|
10249
10249
|
sleep: (ms, signal) => delay3(ms, void 0, signal ? { signal } : void 0),
|
|
10250
10250
|
now: () => Date.now(),
|
|
10251
|
-
spawn: (
|
|
10252
|
-
const child = nodeSpawn2(
|
|
10251
|
+
spawn: (command61, args) => {
|
|
10252
|
+
const child = nodeSpawn2(command61, args, { detached: true, stdio: "ignore" });
|
|
10253
10253
|
child.on("error", () => {
|
|
10254
10254
|
});
|
|
10255
10255
|
child.unref();
|
|
@@ -10290,9 +10290,9 @@ function stringFlag2(flags, name) {
|
|
|
10290
10290
|
const text4 = value.trim();
|
|
10291
10291
|
return text4 === "" ? void 0 : text4;
|
|
10292
10292
|
}
|
|
10293
|
-
function requireFlag(flags, name,
|
|
10293
|
+
function requireFlag(flags, name, command61, hint) {
|
|
10294
10294
|
const value = stringFlag2(flags, name);
|
|
10295
|
-
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 } : {} });
|
|
10296
10296
|
return value;
|
|
10297
10297
|
}
|
|
10298
10298
|
function positiveId(value) {
|
|
@@ -10301,8 +10301,8 @@ function positiveId(value) {
|
|
|
10301
10301
|
const id = Number(text4);
|
|
10302
10302
|
return Number.isSafeInteger(id) && id > 0 ? id : void 0;
|
|
10303
10303
|
}
|
|
10304
|
-
function idFlag(flags, name,
|
|
10305
|
-
const raw = requireFlag(flags, name,
|
|
10304
|
+
function idFlag(flags, name, command61) {
|
|
10305
|
+
const raw = requireFlag(flags, name, command61);
|
|
10306
10306
|
const id = positiveId(raw);
|
|
10307
10307
|
if (id === void 0) throw usageError(`--${name} must be a positive whole number (got "${raw}").`, { field: name });
|
|
10308
10308
|
return id;
|
|
@@ -10322,8 +10322,8 @@ function isDryRun(ctx) {
|
|
|
10322
10322
|
function shellQuote4(value) {
|
|
10323
10323
|
return /^[A-Za-z0-9_\-.,:/@=+%]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
|
|
10324
10324
|
}
|
|
10325
|
-
function sameCommand2(
|
|
10326
|
-
const parts2 = [
|
|
10325
|
+
function sameCommand2(command61, flags, ctx, extra = []) {
|
|
10326
|
+
const parts2 = [command61];
|
|
10327
10327
|
for (const [name, value] of Object.entries(flags)) {
|
|
10328
10328
|
if (value === void 0 || value === false) continue;
|
|
10329
10329
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -11460,12 +11460,12 @@ import { join as join11 } from "node:path";
|
|
|
11460
11460
|
function whereDir(env) {
|
|
11461
11461
|
return join11(runsRoot(env), WHERE_DIR);
|
|
11462
11462
|
}
|
|
11463
|
-
async function unfinishedWhereIds(ctx,
|
|
11463
|
+
async function unfinishedWhereIds(ctx, command61, args) {
|
|
11464
11464
|
const dir = whereDir(ctx.env);
|
|
11465
11465
|
const identity = argsIdentity(args);
|
|
11466
11466
|
const workspaceId = ctx.client.workspaceId ?? ctx.auth.workspaceId;
|
|
11467
11467
|
for (const run of await listRuns(ctx.env)) {
|
|
11468
|
-
if (run.command !==
|
|
11468
|
+
if (run.command !== command61 || run.status === "done" || run.status === "planned") continue;
|
|
11469
11469
|
if ((run.workspaceId || void 0) !== (workspaceId || void 0) || argsIdentity(run.args) !== identity) continue;
|
|
11470
11470
|
if (run.inputPath?.startsWith(`${dir}/`) && existsSync6(run.inputPath)) return run.inputPath;
|
|
11471
11471
|
}
|
|
@@ -11611,14 +11611,14 @@ async function idsFromRun(ctx, runId) {
|
|
|
11611
11611
|
return { ...idItems(ids2), source: "run" };
|
|
11612
11612
|
}
|
|
11613
11613
|
async function collectIds(ctx, flags, kind, dryRun2) {
|
|
11614
|
-
const
|
|
11614
|
+
const command61 = `kenso contacts ${kind}`;
|
|
11615
11615
|
const ids2 = stringFlag2(flags, "ids");
|
|
11616
11616
|
const where = kind === "restore" ? void 0 : stringFlag2(flags, "where");
|
|
11617
11617
|
const run = kind === "restore" ? stringFlag2(flags, "run") : void 0;
|
|
11618
11618
|
const given = [ids2, where, run].filter((v) => v !== void 0).length;
|
|
11619
11619
|
if (given !== 1) {
|
|
11620
11620
|
const choices = kind === "restore" ? "--ids <file|-> or --run <runId>" : "--ids <file|-> or --where '<json>'";
|
|
11621
|
-
throw usageError(`${
|
|
11621
|
+
throw usageError(`${command61} needs exactly one of ${choices}.`, { field: "ids", next: `${command61} --help` });
|
|
11622
11622
|
}
|
|
11623
11623
|
if (ids2 !== void 0) return idsFromFile(ctx, ids2);
|
|
11624
11624
|
if (where !== void 0) return idsFromWhere(ctx, kind, flags, where, dryRun2);
|
|
@@ -12920,19 +12920,95 @@ var init_mcp = __esm({
|
|
|
12920
12920
|
}
|
|
12921
12921
|
});
|
|
12922
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
|
+
|
|
12923
12999
|
// src/commands/opportunities/stage-history.ts
|
|
12924
13000
|
var stage_history_exports = {};
|
|
12925
13001
|
__export(stage_history_exports, {
|
|
12926
13002
|
default: () => stage_history_default
|
|
12927
13003
|
});
|
|
12928
|
-
var
|
|
13004
|
+
var command29, stage_history_default;
|
|
12929
13005
|
var init_stage_history = __esm({
|
|
12930
13006
|
"src/commands/opportunities/stage-history.ts"() {
|
|
12931
13007
|
"use strict";
|
|
12932
13008
|
init_errors();
|
|
12933
13009
|
init_exit_codes();
|
|
12934
13010
|
init_http();
|
|
12935
|
-
|
|
13011
|
+
command29 = {
|
|
12936
13012
|
resource: "opportunities",
|
|
12937
13013
|
action: "stage-history",
|
|
12938
13014
|
summary: "Show a deal's stage history: each stage, when, who moved it and how long it sat there",
|
|
@@ -12956,7 +13032,7 @@ var init_stage_history = __esm({
|
|
|
12956
13032
|
return ExitCode.Ok;
|
|
12957
13033
|
}
|
|
12958
13034
|
};
|
|
12959
|
-
stage_history_default =
|
|
13035
|
+
stage_history_default = command29;
|
|
12960
13036
|
}
|
|
12961
13037
|
});
|
|
12962
13038
|
|
|
@@ -12966,6 +13042,7 @@ var init_opportunities = __esm({
|
|
|
12966
13042
|
"src/commands/opportunities/index.ts"() {
|
|
12967
13043
|
"use strict";
|
|
12968
13044
|
actions17 = {
|
|
13045
|
+
move: () => Promise.resolve().then(() => (init_move(), move_exports)).then((m) => m.default),
|
|
12969
13046
|
"stage-history": () => Promise.resolve().then(() => (init_stage_history(), stage_history_exports)).then((m) => m.default)
|
|
12970
13047
|
};
|
|
12971
13048
|
}
|
|
@@ -13042,7 +13119,7 @@ function summarize3(results) {
|
|
|
13042
13119
|
}
|
|
13043
13120
|
return { matched, addedToAccounts, emailFindsQueued };
|
|
13044
13121
|
}
|
|
13045
|
-
var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND,
|
|
13122
|
+
var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND, command30, import_default3;
|
|
13046
13123
|
var init_import3 = __esm({
|
|
13047
13124
|
"src/commands/people/import.ts"() {
|
|
13048
13125
|
"use strict";
|
|
@@ -13074,7 +13151,7 @@ var init_import3 = __esm({
|
|
|
13074
13151
|
};
|
|
13075
13152
|
PERSON_FIELDS = ["email", "fullName", "firstName", "lastName", "linkedinUrl", "title"];
|
|
13076
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.";
|
|
13077
|
-
|
|
13154
|
+
command30 = {
|
|
13078
13155
|
resource: "people",
|
|
13079
13156
|
action: "import",
|
|
13080
13157
|
summary: "Create or match people from a CSV or JSONL file, optionally onto accounts",
|
|
@@ -13139,7 +13216,7 @@ var init_import3 = __esm({
|
|
|
13139
13216
|
return outcome.exitCode;
|
|
13140
13217
|
}
|
|
13141
13218
|
};
|
|
13142
|
-
import_default3 =
|
|
13219
|
+
import_default3 = command30;
|
|
13143
13220
|
}
|
|
13144
13221
|
});
|
|
13145
13222
|
|
|
@@ -13169,14 +13246,14 @@ function rule(stage) {
|
|
|
13169
13246
|
isDefault: stage.isDefaultRequiredFields
|
|
13170
13247
|
};
|
|
13171
13248
|
}
|
|
13172
|
-
var
|
|
13249
|
+
var command31, stage_rules_default;
|
|
13173
13250
|
var init_stage_rules = __esm({
|
|
13174
13251
|
"src/commands/pipelines/stage-rules.ts"() {
|
|
13175
13252
|
"use strict";
|
|
13176
13253
|
init_errors();
|
|
13177
13254
|
init_exit_codes();
|
|
13178
13255
|
init_http();
|
|
13179
|
-
|
|
13256
|
+
command31 = {
|
|
13180
13257
|
resource: "pipelines",
|
|
13181
13258
|
action: "stage-rules",
|
|
13182
13259
|
summary: "List or set the fields a deal should have in each stage",
|
|
@@ -13229,7 +13306,7 @@ var init_stage_rules = __esm({
|
|
|
13229
13306
|
return ExitCode.Ok;
|
|
13230
13307
|
}
|
|
13231
13308
|
};
|
|
13232
|
-
stage_rules_default =
|
|
13309
|
+
stage_rules_default = command31;
|
|
13233
13310
|
}
|
|
13234
13311
|
});
|
|
13235
13312
|
|
|
@@ -13249,7 +13326,7 @@ var run_exports2 = {};
|
|
|
13249
13326
|
__export(run_exports2, {
|
|
13250
13327
|
default: () => run_default
|
|
13251
13328
|
});
|
|
13252
|
-
var REPORTS,
|
|
13329
|
+
var REPORTS, command32, run_default;
|
|
13253
13330
|
var init_run2 = __esm({
|
|
13254
13331
|
"src/commands/reports/run.ts"() {
|
|
13255
13332
|
"use strict";
|
|
@@ -13257,7 +13334,7 @@ var init_run2 = __esm({
|
|
|
13257
13334
|
init_exit_codes();
|
|
13258
13335
|
init_http();
|
|
13259
13336
|
REPORTS = ["pipeline_by_stage", "won_by_month", "stage_conversion", "time_in_stage", "won_by_source_campaign", "activity_by_member"];
|
|
13260
|
-
|
|
13337
|
+
command32 = {
|
|
13261
13338
|
resource: "reports",
|
|
13262
13339
|
action: "run",
|
|
13263
13340
|
summary: "Run a stock pipeline report and print its table",
|
|
@@ -13319,7 +13396,7 @@ var init_run2 = __esm({
|
|
|
13319
13396
|
return ExitCode.Ok;
|
|
13320
13397
|
}
|
|
13321
13398
|
};
|
|
13322
|
-
run_default =
|
|
13399
|
+
run_default = command32;
|
|
13323
13400
|
}
|
|
13324
13401
|
});
|
|
13325
13402
|
|
|
@@ -13328,14 +13405,14 @@ var summary_exports = {};
|
|
|
13328
13405
|
__export(summary_exports, {
|
|
13329
13406
|
default: () => summary_default
|
|
13330
13407
|
});
|
|
13331
|
-
var
|
|
13408
|
+
var command33, summary_default;
|
|
13332
13409
|
var init_summary = __esm({
|
|
13333
13410
|
"src/commands/reports/summary.ts"() {
|
|
13334
13411
|
"use strict";
|
|
13335
13412
|
init_errors();
|
|
13336
13413
|
init_exit_codes();
|
|
13337
13414
|
init_http();
|
|
13338
|
-
|
|
13415
|
+
command33 = {
|
|
13339
13416
|
resource: "reports",
|
|
13340
13417
|
action: "summary",
|
|
13341
13418
|
summary: "Read where the period stands and what needs you",
|
|
@@ -13390,7 +13467,7 @@ var init_summary = __esm({
|
|
|
13390
13467
|
return ExitCode.Ok;
|
|
13391
13468
|
}
|
|
13392
13469
|
};
|
|
13393
|
-
summary_default =
|
|
13470
|
+
summary_default = command33;
|
|
13394
13471
|
}
|
|
13395
13472
|
});
|
|
13396
13473
|
|
|
@@ -13411,14 +13488,14 @@ var list_exports = {};
|
|
|
13411
13488
|
__export(list_exports, {
|
|
13412
13489
|
default: () => list_default
|
|
13413
13490
|
});
|
|
13414
|
-
var
|
|
13491
|
+
var command34, list_default;
|
|
13415
13492
|
var init_list = __esm({
|
|
13416
13493
|
"src/commands/runs/list.ts"() {
|
|
13417
13494
|
"use strict";
|
|
13418
13495
|
init_runs();
|
|
13419
13496
|
init_errors();
|
|
13420
13497
|
init_exit_codes();
|
|
13421
|
-
|
|
13498
|
+
command34 = {
|
|
13422
13499
|
resource: "runs",
|
|
13423
13500
|
action: "list",
|
|
13424
13501
|
summary: "List batch runs, newest first (finds an interrupted run)",
|
|
@@ -13439,7 +13516,7 @@ var init_list = __esm({
|
|
|
13439
13516
|
return ExitCode.Ok;
|
|
13440
13517
|
}
|
|
13441
13518
|
};
|
|
13442
|
-
list_default =
|
|
13519
|
+
list_default = command34;
|
|
13443
13520
|
}
|
|
13444
13521
|
});
|
|
13445
13522
|
|
|
@@ -13450,7 +13527,7 @@ __export(show_exports2, {
|
|
|
13450
13527
|
});
|
|
13451
13528
|
import { existsSync as existsSync7, readFileSync as readFileSync9 } from "node:fs";
|
|
13452
13529
|
import { join as join12 } from "node:path";
|
|
13453
|
-
var FILES,
|
|
13530
|
+
var FILES, command35, show_default2;
|
|
13454
13531
|
var init_show2 = __esm({
|
|
13455
13532
|
"src/commands/runs/show.ts"() {
|
|
13456
13533
|
"use strict";
|
|
@@ -13465,7 +13542,7 @@ var init_show2 = __esm({
|
|
|
13465
13542
|
["plan", "plan.json"],
|
|
13466
13543
|
["summary", "summary.json"]
|
|
13467
13544
|
];
|
|
13468
|
-
|
|
13545
|
+
command35 = {
|
|
13469
13546
|
resource: "runs",
|
|
13470
13547
|
action: "show",
|
|
13471
13548
|
summary: "Show one batch run and its files",
|
|
@@ -13492,7 +13569,7 @@ var init_show2 = __esm({
|
|
|
13492
13569
|
return ExitCode.Ok;
|
|
13493
13570
|
}
|
|
13494
13571
|
};
|
|
13495
|
-
show_default2 =
|
|
13572
|
+
show_default2 = command35;
|
|
13496
13573
|
}
|
|
13497
13574
|
});
|
|
13498
13575
|
|
|
@@ -13551,14 +13628,14 @@ function resumeArgv(run, globals = {}) {
|
|
|
13551
13628
|
async function sha256(path) {
|
|
13552
13629
|
return createHash5("sha256").update(await readFile9(path)).digest("hex");
|
|
13553
13630
|
}
|
|
13554
|
-
var SKIPPED_KEYS,
|
|
13631
|
+
var SKIPPED_KEYS, command36, resume_default;
|
|
13555
13632
|
var init_resume = __esm({
|
|
13556
13633
|
"src/commands/runs/resume.ts"() {
|
|
13557
13634
|
"use strict";
|
|
13558
13635
|
init_runs();
|
|
13559
13636
|
init_errors();
|
|
13560
13637
|
SKIPPED_KEYS = /* @__PURE__ */ new Set(["positionals", "yes", "dryRun", "dry-run", "help", "version"]);
|
|
13561
|
-
|
|
13638
|
+
command36 = {
|
|
13562
13639
|
resource: "runs",
|
|
13563
13640
|
action: "resume",
|
|
13564
13641
|
summary: "Continue an interrupted batch run (its command with --yes, no dry run)",
|
|
@@ -13613,7 +13690,7 @@ var init_resume = __esm({
|
|
|
13613
13690
|
}
|
|
13614
13691
|
}
|
|
13615
13692
|
};
|
|
13616
|
-
resume_default =
|
|
13693
|
+
resume_default = command36;
|
|
13617
13694
|
}
|
|
13618
13695
|
});
|
|
13619
13696
|
|
|
@@ -13721,7 +13798,7 @@ var create_exports = {};
|
|
|
13721
13798
|
__export(create_exports, {
|
|
13722
13799
|
default: () => create_default
|
|
13723
13800
|
});
|
|
13724
|
-
var
|
|
13801
|
+
var command37, create_default;
|
|
13725
13802
|
var init_create = __esm({
|
|
13726
13803
|
"src/commands/sandbox/create.ts"() {
|
|
13727
13804
|
"use strict";
|
|
@@ -13729,7 +13806,7 @@ var init_create = __esm({
|
|
|
13729
13806
|
init_exit_codes();
|
|
13730
13807
|
init_http();
|
|
13731
13808
|
init_shared();
|
|
13732
|
-
|
|
13809
|
+
command37 = {
|
|
13733
13810
|
resource: "sandbox",
|
|
13734
13811
|
action: "create",
|
|
13735
13812
|
summary: "Create your developer sandbox and save its test key as the sandbox profile",
|
|
@@ -13771,7 +13848,7 @@ var init_create = __esm({
|
|
|
13771
13848
|
return ExitCode.Ok;
|
|
13772
13849
|
}
|
|
13773
13850
|
};
|
|
13774
|
-
create_default =
|
|
13851
|
+
create_default = command37;
|
|
13775
13852
|
}
|
|
13776
13853
|
});
|
|
13777
13854
|
|
|
@@ -13780,7 +13857,7 @@ var delete_exports = {};
|
|
|
13780
13857
|
__export(delete_exports, {
|
|
13781
13858
|
default: () => delete_default
|
|
13782
13859
|
});
|
|
13783
|
-
var
|
|
13860
|
+
var command38, delete_default;
|
|
13784
13861
|
var init_delete = __esm({
|
|
13785
13862
|
"src/commands/sandbox/delete.ts"() {
|
|
13786
13863
|
"use strict";
|
|
@@ -13788,7 +13865,7 @@ var init_delete = __esm({
|
|
|
13788
13865
|
init_confirm();
|
|
13789
13866
|
init_exit_codes();
|
|
13790
13867
|
init_shared();
|
|
13791
|
-
|
|
13868
|
+
command38 = {
|
|
13792
13869
|
resource: "sandbox",
|
|
13793
13870
|
action: "delete",
|
|
13794
13871
|
summary: "Delete your sandbox and its test keys",
|
|
@@ -13815,7 +13892,7 @@ var init_delete = __esm({
|
|
|
13815
13892
|
return ExitCode.Ok;
|
|
13816
13893
|
}
|
|
13817
13894
|
};
|
|
13818
|
-
delete_default =
|
|
13895
|
+
delete_default = command38;
|
|
13819
13896
|
}
|
|
13820
13897
|
});
|
|
13821
13898
|
|
|
@@ -13824,14 +13901,14 @@ var key_exports = {};
|
|
|
13824
13901
|
__export(key_exports, {
|
|
13825
13902
|
default: () => key_default
|
|
13826
13903
|
});
|
|
13827
|
-
var
|
|
13904
|
+
var command39, key_default;
|
|
13828
13905
|
var init_key = __esm({
|
|
13829
13906
|
"src/commands/sandbox/key.ts"() {
|
|
13830
13907
|
"use strict";
|
|
13831
13908
|
init_exit_codes();
|
|
13832
13909
|
init_http();
|
|
13833
13910
|
init_shared();
|
|
13834
|
-
|
|
13911
|
+
command39 = {
|
|
13835
13912
|
resource: "sandbox",
|
|
13836
13913
|
action: "key",
|
|
13837
13914
|
summary: "Create a new test key for your sandbox and save it as the sandbox profile",
|
|
@@ -13851,7 +13928,7 @@ var init_key = __esm({
|
|
|
13851
13928
|
return ExitCode.Ok;
|
|
13852
13929
|
}
|
|
13853
13930
|
};
|
|
13854
|
-
key_default =
|
|
13931
|
+
key_default = command39;
|
|
13855
13932
|
}
|
|
13856
13933
|
});
|
|
13857
13934
|
|
|
@@ -13860,13 +13937,13 @@ var list_exports2 = {};
|
|
|
13860
13937
|
__export(list_exports2, {
|
|
13861
13938
|
default: () => list_default2
|
|
13862
13939
|
});
|
|
13863
|
-
var
|
|
13940
|
+
var command40, list_default2;
|
|
13864
13941
|
var init_list2 = __esm({
|
|
13865
13942
|
"src/commands/sandbox/list.ts"() {
|
|
13866
13943
|
"use strict";
|
|
13867
13944
|
init_exit_codes();
|
|
13868
13945
|
init_shared();
|
|
13869
|
-
|
|
13946
|
+
command40 = {
|
|
13870
13947
|
resource: "sandbox",
|
|
13871
13948
|
action: "list",
|
|
13872
13949
|
summary: "List your developer sandbox",
|
|
@@ -13882,7 +13959,7 @@ var init_list2 = __esm({
|
|
|
13882
13959
|
return ExitCode.Ok;
|
|
13883
13960
|
}
|
|
13884
13961
|
};
|
|
13885
|
-
list_default2 =
|
|
13962
|
+
list_default2 = command40;
|
|
13886
13963
|
}
|
|
13887
13964
|
});
|
|
13888
13965
|
|
|
@@ -13891,14 +13968,14 @@ var reset_exports = {};
|
|
|
13891
13968
|
__export(reset_exports, {
|
|
13892
13969
|
default: () => reset_default
|
|
13893
13970
|
});
|
|
13894
|
-
var
|
|
13971
|
+
var command41, reset_default;
|
|
13895
13972
|
var init_reset = __esm({
|
|
13896
13973
|
"src/commands/sandbox/reset.ts"() {
|
|
13897
13974
|
"use strict";
|
|
13898
13975
|
init_exit_codes();
|
|
13899
13976
|
init_http();
|
|
13900
13977
|
init_shared();
|
|
13901
|
-
|
|
13978
|
+
command41 = {
|
|
13902
13979
|
resource: "sandbox",
|
|
13903
13980
|
action: "reset",
|
|
13904
13981
|
summary: "Reset your sandbox to its seed data",
|
|
@@ -13916,7 +13993,7 @@ var init_reset = __esm({
|
|
|
13916
13993
|
return ExitCode.Ok;
|
|
13917
13994
|
}
|
|
13918
13995
|
};
|
|
13919
|
-
reset_default =
|
|
13996
|
+
reset_default = command41;
|
|
13920
13997
|
}
|
|
13921
13998
|
});
|
|
13922
13999
|
|
|
@@ -14176,7 +14253,7 @@ __export(pull_exports, {
|
|
|
14176
14253
|
});
|
|
14177
14254
|
import { mkdir, writeFile as writeFile4 } from "node:fs/promises";
|
|
14178
14255
|
import { dirname as dirname2, resolve as resolve11 } from "node:path";
|
|
14179
|
-
var
|
|
14256
|
+
var command42, pull_default;
|
|
14180
14257
|
var init_pull = __esm({
|
|
14181
14258
|
"src/commands/studio/pull.ts"() {
|
|
14182
14259
|
"use strict";
|
|
@@ -14186,7 +14263,7 @@ var init_pull = __esm({
|
|
|
14186
14263
|
init_common2();
|
|
14187
14264
|
init_folder();
|
|
14188
14265
|
init_transfer2();
|
|
14189
|
-
|
|
14266
|
+
command42 = {
|
|
14190
14267
|
resource: "studio",
|
|
14191
14268
|
action: "pull",
|
|
14192
14269
|
summary: "Write a template version's files to a folder",
|
|
@@ -14233,7 +14310,7 @@ var init_pull = __esm({
|
|
|
14233
14310
|
return ExitCode.Ok;
|
|
14234
14311
|
}
|
|
14235
14312
|
};
|
|
14236
|
-
pull_default =
|
|
14313
|
+
pull_default = command42;
|
|
14237
14314
|
}
|
|
14238
14315
|
});
|
|
14239
14316
|
|
|
@@ -14266,7 +14343,7 @@ var push_exports = {};
|
|
|
14266
14343
|
__export(push_exports, {
|
|
14267
14344
|
default: () => push_default
|
|
14268
14345
|
});
|
|
14269
|
-
var BUILT_BY, DEFAULT_MESSAGE,
|
|
14346
|
+
var BUILT_BY, DEFAULT_MESSAGE, command43, push_default;
|
|
14270
14347
|
var init_push = __esm({
|
|
14271
14348
|
"src/commands/studio/push.ts"() {
|
|
14272
14349
|
"use strict";
|
|
@@ -14278,7 +14355,7 @@ var init_push = __esm({
|
|
|
14278
14355
|
init_read();
|
|
14279
14356
|
BUILT_BY = "customer_agent";
|
|
14280
14357
|
DEFAULT_MESSAGE = "Pushed with the Kenso CLI";
|
|
14281
|
-
|
|
14358
|
+
command43 = {
|
|
14282
14359
|
resource: "studio",
|
|
14283
14360
|
action: "push",
|
|
14284
14361
|
summary: "Save a folder's files to a template's draft and print the validation",
|
|
@@ -14370,7 +14447,7 @@ var init_push = __esm({
|
|
|
14370
14447
|
);
|
|
14371
14448
|
}
|
|
14372
14449
|
};
|
|
14373
|
-
push_default =
|
|
14450
|
+
push_default = command43;
|
|
14374
14451
|
}
|
|
14375
14452
|
});
|
|
14376
14453
|
|
|
@@ -14379,7 +14456,7 @@ var validate_exports = {};
|
|
|
14379
14456
|
__export(validate_exports, {
|
|
14380
14457
|
default: () => validate_default
|
|
14381
14458
|
});
|
|
14382
|
-
var
|
|
14459
|
+
var command44, validate_default;
|
|
14383
14460
|
var init_validate = __esm({
|
|
14384
14461
|
"src/commands/studio/validate.ts"() {
|
|
14385
14462
|
"use strict";
|
|
@@ -14388,7 +14465,7 @@ var init_validate = __esm({
|
|
|
14388
14465
|
init_columns();
|
|
14389
14466
|
init_common2();
|
|
14390
14467
|
init_read();
|
|
14391
|
-
|
|
14468
|
+
command44 = {
|
|
14392
14469
|
resource: "studio",
|
|
14393
14470
|
action: "validate",
|
|
14394
14471
|
summary: "Validate a folder's files against a template without saving them",
|
|
@@ -14417,7 +14494,7 @@ var init_validate = __esm({
|
|
|
14417
14494
|
throw validationFailed(validation, "The files have validation errors", commandLine2(ctx, "studio validate", args));
|
|
14418
14495
|
}
|
|
14419
14496
|
};
|
|
14420
|
-
validate_default =
|
|
14497
|
+
validate_default = command44;
|
|
14421
14498
|
}
|
|
14422
14499
|
});
|
|
14423
14500
|
|
|
@@ -14466,7 +14543,7 @@ function accountIds(value) {
|
|
|
14466
14543
|
}
|
|
14467
14544
|
return ids2.map(Number);
|
|
14468
14545
|
}
|
|
14469
|
-
var SHOWN,
|
|
14546
|
+
var SHOWN, command45, preview_default;
|
|
14470
14547
|
var init_preview = __esm({
|
|
14471
14548
|
"src/commands/studio/preview.ts"() {
|
|
14472
14549
|
"use strict";
|
|
@@ -14478,7 +14555,7 @@ var init_preview = __esm({
|
|
|
14478
14555
|
init_common2();
|
|
14479
14556
|
init_folder();
|
|
14480
14557
|
SHOWN = 5;
|
|
14481
|
-
|
|
14558
|
+
command45 = {
|
|
14482
14559
|
resource: "studio",
|
|
14483
14560
|
action: "preview",
|
|
14484
14561
|
summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
|
|
@@ -14527,7 +14604,7 @@ var init_preview = __esm({
|
|
|
14527
14604
|
return ExitCode.Ok;
|
|
14528
14605
|
}
|
|
14529
14606
|
};
|
|
14530
|
-
preview_default =
|
|
14607
|
+
preview_default = command45;
|
|
14531
14608
|
}
|
|
14532
14609
|
});
|
|
14533
14610
|
|
|
@@ -14728,7 +14805,7 @@ function estimateOutput(templateId, target, estimate2) {
|
|
|
14728
14805
|
...target.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
|
|
14729
14806
|
};
|
|
14730
14807
|
}
|
|
14731
|
-
var COMMAND6, sha2562,
|
|
14808
|
+
var COMMAND6, sha2562, command46, fill_default;
|
|
14732
14809
|
var init_fill = __esm({
|
|
14733
14810
|
"src/commands/studio/fill.ts"() {
|
|
14734
14811
|
"use strict";
|
|
@@ -14744,7 +14821,7 @@ var init_fill = __esm({
|
|
|
14744
14821
|
init_fill_runs();
|
|
14745
14822
|
COMMAND6 = "studio fill";
|
|
14746
14823
|
sha2562 = (data) => createHash8("sha256").update(data).digest("hex");
|
|
14747
|
-
|
|
14824
|
+
command46 = {
|
|
14748
14825
|
resource: "studio",
|
|
14749
14826
|
action: "fill",
|
|
14750
14827
|
summary: "Fill a template on many accounts or campaign leads (estimate first)",
|
|
@@ -14804,7 +14881,7 @@ var init_fill = __esm({
|
|
|
14804
14881
|
return outcome.exitCode;
|
|
14805
14882
|
}
|
|
14806
14883
|
};
|
|
14807
|
-
fill_default =
|
|
14884
|
+
fill_default = command46;
|
|
14808
14885
|
}
|
|
14809
14886
|
});
|
|
14810
14887
|
|
|
@@ -14906,7 +14983,7 @@ var add_exports = {};
|
|
|
14906
14983
|
__export(add_exports, {
|
|
14907
14984
|
default: () => add_default
|
|
14908
14985
|
});
|
|
14909
|
-
var NEXT,
|
|
14986
|
+
var NEXT, command47, add_default;
|
|
14910
14987
|
var init_add = __esm({
|
|
14911
14988
|
"src/commands/tasks/add.ts"() {
|
|
14912
14989
|
"use strict";
|
|
@@ -14915,7 +14992,7 @@ var init_add = __esm({
|
|
|
14915
14992
|
init_http();
|
|
14916
14993
|
init_shared2();
|
|
14917
14994
|
NEXT = 'kenso tasks add "Send the deck" --due tomorrow --account 812';
|
|
14918
|
-
|
|
14995
|
+
command47 = {
|
|
14919
14996
|
resource: "tasks",
|
|
14920
14997
|
action: "add",
|
|
14921
14998
|
summary: "Add a task: a title, an optional due day and time, assignee and the account, person or deal it is about",
|
|
@@ -14950,7 +15027,7 @@ var init_add = __esm({
|
|
|
14950
15027
|
return ExitCode.Ok;
|
|
14951
15028
|
}
|
|
14952
15029
|
};
|
|
14953
|
-
add_default =
|
|
15030
|
+
add_default = command47;
|
|
14954
15031
|
}
|
|
14955
15032
|
});
|
|
14956
15033
|
|
|
@@ -14969,7 +15046,7 @@ async function patchTask(ctx, taskId, change) {
|
|
|
14969
15046
|
return unwrap((await send2()).body);
|
|
14970
15047
|
}
|
|
14971
15048
|
}
|
|
14972
|
-
var
|
|
15049
|
+
var command48, done_default;
|
|
14973
15050
|
var init_done = __esm({
|
|
14974
15051
|
"src/commands/tasks/done.ts"() {
|
|
14975
15052
|
"use strict";
|
|
@@ -14977,7 +15054,7 @@ var init_done = __esm({
|
|
|
14977
15054
|
init_exit_codes();
|
|
14978
15055
|
init_http();
|
|
14979
15056
|
init_shared2();
|
|
14980
|
-
|
|
15057
|
+
command48 = {
|
|
14981
15058
|
resource: "tasks",
|
|
14982
15059
|
action: "done",
|
|
14983
15060
|
summary: "Complete one or more tasks (--undo reopens them)",
|
|
@@ -15000,7 +15077,7 @@ var init_done = __esm({
|
|
|
15000
15077
|
return ExitCode.Ok;
|
|
15001
15078
|
}
|
|
15002
15079
|
};
|
|
15003
|
-
done_default =
|
|
15080
|
+
done_default = command48;
|
|
15004
15081
|
}
|
|
15005
15082
|
});
|
|
15006
15083
|
|
|
@@ -15009,7 +15086,7 @@ var assign_exports = {};
|
|
|
15009
15086
|
__export(assign_exports, {
|
|
15010
15087
|
default: () => assign_default
|
|
15011
15088
|
});
|
|
15012
|
-
var NEXT2,
|
|
15089
|
+
var NEXT2, command49, assign_default;
|
|
15013
15090
|
var init_assign = __esm({
|
|
15014
15091
|
"src/commands/tasks/assign.ts"() {
|
|
15015
15092
|
"use strict";
|
|
@@ -15017,7 +15094,7 @@ var init_assign = __esm({
|
|
|
15017
15094
|
init_done();
|
|
15018
15095
|
init_shared2();
|
|
15019
15096
|
NEXT2 = "kenso tasks assign <taskId> <me|memberId|email>";
|
|
15020
|
-
|
|
15097
|
+
command49 = {
|
|
15021
15098
|
resource: "tasks",
|
|
15022
15099
|
action: "assign",
|
|
15023
15100
|
summary: "Give a task to a member",
|
|
@@ -15037,7 +15114,7 @@ var init_assign = __esm({
|
|
|
15037
15114
|
return ExitCode.Ok;
|
|
15038
15115
|
}
|
|
15039
15116
|
};
|
|
15040
|
-
assign_default =
|
|
15117
|
+
assign_default = command49;
|
|
15041
15118
|
}
|
|
15042
15119
|
});
|
|
15043
15120
|
|
|
@@ -15046,14 +15123,14 @@ var queue_exports = {};
|
|
|
15046
15123
|
__export(queue_exports, {
|
|
15047
15124
|
default: () => queue_default
|
|
15048
15125
|
});
|
|
15049
|
-
var SCOPES,
|
|
15126
|
+
var SCOPES, command50, queue_default;
|
|
15050
15127
|
var init_queue = __esm({
|
|
15051
15128
|
"src/commands/tasks/queue.ts"() {
|
|
15052
15129
|
"use strict";
|
|
15053
15130
|
init_errors();
|
|
15054
15131
|
init_exit_codes();
|
|
15055
15132
|
SCOPES = ["mine", "assigned_by_me", "everyone"];
|
|
15056
|
-
|
|
15133
|
+
command50 = {
|
|
15057
15134
|
resource: "tasks",
|
|
15058
15135
|
action: "queue",
|
|
15059
15136
|
summary: "Your open work by due day: tasks, touches, call tasks, reply reminders and Ken follow-ups",
|
|
@@ -15074,7 +15151,7 @@ var init_queue = __esm({
|
|
|
15074
15151
|
return ExitCode.Ok;
|
|
15075
15152
|
}
|
|
15076
15153
|
};
|
|
15077
|
-
queue_default =
|
|
15154
|
+
queue_default = command50;
|
|
15078
15155
|
}
|
|
15079
15156
|
});
|
|
15080
15157
|
|
|
@@ -15224,7 +15301,7 @@ function readBody(req) {
|
|
|
15224
15301
|
function reply(res, status, body2) {
|
|
15225
15302
|
res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
|
|
15226
15303
|
}
|
|
15227
|
-
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES,
|
|
15304
|
+
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command51, listen_default;
|
|
15228
15305
|
var init_listen = __esm({
|
|
15229
15306
|
"src/commands/webhooks/listen.ts"() {
|
|
15230
15307
|
"use strict";
|
|
@@ -15235,7 +15312,7 @@ var init_listen = __esm({
|
|
|
15235
15312
|
MIN_POLL_MS = 1e3;
|
|
15236
15313
|
MAX_POLL_MS = 6e4;
|
|
15237
15314
|
MAX_TRIGGER_BYTES = 1e6;
|
|
15238
|
-
|
|
15315
|
+
command51 = {
|
|
15239
15316
|
resource: "webhooks",
|
|
15240
15317
|
action: "listen",
|
|
15241
15318
|
summary: "Stream the workspace's events and forward them, signed, to a local handler",
|
|
@@ -15341,7 +15418,7 @@ var init_listen = __esm({
|
|
|
15341
15418
|
return ExitCode.Ok;
|
|
15342
15419
|
}
|
|
15343
15420
|
};
|
|
15344
|
-
listen_default =
|
|
15421
|
+
listen_default = command51;
|
|
15345
15422
|
}
|
|
15346
15423
|
});
|
|
15347
15424
|
|
|
@@ -15360,7 +15437,7 @@ function notRunning() {
|
|
|
15360
15437
|
next: LISTEN_NEXT
|
|
15361
15438
|
});
|
|
15362
15439
|
}
|
|
15363
|
-
var LISTEN_NEXT,
|
|
15440
|
+
var LISTEN_NEXT, command52, trigger_default;
|
|
15364
15441
|
var init_trigger = __esm({
|
|
15365
15442
|
"src/commands/webhooks/trigger.ts"() {
|
|
15366
15443
|
"use strict";
|
|
@@ -15369,7 +15446,7 @@ var init_trigger = __esm({
|
|
|
15369
15446
|
init_http();
|
|
15370
15447
|
init_local();
|
|
15371
15448
|
LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
|
|
15372
|
-
|
|
15449
|
+
command52 = {
|
|
15373
15450
|
resource: "webhooks",
|
|
15374
15451
|
action: "trigger",
|
|
15375
15452
|
summary: "Send a sample event of one type through the running kenso webhooks listen",
|
|
@@ -15426,7 +15503,7 @@ var init_trigger = __esm({
|
|
|
15426
15503
|
return ExitCode.Ok;
|
|
15427
15504
|
}
|
|
15428
15505
|
};
|
|
15429
|
-
trigger_default =
|
|
15506
|
+
trigger_default = command52;
|
|
15430
15507
|
}
|
|
15431
15508
|
});
|
|
15432
15509
|
|
|
@@ -15630,14 +15707,14 @@ var status_exports3 = {};
|
|
|
15630
15707
|
__export(status_exports3, {
|
|
15631
15708
|
default: () => status_default3
|
|
15632
15709
|
});
|
|
15633
|
-
var
|
|
15710
|
+
var command53, status_default3;
|
|
15634
15711
|
var init_status3 = __esm({
|
|
15635
15712
|
"src/commands/work/status.ts"() {
|
|
15636
15713
|
"use strict";
|
|
15637
15714
|
init_exit_codes();
|
|
15638
15715
|
init_http();
|
|
15639
15716
|
init_common3();
|
|
15640
|
-
|
|
15717
|
+
command53 = {
|
|
15641
15718
|
resource: "work",
|
|
15642
15719
|
action: "status",
|
|
15643
15720
|
summary: "Show the Kenso AI work waiting for your own agent, per kind",
|
|
@@ -15671,7 +15748,7 @@ var init_status3 = __esm({
|
|
|
15671
15748
|
return ExitCode.Ok;
|
|
15672
15749
|
}
|
|
15673
15750
|
};
|
|
15674
|
-
status_default3 =
|
|
15751
|
+
status_default3 = command53;
|
|
15675
15752
|
}
|
|
15676
15753
|
});
|
|
15677
15754
|
|
|
@@ -15803,9 +15880,9 @@ var init_files = __esm({
|
|
|
15803
15880
|
import { execFile, spawnSync as spawnSync2 } from "node:child_process";
|
|
15804
15881
|
import { readFileSync as readFileSync12 } from "node:fs";
|
|
15805
15882
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
15806
|
-
function sudoArgs(user,
|
|
15883
|
+
function sudoArgs(user, command61, args, keep = [], set = {}) {
|
|
15807
15884
|
const assignments = Object.entries(set).map(([name, value]) => `${name}=${value}`);
|
|
15808
|
-
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];
|
|
15809
15886
|
}
|
|
15810
15887
|
function agentKensoEnv(opts) {
|
|
15811
15888
|
return {
|
|
@@ -15815,12 +15892,12 @@ function agentKensoEnv(opts) {
|
|
|
15815
15892
|
AI_AGENT: opts.agentName
|
|
15816
15893
|
};
|
|
15817
15894
|
}
|
|
15818
|
-
function sudoExec(user,
|
|
15895
|
+
function sudoExec(user, command61, args, opts = {}) {
|
|
15819
15896
|
const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
|
|
15820
15897
|
return new Promise((resolve16) => {
|
|
15821
15898
|
execFile(
|
|
15822
15899
|
sudo,
|
|
15823
|
-
[...lead, ...sudoArgs(user.name,
|
|
15900
|
+
[...lead, ...sudoArgs(user.name, command61, args)],
|
|
15824
15901
|
{ env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
|
|
15825
15902
|
(err, stdout, stderr) => {
|
|
15826
15903
|
const code = err ? err.code : 0;
|
|
@@ -15930,9 +16007,9 @@ var init_folder2 = __esm({
|
|
|
15930
16007
|
init_redact();
|
|
15931
16008
|
init_agent_user();
|
|
15932
16009
|
WorkRunFolder = class {
|
|
15933
|
-
constructor(ctx,
|
|
16010
|
+
constructor(ctx, command61, args, outDir, shared = false) {
|
|
15934
16011
|
this.ctx = ctx;
|
|
15935
|
-
this.command =
|
|
16012
|
+
this.command = command61;
|
|
15936
16013
|
this.args = args;
|
|
15937
16014
|
this.outDir = outDir;
|
|
15938
16015
|
this.shared = shared;
|
|
@@ -16047,7 +16124,7 @@ var pull_exports2 = {};
|
|
|
16047
16124
|
__export(pull_exports2, {
|
|
16048
16125
|
default: () => pull_default2
|
|
16049
16126
|
});
|
|
16050
|
-
var MAX_FILES,
|
|
16127
|
+
var MAX_FILES, command54, pull_default2;
|
|
16051
16128
|
var init_pull2 = __esm({
|
|
16052
16129
|
"src/commands/work/pull.ts"() {
|
|
16053
16130
|
"use strict";
|
|
@@ -16056,7 +16133,7 @@ var init_pull2 = __esm({
|
|
|
16056
16133
|
init_common3();
|
|
16057
16134
|
init_folder2();
|
|
16058
16135
|
MAX_FILES = 100;
|
|
16059
|
-
|
|
16136
|
+
command54 = {
|
|
16060
16137
|
resource: "work",
|
|
16061
16138
|
action: "pull",
|
|
16062
16139
|
summary: "Claim waiting work into local work files, to answer by hand",
|
|
@@ -16134,7 +16211,7 @@ var init_pull2 = __esm({
|
|
|
16134
16211
|
return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
|
|
16135
16212
|
}
|
|
16136
16213
|
};
|
|
16137
|
-
pull_default2 =
|
|
16214
|
+
pull_default2 = command54;
|
|
16138
16215
|
}
|
|
16139
16216
|
});
|
|
16140
16217
|
|
|
@@ -16276,7 +16353,7 @@ __export(submit_exports, {
|
|
|
16276
16353
|
default: () => submit_default
|
|
16277
16354
|
});
|
|
16278
16355
|
import { resolve as resolve14 } from "node:path";
|
|
16279
|
-
var
|
|
16356
|
+
var command55, submit_default;
|
|
16280
16357
|
var init_submit = __esm({
|
|
16281
16358
|
"src/commands/work/submit.ts"() {
|
|
16282
16359
|
"use strict";
|
|
@@ -16285,7 +16362,7 @@ var init_submit = __esm({
|
|
|
16285
16362
|
init_files();
|
|
16286
16363
|
init_answers();
|
|
16287
16364
|
init_common3();
|
|
16288
|
-
|
|
16365
|
+
command55 = {
|
|
16289
16366
|
resource: "work",
|
|
16290
16367
|
action: "submit",
|
|
16291
16368
|
summary: "Send answers files to Kenso and write each one's results",
|
|
@@ -16317,7 +16394,7 @@ var init_submit = __esm({
|
|
|
16317
16394
|
return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
|
|
16318
16395
|
}
|
|
16319
16396
|
};
|
|
16320
|
-
submit_default =
|
|
16397
|
+
submit_default = command55;
|
|
16321
16398
|
}
|
|
16322
16399
|
});
|
|
16323
16400
|
|
|
@@ -16338,7 +16415,7 @@ function claimIdOf(arg) {
|
|
|
16338
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..." });
|
|
16339
16416
|
return arg;
|
|
16340
16417
|
}
|
|
16341
|
-
var CLAIM_ID,
|
|
16418
|
+
var CLAIM_ID, command56, release_default;
|
|
16342
16419
|
var init_release = __esm({
|
|
16343
16420
|
"src/commands/work/release.ts"() {
|
|
16344
16421
|
"use strict";
|
|
@@ -16347,7 +16424,7 @@ var init_release = __esm({
|
|
|
16347
16424
|
init_files();
|
|
16348
16425
|
init_common3();
|
|
16349
16426
|
CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
16350
|
-
|
|
16427
|
+
command56 = {
|
|
16351
16428
|
resource: "work",
|
|
16352
16429
|
action: "release",
|
|
16353
16430
|
summary: "Give claimed work back to the queue now",
|
|
@@ -16366,7 +16443,7 @@ var init_release = __esm({
|
|
|
16366
16443
|
return ExitCode.Ok;
|
|
16367
16444
|
}
|
|
16368
16445
|
};
|
|
16369
|
-
release_default =
|
|
16446
|
+
release_default = command56;
|
|
16370
16447
|
}
|
|
16371
16448
|
});
|
|
16372
16449
|
|
|
@@ -16705,12 +16782,12 @@ function plain(text4) {
|
|
|
16705
16782
|
return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
|
|
16706
16783
|
}
|
|
16707
16784
|
function runStatus(bin, args, env, adapter, runAs) {
|
|
16708
|
-
const
|
|
16785
|
+
const command61 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
|
|
16709
16786
|
const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
|
|
16710
16787
|
const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
|
|
16711
16788
|
return new Promise((resolve16) => {
|
|
16712
16789
|
execFile2(
|
|
16713
|
-
|
|
16790
|
+
command61,
|
|
16714
16791
|
commandArgs2,
|
|
16715
16792
|
{ ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
|
|
16716
16793
|
(err, stdout, stderr) => {
|
|
@@ -17792,7 +17869,7 @@ var run_exports3 = {};
|
|
|
17792
17869
|
__export(run_exports3, {
|
|
17793
17870
|
default: () => run_default2
|
|
17794
17871
|
});
|
|
17795
|
-
var FAILURES_IN_A_ROW,
|
|
17872
|
+
var FAILURES_IN_A_ROW, command57, run_default2;
|
|
17796
17873
|
var init_run3 = __esm({
|
|
17797
17874
|
"src/commands/work/run.ts"() {
|
|
17798
17875
|
"use strict";
|
|
@@ -17813,7 +17890,7 @@ var init_run3 = __esm({
|
|
|
17813
17890
|
init_folder2();
|
|
17814
17891
|
init_stop();
|
|
17815
17892
|
FAILURES_IN_A_ROW = 3;
|
|
17816
|
-
|
|
17893
|
+
command57 = {
|
|
17817
17894
|
resource: "work",
|
|
17818
17895
|
action: "run",
|
|
17819
17896
|
summary: "Run your own coding agent on the waiting work until the queue is empty",
|
|
@@ -18138,7 +18215,7 @@ var init_run3 = __esm({
|
|
|
18138
18215
|
return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
|
|
18139
18216
|
}
|
|
18140
18217
|
};
|
|
18141
|
-
run_default2 =
|
|
18218
|
+
run_default2 = command57;
|
|
18142
18219
|
}
|
|
18143
18220
|
});
|
|
18144
18221
|
|
|
@@ -18178,7 +18255,7 @@ function rewrap(err, overrides) {
|
|
|
18178
18255
|
details: err.details
|
|
18179
18256
|
});
|
|
18180
18257
|
}
|
|
18181
|
-
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE,
|
|
18258
|
+
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE, command58, keys_default;
|
|
18182
18259
|
var init_keys = __esm({
|
|
18183
18260
|
"src/commands/workspace/keys.ts"() {
|
|
18184
18261
|
"use strict";
|
|
@@ -18188,7 +18265,7 @@ var init_keys = __esm({
|
|
|
18188
18265
|
TEMPLATES = ["admin", "editor", "viewer"];
|
|
18189
18266
|
APP_NEXT_STEP = "A workspace admin can create it in the app: Settings > API keys > Workspace keys";
|
|
18190
18267
|
NOT_AVAILABLE = "Workspace keys are not available for this workspace yet.";
|
|
18191
|
-
|
|
18268
|
+
command58 = {
|
|
18192
18269
|
resource: "workspace",
|
|
18193
18270
|
action: "keys",
|
|
18194
18271
|
summary: "Create an API key the workspace owns",
|
|
@@ -18249,7 +18326,7 @@ var init_keys = __esm({
|
|
|
18249
18326
|
return ExitCode.Ok;
|
|
18250
18327
|
}
|
|
18251
18328
|
};
|
|
18252
|
-
keys_default =
|
|
18329
|
+
keys_default = command58;
|
|
18253
18330
|
}
|
|
18254
18331
|
});
|
|
18255
18332
|
|
|
@@ -18267,14 +18344,14 @@ function parseLimit(value) {
|
|
|
18267
18344
|
}
|
|
18268
18345
|
return limit;
|
|
18269
18346
|
}
|
|
18270
|
-
var MAX_LIMIT,
|
|
18347
|
+
var MAX_LIMIT, command59, list_default3;
|
|
18271
18348
|
var init_list3 = __esm({
|
|
18272
18349
|
"src/commands/workspace/list.ts"() {
|
|
18273
18350
|
"use strict";
|
|
18274
18351
|
init_errors();
|
|
18275
18352
|
init_exit_codes();
|
|
18276
18353
|
MAX_LIMIT = 200;
|
|
18277
|
-
|
|
18354
|
+
command59 = {
|
|
18278
18355
|
resource: "workspace",
|
|
18279
18356
|
action: "list",
|
|
18280
18357
|
summary: "List the workspaces your key can use",
|
|
@@ -18302,7 +18379,7 @@ var init_list3 = __esm({
|
|
|
18302
18379
|
return ExitCode.Ok;
|
|
18303
18380
|
}
|
|
18304
18381
|
};
|
|
18305
|
-
list_default3 =
|
|
18382
|
+
list_default3 = command59;
|
|
18306
18383
|
}
|
|
18307
18384
|
});
|
|
18308
18385
|
|
|
@@ -18311,7 +18388,7 @@ var use_exports = {};
|
|
|
18311
18388
|
__export(use_exports, {
|
|
18312
18389
|
default: () => use_default
|
|
18313
18390
|
});
|
|
18314
|
-
var
|
|
18391
|
+
var command60, use_default;
|
|
18315
18392
|
var init_use = __esm({
|
|
18316
18393
|
"src/commands/workspace/use.ts"() {
|
|
18317
18394
|
"use strict";
|
|
@@ -18319,7 +18396,7 @@ var init_use = __esm({
|
|
|
18319
18396
|
init_errors();
|
|
18320
18397
|
init_exit_codes();
|
|
18321
18398
|
init_http();
|
|
18322
|
-
|
|
18399
|
+
command60 = {
|
|
18323
18400
|
resource: "workspace",
|
|
18324
18401
|
action: "use",
|
|
18325
18402
|
summary: "Set the profile's default workspace",
|
|
@@ -18376,7 +18453,7 @@ var init_use = __esm({
|
|
|
18376
18453
|
return ExitCode.Ok;
|
|
18377
18454
|
}
|
|
18378
18455
|
};
|
|
18379
|
-
use_default =
|
|
18456
|
+
use_default = command60;
|
|
18380
18457
|
}
|
|
18381
18458
|
});
|
|
18382
18459
|
|
|
@@ -18946,8 +19023,8 @@ function startUpdateNotice(argv, opts = {}) {
|
|
|
18946
19023
|
if (!found) return;
|
|
18947
19024
|
writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
|
|
18948
19025
|
if (isNewer(found, version)) {
|
|
18949
|
-
const
|
|
18950
|
-
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}
|
|
18951
19028
|
Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
|
|
18952
19029
|
`);
|
|
18953
19030
|
}
|