kenso 0.1.90 → 0.1.91
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/CHANGELOG.md +1 -0
- package/dist/kenso.js +258 -183
- package/dist/operations.json +1 -1
- package/docs/crm.md +3 -1
- package/docs/reference.md +100 -7
- 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.91" : "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: command60, createdAt, status } = raw;
|
|
4178
4178
|
if (typeof runId !== "string" || !RUN_ID_PATTERN.test(runId)) return null;
|
|
4179
|
-
if (typeof
|
|
4179
|
+
if (typeof command60 !== "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: command60,
|
|
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(command60, 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 === command60 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
|
|
4250
4250
|
);
|
|
4251
4251
|
}
|
|
4252
4252
|
function isOtherLiveProcess(pid) {
|
|
@@ -7451,8 +7451,8 @@ function idValue(value, field) {
|
|
|
7451
7451
|
function shellQuote3(arg) {
|
|
7452
7452
|
return /^[A-Za-z0-9_./:=@%+,-]+$/.test(arg) ? arg : `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
7453
7453
|
}
|
|
7454
|
-
function commandLine2(ctx,
|
|
7455
|
-
const parts2 = ["kenso", ...
|
|
7454
|
+
function commandLine2(ctx, command60, args, extra = []) {
|
|
7455
|
+
const parts2 = ["kenso", ...command60.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
|
|
7456
7456
|
for (const [name, value] of Object.entries(args.flags)) {
|
|
7457
7457
|
if (value === void 0 || value === false) continue;
|
|
7458
7458
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -7784,7 +7784,7 @@ var init_connect = __esm({
|
|
|
7784
7784
|
var crm_default;
|
|
7785
7785
|
var init_crm = __esm({
|
|
7786
7786
|
"docs/crm.md"() {
|
|
7787
|
-
crm_default = '# CRM (beta)\n\nThe CRM commands work on Kenso\'s Accounts lane: accounts (companies), the people on them, and opportunities. They are beta: they need the `accounts` feature flag on your workspace (opportunities need `opportunities`, CRM sync needs `ingestion`). Help and `kenso describe` hide them until your workspace has the flag; `--all-commands` shows them.\n\n| Command | What it does |\n|---|---|\n| `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |\n| `people import` | Create or match people from a file, optionally onto accounts |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `deleted-accounts list`, `accounts restore <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved Accounts view, or what the filters match |\n| `capture status` | Your captured mailbox, its backfill progress and what teammates see of a captured email. Needs the `crm_capture` flag |\n| `capture connect` | Turn capture on for your own mailbox. `--private` starts it hidden from teammates; `--provider google` prints a sign-in link when no account is connected yet |\n| `capture private on\\|off` | Hide your captured email from teammates, or show it again. Email only: meetings stay visible |\n| `capture disconnect` | Turn capture off and delete your stored email bodies. Asks first; `--yes` skips the question |\n| `capture teammates-see summary\\|full_email` | Workspace admin: what teammates see of captured email |\n| `pipelines stage-rules` | List or set the fields a deal should have in each stage |\n| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n| `tasks add`, `tasks done`, `tasks assign`, `tasks queue` | Add a to-do for a member on an account, person or deal, complete it, hand it on, or read your open work (needs `tasks`) |\n\nImport accounts first, then people: `people import` never creates an account.\n\n## Import accounts\n\n```bash\nkenso accounts import --file accounts.csv\nkenso accounts import --file accounts.csv --yes\n```\n\n```csv\nname,domain,industry,employeeCount\nAcme,acme.io,Software,120\nGlobex,globex.com,Manufacturing,"1,200"\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `name` (or `company`, `companyName`, `accountName`), `domains` (several, split on `,` or `;`) or one `domain` (or `website`, `companyDomain`), `industry`, `employeeCount`, `hqLocation`, `linkedinUrl`, `stage`, `angle`, `whyNow`, `fitScore`, `fundingRound`, `cadenceDays`, `ownerMemberId`, `kenCompanyId`, `sendsFromInboxId`, `sendsFromLinkedInAccountId` and `source`.\n- **A domain is required.** A file with no domain column is a usage error, and a row without a domain is `invalid` (`domain_required`).\n- **The dry run prices the research.** It asks for a credit estimate per 1,000 accounts and puts the sum in the plan: `kind`, `accountCount`, `totalMillicredits`, `availableMillicredits` and `sufficient`.\n- **Rows go 100 per call** to `POST /v1/accounts/bulk-create`.\n\nEach row comes back `created` (`id` is the new account; its research is queued, `researchQueued`, or waits for credits, `researchWaitingCredits`), `skipped` with reason `domain_taken` (already an account; `id` is that account) or `failed` (`reason` is the API\'s code, `error` names the field; an item Kenso failed to save is sent once more first). Rerunning the same file is safe: accounts that exist come back `domain_taken`.\n\n## Import people\n\n```bash\nkenso people import --file people.csv\nkenso people import --file people.csv --find-emails --yes\nkenso people import --file people.jsonl --dry-run\n```\n\n```csv\nfullName,email,title,accountDomain,role\nAnn Lee,ann@acme.io,VP Sales,acme.io,champion\nBob Ray,,CTO,acme.io,\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `email`, `fullName` (or `name`), `firstName`, `lastName`, `title`, `linkedinUrl` (or `linkedin`, `profileUrl`), `accountDomain` (or `domain`, `website`, `companyDomain`), `accountId`, `role` and `priority`. Other columns are ignored with one warning.\n- **A person needs a name:** `fullName`, or `firstName`, `lastName` or both (the CLI joins them). A row with none of them is `invalid` (`name_required`).\n- **To put a person on an account,** give `accountDomain` or `accountId`. A row with both sends only `accountId`.\n- **`--find-emails`** queues an email find (charged in credits) for each person without an email.\n- **Rows go 200 per call** to `POST /v1/people/batch`.\n\nPeople already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nobody twice. A row comes back `created` (a new person), `updated` (an existing person added to the account), `skipped` with reason `already_on_account`, `matched` (no account asked) or `previously_removed`, or `failed`: `account_not_found` saves the person without an account (import the account, then rerun to place them), any other reason is the API\'s. The summary adds `matched`, `addedToAccounts` and `emailFindsQueued`.\n\n## List and search accounts\n\n`accounts list` and `accounts search` sort and page on the server, so they reach every account in the workspace, however many there are.\n\n```bash\nkenso accounts list --sort score:desc --limit 100 # one page; the output\'s next: line is the following one\nkenso accounts list --sort score:desc --limit 100 --all # every page, to the end\nkenso accounts search --search hiring --sort latestSignalAt:desc --data \'{"qFields": ["name", "latestSignal"]}\'\nkenso accounts search --limit 1 --data \'{"countBy": ["stage"]}\' # how many accounts sit in each stage\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}]}, "sort": "tier,-pipelineAmount"}\' --all\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "hqLocation", "operator": "contains", "values": ["Germany"]}]}}\' --all\n# tier 1 accounts with no meeting in 30 days: none since then, or none ever\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}, {"match": "any", "conditions": [{"field": "lastMeeting", "operator": "older_than_days", "values": ["30"]}, {"field": "lastMeeting", "operator": "is_empty"}]}]}}\' --all\n```\n\n- **`--sort`** takes up to 3 comma-separated keys, each `field` (ascending), `field:asc` or `field:desc`. The API\'s `-field` form needs the equals sign here, `--sort=-score`, because a value that starts with a dash reads as a flag. Fields: `createdAt`, `name`, `score`, `tier` (ascending is tier 1 first), `latestSignalAt`, `committee`, `pipelineAmount`, `nextTouchAt`, `lastTouchAt`. An account with no value for a key comes last in both directions. The default is `-createdAt`.\n- **`--limit`** is 1 to 1000 (default 50). `--cursor` takes the previous page\'s `nextCursor` with the same filters and sort; `--all` follows the cursors for you.\n- **`--search`** (also `--q`) matches the name or a domain.\n- **Lists and objects go in `--data`** on `search`, as the API takes them (`kenso describe accounts search`); a flag beside it sets or replaces one key:\n - `qFields` picks where the search text looks: `name`, `domain`, `latestSignal` (the latest signal\'s title).\n - `countBy` (`stage`, `stageGroup`) adds `counts` to the output: every value with the number of matching accounts that hold it, whatever the page. The output is then one object: `data`, `pagination` and `counts`.\n - `filters` and `where` narrow the accounts.\n\nAn account\'s timeline pages the same way. `kenso accounts activity 812` returns the newest 100 earlier rows and, when older ones exist, `data.nextCursor`. Pass it back as `--cursor` (with the same `--category`) for the rows before them, until a page comes without one.\n\n## Edit accounts, people and opportunities\n\nApart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command\'s flags by API name or flag name, and the id column fills the route:\n\n```bash\nkenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes\nkenso people update --each people-edit.csv --dry-run\nkenso opportunities update --each deals.csv --dry-run\n```\n\n```csv\naccountId,stage,ownerMemberId,overwritePinned\n501,engaged,42,true\n502,customer,42,true\n```\n\nA row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person\'s OK). Every flag of an update command: `kenso accounts update --help`.\n\n## Search opportunities\n\n`kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.\n\n```bash\nkenso opportunities search --data \'{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}\' --all\nkenso opportunities search --data \'{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}\'\nkenso opportunities search --limit 1 --data \'{"countBy": ["stage", "ownerMemberId"]}\' # how many opportunities hold each value\n```\n\n- **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.\n- **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.\n- `--account-id` keeps the search to one account. `closeDate` counts days in the member\'s app time zone.\n\nOne person\'s deals, meetings and campaign contacts, as their person page lists them:\n\n```bash\nkenso opportunities list --person-id 9001 # the deals they are on, or are the primary person of\nkenso meetings list --person-id 9001 # the meetings they attend, among the ones you can see\nkenso contacts list --person-id 9001 # their contact in each campaign they are in\n```\n\n## Write research you gathered\n\n`accounts write-research` and `people write-research` store research you gathered outside Kenso as the record\'s latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account\'s own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.\n\nThe body is the research block `accounts get --expand research` (or `people get-research`) returns, without its read-only fields: leave out `id`, `status`, `trigger`, `errorCode`, `researchedAt`, `isStale` and `appliedPrompt` (for a person also `mode`, `requestedAt`, `researchedMode`, `firecrawlCredits` and `webNote`), or the write fails with `unknown_field`. Pass it with `--data @file`:\n\n```bash\nkenso accounts write-research --account-id 501 --data @acme-dossier.json\nkenso people write-research --person-id 9001 --data @jane.json\n```\n\n```json\n{\n "tagline": { "text": "Payroll for EU contractors", "sourceUrls": ["https://acme.example"] },\n "description": { "text": "Acme runs payroll and compliance for companies hiring contractors in 30 EU countries.", "sourceUrls": ["https://acme.example"] },\n "links": { "website": "https://acme.example" },\n "whyNow": { "text": "Raised a $40M Series B in October", "sourceUrls": ["https://news.example/acme-b"], "date": "2026-10" },\n "fitScore": 82,\n "angle": "Lead with contractor onboarding time."\n}\n```\n\nMany records: one JSONL line per record, with the id next to the block\'s fields. Nested objects are sent as written. Use JSONL, not CSV: the block\'s fields are objects and lists, which a CSV cell cannot carry.\n\n```bash\nkenso accounts write-research --each dossiers.jsonl --dry-run # then the same with --yes\nkenso people write-research --each people-research.jsonl --yes --concurrency 8\n```\n\n```jsonl\n{"accountId": 501, "tagline": {"text": "Payroll for EU contractors"}, "links": {"website": "https://acme.example"}}\n{"accountId": 502, "description": {"text": "Cloud cost tooling for retailers."}, "links": {"website": "https://beta.example"}}\n```\n\nA row fails as a whole with the API\'s code: `validation_failed` (an unknown field is `unknown_field`, and `error.details` names every bad field), `research_in_progress` (`409`: Ken is researching that record now, write it again once the run ends; an account run waiting for credits counts too: it runs once the workspace has credits, and the write stays refused until that run ends) or `not_found`. Rerunning a file is safe: each write replaces the record\'s research shown.\n\n## CRM sync\n\nCRM sync has generated commands only: read connections, preview, start an import, and work through sync issues. Connect the CRM itself in the app.\n\n```bash\nkenso crm-connections list\nkenso crm-connections get --connection-id 7\nkenso crm-imports create --connection-id 7 --dry-run\nkenso crm-sync-issues list --connection-id 7 --all\n```\n\nRun `kenso crm-connections --help` (or add `--all-commands` when the actions are hidden) to see every action.\n\n## Pipelines\n\nA workspace with the `pipelines` flag on can run several deal pipelines, each with its own stages. These are generated commands (beta):\n\n```bash\nkenso pipelines list\nkenso pipelines list --query "[].{id: id, name: name, default: isDefault, stages: stages[].key}"\nkenso pipelines get --pipeline-id 5\n```\n\n`list` prints every pipeline in display order, archived ones included: `id`, `name`, `routingRule` (the one sentence Ken reads to decide whether a new deal belongs there), `isDefault`, `isArchived`, `position`, `opportunityCount`, `amountTotal` and `stages`, each stage as `kenso opportunity-stages list` prints it. A stage key is unique in the workspace, across pipelines, so a deal\'s `stage` names its pipeline and its `pipelineId` repeats it. The first read turns the workspace\'s stage list into its default pipeline, named Sales, with every deal in it. The same rows as the MCP\'s `pipelines(operation="list")`.\n\nShaping them needs the `workspace_settings` permission:\n\n```bash\nkenso pipelines create --name Renewals --routing-rule "The account is already a customer" --data \'{"stages": [{"label": "Up for renewal", "category": "open"}, {"label": "Won", "category": "won"}, {"label": "Lost", "category": "lost"}]}\'\nkenso pipelines update --pipeline-id 6 --name Expansion --position 0\nkenso pipelines update --pipeline-id 6 --data @stages.json\nkenso pipelines archive --pipeline-id 6\nkenso pipelines restore --pipeline-id 6\n```\n\n- **`create`** takes a unique `name`, the pipeline\'s `stages` in display order (at least one `open`, one `won` and one `lost`) and an optional `routingRule`: one sentence that says which deals belong there, which Ken reads to route a new deal that names no pipeline. Each stage gets a key from its label; a key another pipeline already uses gets the pipeline\'s name in front (`renewals_won`). A workspace has at most 10 pipelines.\n- **`update`** changes what you send. `stages` is the pipeline\'s whole stage list: read it with `pipelines get`, keep each stage\'s `key`, and add a new stage without one. A stage with live deals in it cannot be left out; archive it with `"isArchived": true` instead.\n- **`archive`** stops new deals from entering a pipeline and keeps the deals in it. The default pipeline cannot be archived, and nothing is deleted: `restore` brings a pipeline back.\n\n## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore 812\n```\n\nA deleted account can be restored for 30 days. `deleted-accounts list` shows each one with who deleted it, `expiresAt` (restore works until then) and what comes back: `personCount`, `opportunityCount` and `touchCount`. `accounts restore <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. A domain another account took since stays with that account and is listed in `domainsTaken`. A merged account is not listed and cannot be restored: a merge has no undo. Both commands are behind the `crm_import_export` feature flag (`404` while it is off).\n\n## Export accounts, people or deals\n\n```bash\nkenso export accounts --out accounts.csv\nkenso export accounts --view 12 --out tier-1.csv\nkenso export deals --filters \'[{"field":"stageCategory","operator":"is","values":["open"]}]\' > open-deals.csv\n```\n\nIt writes the CSV that `POST /v1/accounts/export`, `/v1/people/export` or `/v1/opportunities/export` returns, to stdout or to `--out` (then it prints the file and its row count). With no filter it exports every record. More than 50,000 rows is refused: narrow the filters. `--view <id>` exports a saved Accounts view (`kenso account-views list` shows the ids). `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields, so a deals or people view exports with its filters and sort. The accounts and deals files start with `id` and import back as they are. Each export writes an audit-log entry and needs the export permission. Accounts and deals also need the `crm_import_export` flag while it is in beta.\n\n## A deal\'s stage history\n\n```bash\nkenso opportunities stage-history 77\nkenso opportunities stage-history 77 --query "entries[].{to: stageLabel, at: enteredAt, by: changedBy}"\n```\n\nIt prints `GET /v1/opportunities/{id}/stage-history` as it is, the same rows as the deal page and the MCP\'s `opportunities(operation="get-stage-history")`: the stage now, `isComplete` and `entries`, oldest first, each with `fromStage`, `stage`, `stageLabel`, `enteredAt`, `leftAt`, `durationSeconds`, `actorKind`, `actorMemberId` and Ken\'s `reason` on a move its stage judge made. With the `deal_stage_rules` flag on, each entry also has `changedBy` (`member`, `agent`, `api_key`, `workflow`, `stage_judge`, `crm_sync` or `ken_automation`), `crmProvider` on a CRM sync, and on a move `fromStageLabel` and `fromStageDurationSeconds`, how long the deal sat in the stage it left. `isComplete` false means Kenso has no record of part of the history.\n\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier\nkenso pipelines stage-rules proposal --none\nkenso pipelines stage-rules lost --default\n```\n\nWith the `deal_stage_rules` flag on, each stage can name the fields a deal should have in it. Without a stage the command prints every stage\'s `key`, `label`, `category`, `isArchived`, `requiredFields` and `isDefault`, plus `requirableFields`: `amount`, `closeDate`, `ownerMemberId`, `primaryPersonId`, `nextStep`, `lostReasonKey`, `wonReasonKey` and `custom.<key>` for each custom deal field. `--require` sets the stage\'s whole list, in order, at most 10. `--none` requires nothing, and `--default` goes back to the default: a lost stage asks for `lostReasonKey`, any other stage nothing. Setting a rule needs the `workspace_settings` permission. The same as the MCP\'s `opportunities(operation="stages-set-required-fields")`.\n\nA missing field never stops a move. The deal moves, and it is flagged Missing on the board, the list and the deal page until the field is filled. A rule also applies to deals already in the stage.\n\n## Tasks\n\nTasks are to-dos a member owes: a title, an optional due day or time, an assignee and at most one account, person or deal. They need the `tasks` flag. The app calls deals "Deals"; the CLI keeps `--deal` for an opportunity id.\n\n```bash\nkenso tasks add "Send the deck" --due tomorrow --account 812\nkenso tasks add "Call Ada back" --due friday --at 16:00 --person 501 --assignee ada@acme.com\nkenso tasks list --assignee me --due overdue,today\nkenso tasks queue --scope mine\nkenso tasks assign 7 me\nkenso tasks done 7 8 9\nkenso tasks done 7 --undo\n```\n\n- `tasks add` sends `POST /v1/tasks`. `--due` takes `today`, `tomorrow`, a weekday (the next one: `friday` or `fri`), a day (`2026-11-20`) or an ISO 8601 time; `--at HH:MM` puts a time on that day (today without `--due`). Day words and `--at` read this computer\'s clock and time zone (`TZ`); a time\'s day is read in the assignee\'s app time zone. `--assignee` takes `me`, a member id or an email; without it the task is yours.\n- `tasks done` completes each task it names, in order (`PATCH /v1/tasks/{id}` with `status: done`); `--undo` reopens them. `tasks assign` gives a task to `me`, a member id or a member\'s email; that member gets a `task_assigned` notification.\n- `tasks queue` is `task-queue list` under the name you would try: the Tasks screen\'s open work by due day, with `--scope mine|assigned_by_me|everyone`. It lists tasks, manual touches, call tasks, inbox threads with a reminder due (when you can view the Inbox) and Ken\'s follow-ups to you, each with the app path in `href` (null for a task, which opens in its panel).\n- `tasks list`, `get`, `update`, `delete`, `restore` and `task-queue list` are generated from the API: `kenso tasks --help` lists them.\n';
|
|
7787
|
+
crm_default = '# CRM (beta)\n\nThe CRM commands work on Kenso\'s Accounts lane: accounts (companies), the people on them, and opportunities. They are beta: they need the `accounts` feature flag on your workspace (opportunities need `opportunities`, CRM sync needs `ingestion`). Help and `kenso describe` hide them until your workspace has the flag; `--all-commands` shows them.\n\n| Command | What it does |\n|---|---|\n| `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |\n| `people import` | Create or match people from a file, optionally onto accounts |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `deleted-accounts list`, `accounts restore <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved Accounts view, or what the filters match |\n| `capture status` | Your captured mailbox, its backfill progress and what teammates see of a captured email. Needs the `crm_capture` flag |\n| `capture connect` | Turn capture on for your own mailbox. `--private` starts it hidden from teammates; `--provider google` prints a sign-in link when no account is connected yet |\n| `capture private on\\|off` | Hide your captured email from teammates, or show it again. Email only: meetings stay visible. `--thread <id>` sets the switch for one thread |\n| `capture thread <threadId>` | One captured email thread: subject, people, time, Ken\'s summary, and each body you may open. The id is `capturedThread.id` on a timeline row |\n| `capture sync` | Read your captured mailbox now, instead of waiting for the next two-minute poll. Prints what the pass read, logged and created |\n| `capture disconnect` | Turn capture off and delete your stored email bodies. Asks first; `--yes` skips the question |\n| `capture teammates-see summary\\|full_email` | Workspace admin: what teammates see of captured email |\n| `pipelines stage-rules` | List or set the fields a deal should have in each stage |\n| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n| `tasks add`, `tasks done`, `tasks assign`, `tasks queue` | Add a to-do for a member on an account, person or deal, complete it, hand it on, or read your open work (needs `tasks`) |\n\nImport accounts first, then people: `people import` never creates an account.\n\n## Import accounts\n\n```bash\nkenso accounts import --file accounts.csv\nkenso accounts import --file accounts.csv --yes\n```\n\n```csv\nname,domain,industry,employeeCount\nAcme,acme.io,Software,120\nGlobex,globex.com,Manufacturing,"1,200"\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `name` (or `company`, `companyName`, `accountName`), `domains` (several, split on `,` or `;`) or one `domain` (or `website`, `companyDomain`), `industry`, `employeeCount`, `hqLocation`, `linkedinUrl`, `stage`, `angle`, `whyNow`, `fitScore`, `fundingRound`, `cadenceDays`, `ownerMemberId`, `kenCompanyId`, `sendsFromInboxId`, `sendsFromLinkedInAccountId` and `source`.\n- **A domain is required.** A file with no domain column is a usage error, and a row without a domain is `invalid` (`domain_required`).\n- **The dry run prices the research.** It asks for a credit estimate per 1,000 accounts and puts the sum in the plan: `kind`, `accountCount`, `totalMillicredits`, `availableMillicredits` and `sufficient`.\n- **Rows go 100 per call** to `POST /v1/accounts/bulk-create`.\n\nEach row comes back `created` (`id` is the new account; its research is queued, `researchQueued`, or waits for credits, `researchWaitingCredits`), `skipped` with reason `domain_taken` (already an account; `id` is that account) or `failed` (`reason` is the API\'s code, `error` names the field; an item Kenso failed to save is sent once more first). Rerunning the same file is safe: accounts that exist come back `domain_taken`.\n\n## Import people\n\n```bash\nkenso people import --file people.csv\nkenso people import --file people.csv --find-emails --yes\nkenso people import --file people.jsonl --dry-run\n```\n\n```csv\nfullName,email,title,accountDomain,role\nAnn Lee,ann@acme.io,VP Sales,acme.io,champion\nBob Ray,,CTO,acme.io,\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `email`, `fullName` (or `name`), `firstName`, `lastName`, `title`, `linkedinUrl` (or `linkedin`, `profileUrl`), `accountDomain` (or `domain`, `website`, `companyDomain`), `accountId`, `role` and `priority`. Other columns are ignored with one warning.\n- **A person needs a name:** `fullName`, or `firstName`, `lastName` or both (the CLI joins them). A row with none of them is `invalid` (`name_required`).\n- **To put a person on an account,** give `accountDomain` or `accountId`. A row with both sends only `accountId`.\n- **`--find-emails`** queues an email find (charged in credits) for each person without an email.\n- **Rows go 200 per call** to `POST /v1/people/batch`.\n\nPeople already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nobody twice. A row comes back `created` (a new person), `updated` (an existing person added to the account), `skipped` with reason `already_on_account`, `matched` (no account asked) or `previously_removed`, or `failed`: `account_not_found` saves the person without an account (import the account, then rerun to place them), any other reason is the API\'s. The summary adds `matched`, `addedToAccounts` and `emailFindsQueued`.\n\n## List and search accounts\n\n`accounts list` and `accounts search` sort and page on the server, so they reach every account in the workspace, however many there are.\n\n```bash\nkenso accounts list --sort score:desc --limit 100 # one page; the output\'s next: line is the following one\nkenso accounts list --sort score:desc --limit 100 --all # every page, to the end\nkenso accounts search --search hiring --sort latestSignalAt:desc --data \'{"qFields": ["name", "latestSignal"]}\'\nkenso accounts search --limit 1 --data \'{"countBy": ["stage"]}\' # how many accounts sit in each stage\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}]}, "sort": "tier,-pipelineAmount"}\' --all\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "hqLocation", "operator": "contains", "values": ["Germany"]}]}}\' --all\n# tier 1 accounts with no meeting in 30 days: none since then, or none ever\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}, {"match": "any", "conditions": [{"field": "lastMeeting", "operator": "older_than_days", "values": ["30"]}, {"field": "lastMeeting", "operator": "is_empty"}]}]}}\' --all\n```\n\n- **`--sort`** takes up to 3 comma-separated keys, each `field` (ascending), `field:asc` or `field:desc`. The API\'s `-field` form needs the equals sign here, `--sort=-score`, because a value that starts with a dash reads as a flag. Fields: `createdAt`, `name`, `score`, `tier` (ascending is tier 1 first), `latestSignalAt`, `committee`, `pipelineAmount`, `nextTouchAt`, `lastTouchAt`. An account with no value for a key comes last in both directions. The default is `-createdAt`.\n- **`--limit`** is 1 to 1000 (default 50). `--cursor` takes the previous page\'s `nextCursor` with the same filters and sort; `--all` follows the cursors for you.\n- **`--search`** (also `--q`) matches the name or a domain.\n- **Lists and objects go in `--data`** on `search`, as the API takes them (`kenso describe accounts search`); a flag beside it sets or replaces one key:\n - `qFields` picks where the search text looks: `name`, `domain`, `latestSignal` (the latest signal\'s title).\n - `countBy` (`stage`, `stageGroup`) adds `counts` to the output: every value with the number of matching accounts that hold it, whatever the page. The output is then one object: `data`, `pagination` and `counts`.\n - `filters` and `where` narrow the accounts.\n\nAn account\'s timeline pages the same way. `kenso accounts activity 812` returns the newest 100 earlier rows and, when older ones exist, `data.nextCursor`. Pass it back as `--cursor` (with the same `--category`) for the rows before them, until a page comes without one.\n\n## Edit accounts, people and opportunities\n\nApart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command\'s flags by API name or flag name, and the id column fills the route:\n\n```bash\nkenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes\nkenso people update --each people-edit.csv --dry-run\nkenso opportunities update --each deals.csv --dry-run\n```\n\n```csv\naccountId,stage,ownerMemberId,overwritePinned\n501,engaged,42,true\n502,customer,42,true\n```\n\nA row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person\'s OK). Every flag of an update command: `kenso accounts update --help`.\n\n## Search opportunities\n\n`kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.\n\n```bash\nkenso opportunities search --data \'{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}\' --all\nkenso opportunities search --data \'{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}\'\nkenso opportunities search --limit 1 --data \'{"countBy": ["stage", "ownerMemberId"]}\' # how many opportunities hold each value\n```\n\n- **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.\n- **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.\n- `--account-id` keeps the search to one account. `closeDate` counts days in the member\'s app time zone.\n\nOne person\'s deals, meetings and campaign contacts, as their person page lists them:\n\n```bash\nkenso opportunities list --person-id 9001 # the deals they are on, or are the primary person of\nkenso meetings list --person-id 9001 # the meetings they attend, among the ones you can see\nkenso contacts list --person-id 9001 # their contact in each campaign they are in\n```\n\n## Write research you gathered\n\n`accounts write-research` and `people write-research` store research you gathered outside Kenso as the record\'s latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account\'s own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.\n\nThe body is the research block `accounts get --expand research` (or `people get-research`) returns, without its read-only fields: leave out `id`, `status`, `trigger`, `errorCode`, `researchedAt`, `isStale` and `appliedPrompt` (for a person also `mode`, `requestedAt`, `researchedMode`, `firecrawlCredits` and `webNote`), or the write fails with `unknown_field`. Pass it with `--data @file`:\n\n```bash\nkenso accounts write-research --account-id 501 --data @acme-dossier.json\nkenso people write-research --person-id 9001 --data @jane.json\n```\n\n```json\n{\n "tagline": { "text": "Payroll for EU contractors", "sourceUrls": ["https://acme.example"] },\n "description": { "text": "Acme runs payroll and compliance for companies hiring contractors in 30 EU countries.", "sourceUrls": ["https://acme.example"] },\n "links": { "website": "https://acme.example" },\n "whyNow": { "text": "Raised a $40M Series B in October", "sourceUrls": ["https://news.example/acme-b"], "date": "2026-10" },\n "fitScore": 82,\n "angle": "Lead with contractor onboarding time."\n}\n```\n\nMany records: one JSONL line per record, with the id next to the block\'s fields. Nested objects are sent as written. Use JSONL, not CSV: the block\'s fields are objects and lists, which a CSV cell cannot carry.\n\n```bash\nkenso accounts write-research --each dossiers.jsonl --dry-run # then the same with --yes\nkenso people write-research --each people-research.jsonl --yes --concurrency 8\n```\n\n```jsonl\n{"accountId": 501, "tagline": {"text": "Payroll for EU contractors"}, "links": {"website": "https://acme.example"}}\n{"accountId": 502, "description": {"text": "Cloud cost tooling for retailers."}, "links": {"website": "https://beta.example"}}\n```\n\nA row fails as a whole with the API\'s code: `validation_failed` (an unknown field is `unknown_field`, and `error.details` names every bad field), `research_in_progress` (`409`: Ken is researching that record now, write it again once the run ends; an account run waiting for credits counts too: it runs once the workspace has credits, and the write stays refused until that run ends) or `not_found`. Rerunning a file is safe: each write replaces the record\'s research shown.\n\n## CRM sync\n\nCRM sync has generated commands only: read connections, preview, start an import, and work through sync issues. Connect the CRM itself in the app.\n\n```bash\nkenso crm-connections list\nkenso crm-connections get --connection-id 7\nkenso crm-imports create --connection-id 7 --dry-run\nkenso crm-sync-issues list --connection-id 7 --all\n```\n\nRun `kenso crm-connections --help` (or add `--all-commands` when the actions are hidden) to see every action.\n\n## Pipelines\n\nA workspace with the `pipelines` flag on can run several deal pipelines, each with its own stages. These are generated commands (beta):\n\n```bash\nkenso pipelines list\nkenso pipelines list --query "[].{id: id, name: name, default: isDefault, stages: stages[].key}"\nkenso pipelines get --pipeline-id 5\n```\n\n`list` prints every pipeline in display order, archived ones included: `id`, `name`, `routingRule` (the one sentence Ken reads to decide whether a new deal belongs there), `isDefault`, `isArchived`, `position`, `opportunityCount`, `amountTotal` and `stages`, each stage as `kenso opportunity-stages list` prints it. A stage key is unique in the workspace, across pipelines, so a deal\'s `stage` names its pipeline and its `pipelineId` repeats it. The first read turns the workspace\'s stage list into its default pipeline, named Sales, with every deal in it. The same rows as the MCP\'s `pipelines(operation="list")`.\n\nShaping them needs the `workspace_settings` permission:\n\n```bash\nkenso pipelines create --name Renewals --routing-rule "The account is already a customer" --data \'{"stages": [{"label": "Up for renewal", "category": "open"}, {"label": "Won", "category": "won"}, {"label": "Lost", "category": "lost"}]}\'\nkenso pipelines update --pipeline-id 6 --name Expansion --position 0\nkenso pipelines update --pipeline-id 6 --data @stages.json\nkenso pipelines archive --pipeline-id 6\nkenso pipelines restore --pipeline-id 6\n```\n\n- **`create`** takes a unique `name`, the pipeline\'s `stages` in display order (at least one `open`, one `won` and one `lost`) and an optional `routingRule`: one sentence that says which deals belong there, which Ken reads to route a new deal that names no pipeline. Each stage gets a key from its label; a key another pipeline already uses gets the pipeline\'s name in front (`renewals_won`). A workspace has at most 10 pipelines.\n- **`update`** changes what you send. `stages` is the pipeline\'s whole stage list: read it with `pipelines get`, keep each stage\'s `key`, and add a new stage without one. A stage with live deals in it cannot be left out; archive it with `"isArchived": true` instead.\n- **`archive`** stops new deals from entering a pipeline and keeps the deals in it. The default pipeline cannot be archived, and nothing is deleted: `restore` brings a pipeline back.\n\n## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore 812\n```\n\nA deleted account can be restored for 30 days. `deleted-accounts list` shows each one with who deleted it, `expiresAt` (restore works until then) and what comes back: `personCount`, `opportunityCount` and `touchCount`. `accounts restore <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. A domain another account took since stays with that account and is listed in `domainsTaken`. A merged account is not listed and cannot be restored: a merge has no undo. Both commands are behind the `crm_import_export` feature flag (`404` while it is off).\n\n## Export accounts, people or deals\n\n```bash\nkenso export accounts --out accounts.csv\nkenso export accounts --view 12 --out tier-1.csv\nkenso export deals --filters \'[{"field":"stageCategory","operator":"is","values":["open"]}]\' > open-deals.csv\n```\n\nIt writes the CSV that `POST /v1/accounts/export`, `/v1/people/export` or `/v1/opportunities/export` returns, to stdout or to `--out` (then it prints the file and its row count). With no filter it exports every record. More than 50,000 rows is refused: narrow the filters. `--view <id>` exports a saved Accounts view (`kenso account-views list` shows the ids). `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields, so a deals or people view exports with its filters and sort. The accounts and deals files start with `id` and import back as they are. Each export writes an audit-log entry and needs the export permission. Accounts and deals also need the `crm_import_export` flag while it is in beta.\n\n## A deal\'s stage history\n\n```bash\nkenso opportunities stage-history 77\nkenso opportunities stage-history 77 --query "entries[].{to: stageLabel, at: enteredAt, by: changedBy}"\n```\n\nIt prints `GET /v1/opportunities/{id}/stage-history` as it is, the same rows as the deal page and the MCP\'s `opportunities(operation="get-stage-history")`: the stage now, `isComplete` and `entries`, oldest first, each with `fromStage`, `stage`, `stageLabel`, `enteredAt`, `leftAt`, `durationSeconds`, `actorKind`, `actorMemberId` and Ken\'s `reason` on a move its stage judge made. With the `deal_stage_rules` flag on, each entry also has `changedBy` (`member`, `agent`, `api_key`, `workflow`, `stage_judge`, `crm_sync` or `ken_automation`), `crmProvider` on a CRM sync, and on a move `fromStageLabel` and `fromStageDurationSeconds`, how long the deal sat in the stage it left. `isComplete` false means Kenso has no record of part of the history.\n\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier\nkenso pipelines stage-rules proposal --none\nkenso pipelines stage-rules lost --default\n```\n\nWith the `deal_stage_rules` flag on, each stage can name the fields a deal should have in it. Without a stage the command prints every stage\'s `key`, `label`, `category`, `isArchived`, `requiredFields` and `isDefault`, plus `requirableFields`: `amount`, `closeDate`, `ownerMemberId`, `primaryPersonId`, `nextStep`, `lostReasonKey`, `wonReasonKey` and `custom.<key>` for each custom deal field. `--require` sets the stage\'s whole list, in order, at most 10. `--none` requires nothing, and `--default` goes back to the default: a lost stage asks for `lostReasonKey`, any other stage nothing. Setting a rule needs the `workspace_settings` permission. The same as the MCP\'s `opportunities(operation="stages-set-required-fields")`.\n\nA missing field never stops a move. The deal moves, and it is flagged Missing on the board, the list and the deal page until the field is filled. A rule also applies to deals already in the stage.\n\n## Tasks\n\nTasks are to-dos a member owes: a title, an optional due day or time, an assignee and at most one account, person or deal. They need the `tasks` flag. The app calls deals "Deals"; the CLI keeps `--deal` for an opportunity id.\n\n```bash\nkenso tasks add "Send the deck" --due tomorrow --account 812\nkenso tasks add "Call Ada back" --due friday --at 16:00 --person 501 --assignee ada@acme.com\nkenso tasks list --assignee me --due overdue,today\nkenso tasks queue --scope mine\nkenso tasks assign 7 me\nkenso tasks done 7 8 9\nkenso tasks done 7 --undo\n```\n\n- `tasks add` sends `POST /v1/tasks`. `--due` takes `today`, `tomorrow`, a weekday (the next one: `friday` or `fri`), a day (`2026-11-20`) or an ISO 8601 time; `--at HH:MM` puts a time on that day (today without `--due`). Day words and `--at` read this computer\'s clock and time zone (`TZ`); a time\'s day is read in the assignee\'s app time zone. `--assignee` takes `me`, a member id or an email; without it the task is yours.\n- `tasks done` completes each task it names, in order (`PATCH /v1/tasks/{id}` with `status: done`); `--undo` reopens them. `tasks assign` gives a task to `me`, a member id or a member\'s email; that member gets a `task_assigned` notification.\n- `tasks queue` is `task-queue list` under the name you would try: the Tasks screen\'s open work by due day, with `--scope mine|assigned_by_me|everyone`. It lists tasks, manual touches, call tasks, inbox threads with a reminder due (when you can view the Inbox) and Ken\'s follow-ups to you, each with the app path in `href` (null for a task, which opens in its panel).\n- `tasks list`, `get`, `update`, `delete`, `restore` and `task-queue list` are generated from the API: `kenso tasks --help` lists them.\n';
|
|
7788
7788
|
}
|
|
7789
7789
|
});
|
|
7790
7790
|
|
|
@@ -8976,8 +8976,8 @@ var init_browser_login = __esm({
|
|
|
8976
8976
|
defaultDeps = {
|
|
8977
8977
|
sleep: (ms, signal) => delay2(ms, void 0, signal ? { signal } : void 0),
|
|
8978
8978
|
now: () => Date.now(),
|
|
8979
|
-
spawn: (
|
|
8980
|
-
const child = nodeSpawn(
|
|
8979
|
+
spawn: (command60, args) => {
|
|
8980
|
+
const child = nodeSpawn(command60, args, { detached: true, stdio: "ignore" });
|
|
8981
8981
|
child.on("error", () => {
|
|
8982
8982
|
});
|
|
8983
8983
|
child.unref();
|
|
@@ -9416,34 +9416,77 @@ var init_connect2 = __esm({
|
|
|
9416
9416
|
}
|
|
9417
9417
|
});
|
|
9418
9418
|
|
|
9419
|
+
// src/commands/capture/thread.ts
|
|
9420
|
+
var thread_exports = {};
|
|
9421
|
+
__export(thread_exports, {
|
|
9422
|
+
default: () => thread_default,
|
|
9423
|
+
threadId: () => threadId
|
|
9424
|
+
});
|
|
9425
|
+
function threadId(value, from = { field: "threadId", example: "kenso capture thread 4821" }) {
|
|
9426
|
+
if (typeof value !== "string" || !/^\d+$/.test(value)) {
|
|
9427
|
+
throw usageError(`The thread id is a number: ${from.example}.`, { field: from.field });
|
|
9428
|
+
}
|
|
9429
|
+
return value;
|
|
9430
|
+
}
|
|
9431
|
+
var command10, thread_default;
|
|
9432
|
+
var init_thread = __esm({
|
|
9433
|
+
"src/commands/capture/thread.ts"() {
|
|
9434
|
+
"use strict";
|
|
9435
|
+
init_errors();
|
|
9436
|
+
init_exit_codes();
|
|
9437
|
+
init_http();
|
|
9438
|
+
command10 = {
|
|
9439
|
+
resource: "capture",
|
|
9440
|
+
action: "thread",
|
|
9441
|
+
summary: "Read one captured email thread",
|
|
9442
|
+
description: "Reads GET /v1/capture/threads/{threadId} and prints it. threadId is capturedThread.id of an email_captured row on an account or person timeline (GET /v1/accounts/{accountId}/activity). Prints subject, Ken's summary, messageCount, lastMessageAt, access, isPrivate (your own Private switch for this thread, null when your mailbox does not hold it) and messages, oldest first: people, time, direction, access and body. body is filled only when access is full: your own mailbox holds the message, or the workspace lets teammates open the full email and a mailbox that is not private holds it. Kenso decides that on the server. Hide a thread with kenso capture private on --thread.",
|
|
9443
|
+
flags: {},
|
|
9444
|
+
positionals: [{ name: "threadId", required: true, description: "The captured thread id (capturedThread.id on a timeline row)" }],
|
|
9445
|
+
examples: ["kenso capture thread 4821", "kenso capture thread 4821 --query 'messages[].{at: sentAt, from: fromEmail, access: access}'"],
|
|
9446
|
+
beta: { featureGates: { all: ["crm_capture"] } },
|
|
9447
|
+
operationIds: ["capture-threads.get"],
|
|
9448
|
+
async run(ctx, { positionals }) {
|
|
9449
|
+
const res = await ctx.client.request({ method: "GET", path: `/v1/capture/threads/${threadId(positionals[0])}`, signal: ctx.signal });
|
|
9450
|
+
ctx.output.object(unwrap(res.body));
|
|
9451
|
+
return ExitCode.Ok;
|
|
9452
|
+
}
|
|
9453
|
+
};
|
|
9454
|
+
thread_default = command10;
|
|
9455
|
+
}
|
|
9456
|
+
});
|
|
9457
|
+
|
|
9419
9458
|
// src/commands/capture/private.ts
|
|
9420
9459
|
var private_exports = {};
|
|
9421
9460
|
__export(private_exports, {
|
|
9422
9461
|
default: () => private_default
|
|
9423
9462
|
});
|
|
9424
|
-
var
|
|
9463
|
+
var THREAD_FLAG, command11, private_default;
|
|
9425
9464
|
var init_private = __esm({
|
|
9426
9465
|
"src/commands/capture/private.ts"() {
|
|
9427
9466
|
"use strict";
|
|
9428
9467
|
init_errors();
|
|
9429
9468
|
init_exit_codes();
|
|
9430
9469
|
init_http();
|
|
9431
|
-
|
|
9470
|
+
init_thread();
|
|
9471
|
+
THREAD_FLAG = { field: "thread", example: "kenso capture private on --thread 4821" };
|
|
9472
|
+
command11 = {
|
|
9432
9473
|
resource: "capture",
|
|
9433
9474
|
action: "private",
|
|
9434
9475
|
summary: "Hide your captured email from teammates, or show it again",
|
|
9435
|
-
description: "Sends PATCH /v1/capture/mailbox with isPrivate. on hides your captured email from teammates, mail already captured included: a teammate sees no trace of a thread only your mailbox holds, and a private mailbox creates no people or accounts. A message a teammate's own mailbox also holds stays visible through theirs. off shows your email again as the workspace setting allows. Email only: meetings stay visible, and Ken still reads the mailbox for you.",
|
|
9436
|
-
flags: {
|
|
9476
|
+
description: "Sends PATCH /v1/capture/mailbox with isPrivate. on hides your captured email from teammates, mail already captured included: a teammate sees no trace of a thread only your mailbox holds, and a private mailbox creates no people or accounts. A message a teammate's own mailbox also holds stays visible through theirs. off shows your email again as the workspace setting allows. Email only: meetings stay visible, and Ken still reads the mailbox for you. With --thread it sends PATCH /v1/capture/threads/{threadId} instead: the switch for that one thread, as far as your own mailbox holds it.",
|
|
9477
|
+
flags: {
|
|
9478
|
+
thread: { type: "string", description: "Set the switch for this one captured thread (its id), not the whole mailbox" }
|
|
9479
|
+
},
|
|
9437
9480
|
positionals: [{ name: "state", required: true, description: "on or off" }],
|
|
9438
|
-
examples: ["kenso capture private on", "kenso capture private off"],
|
|
9481
|
+
examples: ["kenso capture private on", "kenso capture private off", "kenso capture private on --thread 4821"],
|
|
9439
9482
|
beta: { featureGates: { all: ["crm_capture"] } },
|
|
9440
|
-
operationIds: ["capture-mailbox.update"],
|
|
9441
|
-
async run(ctx, { positionals }) {
|
|
9483
|
+
operationIds: ["capture-mailbox.update", "capture-threads.update"],
|
|
9484
|
+
async run(ctx, { positionals, flags }) {
|
|
9442
9485
|
const state = positionals[0];
|
|
9443
9486
|
if (state !== "on" && state !== "off") throw usageError("Say on or off: kenso capture private on.", { field: "state" });
|
|
9444
9487
|
const res = await ctx.client.request({
|
|
9445
9488
|
method: "PATCH",
|
|
9446
|
-
path: "/v1/capture/mailbox",
|
|
9489
|
+
path: flags.thread === void 0 ? "/v1/capture/mailbox" : `/v1/capture/threads/${threadId(flags.thread, THREAD_FLAG)}`,
|
|
9447
9490
|
body: { isPrivate: state === "on" },
|
|
9448
9491
|
signal: ctx.signal
|
|
9449
9492
|
});
|
|
@@ -9451,7 +9494,37 @@ var init_private = __esm({
|
|
|
9451
9494
|
return ExitCode.Ok;
|
|
9452
9495
|
}
|
|
9453
9496
|
};
|
|
9454
|
-
private_default =
|
|
9497
|
+
private_default = command11;
|
|
9498
|
+
}
|
|
9499
|
+
});
|
|
9500
|
+
|
|
9501
|
+
// src/commands/capture/sync.ts
|
|
9502
|
+
var sync_exports = {};
|
|
9503
|
+
__export(sync_exports, {
|
|
9504
|
+
default: () => sync_default
|
|
9505
|
+
});
|
|
9506
|
+
var command12, sync_default;
|
|
9507
|
+
var init_sync3 = __esm({
|
|
9508
|
+
"src/commands/capture/sync.ts"() {
|
|
9509
|
+
"use strict";
|
|
9510
|
+
init_exit_codes();
|
|
9511
|
+
init_http();
|
|
9512
|
+
command12 = {
|
|
9513
|
+
resource: "capture",
|
|
9514
|
+
action: "sync",
|
|
9515
|
+
summary: "Read your captured mailbox now",
|
|
9516
|
+
description: "Sends POST /v1/capture/mailbox/sync: one sync pass over your own mailbox. Kenso lists up to 25 messages and logs the ones with people and accounts in Kenso on their timelines; a reply from someone new to mail you sent creates the person and their account. Prints outcome (completed, busy while another pass reads the mailbox or it waits on a retry, timed_out when the pass ran out of its 70 seconds before the page was done: what it logged is kept, so run it again, or why the pass stopped: connection_unavailable, missing_scope, login_refused, token_unavailable, provider_unavailable, store_unavailable), messagesRead, messagesLogged, peopleCreated, threadsSummarized (threads Ken summarized after the pass, up to 3 a call), meetingsLogged (meetings you held that went on a guest's timeline), hasMore (true while the mailbox has more to read: run it again, or leave the rest to the poll) and the mailbox after the pass.",
|
|
9517
|
+
flags: {},
|
|
9518
|
+
examples: ["kenso capture sync", "kenso capture sync --query '{outcome: outcome, logged: messagesLogged, more: hasMore}'"],
|
|
9519
|
+
beta: { featureGates: { all: ["crm_capture"] } },
|
|
9520
|
+
operationIds: ["capture-mailbox.sync"],
|
|
9521
|
+
async run(ctx) {
|
|
9522
|
+
const res = await ctx.client.request({ method: "POST", path: "/v1/capture/mailbox/sync", signal: ctx.signal });
|
|
9523
|
+
ctx.output.object(unwrap(res.body));
|
|
9524
|
+
return ExitCode.Ok;
|
|
9525
|
+
}
|
|
9526
|
+
};
|
|
9527
|
+
sync_default = command12;
|
|
9455
9528
|
}
|
|
9456
9529
|
});
|
|
9457
9530
|
|
|
@@ -9460,13 +9533,13 @@ var disconnect_exports = {};
|
|
|
9460
9533
|
__export(disconnect_exports, {
|
|
9461
9534
|
default: () => disconnect_default
|
|
9462
9535
|
});
|
|
9463
|
-
var
|
|
9536
|
+
var command13, disconnect_default;
|
|
9464
9537
|
var init_disconnect = __esm({
|
|
9465
9538
|
"src/commands/capture/disconnect.ts"() {
|
|
9466
9539
|
"use strict";
|
|
9467
9540
|
init_confirm();
|
|
9468
9541
|
init_exit_codes();
|
|
9469
|
-
|
|
9542
|
+
command13 = {
|
|
9470
9543
|
resource: "capture",
|
|
9471
9544
|
action: "disconnect",
|
|
9472
9545
|
summary: "Turn capture off for your own mailbox and delete its stored email bodies",
|
|
@@ -9482,7 +9555,7 @@ var init_disconnect = __esm({
|
|
|
9482
9555
|
return ExitCode.Ok;
|
|
9483
9556
|
}
|
|
9484
9557
|
};
|
|
9485
|
-
disconnect_default =
|
|
9558
|
+
disconnect_default = command13;
|
|
9486
9559
|
}
|
|
9487
9560
|
});
|
|
9488
9561
|
|
|
@@ -9491,7 +9564,7 @@ var teammates_see_exports = {};
|
|
|
9491
9564
|
__export(teammates_see_exports, {
|
|
9492
9565
|
default: () => teammates_see_default
|
|
9493
9566
|
});
|
|
9494
|
-
var VALUES,
|
|
9567
|
+
var VALUES, command14, teammates_see_default;
|
|
9495
9568
|
var init_teammates_see = __esm({
|
|
9496
9569
|
"src/commands/capture/teammates-see.ts"() {
|
|
9497
9570
|
"use strict";
|
|
@@ -9499,7 +9572,7 @@ var init_teammates_see = __esm({
|
|
|
9499
9572
|
init_exit_codes();
|
|
9500
9573
|
init_http();
|
|
9501
9574
|
VALUES = ["summary", "full_email"];
|
|
9502
|
-
|
|
9575
|
+
command14 = {
|
|
9503
9576
|
resource: "capture",
|
|
9504
9577
|
action: "teammates-see",
|
|
9505
9578
|
summary: "Pick what teammates see of captured email: the summary, or the full email (workspace admin)",
|
|
@@ -9519,7 +9592,7 @@ var init_teammates_see = __esm({
|
|
|
9519
9592
|
return ExitCode.Ok;
|
|
9520
9593
|
}
|
|
9521
9594
|
};
|
|
9522
|
-
teammates_see_default =
|
|
9595
|
+
teammates_see_default = command14;
|
|
9523
9596
|
}
|
|
9524
9597
|
});
|
|
9525
9598
|
|
|
@@ -9532,6 +9605,8 @@ var init_capture = __esm({
|
|
|
9532
9605
|
status: () => Promise.resolve().then(() => (init_status2(), status_exports2)).then((m) => m.default),
|
|
9533
9606
|
connect: () => Promise.resolve().then(() => (init_connect2(), connect_exports)).then((m) => m.default),
|
|
9534
9607
|
private: () => Promise.resolve().then(() => (init_private(), private_exports)).then((m) => m.default),
|
|
9608
|
+
sync: () => Promise.resolve().then(() => (init_sync3(), sync_exports)).then((m) => m.default),
|
|
9609
|
+
thread: () => Promise.resolve().then(() => (init_thread(), thread_exports)).then((m) => m.default),
|
|
9535
9610
|
disconnect: () => Promise.resolve().then(() => (init_disconnect(), disconnect_exports)).then((m) => m.default),
|
|
9536
9611
|
"teammates-see": () => Promise.resolve().then(() => (init_teammates_see(), teammates_see_exports)).then((m) => m.default)
|
|
9537
9612
|
};
|
|
@@ -9544,7 +9619,7 @@ __export(completion_exports, {
|
|
|
9544
9619
|
SCRIPTS: () => SCRIPTS,
|
|
9545
9620
|
default: () => completion_default
|
|
9546
9621
|
});
|
|
9547
|
-
var ZSH, BASH, FISH, SCRIPTS,
|
|
9622
|
+
var ZSH, BASH, FISH, SCRIPTS, command15, completion_default;
|
|
9548
9623
|
var init_completion = __esm({
|
|
9549
9624
|
"src/commands/completion/completion.ts"() {
|
|
9550
9625
|
"use strict";
|
|
@@ -9608,7 +9683,7 @@ end
|
|
|
9608
9683
|
complete -c kenso -f -a '(__kenso_complete)'
|
|
9609
9684
|
`;
|
|
9610
9685
|
SCRIPTS = { bash: BASH, zsh: ZSH, fish: FISH };
|
|
9611
|
-
|
|
9686
|
+
command15 = {
|
|
9612
9687
|
resource: "completion",
|
|
9613
9688
|
action: "",
|
|
9614
9689
|
summary: "Print the tab-completion script for bash, zsh or fish",
|
|
@@ -9636,7 +9711,7 @@ complete -c kenso -f -a '(__kenso_complete)'
|
|
|
9636
9711
|
return ExitCode.Ok;
|
|
9637
9712
|
}
|
|
9638
9713
|
};
|
|
9639
|
-
completion_default =
|
|
9714
|
+
completion_default = command15;
|
|
9640
9715
|
}
|
|
9641
9716
|
});
|
|
9642
9717
|
|
|
@@ -10166,8 +10241,8 @@ var init_run = __esm({
|
|
|
10166
10241
|
defaultDeps2 = {
|
|
10167
10242
|
sleep: (ms, signal) => delay3(ms, void 0, signal ? { signal } : void 0),
|
|
10168
10243
|
now: () => Date.now(),
|
|
10169
|
-
spawn: (
|
|
10170
|
-
const child = nodeSpawn2(
|
|
10244
|
+
spawn: (command60, args) => {
|
|
10245
|
+
const child = nodeSpawn2(command60, args, { detached: true, stdio: "ignore" });
|
|
10171
10246
|
child.on("error", () => {
|
|
10172
10247
|
});
|
|
10173
10248
|
child.unref();
|
|
@@ -10208,9 +10283,9 @@ function stringFlag2(flags, name) {
|
|
|
10208
10283
|
const text4 = value.trim();
|
|
10209
10284
|
return text4 === "" ? void 0 : text4;
|
|
10210
10285
|
}
|
|
10211
|
-
function requireFlag(flags, name,
|
|
10286
|
+
function requireFlag(flags, name, command60, hint) {
|
|
10212
10287
|
const value = stringFlag2(flags, name);
|
|
10213
|
-
if (value === void 0) throw usageError(`--${name} is required for ${
|
|
10288
|
+
if (value === void 0) throw usageError(`--${name} is required for ${command60}.`, { field: name, next: `${command60} --help`, ...hint ? { hint } : {} });
|
|
10214
10289
|
return value;
|
|
10215
10290
|
}
|
|
10216
10291
|
function positiveId(value) {
|
|
@@ -10219,8 +10294,8 @@ function positiveId(value) {
|
|
|
10219
10294
|
const id = Number(text4);
|
|
10220
10295
|
return Number.isSafeInteger(id) && id > 0 ? id : void 0;
|
|
10221
10296
|
}
|
|
10222
|
-
function idFlag(flags, name,
|
|
10223
|
-
const raw = requireFlag(flags, name,
|
|
10297
|
+
function idFlag(flags, name, command60) {
|
|
10298
|
+
const raw = requireFlag(flags, name, command60);
|
|
10224
10299
|
const id = positiveId(raw);
|
|
10225
10300
|
if (id === void 0) throw usageError(`--${name} must be a positive whole number (got "${raw}").`, { field: name });
|
|
10226
10301
|
return id;
|
|
@@ -10240,8 +10315,8 @@ function isDryRun(ctx) {
|
|
|
10240
10315
|
function shellQuote4(value) {
|
|
10241
10316
|
return /^[A-Za-z0-9_\-.,:/@=+%]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
|
|
10242
10317
|
}
|
|
10243
|
-
function sameCommand2(
|
|
10244
|
-
const parts2 = [
|
|
10318
|
+
function sameCommand2(command60, flags, ctx, extra = []) {
|
|
10319
|
+
const parts2 = [command60];
|
|
10245
10320
|
for (const [name, value] of Object.entries(flags)) {
|
|
10246
10321
|
if (value === void 0 || value === false) continue;
|
|
10247
10322
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -10841,7 +10916,7 @@ function parseDuration(text4) {
|
|
|
10841
10916
|
const ms = Number(match[1]) * (UNIT_MS[(match[2] || "s").toLowerCase()] ?? 1e3);
|
|
10842
10917
|
return Number.isFinite(ms) ? Math.round(ms) : void 0;
|
|
10843
10918
|
}
|
|
10844
|
-
var UNIT_MS,
|
|
10919
|
+
var UNIT_MS, command16, wait_default;
|
|
10845
10920
|
var init_wait = __esm({
|
|
10846
10921
|
"src/commands/jobs/wait.ts"() {
|
|
10847
10922
|
"use strict";
|
|
@@ -10849,7 +10924,7 @@ var init_wait = __esm({
|
|
|
10849
10924
|
init_errors();
|
|
10850
10925
|
init_exit_codes();
|
|
10851
10926
|
UNIT_MS = { s: 1e3, m: 6e4, h: 36e5 };
|
|
10852
|
-
|
|
10927
|
+
command16 = {
|
|
10853
10928
|
resource: "jobs",
|
|
10854
10929
|
action: "wait",
|
|
10855
10930
|
summary: "Wait for a background job and print it",
|
|
@@ -10888,7 +10963,7 @@ var init_wait = __esm({
|
|
|
10888
10963
|
});
|
|
10889
10964
|
}
|
|
10890
10965
|
};
|
|
10891
|
-
wait_default =
|
|
10966
|
+
wait_default = command16;
|
|
10892
10967
|
}
|
|
10893
10968
|
});
|
|
10894
10969
|
|
|
@@ -11070,7 +11145,7 @@ function summarize2(campaignId) {
|
|
|
11070
11145
|
notSendable: results.filter((r) => (r.status === "created" || r.status === "updated") && r.sendable === false).length
|
|
11071
11146
|
});
|
|
11072
11147
|
}
|
|
11073
|
-
var COMMAND2, CHUNK_SIZE2, LINKEDIN_ONLY_CHANNELS, TEMPLATE_HEADER,
|
|
11148
|
+
var COMMAND2, CHUNK_SIZE2, LINKEDIN_ONLY_CHANNELS, TEMPLATE_HEADER, command17, import_default2;
|
|
11074
11149
|
var init_import2 = __esm({
|
|
11075
11150
|
"src/commands/contacts/import.ts"() {
|
|
11076
11151
|
"use strict";
|
|
@@ -11089,7 +11164,7 @@ var init_import2 = __esm({
|
|
|
11089
11164
|
CHUNK_SIZE2 = 1e3;
|
|
11090
11165
|
LINKEDIN_ONLY_CHANNELS = /* @__PURE__ */ new Set(["linkedin", "linkedin_only"]);
|
|
11091
11166
|
TEMPLATE_HEADER = `${CONTACT_FIELDS.join(",")},<your custom columns>`;
|
|
11092
|
-
|
|
11167
|
+
command17 = {
|
|
11093
11168
|
resource: "contacts",
|
|
11094
11169
|
action: "import",
|
|
11095
11170
|
summary: "Add leads from a CSV or JSONL file to a campaign",
|
|
@@ -11178,7 +11253,7 @@ var init_import2 = __esm({
|
|
|
11178
11253
|
return outcome.exitCode;
|
|
11179
11254
|
}
|
|
11180
11255
|
};
|
|
11181
|
-
import_default2 =
|
|
11256
|
+
import_default2 = command17;
|
|
11182
11257
|
}
|
|
11183
11258
|
});
|
|
11184
11259
|
|
|
@@ -11282,7 +11357,7 @@ async function sendUpdateChunk(chunk, ctx) {
|
|
|
11282
11357
|
});
|
|
11283
11358
|
return { results: mapUpdateAnswer(chunk, res.body), rateLimitRemaining: rateLimitRemaining3(res.headers) };
|
|
11284
11359
|
}
|
|
11285
|
-
var COMMAND3, CHUNK_SIZE3, PAGE_SIZE,
|
|
11360
|
+
var COMMAND3, CHUNK_SIZE3, PAGE_SIZE, command18, update_default;
|
|
11286
11361
|
var init_update = __esm({
|
|
11287
11362
|
"src/commands/contacts/update.ts"() {
|
|
11288
11363
|
"use strict";
|
|
@@ -11296,7 +11371,7 @@ var init_update = __esm({
|
|
|
11296
11371
|
COMMAND3 = "kenso contacts update";
|
|
11297
11372
|
CHUNK_SIZE3 = 1e3;
|
|
11298
11373
|
PAGE_SIZE = 200;
|
|
11299
|
-
|
|
11374
|
+
command18 = {
|
|
11300
11375
|
resource: "contacts",
|
|
11301
11376
|
action: "update",
|
|
11302
11377
|
summary: "Edit leads from a CSV or JSONL file, by id or email (also one lead)",
|
|
@@ -11367,7 +11442,7 @@ var init_update = __esm({
|
|
|
11367
11442
|
return outcome.exitCode;
|
|
11368
11443
|
}
|
|
11369
11444
|
};
|
|
11370
|
-
update_default =
|
|
11445
|
+
update_default = command18;
|
|
11371
11446
|
}
|
|
11372
11447
|
});
|
|
11373
11448
|
|
|
@@ -11378,12 +11453,12 @@ import { join as join11 } from "node:path";
|
|
|
11378
11453
|
function whereDir(env) {
|
|
11379
11454
|
return join11(runsRoot(env), WHERE_DIR);
|
|
11380
11455
|
}
|
|
11381
|
-
async function unfinishedWhereIds(ctx,
|
|
11456
|
+
async function unfinishedWhereIds(ctx, command60, args) {
|
|
11382
11457
|
const dir = whereDir(ctx.env);
|
|
11383
11458
|
const identity = argsIdentity(args);
|
|
11384
11459
|
const workspaceId = ctx.client.workspaceId ?? ctx.auth.workspaceId;
|
|
11385
11460
|
for (const run of await listRuns(ctx.env)) {
|
|
11386
|
-
if (run.command !==
|
|
11461
|
+
if (run.command !== command60 || run.status === "done" || run.status === "planned") continue;
|
|
11387
11462
|
if ((run.workspaceId || void 0) !== (workspaceId || void 0) || argsIdentity(run.args) !== identity) continue;
|
|
11388
11463
|
if (run.inputPath?.startsWith(`${dir}/`) && existsSync6(run.inputPath)) return run.inputPath;
|
|
11389
11464
|
}
|
|
@@ -11529,14 +11604,14 @@ async function idsFromRun(ctx, runId) {
|
|
|
11529
11604
|
return { ...idItems(ids2), source: "run" };
|
|
11530
11605
|
}
|
|
11531
11606
|
async function collectIds(ctx, flags, kind, dryRun2) {
|
|
11532
|
-
const
|
|
11607
|
+
const command60 = `kenso contacts ${kind}`;
|
|
11533
11608
|
const ids2 = stringFlag2(flags, "ids");
|
|
11534
11609
|
const where = kind === "restore" ? void 0 : stringFlag2(flags, "where");
|
|
11535
11610
|
const run = kind === "restore" ? stringFlag2(flags, "run") : void 0;
|
|
11536
11611
|
const given = [ids2, where, run].filter((v) => v !== void 0).length;
|
|
11537
11612
|
if (given !== 1) {
|
|
11538
11613
|
const choices = kind === "restore" ? "--ids <file|-> or --run <runId>" : "--ids <file|-> or --where '<json>'";
|
|
11539
|
-
throw usageError(`${
|
|
11614
|
+
throw usageError(`${command60} needs exactly one of ${choices}.`, { field: "ids", next: `${command60} --help` });
|
|
11540
11615
|
}
|
|
11541
11616
|
if (ids2 !== void 0) return idsFromFile(ctx, ids2);
|
|
11542
11617
|
if (where !== void 0) return idsFromWhere(ctx, kind, flags, where, dryRun2);
|
|
@@ -11828,7 +11903,7 @@ async function download(ctx, job, exportId, out) {
|
|
|
11828
11903
|
const body2 = typeof res.body === "string" ? res.body : res.body === null ? "" : JSON.stringify(res.body);
|
|
11829
11904
|
return { format: "csv", rows: countRows(body2), path: await saveFile(out, res.raw ?? Buffer.from(body2, "utf8")) };
|
|
11830
11905
|
}
|
|
11831
|
-
var COMMAND4, JOB_TYPE, DEFAULT_TIMEOUT2, CONTENT_PATH,
|
|
11906
|
+
var COMMAND4, JOB_TYPE, DEFAULT_TIMEOUT2, CONTENT_PATH, command19, export_default;
|
|
11832
11907
|
var init_export = __esm({
|
|
11833
11908
|
"src/commands/contacts/export.ts"() {
|
|
11834
11909
|
"use strict";
|
|
@@ -11844,7 +11919,7 @@ var init_export = __esm({
|
|
|
11844
11919
|
JOB_TYPE = "contact_export";
|
|
11845
11920
|
DEFAULT_TIMEOUT2 = "30m";
|
|
11846
11921
|
CONTENT_PATH = /\/v1\/contact-exports\/([0-9]+)\/content/;
|
|
11847
|
-
|
|
11922
|
+
command19 = {
|
|
11848
11923
|
resource: "contacts",
|
|
11849
11924
|
action: "export",
|
|
11850
11925
|
summary: "Export a campaign's contacts to CSV (a segment: contact-exports create)",
|
|
@@ -11903,7 +11978,7 @@ var init_export = __esm({
|
|
|
11903
11978
|
return ExitCode.Ok;
|
|
11904
11979
|
}
|
|
11905
11980
|
};
|
|
11906
|
-
export_default =
|
|
11981
|
+
export_default = command19;
|
|
11907
11982
|
}
|
|
11908
11983
|
});
|
|
11909
11984
|
|
|
@@ -11931,14 +12006,14 @@ var show_exports = {};
|
|
|
11931
12006
|
__export(show_exports, {
|
|
11932
12007
|
default: () => show_default
|
|
11933
12008
|
});
|
|
11934
|
-
var
|
|
12009
|
+
var command20, show_default;
|
|
11935
12010
|
var init_show = __esm({
|
|
11936
12011
|
"src/commands/dashboards/show.ts"() {
|
|
11937
12012
|
"use strict";
|
|
11938
12013
|
init_errors();
|
|
11939
12014
|
init_exit_codes();
|
|
11940
12015
|
init_http();
|
|
11941
|
-
|
|
12016
|
+
command20 = {
|
|
11942
12017
|
resource: "dashboards",
|
|
11943
12018
|
action: "show",
|
|
11944
12019
|
summary: "Run a dashboard's charts and print their numbers",
|
|
@@ -11992,7 +12067,7 @@ var init_show = __esm({
|
|
|
11992
12067
|
return ExitCode.Ok;
|
|
11993
12068
|
}
|
|
11994
12069
|
};
|
|
11995
|
-
show_default =
|
|
12070
|
+
show_default = command20;
|
|
11996
12071
|
}
|
|
11997
12072
|
});
|
|
11998
12073
|
|
|
@@ -12115,7 +12190,7 @@ function unknown(words) {
|
|
|
12115
12190
|
next: "kenso describe"
|
|
12116
12191
|
});
|
|
12117
12192
|
}
|
|
12118
|
-
var
|
|
12193
|
+
var command21, describe_default;
|
|
12119
12194
|
var init_describe = __esm({
|
|
12120
12195
|
"src/commands/describe/describe.ts"() {
|
|
12121
12196
|
"use strict";
|
|
@@ -12128,7 +12203,7 @@ var init_describe = __esm({
|
|
|
12128
12203
|
init_manifest();
|
|
12129
12204
|
init_help();
|
|
12130
12205
|
init_registry();
|
|
12131
|
-
|
|
12206
|
+
command21 = {
|
|
12132
12207
|
resource: "describe",
|
|
12133
12208
|
action: "",
|
|
12134
12209
|
summary: "The command map as JSON: commands, flags, body schemas",
|
|
@@ -12169,7 +12244,7 @@ var init_describe = __esm({
|
|
|
12169
12244
|
return ExitCode.Ok;
|
|
12170
12245
|
}
|
|
12171
12246
|
};
|
|
12172
|
-
describe_default =
|
|
12247
|
+
describe_default = command21;
|
|
12173
12248
|
}
|
|
12174
12249
|
});
|
|
12175
12250
|
|
|
@@ -12193,7 +12268,7 @@ function findTopic(input) {
|
|
|
12193
12268
|
const name = input.trim().toLowerCase().replace(/\.md$/, "");
|
|
12194
12269
|
return TOPICS.find((t) => t.topic === name);
|
|
12195
12270
|
}
|
|
12196
|
-
var NAMES,
|
|
12271
|
+
var NAMES, command22, docs_default;
|
|
12197
12272
|
var init_docs = __esm({
|
|
12198
12273
|
"src/commands/docs/docs.ts"() {
|
|
12199
12274
|
"use strict";
|
|
@@ -12201,7 +12276,7 @@ var init_docs = __esm({
|
|
|
12201
12276
|
init_exit_codes();
|
|
12202
12277
|
init_content();
|
|
12203
12278
|
NAMES = TOPICS.map((t) => t.topic).join(", ");
|
|
12204
|
-
|
|
12279
|
+
command22 = {
|
|
12205
12280
|
resource: "docs",
|
|
12206
12281
|
action: "",
|
|
12207
12282
|
summary: "Offline docs: the topic list, or one topic",
|
|
@@ -12242,7 +12317,7 @@ var init_docs = __esm({
|
|
|
12242
12317
|
return ExitCode.Ok;
|
|
12243
12318
|
}
|
|
12244
12319
|
};
|
|
12245
|
-
docs_default =
|
|
12320
|
+
docs_default = command22;
|
|
12246
12321
|
}
|
|
12247
12322
|
});
|
|
12248
12323
|
|
|
@@ -12280,7 +12355,7 @@ function configCheck(env) {
|
|
|
12280
12355
|
const octal = mode.toString(8).padStart(4, "0");
|
|
12281
12356
|
return mode === 384 ? { name: "config_permissions", ok: true, detail: `${file} is ${octal}` } : { name: "config_permissions", ok: false, detail: `${file} is ${octal}: run chmod 600 ${file}` };
|
|
12282
12357
|
}
|
|
12283
|
-
var MIN_NODE_MAJOR,
|
|
12358
|
+
var MIN_NODE_MAJOR, command23, actions12;
|
|
12284
12359
|
var init_doctor = __esm({
|
|
12285
12360
|
"src/commands/doctor/index.ts"() {
|
|
12286
12361
|
"use strict";
|
|
@@ -12289,7 +12364,7 @@ var init_doctor = __esm({
|
|
|
12289
12364
|
init_exit_codes();
|
|
12290
12365
|
init_http();
|
|
12291
12366
|
MIN_NODE_MAJOR = 22;
|
|
12292
|
-
|
|
12367
|
+
command23 = {
|
|
12293
12368
|
resource: "doctor",
|
|
12294
12369
|
action: "",
|
|
12295
12370
|
summary: "Check Node, the config, the API and the key",
|
|
@@ -12354,7 +12429,7 @@ var init_doctor = __esm({
|
|
|
12354
12429
|
}
|
|
12355
12430
|
};
|
|
12356
12431
|
actions12 = {
|
|
12357
|
-
"": async () =>
|
|
12432
|
+
"": async () => command23
|
|
12358
12433
|
};
|
|
12359
12434
|
}
|
|
12360
12435
|
});
|
|
@@ -12393,7 +12468,7 @@ function recordCount(csv) {
|
|
|
12393
12468
|
}
|
|
12394
12469
|
return hasText ? records + 1 : records;
|
|
12395
12470
|
}
|
|
12396
|
-
var OBJECTS,
|
|
12471
|
+
var OBJECTS, command24, export_default2;
|
|
12397
12472
|
var init_export2 = __esm({
|
|
12398
12473
|
"src/commands/export/export.ts"() {
|
|
12399
12474
|
"use strict";
|
|
@@ -12408,7 +12483,7 @@ var init_export2 = __esm({
|
|
|
12408
12483
|
deals: { resource: "opportunities", noun: "deals" },
|
|
12409
12484
|
opportunities: { resource: "opportunities", noun: "deals" }
|
|
12410
12485
|
};
|
|
12411
|
-
|
|
12486
|
+
command24 = {
|
|
12412
12487
|
resource: "export",
|
|
12413
12488
|
action: "",
|
|
12414
12489
|
summary: "Export accounts, people or deals as CSV: everything, a saved view, or what the filters match",
|
|
@@ -12491,7 +12566,7 @@ var init_export2 = __esm({
|
|
|
12491
12566
|
return ExitCode.Ok;
|
|
12492
12567
|
}
|
|
12493
12568
|
};
|
|
12494
|
-
export_default2 =
|
|
12569
|
+
export_default2 = command24;
|
|
12495
12570
|
}
|
|
12496
12571
|
});
|
|
12497
12572
|
|
|
@@ -12544,7 +12619,7 @@ function readable(row) {
|
|
|
12544
12619
|
const parts2 = [time, `[${row.status}]`, row.method, row.pathTemplate, row.errorCode, `${row.durationMs}ms`, row.apiKeyId, row.requestId];
|
|
12545
12620
|
return parts2.filter((p) => p !== void 0 && p !== "").join(" ");
|
|
12546
12621
|
}
|
|
12547
|
-
var MIN_INTERVAL_MS, MAX_INTERVAL_MS, MAX_SINCE_MS, OVERLAP_MS, MAX_PAGES, RATE_LIMITED_WAIT_MS, isOwnPoll, pad,
|
|
12622
|
+
var MIN_INTERVAL_MS, MAX_INTERVAL_MS, MAX_SINCE_MS, OVERLAP_MS, MAX_PAGES, RATE_LIMITED_WAIT_MS, isOwnPoll, pad, command25, tail_default;
|
|
12548
12623
|
var init_tail = __esm({
|
|
12549
12624
|
"src/commands/logs/tail.ts"() {
|
|
12550
12625
|
"use strict";
|
|
@@ -12560,7 +12635,7 @@ var init_tail = __esm({
|
|
|
12560
12635
|
RATE_LIMITED_WAIT_MS = 3e4;
|
|
12561
12636
|
isOwnPoll = (row) => row.method === "GET" && row.pathTemplate === "/v1/api-requests" && row.userAgent?.startsWith("kenso-cli/") === true;
|
|
12562
12637
|
pad = (n) => String(n).padStart(2, "0");
|
|
12563
|
-
|
|
12638
|
+
command25 = {
|
|
12564
12639
|
resource: "logs",
|
|
12565
12640
|
action: "tail",
|
|
12566
12641
|
summary: "Stream your workspace's new API request log rows",
|
|
@@ -12666,7 +12741,7 @@ var init_tail = __esm({
|
|
|
12666
12741
|
return ExitCode.Ok;
|
|
12667
12742
|
}
|
|
12668
12743
|
};
|
|
12669
|
-
tail_default =
|
|
12744
|
+
tail_default = command25;
|
|
12670
12745
|
}
|
|
12671
12746
|
});
|
|
12672
12747
|
|
|
@@ -12731,7 +12806,7 @@ function isRecord7(value) {
|
|
|
12731
12806
|
function textOf(result) {
|
|
12732
12807
|
return (result.content ?? []).filter((part) => part.type === "text" && typeof part.text === "string").map((part) => part.text).join("\n");
|
|
12733
12808
|
}
|
|
12734
|
-
var
|
|
12809
|
+
var command26, call_default;
|
|
12735
12810
|
var init_call = __esm({
|
|
12736
12811
|
"src/commands/mcp/call.ts"() {
|
|
12737
12812
|
"use strict";
|
|
@@ -12739,7 +12814,7 @@ var init_call = __esm({
|
|
|
12739
12814
|
init_exit_codes();
|
|
12740
12815
|
init_input();
|
|
12741
12816
|
init_connect4();
|
|
12742
|
-
|
|
12817
|
+
command26 = {
|
|
12743
12818
|
resource: "mcp",
|
|
12744
12819
|
action: "call",
|
|
12745
12820
|
summary: "Call a hosted Kenso MCP tool, such as list_skills",
|
|
@@ -12792,7 +12867,7 @@ var init_call = __esm({
|
|
|
12792
12867
|
return ExitCode.Ok;
|
|
12793
12868
|
}
|
|
12794
12869
|
};
|
|
12795
|
-
call_default =
|
|
12870
|
+
call_default = command26;
|
|
12796
12871
|
}
|
|
12797
12872
|
});
|
|
12798
12873
|
|
|
@@ -12801,13 +12876,13 @@ var tools_exports = {};
|
|
|
12801
12876
|
__export(tools_exports, {
|
|
12802
12877
|
default: () => tools_default
|
|
12803
12878
|
});
|
|
12804
|
-
var
|
|
12879
|
+
var command27, tools_default;
|
|
12805
12880
|
var init_tools = __esm({
|
|
12806
12881
|
"src/commands/mcp/tools.ts"() {
|
|
12807
12882
|
"use strict";
|
|
12808
12883
|
init_exit_codes();
|
|
12809
12884
|
init_connect4();
|
|
12810
|
-
|
|
12885
|
+
command27 = {
|
|
12811
12886
|
resource: "mcp",
|
|
12812
12887
|
action: "tools",
|
|
12813
12888
|
summary: "List the hosted Kenso MCP's tools",
|
|
@@ -12822,7 +12897,7 @@ var init_tools = __esm({
|
|
|
12822
12897
|
return ExitCode.Ok;
|
|
12823
12898
|
}
|
|
12824
12899
|
};
|
|
12825
|
-
tools_default =
|
|
12900
|
+
tools_default = command27;
|
|
12826
12901
|
}
|
|
12827
12902
|
});
|
|
12828
12903
|
|
|
@@ -12843,14 +12918,14 @@ var stage_history_exports = {};
|
|
|
12843
12918
|
__export(stage_history_exports, {
|
|
12844
12919
|
default: () => stage_history_default
|
|
12845
12920
|
});
|
|
12846
|
-
var
|
|
12921
|
+
var command28, stage_history_default;
|
|
12847
12922
|
var init_stage_history = __esm({
|
|
12848
12923
|
"src/commands/opportunities/stage-history.ts"() {
|
|
12849
12924
|
"use strict";
|
|
12850
12925
|
init_errors();
|
|
12851
12926
|
init_exit_codes();
|
|
12852
12927
|
init_http();
|
|
12853
|
-
|
|
12928
|
+
command28 = {
|
|
12854
12929
|
resource: "opportunities",
|
|
12855
12930
|
action: "stage-history",
|
|
12856
12931
|
summary: "Show a deal's stage history: each stage, when, who moved it and how long it sat there",
|
|
@@ -12874,7 +12949,7 @@ var init_stage_history = __esm({
|
|
|
12874
12949
|
return ExitCode.Ok;
|
|
12875
12950
|
}
|
|
12876
12951
|
};
|
|
12877
|
-
stage_history_default =
|
|
12952
|
+
stage_history_default = command28;
|
|
12878
12953
|
}
|
|
12879
12954
|
});
|
|
12880
12955
|
|
|
@@ -12960,7 +13035,7 @@ function summarize3(results) {
|
|
|
12960
13035
|
}
|
|
12961
13036
|
return { matched, addedToAccounts, emailFindsQueued };
|
|
12962
13037
|
}
|
|
12963
|
-
var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND,
|
|
13038
|
+
var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND, command29, import_default3;
|
|
12964
13039
|
var init_import3 = __esm({
|
|
12965
13040
|
"src/commands/people/import.ts"() {
|
|
12966
13041
|
"use strict";
|
|
@@ -12992,7 +13067,7 @@ var init_import3 = __esm({
|
|
|
12992
13067
|
};
|
|
12993
13068
|
PERSON_FIELDS = ["email", "fullName", "firstName", "lastName", "linkedinUrl", "title"];
|
|
12994
13069
|
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.";
|
|
12995
|
-
|
|
13070
|
+
command29 = {
|
|
12996
13071
|
resource: "people",
|
|
12997
13072
|
action: "import",
|
|
12998
13073
|
summary: "Create or match people from a CSV or JSONL file, optionally onto accounts",
|
|
@@ -13057,7 +13132,7 @@ var init_import3 = __esm({
|
|
|
13057
13132
|
return outcome.exitCode;
|
|
13058
13133
|
}
|
|
13059
13134
|
};
|
|
13060
|
-
import_default3 =
|
|
13135
|
+
import_default3 = command29;
|
|
13061
13136
|
}
|
|
13062
13137
|
});
|
|
13063
13138
|
|
|
@@ -13087,14 +13162,14 @@ function rule(stage) {
|
|
|
13087
13162
|
isDefault: stage.isDefaultRequiredFields
|
|
13088
13163
|
};
|
|
13089
13164
|
}
|
|
13090
|
-
var
|
|
13165
|
+
var command30, stage_rules_default;
|
|
13091
13166
|
var init_stage_rules = __esm({
|
|
13092
13167
|
"src/commands/pipelines/stage-rules.ts"() {
|
|
13093
13168
|
"use strict";
|
|
13094
13169
|
init_errors();
|
|
13095
13170
|
init_exit_codes();
|
|
13096
13171
|
init_http();
|
|
13097
|
-
|
|
13172
|
+
command30 = {
|
|
13098
13173
|
resource: "pipelines",
|
|
13099
13174
|
action: "stage-rules",
|
|
13100
13175
|
summary: "List or set the fields a deal should have in each stage",
|
|
@@ -13147,7 +13222,7 @@ var init_stage_rules = __esm({
|
|
|
13147
13222
|
return ExitCode.Ok;
|
|
13148
13223
|
}
|
|
13149
13224
|
};
|
|
13150
|
-
stage_rules_default =
|
|
13225
|
+
stage_rules_default = command30;
|
|
13151
13226
|
}
|
|
13152
13227
|
});
|
|
13153
13228
|
|
|
@@ -13167,7 +13242,7 @@ var run_exports2 = {};
|
|
|
13167
13242
|
__export(run_exports2, {
|
|
13168
13243
|
default: () => run_default
|
|
13169
13244
|
});
|
|
13170
|
-
var REPORTS,
|
|
13245
|
+
var REPORTS, command31, run_default;
|
|
13171
13246
|
var init_run2 = __esm({
|
|
13172
13247
|
"src/commands/reports/run.ts"() {
|
|
13173
13248
|
"use strict";
|
|
@@ -13175,7 +13250,7 @@ var init_run2 = __esm({
|
|
|
13175
13250
|
init_exit_codes();
|
|
13176
13251
|
init_http();
|
|
13177
13252
|
REPORTS = ["pipeline_by_stage", "won_by_month", "stage_conversion", "time_in_stage", "won_by_source_campaign", "activity_by_member"];
|
|
13178
|
-
|
|
13253
|
+
command31 = {
|
|
13179
13254
|
resource: "reports",
|
|
13180
13255
|
action: "run",
|
|
13181
13256
|
summary: "Run a stock pipeline report and print its table",
|
|
@@ -13237,7 +13312,7 @@ var init_run2 = __esm({
|
|
|
13237
13312
|
return ExitCode.Ok;
|
|
13238
13313
|
}
|
|
13239
13314
|
};
|
|
13240
|
-
run_default =
|
|
13315
|
+
run_default = command31;
|
|
13241
13316
|
}
|
|
13242
13317
|
});
|
|
13243
13318
|
|
|
@@ -13246,14 +13321,14 @@ var summary_exports = {};
|
|
|
13246
13321
|
__export(summary_exports, {
|
|
13247
13322
|
default: () => summary_default
|
|
13248
13323
|
});
|
|
13249
|
-
var
|
|
13324
|
+
var command32, summary_default;
|
|
13250
13325
|
var init_summary = __esm({
|
|
13251
13326
|
"src/commands/reports/summary.ts"() {
|
|
13252
13327
|
"use strict";
|
|
13253
13328
|
init_errors();
|
|
13254
13329
|
init_exit_codes();
|
|
13255
13330
|
init_http();
|
|
13256
|
-
|
|
13331
|
+
command32 = {
|
|
13257
13332
|
resource: "reports",
|
|
13258
13333
|
action: "summary",
|
|
13259
13334
|
summary: "Read where the period stands and what needs you",
|
|
@@ -13308,7 +13383,7 @@ var init_summary = __esm({
|
|
|
13308
13383
|
return ExitCode.Ok;
|
|
13309
13384
|
}
|
|
13310
13385
|
};
|
|
13311
|
-
summary_default =
|
|
13386
|
+
summary_default = command32;
|
|
13312
13387
|
}
|
|
13313
13388
|
});
|
|
13314
13389
|
|
|
@@ -13329,14 +13404,14 @@ var list_exports = {};
|
|
|
13329
13404
|
__export(list_exports, {
|
|
13330
13405
|
default: () => list_default
|
|
13331
13406
|
});
|
|
13332
|
-
var
|
|
13407
|
+
var command33, list_default;
|
|
13333
13408
|
var init_list = __esm({
|
|
13334
13409
|
"src/commands/runs/list.ts"() {
|
|
13335
13410
|
"use strict";
|
|
13336
13411
|
init_runs();
|
|
13337
13412
|
init_errors();
|
|
13338
13413
|
init_exit_codes();
|
|
13339
|
-
|
|
13414
|
+
command33 = {
|
|
13340
13415
|
resource: "runs",
|
|
13341
13416
|
action: "list",
|
|
13342
13417
|
summary: "List batch runs, newest first (finds an interrupted run)",
|
|
@@ -13357,7 +13432,7 @@ var init_list = __esm({
|
|
|
13357
13432
|
return ExitCode.Ok;
|
|
13358
13433
|
}
|
|
13359
13434
|
};
|
|
13360
|
-
list_default =
|
|
13435
|
+
list_default = command33;
|
|
13361
13436
|
}
|
|
13362
13437
|
});
|
|
13363
13438
|
|
|
@@ -13368,7 +13443,7 @@ __export(show_exports2, {
|
|
|
13368
13443
|
});
|
|
13369
13444
|
import { existsSync as existsSync7, readFileSync as readFileSync9 } from "node:fs";
|
|
13370
13445
|
import { join as join12 } from "node:path";
|
|
13371
|
-
var FILES,
|
|
13446
|
+
var FILES, command34, show_default2;
|
|
13372
13447
|
var init_show2 = __esm({
|
|
13373
13448
|
"src/commands/runs/show.ts"() {
|
|
13374
13449
|
"use strict";
|
|
@@ -13383,7 +13458,7 @@ var init_show2 = __esm({
|
|
|
13383
13458
|
["plan", "plan.json"],
|
|
13384
13459
|
["summary", "summary.json"]
|
|
13385
13460
|
];
|
|
13386
|
-
|
|
13461
|
+
command34 = {
|
|
13387
13462
|
resource: "runs",
|
|
13388
13463
|
action: "show",
|
|
13389
13464
|
summary: "Show one batch run and its files",
|
|
@@ -13410,7 +13485,7 @@ var init_show2 = __esm({
|
|
|
13410
13485
|
return ExitCode.Ok;
|
|
13411
13486
|
}
|
|
13412
13487
|
};
|
|
13413
|
-
show_default2 =
|
|
13488
|
+
show_default2 = command34;
|
|
13414
13489
|
}
|
|
13415
13490
|
});
|
|
13416
13491
|
|
|
@@ -13469,14 +13544,14 @@ function resumeArgv(run, globals = {}) {
|
|
|
13469
13544
|
async function sha256(path) {
|
|
13470
13545
|
return createHash5("sha256").update(await readFile9(path)).digest("hex");
|
|
13471
13546
|
}
|
|
13472
|
-
var SKIPPED_KEYS,
|
|
13547
|
+
var SKIPPED_KEYS, command35, resume_default;
|
|
13473
13548
|
var init_resume = __esm({
|
|
13474
13549
|
"src/commands/runs/resume.ts"() {
|
|
13475
13550
|
"use strict";
|
|
13476
13551
|
init_runs();
|
|
13477
13552
|
init_errors();
|
|
13478
13553
|
SKIPPED_KEYS = /* @__PURE__ */ new Set(["positionals", "yes", "dryRun", "dry-run", "help", "version"]);
|
|
13479
|
-
|
|
13554
|
+
command35 = {
|
|
13480
13555
|
resource: "runs",
|
|
13481
13556
|
action: "resume",
|
|
13482
13557
|
summary: "Continue an interrupted batch run (its command with --yes, no dry run)",
|
|
@@ -13531,7 +13606,7 @@ var init_resume = __esm({
|
|
|
13531
13606
|
}
|
|
13532
13607
|
}
|
|
13533
13608
|
};
|
|
13534
|
-
resume_default =
|
|
13609
|
+
resume_default = command35;
|
|
13535
13610
|
}
|
|
13536
13611
|
});
|
|
13537
13612
|
|
|
@@ -13639,7 +13714,7 @@ var create_exports = {};
|
|
|
13639
13714
|
__export(create_exports, {
|
|
13640
13715
|
default: () => create_default
|
|
13641
13716
|
});
|
|
13642
|
-
var
|
|
13717
|
+
var command36, create_default;
|
|
13643
13718
|
var init_create = __esm({
|
|
13644
13719
|
"src/commands/sandbox/create.ts"() {
|
|
13645
13720
|
"use strict";
|
|
@@ -13647,7 +13722,7 @@ var init_create = __esm({
|
|
|
13647
13722
|
init_exit_codes();
|
|
13648
13723
|
init_http();
|
|
13649
13724
|
init_shared();
|
|
13650
|
-
|
|
13725
|
+
command36 = {
|
|
13651
13726
|
resource: "sandbox",
|
|
13652
13727
|
action: "create",
|
|
13653
13728
|
summary: "Create your developer sandbox and save its test key as the sandbox profile",
|
|
@@ -13689,7 +13764,7 @@ var init_create = __esm({
|
|
|
13689
13764
|
return ExitCode.Ok;
|
|
13690
13765
|
}
|
|
13691
13766
|
};
|
|
13692
|
-
create_default =
|
|
13767
|
+
create_default = command36;
|
|
13693
13768
|
}
|
|
13694
13769
|
});
|
|
13695
13770
|
|
|
@@ -13698,7 +13773,7 @@ var delete_exports = {};
|
|
|
13698
13773
|
__export(delete_exports, {
|
|
13699
13774
|
default: () => delete_default
|
|
13700
13775
|
});
|
|
13701
|
-
var
|
|
13776
|
+
var command37, delete_default;
|
|
13702
13777
|
var init_delete = __esm({
|
|
13703
13778
|
"src/commands/sandbox/delete.ts"() {
|
|
13704
13779
|
"use strict";
|
|
@@ -13706,7 +13781,7 @@ var init_delete = __esm({
|
|
|
13706
13781
|
init_confirm();
|
|
13707
13782
|
init_exit_codes();
|
|
13708
13783
|
init_shared();
|
|
13709
|
-
|
|
13784
|
+
command37 = {
|
|
13710
13785
|
resource: "sandbox",
|
|
13711
13786
|
action: "delete",
|
|
13712
13787
|
summary: "Delete your sandbox and its test keys",
|
|
@@ -13733,7 +13808,7 @@ var init_delete = __esm({
|
|
|
13733
13808
|
return ExitCode.Ok;
|
|
13734
13809
|
}
|
|
13735
13810
|
};
|
|
13736
|
-
delete_default =
|
|
13811
|
+
delete_default = command37;
|
|
13737
13812
|
}
|
|
13738
13813
|
});
|
|
13739
13814
|
|
|
@@ -13742,14 +13817,14 @@ var key_exports = {};
|
|
|
13742
13817
|
__export(key_exports, {
|
|
13743
13818
|
default: () => key_default
|
|
13744
13819
|
});
|
|
13745
|
-
var
|
|
13820
|
+
var command38, key_default;
|
|
13746
13821
|
var init_key = __esm({
|
|
13747
13822
|
"src/commands/sandbox/key.ts"() {
|
|
13748
13823
|
"use strict";
|
|
13749
13824
|
init_exit_codes();
|
|
13750
13825
|
init_http();
|
|
13751
13826
|
init_shared();
|
|
13752
|
-
|
|
13827
|
+
command38 = {
|
|
13753
13828
|
resource: "sandbox",
|
|
13754
13829
|
action: "key",
|
|
13755
13830
|
summary: "Create a new test key for your sandbox and save it as the sandbox profile",
|
|
@@ -13769,7 +13844,7 @@ var init_key = __esm({
|
|
|
13769
13844
|
return ExitCode.Ok;
|
|
13770
13845
|
}
|
|
13771
13846
|
};
|
|
13772
|
-
key_default =
|
|
13847
|
+
key_default = command38;
|
|
13773
13848
|
}
|
|
13774
13849
|
});
|
|
13775
13850
|
|
|
@@ -13778,13 +13853,13 @@ var list_exports2 = {};
|
|
|
13778
13853
|
__export(list_exports2, {
|
|
13779
13854
|
default: () => list_default2
|
|
13780
13855
|
});
|
|
13781
|
-
var
|
|
13856
|
+
var command39, list_default2;
|
|
13782
13857
|
var init_list2 = __esm({
|
|
13783
13858
|
"src/commands/sandbox/list.ts"() {
|
|
13784
13859
|
"use strict";
|
|
13785
13860
|
init_exit_codes();
|
|
13786
13861
|
init_shared();
|
|
13787
|
-
|
|
13862
|
+
command39 = {
|
|
13788
13863
|
resource: "sandbox",
|
|
13789
13864
|
action: "list",
|
|
13790
13865
|
summary: "List your developer sandbox",
|
|
@@ -13800,7 +13875,7 @@ var init_list2 = __esm({
|
|
|
13800
13875
|
return ExitCode.Ok;
|
|
13801
13876
|
}
|
|
13802
13877
|
};
|
|
13803
|
-
list_default2 =
|
|
13878
|
+
list_default2 = command39;
|
|
13804
13879
|
}
|
|
13805
13880
|
});
|
|
13806
13881
|
|
|
@@ -13809,14 +13884,14 @@ var reset_exports = {};
|
|
|
13809
13884
|
__export(reset_exports, {
|
|
13810
13885
|
default: () => reset_default
|
|
13811
13886
|
});
|
|
13812
|
-
var
|
|
13887
|
+
var command40, reset_default;
|
|
13813
13888
|
var init_reset = __esm({
|
|
13814
13889
|
"src/commands/sandbox/reset.ts"() {
|
|
13815
13890
|
"use strict";
|
|
13816
13891
|
init_exit_codes();
|
|
13817
13892
|
init_http();
|
|
13818
13893
|
init_shared();
|
|
13819
|
-
|
|
13894
|
+
command40 = {
|
|
13820
13895
|
resource: "sandbox",
|
|
13821
13896
|
action: "reset",
|
|
13822
13897
|
summary: "Reset your sandbox to its seed data",
|
|
@@ -13834,7 +13909,7 @@ var init_reset = __esm({
|
|
|
13834
13909
|
return ExitCode.Ok;
|
|
13835
13910
|
}
|
|
13836
13911
|
};
|
|
13837
|
-
reset_default =
|
|
13912
|
+
reset_default = command40;
|
|
13838
13913
|
}
|
|
13839
13914
|
});
|
|
13840
13915
|
|
|
@@ -14094,7 +14169,7 @@ __export(pull_exports, {
|
|
|
14094
14169
|
});
|
|
14095
14170
|
import { mkdir, writeFile as writeFile4 } from "node:fs/promises";
|
|
14096
14171
|
import { dirname as dirname2, resolve as resolve11 } from "node:path";
|
|
14097
|
-
var
|
|
14172
|
+
var command41, pull_default;
|
|
14098
14173
|
var init_pull = __esm({
|
|
14099
14174
|
"src/commands/studio/pull.ts"() {
|
|
14100
14175
|
"use strict";
|
|
@@ -14104,7 +14179,7 @@ var init_pull = __esm({
|
|
|
14104
14179
|
init_common2();
|
|
14105
14180
|
init_folder();
|
|
14106
14181
|
init_transfer2();
|
|
14107
|
-
|
|
14182
|
+
command41 = {
|
|
14108
14183
|
resource: "studio",
|
|
14109
14184
|
action: "pull",
|
|
14110
14185
|
summary: "Write a template version's files to a folder",
|
|
@@ -14151,7 +14226,7 @@ var init_pull = __esm({
|
|
|
14151
14226
|
return ExitCode.Ok;
|
|
14152
14227
|
}
|
|
14153
14228
|
};
|
|
14154
|
-
pull_default =
|
|
14229
|
+
pull_default = command41;
|
|
14155
14230
|
}
|
|
14156
14231
|
});
|
|
14157
14232
|
|
|
@@ -14184,7 +14259,7 @@ var push_exports = {};
|
|
|
14184
14259
|
__export(push_exports, {
|
|
14185
14260
|
default: () => push_default
|
|
14186
14261
|
});
|
|
14187
|
-
var BUILT_BY, DEFAULT_MESSAGE,
|
|
14262
|
+
var BUILT_BY, DEFAULT_MESSAGE, command42, push_default;
|
|
14188
14263
|
var init_push = __esm({
|
|
14189
14264
|
"src/commands/studio/push.ts"() {
|
|
14190
14265
|
"use strict";
|
|
@@ -14196,7 +14271,7 @@ var init_push = __esm({
|
|
|
14196
14271
|
init_read();
|
|
14197
14272
|
BUILT_BY = "customer_agent";
|
|
14198
14273
|
DEFAULT_MESSAGE = "Pushed with the Kenso CLI";
|
|
14199
|
-
|
|
14274
|
+
command42 = {
|
|
14200
14275
|
resource: "studio",
|
|
14201
14276
|
action: "push",
|
|
14202
14277
|
summary: "Save a folder's files to a template's draft and print the validation",
|
|
@@ -14288,7 +14363,7 @@ var init_push = __esm({
|
|
|
14288
14363
|
);
|
|
14289
14364
|
}
|
|
14290
14365
|
};
|
|
14291
|
-
push_default =
|
|
14366
|
+
push_default = command42;
|
|
14292
14367
|
}
|
|
14293
14368
|
});
|
|
14294
14369
|
|
|
@@ -14297,7 +14372,7 @@ var validate_exports = {};
|
|
|
14297
14372
|
__export(validate_exports, {
|
|
14298
14373
|
default: () => validate_default
|
|
14299
14374
|
});
|
|
14300
|
-
var
|
|
14375
|
+
var command43, validate_default;
|
|
14301
14376
|
var init_validate = __esm({
|
|
14302
14377
|
"src/commands/studio/validate.ts"() {
|
|
14303
14378
|
"use strict";
|
|
@@ -14306,7 +14381,7 @@ var init_validate = __esm({
|
|
|
14306
14381
|
init_columns();
|
|
14307
14382
|
init_common2();
|
|
14308
14383
|
init_read();
|
|
14309
|
-
|
|
14384
|
+
command43 = {
|
|
14310
14385
|
resource: "studio",
|
|
14311
14386
|
action: "validate",
|
|
14312
14387
|
summary: "Validate a folder's files against a template without saving them",
|
|
@@ -14335,7 +14410,7 @@ var init_validate = __esm({
|
|
|
14335
14410
|
throw validationFailed(validation, "The files have validation errors", commandLine2(ctx, "studio validate", args));
|
|
14336
14411
|
}
|
|
14337
14412
|
};
|
|
14338
|
-
validate_default =
|
|
14413
|
+
validate_default = command43;
|
|
14339
14414
|
}
|
|
14340
14415
|
});
|
|
14341
14416
|
|
|
@@ -14384,7 +14459,7 @@ function accountIds(value) {
|
|
|
14384
14459
|
}
|
|
14385
14460
|
return ids2.map(Number);
|
|
14386
14461
|
}
|
|
14387
|
-
var SHOWN,
|
|
14462
|
+
var SHOWN, command44, preview_default;
|
|
14388
14463
|
var init_preview = __esm({
|
|
14389
14464
|
"src/commands/studio/preview.ts"() {
|
|
14390
14465
|
"use strict";
|
|
@@ -14396,7 +14471,7 @@ var init_preview = __esm({
|
|
|
14396
14471
|
init_common2();
|
|
14397
14472
|
init_folder();
|
|
14398
14473
|
SHOWN = 5;
|
|
14399
|
-
|
|
14474
|
+
command44 = {
|
|
14400
14475
|
resource: "studio",
|
|
14401
14476
|
action: "preview",
|
|
14402
14477
|
summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
|
|
@@ -14445,7 +14520,7 @@ var init_preview = __esm({
|
|
|
14445
14520
|
return ExitCode.Ok;
|
|
14446
14521
|
}
|
|
14447
14522
|
};
|
|
14448
|
-
preview_default =
|
|
14523
|
+
preview_default = command44;
|
|
14449
14524
|
}
|
|
14450
14525
|
});
|
|
14451
14526
|
|
|
@@ -14646,7 +14721,7 @@ function estimateOutput(templateId, target, estimate2) {
|
|
|
14646
14721
|
...target.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
|
|
14647
14722
|
};
|
|
14648
14723
|
}
|
|
14649
|
-
var COMMAND6, sha2562,
|
|
14724
|
+
var COMMAND6, sha2562, command45, fill_default;
|
|
14650
14725
|
var init_fill = __esm({
|
|
14651
14726
|
"src/commands/studio/fill.ts"() {
|
|
14652
14727
|
"use strict";
|
|
@@ -14662,7 +14737,7 @@ var init_fill = __esm({
|
|
|
14662
14737
|
init_fill_runs();
|
|
14663
14738
|
COMMAND6 = "studio fill";
|
|
14664
14739
|
sha2562 = (data) => createHash8("sha256").update(data).digest("hex");
|
|
14665
|
-
|
|
14740
|
+
command45 = {
|
|
14666
14741
|
resource: "studio",
|
|
14667
14742
|
action: "fill",
|
|
14668
14743
|
summary: "Fill a template on many accounts or campaign leads (estimate first)",
|
|
@@ -14722,7 +14797,7 @@ var init_fill = __esm({
|
|
|
14722
14797
|
return outcome.exitCode;
|
|
14723
14798
|
}
|
|
14724
14799
|
};
|
|
14725
|
-
fill_default =
|
|
14800
|
+
fill_default = command45;
|
|
14726
14801
|
}
|
|
14727
14802
|
});
|
|
14728
14803
|
|
|
@@ -14824,7 +14899,7 @@ var add_exports = {};
|
|
|
14824
14899
|
__export(add_exports, {
|
|
14825
14900
|
default: () => add_default
|
|
14826
14901
|
});
|
|
14827
|
-
var NEXT,
|
|
14902
|
+
var NEXT, command46, add_default;
|
|
14828
14903
|
var init_add = __esm({
|
|
14829
14904
|
"src/commands/tasks/add.ts"() {
|
|
14830
14905
|
"use strict";
|
|
@@ -14833,7 +14908,7 @@ var init_add = __esm({
|
|
|
14833
14908
|
init_http();
|
|
14834
14909
|
init_shared2();
|
|
14835
14910
|
NEXT = 'kenso tasks add "Send the deck" --due tomorrow --account 812';
|
|
14836
|
-
|
|
14911
|
+
command46 = {
|
|
14837
14912
|
resource: "tasks",
|
|
14838
14913
|
action: "add",
|
|
14839
14914
|
summary: "Add a task: a title, an optional due day and time, assignee and the account, person or deal it is about",
|
|
@@ -14868,7 +14943,7 @@ var init_add = __esm({
|
|
|
14868
14943
|
return ExitCode.Ok;
|
|
14869
14944
|
}
|
|
14870
14945
|
};
|
|
14871
|
-
add_default =
|
|
14946
|
+
add_default = command46;
|
|
14872
14947
|
}
|
|
14873
14948
|
});
|
|
14874
14949
|
|
|
@@ -14887,7 +14962,7 @@ async function patchTask(ctx, taskId, change) {
|
|
|
14887
14962
|
return unwrap((await send2()).body);
|
|
14888
14963
|
}
|
|
14889
14964
|
}
|
|
14890
|
-
var
|
|
14965
|
+
var command47, done_default;
|
|
14891
14966
|
var init_done = __esm({
|
|
14892
14967
|
"src/commands/tasks/done.ts"() {
|
|
14893
14968
|
"use strict";
|
|
@@ -14895,7 +14970,7 @@ var init_done = __esm({
|
|
|
14895
14970
|
init_exit_codes();
|
|
14896
14971
|
init_http();
|
|
14897
14972
|
init_shared2();
|
|
14898
|
-
|
|
14973
|
+
command47 = {
|
|
14899
14974
|
resource: "tasks",
|
|
14900
14975
|
action: "done",
|
|
14901
14976
|
summary: "Complete one or more tasks (--undo reopens them)",
|
|
@@ -14918,7 +14993,7 @@ var init_done = __esm({
|
|
|
14918
14993
|
return ExitCode.Ok;
|
|
14919
14994
|
}
|
|
14920
14995
|
};
|
|
14921
|
-
done_default =
|
|
14996
|
+
done_default = command47;
|
|
14922
14997
|
}
|
|
14923
14998
|
});
|
|
14924
14999
|
|
|
@@ -14927,7 +15002,7 @@ var assign_exports = {};
|
|
|
14927
15002
|
__export(assign_exports, {
|
|
14928
15003
|
default: () => assign_default
|
|
14929
15004
|
});
|
|
14930
|
-
var NEXT2,
|
|
15005
|
+
var NEXT2, command48, assign_default;
|
|
14931
15006
|
var init_assign = __esm({
|
|
14932
15007
|
"src/commands/tasks/assign.ts"() {
|
|
14933
15008
|
"use strict";
|
|
@@ -14935,7 +15010,7 @@ var init_assign = __esm({
|
|
|
14935
15010
|
init_done();
|
|
14936
15011
|
init_shared2();
|
|
14937
15012
|
NEXT2 = "kenso tasks assign <taskId> <me|memberId|email>";
|
|
14938
|
-
|
|
15013
|
+
command48 = {
|
|
14939
15014
|
resource: "tasks",
|
|
14940
15015
|
action: "assign",
|
|
14941
15016
|
summary: "Give a task to a member",
|
|
@@ -14955,7 +15030,7 @@ var init_assign = __esm({
|
|
|
14955
15030
|
return ExitCode.Ok;
|
|
14956
15031
|
}
|
|
14957
15032
|
};
|
|
14958
|
-
assign_default =
|
|
15033
|
+
assign_default = command48;
|
|
14959
15034
|
}
|
|
14960
15035
|
});
|
|
14961
15036
|
|
|
@@ -14964,14 +15039,14 @@ var queue_exports = {};
|
|
|
14964
15039
|
__export(queue_exports, {
|
|
14965
15040
|
default: () => queue_default
|
|
14966
15041
|
});
|
|
14967
|
-
var SCOPES,
|
|
15042
|
+
var SCOPES, command49, queue_default;
|
|
14968
15043
|
var init_queue = __esm({
|
|
14969
15044
|
"src/commands/tasks/queue.ts"() {
|
|
14970
15045
|
"use strict";
|
|
14971
15046
|
init_errors();
|
|
14972
15047
|
init_exit_codes();
|
|
14973
15048
|
SCOPES = ["mine", "assigned_by_me", "everyone"];
|
|
14974
|
-
|
|
15049
|
+
command49 = {
|
|
14975
15050
|
resource: "tasks",
|
|
14976
15051
|
action: "queue",
|
|
14977
15052
|
summary: "Your open work by due day: tasks, touches, call tasks, reply reminders and Ken follow-ups",
|
|
@@ -14992,7 +15067,7 @@ var init_queue = __esm({
|
|
|
14992
15067
|
return ExitCode.Ok;
|
|
14993
15068
|
}
|
|
14994
15069
|
};
|
|
14995
|
-
queue_default =
|
|
15070
|
+
queue_default = command49;
|
|
14996
15071
|
}
|
|
14997
15072
|
});
|
|
14998
15073
|
|
|
@@ -15142,7 +15217,7 @@ function readBody(req) {
|
|
|
15142
15217
|
function reply(res, status, body2) {
|
|
15143
15218
|
res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
|
|
15144
15219
|
}
|
|
15145
|
-
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES,
|
|
15220
|
+
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command50, listen_default;
|
|
15146
15221
|
var init_listen = __esm({
|
|
15147
15222
|
"src/commands/webhooks/listen.ts"() {
|
|
15148
15223
|
"use strict";
|
|
@@ -15153,7 +15228,7 @@ var init_listen = __esm({
|
|
|
15153
15228
|
MIN_POLL_MS = 1e3;
|
|
15154
15229
|
MAX_POLL_MS = 6e4;
|
|
15155
15230
|
MAX_TRIGGER_BYTES = 1e6;
|
|
15156
|
-
|
|
15231
|
+
command50 = {
|
|
15157
15232
|
resource: "webhooks",
|
|
15158
15233
|
action: "listen",
|
|
15159
15234
|
summary: "Stream the workspace's events and forward them, signed, to a local handler",
|
|
@@ -15259,7 +15334,7 @@ var init_listen = __esm({
|
|
|
15259
15334
|
return ExitCode.Ok;
|
|
15260
15335
|
}
|
|
15261
15336
|
};
|
|
15262
|
-
listen_default =
|
|
15337
|
+
listen_default = command50;
|
|
15263
15338
|
}
|
|
15264
15339
|
});
|
|
15265
15340
|
|
|
@@ -15278,7 +15353,7 @@ function notRunning() {
|
|
|
15278
15353
|
next: LISTEN_NEXT
|
|
15279
15354
|
});
|
|
15280
15355
|
}
|
|
15281
|
-
var LISTEN_NEXT,
|
|
15356
|
+
var LISTEN_NEXT, command51, trigger_default;
|
|
15282
15357
|
var init_trigger = __esm({
|
|
15283
15358
|
"src/commands/webhooks/trigger.ts"() {
|
|
15284
15359
|
"use strict";
|
|
@@ -15287,7 +15362,7 @@ var init_trigger = __esm({
|
|
|
15287
15362
|
init_http();
|
|
15288
15363
|
init_local();
|
|
15289
15364
|
LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
|
|
15290
|
-
|
|
15365
|
+
command51 = {
|
|
15291
15366
|
resource: "webhooks",
|
|
15292
15367
|
action: "trigger",
|
|
15293
15368
|
summary: "Send a sample event of one type through the running kenso webhooks listen",
|
|
@@ -15344,7 +15419,7 @@ var init_trigger = __esm({
|
|
|
15344
15419
|
return ExitCode.Ok;
|
|
15345
15420
|
}
|
|
15346
15421
|
};
|
|
15347
|
-
trigger_default =
|
|
15422
|
+
trigger_default = command51;
|
|
15348
15423
|
}
|
|
15349
15424
|
});
|
|
15350
15425
|
|
|
@@ -15548,14 +15623,14 @@ var status_exports3 = {};
|
|
|
15548
15623
|
__export(status_exports3, {
|
|
15549
15624
|
default: () => status_default3
|
|
15550
15625
|
});
|
|
15551
|
-
var
|
|
15626
|
+
var command52, status_default3;
|
|
15552
15627
|
var init_status3 = __esm({
|
|
15553
15628
|
"src/commands/work/status.ts"() {
|
|
15554
15629
|
"use strict";
|
|
15555
15630
|
init_exit_codes();
|
|
15556
15631
|
init_http();
|
|
15557
15632
|
init_common3();
|
|
15558
|
-
|
|
15633
|
+
command52 = {
|
|
15559
15634
|
resource: "work",
|
|
15560
15635
|
action: "status",
|
|
15561
15636
|
summary: "Show the Kenso AI work waiting for your own agent, per kind",
|
|
@@ -15589,7 +15664,7 @@ var init_status3 = __esm({
|
|
|
15589
15664
|
return ExitCode.Ok;
|
|
15590
15665
|
}
|
|
15591
15666
|
};
|
|
15592
|
-
status_default3 =
|
|
15667
|
+
status_default3 = command52;
|
|
15593
15668
|
}
|
|
15594
15669
|
});
|
|
15595
15670
|
|
|
@@ -15721,9 +15796,9 @@ var init_files = __esm({
|
|
|
15721
15796
|
import { execFile, spawnSync as spawnSync2 } from "node:child_process";
|
|
15722
15797
|
import { readFileSync as readFileSync12 } from "node:fs";
|
|
15723
15798
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
15724
|
-
function sudoArgs(user,
|
|
15799
|
+
function sudoArgs(user, command60, args, keep = [], set = {}) {
|
|
15725
15800
|
const assignments = Object.entries(set).map(([name, value]) => `${name}=${value}`);
|
|
15726
|
-
return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--",
|
|
15801
|
+
return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command60, ...args];
|
|
15727
15802
|
}
|
|
15728
15803
|
function agentKensoEnv(opts) {
|
|
15729
15804
|
return {
|
|
@@ -15733,12 +15808,12 @@ function agentKensoEnv(opts) {
|
|
|
15733
15808
|
AI_AGENT: opts.agentName
|
|
15734
15809
|
};
|
|
15735
15810
|
}
|
|
15736
|
-
function sudoExec(user,
|
|
15811
|
+
function sudoExec(user, command60, args, opts = {}) {
|
|
15737
15812
|
const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
|
|
15738
15813
|
return new Promise((resolve16) => {
|
|
15739
15814
|
execFile(
|
|
15740
15815
|
sudo,
|
|
15741
|
-
[...lead, ...sudoArgs(user.name,
|
|
15816
|
+
[...lead, ...sudoArgs(user.name, command60, args)],
|
|
15742
15817
|
{ env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
|
|
15743
15818
|
(err, stdout, stderr) => {
|
|
15744
15819
|
const code = err ? err.code : 0;
|
|
@@ -15848,9 +15923,9 @@ var init_folder2 = __esm({
|
|
|
15848
15923
|
init_redact();
|
|
15849
15924
|
init_agent_user();
|
|
15850
15925
|
WorkRunFolder = class {
|
|
15851
|
-
constructor(ctx,
|
|
15926
|
+
constructor(ctx, command60, args, outDir, shared = false) {
|
|
15852
15927
|
this.ctx = ctx;
|
|
15853
|
-
this.command =
|
|
15928
|
+
this.command = command60;
|
|
15854
15929
|
this.args = args;
|
|
15855
15930
|
this.outDir = outDir;
|
|
15856
15931
|
this.shared = shared;
|
|
@@ -15965,7 +16040,7 @@ var pull_exports2 = {};
|
|
|
15965
16040
|
__export(pull_exports2, {
|
|
15966
16041
|
default: () => pull_default2
|
|
15967
16042
|
});
|
|
15968
|
-
var MAX_FILES,
|
|
16043
|
+
var MAX_FILES, command53, pull_default2;
|
|
15969
16044
|
var init_pull2 = __esm({
|
|
15970
16045
|
"src/commands/work/pull.ts"() {
|
|
15971
16046
|
"use strict";
|
|
@@ -15974,7 +16049,7 @@ var init_pull2 = __esm({
|
|
|
15974
16049
|
init_common3();
|
|
15975
16050
|
init_folder2();
|
|
15976
16051
|
MAX_FILES = 100;
|
|
15977
|
-
|
|
16052
|
+
command53 = {
|
|
15978
16053
|
resource: "work",
|
|
15979
16054
|
action: "pull",
|
|
15980
16055
|
summary: "Claim waiting work into local work files, to answer by hand",
|
|
@@ -16052,7 +16127,7 @@ var init_pull2 = __esm({
|
|
|
16052
16127
|
return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
|
|
16053
16128
|
}
|
|
16054
16129
|
};
|
|
16055
|
-
pull_default2 =
|
|
16130
|
+
pull_default2 = command53;
|
|
16056
16131
|
}
|
|
16057
16132
|
});
|
|
16058
16133
|
|
|
@@ -16194,7 +16269,7 @@ __export(submit_exports, {
|
|
|
16194
16269
|
default: () => submit_default
|
|
16195
16270
|
});
|
|
16196
16271
|
import { resolve as resolve14 } from "node:path";
|
|
16197
|
-
var
|
|
16272
|
+
var command54, submit_default;
|
|
16198
16273
|
var init_submit = __esm({
|
|
16199
16274
|
"src/commands/work/submit.ts"() {
|
|
16200
16275
|
"use strict";
|
|
@@ -16203,7 +16278,7 @@ var init_submit = __esm({
|
|
|
16203
16278
|
init_files();
|
|
16204
16279
|
init_answers();
|
|
16205
16280
|
init_common3();
|
|
16206
|
-
|
|
16281
|
+
command54 = {
|
|
16207
16282
|
resource: "work",
|
|
16208
16283
|
action: "submit",
|
|
16209
16284
|
summary: "Send answers files to Kenso and write each one's results",
|
|
@@ -16235,7 +16310,7 @@ var init_submit = __esm({
|
|
|
16235
16310
|
return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
|
|
16236
16311
|
}
|
|
16237
16312
|
};
|
|
16238
|
-
submit_default =
|
|
16313
|
+
submit_default = command54;
|
|
16239
16314
|
}
|
|
16240
16315
|
});
|
|
16241
16316
|
|
|
@@ -16256,7 +16331,7 @@ function claimIdOf(arg) {
|
|
|
16256
16331
|
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..." });
|
|
16257
16332
|
return arg;
|
|
16258
16333
|
}
|
|
16259
|
-
var CLAIM_ID,
|
|
16334
|
+
var CLAIM_ID, command55, release_default;
|
|
16260
16335
|
var init_release = __esm({
|
|
16261
16336
|
"src/commands/work/release.ts"() {
|
|
16262
16337
|
"use strict";
|
|
@@ -16265,7 +16340,7 @@ var init_release = __esm({
|
|
|
16265
16340
|
init_files();
|
|
16266
16341
|
init_common3();
|
|
16267
16342
|
CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
16268
|
-
|
|
16343
|
+
command55 = {
|
|
16269
16344
|
resource: "work",
|
|
16270
16345
|
action: "release",
|
|
16271
16346
|
summary: "Give claimed work back to the queue now",
|
|
@@ -16284,7 +16359,7 @@ var init_release = __esm({
|
|
|
16284
16359
|
return ExitCode.Ok;
|
|
16285
16360
|
}
|
|
16286
16361
|
};
|
|
16287
|
-
release_default =
|
|
16362
|
+
release_default = command55;
|
|
16288
16363
|
}
|
|
16289
16364
|
});
|
|
16290
16365
|
|
|
@@ -16623,12 +16698,12 @@ function plain(text4) {
|
|
|
16623
16698
|
return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
|
|
16624
16699
|
}
|
|
16625
16700
|
function runStatus(bin, args, env, adapter, runAs) {
|
|
16626
|
-
const
|
|
16701
|
+
const command60 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
|
|
16627
16702
|
const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
|
|
16628
16703
|
const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
|
|
16629
16704
|
return new Promise((resolve16) => {
|
|
16630
16705
|
execFile2(
|
|
16631
|
-
|
|
16706
|
+
command60,
|
|
16632
16707
|
commandArgs2,
|
|
16633
16708
|
{ ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
|
|
16634
16709
|
(err, stdout, stderr) => {
|
|
@@ -17710,7 +17785,7 @@ var run_exports3 = {};
|
|
|
17710
17785
|
__export(run_exports3, {
|
|
17711
17786
|
default: () => run_default2
|
|
17712
17787
|
});
|
|
17713
|
-
var FAILURES_IN_A_ROW,
|
|
17788
|
+
var FAILURES_IN_A_ROW, command56, run_default2;
|
|
17714
17789
|
var init_run3 = __esm({
|
|
17715
17790
|
"src/commands/work/run.ts"() {
|
|
17716
17791
|
"use strict";
|
|
@@ -17731,7 +17806,7 @@ var init_run3 = __esm({
|
|
|
17731
17806
|
init_folder2();
|
|
17732
17807
|
init_stop();
|
|
17733
17808
|
FAILURES_IN_A_ROW = 3;
|
|
17734
|
-
|
|
17809
|
+
command56 = {
|
|
17735
17810
|
resource: "work",
|
|
17736
17811
|
action: "run",
|
|
17737
17812
|
summary: "Run your own coding agent on the waiting work until the queue is empty",
|
|
@@ -18056,7 +18131,7 @@ var init_run3 = __esm({
|
|
|
18056
18131
|
return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
|
|
18057
18132
|
}
|
|
18058
18133
|
};
|
|
18059
|
-
run_default2 =
|
|
18134
|
+
run_default2 = command56;
|
|
18060
18135
|
}
|
|
18061
18136
|
});
|
|
18062
18137
|
|
|
@@ -18096,7 +18171,7 @@ function rewrap(err, overrides) {
|
|
|
18096
18171
|
details: err.details
|
|
18097
18172
|
});
|
|
18098
18173
|
}
|
|
18099
|
-
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE,
|
|
18174
|
+
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE, command57, keys_default;
|
|
18100
18175
|
var init_keys = __esm({
|
|
18101
18176
|
"src/commands/workspace/keys.ts"() {
|
|
18102
18177
|
"use strict";
|
|
@@ -18106,7 +18181,7 @@ var init_keys = __esm({
|
|
|
18106
18181
|
TEMPLATES = ["admin", "editor", "viewer"];
|
|
18107
18182
|
APP_NEXT_STEP = "A workspace admin can create it in the app: Settings > API keys > Workspace keys";
|
|
18108
18183
|
NOT_AVAILABLE = "Workspace keys are not available for this workspace yet.";
|
|
18109
|
-
|
|
18184
|
+
command57 = {
|
|
18110
18185
|
resource: "workspace",
|
|
18111
18186
|
action: "keys",
|
|
18112
18187
|
summary: "Create an API key the workspace owns",
|
|
@@ -18167,7 +18242,7 @@ var init_keys = __esm({
|
|
|
18167
18242
|
return ExitCode.Ok;
|
|
18168
18243
|
}
|
|
18169
18244
|
};
|
|
18170
|
-
keys_default =
|
|
18245
|
+
keys_default = command57;
|
|
18171
18246
|
}
|
|
18172
18247
|
});
|
|
18173
18248
|
|
|
@@ -18185,14 +18260,14 @@ function parseLimit(value) {
|
|
|
18185
18260
|
}
|
|
18186
18261
|
return limit;
|
|
18187
18262
|
}
|
|
18188
|
-
var MAX_LIMIT,
|
|
18263
|
+
var MAX_LIMIT, command58, list_default3;
|
|
18189
18264
|
var init_list3 = __esm({
|
|
18190
18265
|
"src/commands/workspace/list.ts"() {
|
|
18191
18266
|
"use strict";
|
|
18192
18267
|
init_errors();
|
|
18193
18268
|
init_exit_codes();
|
|
18194
18269
|
MAX_LIMIT = 200;
|
|
18195
|
-
|
|
18270
|
+
command58 = {
|
|
18196
18271
|
resource: "workspace",
|
|
18197
18272
|
action: "list",
|
|
18198
18273
|
summary: "List the workspaces your key can use",
|
|
@@ -18220,7 +18295,7 @@ var init_list3 = __esm({
|
|
|
18220
18295
|
return ExitCode.Ok;
|
|
18221
18296
|
}
|
|
18222
18297
|
};
|
|
18223
|
-
list_default3 =
|
|
18298
|
+
list_default3 = command58;
|
|
18224
18299
|
}
|
|
18225
18300
|
});
|
|
18226
18301
|
|
|
@@ -18229,7 +18304,7 @@ var use_exports = {};
|
|
|
18229
18304
|
__export(use_exports, {
|
|
18230
18305
|
default: () => use_default
|
|
18231
18306
|
});
|
|
18232
|
-
var
|
|
18307
|
+
var command59, use_default;
|
|
18233
18308
|
var init_use = __esm({
|
|
18234
18309
|
"src/commands/workspace/use.ts"() {
|
|
18235
18310
|
"use strict";
|
|
@@ -18237,7 +18312,7 @@ var init_use = __esm({
|
|
|
18237
18312
|
init_errors();
|
|
18238
18313
|
init_exit_codes();
|
|
18239
18314
|
init_http();
|
|
18240
|
-
|
|
18315
|
+
command59 = {
|
|
18241
18316
|
resource: "workspace",
|
|
18242
18317
|
action: "use",
|
|
18243
18318
|
summary: "Set the profile's default workspace",
|
|
@@ -18294,7 +18369,7 @@ var init_use = __esm({
|
|
|
18294
18369
|
return ExitCode.Ok;
|
|
18295
18370
|
}
|
|
18296
18371
|
};
|
|
18297
|
-
use_default =
|
|
18372
|
+
use_default = command59;
|
|
18298
18373
|
}
|
|
18299
18374
|
});
|
|
18300
18375
|
|
|
@@ -18864,8 +18939,8 @@ function startUpdateNotice(argv, opts = {}) {
|
|
|
18864
18939
|
if (!found) return;
|
|
18865
18940
|
writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
|
|
18866
18941
|
if (isNewer(found, version)) {
|
|
18867
|
-
const
|
|
18868
|
-
stderr.write(`kenso ${found} is out (you have ${version}): ${
|
|
18942
|
+
const command60 = updateCommand(install, opts.platform ?? process.platform);
|
|
18943
|
+
stderr.write(`kenso ${found} is out (you have ${version}): ${command60}
|
|
18869
18944
|
Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
|
|
18870
18945
|
`);
|
|
18871
18946
|
}
|