kenso 0.1.90 → 0.1.92
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 +265 -183
- package/dist/operations.json +1 -1
- package/docs/crm.md +10 -1
- package/docs/reference.md +146 -14
- 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.92" : "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) {
|
|
@@ -7177,6 +7177,12 @@ function eachConcurrency(raw) {
|
|
|
7177
7177
|
function secretParams(op) {
|
|
7178
7178
|
return operationFlags(op).flatMap((f) => f.param && f.location === "body" && isSecretFlag(f.flag, f.type) ? [{ flag: f.flag, name: f.param.name }] : []);
|
|
7179
7179
|
}
|
|
7180
|
+
function printWarnings(ctx, body2) {
|
|
7181
|
+
if (!isRecord3(body2) || !Array.isArray(body2.warnings)) return;
|
|
7182
|
+
for (const warning of body2.warnings) {
|
|
7183
|
+
if (isRecord3(warning) && typeof warning.message === "string") ctx.output.warn(warning.message);
|
|
7184
|
+
}
|
|
7185
|
+
}
|
|
7180
7186
|
async function runOperation(ctx, op, flags) {
|
|
7181
7187
|
const secrets = secretParams(op);
|
|
7182
7188
|
checkSecretSources(flags, secrets.map((s) => s.flag));
|
|
@@ -7213,6 +7219,7 @@ async function runOperation(ctx, op, flags) {
|
|
|
7213
7219
|
return ExitCode.Ok;
|
|
7214
7220
|
}
|
|
7215
7221
|
if (res.status === 204 || res.body === null || res.body === "") return ExitCode.Ok;
|
|
7222
|
+
printWarnings(ctx, res.body);
|
|
7216
7223
|
if (op.list && isRecord3(res.body) && Array.isArray(res.body.data)) {
|
|
7217
7224
|
if (res.body.counts !== void 0) {
|
|
7218
7225
|
ctx.output.object({ data: res.body.data, pagination: res.body.pagination, counts: res.body.counts });
|
|
@@ -7451,8 +7458,8 @@ function idValue(value, field) {
|
|
|
7451
7458
|
function shellQuote3(arg) {
|
|
7452
7459
|
return /^[A-Za-z0-9_./:=@%+,-]+$/.test(arg) ? arg : `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
7453
7460
|
}
|
|
7454
|
-
function commandLine2(ctx,
|
|
7455
|
-
const parts2 = ["kenso", ...
|
|
7461
|
+
function commandLine2(ctx, command60, args, extra = []) {
|
|
7462
|
+
const parts2 = ["kenso", ...command60.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
|
|
7456
7463
|
for (const [name, value] of Object.entries(args.flags)) {
|
|
7457
7464
|
if (value === void 0 || value === false) continue;
|
|
7458
7465
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -7784,7 +7791,7 @@ var init_connect = __esm({
|
|
|
7784
7791
|
var crm_default;
|
|
7785
7792
|
var init_crm = __esm({
|
|
7786
7793
|
"docs/crm.md"() {
|
|
7787
|
-
crm_default = '# CRM (beta)\n\nThe CRM commands work on Kenso\'s Accounts lane: accounts (companies), the people on them, and opportunities. They are beta: they need the `accounts` feature flag on your workspace (opportunities need `opportunities`, CRM sync needs `ingestion`). Help and `kenso describe` hide them until your workspace has the flag; `--all-commands` shows them.\n\n| Command | What it does |\n|---|---|\n| `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |\n| `people import` | Create or match people from a file, optionally onto accounts |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `deleted-accounts list`, `accounts restore <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved Accounts view, or what the filters match |\n| `capture status` | Your captured mailbox, its backfill progress and what teammates see of a captured email. Needs the `crm_capture` flag |\n| `capture connect` | Turn capture on for your own mailbox. `--private` starts it hidden from teammates; `--provider google` prints a sign-in link when no account is connected yet |\n| `capture private on\\|off` | Hide your captured email from teammates, or show it again. Email only: meetings stay visible |\n| `capture disconnect` | Turn capture off and delete your stored email bodies. Asks first; `--yes` skips the question |\n| `capture teammates-see summary\\|full_email` | Workspace admin: what teammates see of captured email |\n| `pipelines stage-rules` | List or set the fields a deal should have in each stage |\n| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n| `tasks add`, `tasks done`, `tasks assign`, `tasks queue` | Add a to-do for a member on an account, person or deal, complete it, hand it on, or read your open work (needs `tasks`) |\n\nImport accounts first, then people: `people import` never creates an account.\n\n## Import accounts\n\n```bash\nkenso accounts import --file accounts.csv\nkenso accounts import --file accounts.csv --yes\n```\n\n```csv\nname,domain,industry,employeeCount\nAcme,acme.io,Software,120\nGlobex,globex.com,Manufacturing,"1,200"\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `name` (or `company`, `companyName`, `accountName`), `domains` (several, split on `,` or `;`) or one `domain` (or `website`, `companyDomain`), `industry`, `employeeCount`, `hqLocation`, `linkedinUrl`, `stage`, `angle`, `whyNow`, `fitScore`, `fundingRound`, `cadenceDays`, `ownerMemberId`, `kenCompanyId`, `sendsFromInboxId`, `sendsFromLinkedInAccountId` and `source`.\n- **A domain is required.** A file with no domain column is a usage error, and a row without a domain is `invalid` (`domain_required`).\n- **The dry run prices the research.** It asks for a credit estimate per 1,000 accounts and puts the sum in the plan: `kind`, `accountCount`, `totalMillicredits`, `availableMillicredits` and `sufficient`.\n- **Rows go 100 per call** to `POST /v1/accounts/bulk-create`.\n\nEach row comes back `created` (`id` is the new account; its research is queued, `researchQueued`, or waits for credits, `researchWaitingCredits`), `skipped` with reason `domain_taken` (already an account; `id` is that account) or `failed` (`reason` is the API\'s code, `error` names the field; an item Kenso failed to save is sent once more first). Rerunning the same file is safe: accounts that exist come back `domain_taken`.\n\n## Import people\n\n```bash\nkenso people import --file people.csv\nkenso people import --file people.csv --find-emails --yes\nkenso people import --file people.jsonl --dry-run\n```\n\n```csv\nfullName,email,title,accountDomain,role\nAnn Lee,ann@acme.io,VP Sales,acme.io,champion\nBob Ray,,CTO,acme.io,\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `email`, `fullName` (or `name`), `firstName`, `lastName`, `title`, `linkedinUrl` (or `linkedin`, `profileUrl`), `accountDomain` (or `domain`, `website`, `companyDomain`), `accountId`, `role` and `priority`. Other columns are ignored with one warning.\n- **A person needs a name:** `fullName`, or `firstName`, `lastName` or both (the CLI joins them). A row with none of them is `invalid` (`name_required`).\n- **To put a person on an account,** give `accountDomain` or `accountId`. A row with both sends only `accountId`.\n- **`--find-emails`** queues an email find (charged in credits) for each person without an email.\n- **Rows go 200 per call** to `POST /v1/people/batch`.\n\nPeople already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nobody twice. A row comes back `created` (a new person), `updated` (an existing person added to the account), `skipped` with reason `already_on_account`, `matched` (no account asked) or `previously_removed`, or `failed`: `account_not_found` saves the person without an account (import the account, then rerun to place them), any other reason is the API\'s. The summary adds `matched`, `addedToAccounts` and `emailFindsQueued`.\n\n## List and search accounts\n\n`accounts list` and `accounts search` sort and page on the server, so they reach every account in the workspace, however many there are.\n\n```bash\nkenso accounts list --sort score:desc --limit 100 # one page; the output\'s next: line is the following one\nkenso accounts list --sort score:desc --limit 100 --all # every page, to the end\nkenso accounts search --search hiring --sort latestSignalAt:desc --data \'{"qFields": ["name", "latestSignal"]}\'\nkenso accounts search --limit 1 --data \'{"countBy": ["stage"]}\' # how many accounts sit in each stage\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}]}, "sort": "tier,-pipelineAmount"}\' --all\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "hqLocation", "operator": "contains", "values": ["Germany"]}]}}\' --all\n# tier 1 accounts with no meeting in 30 days: none since then, or none ever\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}, {"match": "any", "conditions": [{"field": "lastMeeting", "operator": "older_than_days", "values": ["30"]}, {"field": "lastMeeting", "operator": "is_empty"}]}]}}\' --all\n```\n\n- **`--sort`** takes up to 3 comma-separated keys, each `field` (ascending), `field:asc` or `field:desc`. The API\'s `-field` form needs the equals sign here, `--sort=-score`, because a value that starts with a dash reads as a flag. Fields: `createdAt`, `name`, `score`, `tier` (ascending is tier 1 first), `latestSignalAt`, `committee`, `pipelineAmount`, `nextTouchAt`, `lastTouchAt`. An account with no value for a key comes last in both directions. The default is `-createdAt`.\n- **`--limit`** is 1 to 1000 (default 50). `--cursor` takes the previous page\'s `nextCursor` with the same filters and sort; `--all` follows the cursors for you.\n- **`--search`** (also `--q`) matches the name or a domain.\n- **Lists and objects go in `--data`** on `search`, as the API takes them (`kenso describe accounts search`); a flag beside it sets or replaces one key:\n - `qFields` picks where the search text looks: `name`, `domain`, `latestSignal` (the latest signal\'s title).\n - `countBy` (`stage`, `stageGroup`) adds `counts` to the output: every value with the number of matching accounts that hold it, whatever the page. The output is then one object: `data`, `pagination` and `counts`.\n - `filters` and `where` narrow the accounts.\n\nAn account\'s timeline pages the same way. `kenso accounts activity 812` returns the newest 100 earlier rows and, when older ones exist, `data.nextCursor`. Pass it back as `--cursor` (with the same `--category`) for the rows before them, until a page comes without one.\n\n## Edit accounts, people and opportunities\n\nApart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command\'s flags by API name or flag name, and the id column fills the route:\n\n```bash\nkenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes\nkenso people update --each people-edit.csv --dry-run\nkenso opportunities update --each deals.csv --dry-run\n```\n\n```csv\naccountId,stage,ownerMemberId,overwritePinned\n501,engaged,42,true\n502,customer,42,true\n```\n\nA row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person\'s OK). Every flag of an update command: `kenso accounts update --help`.\n\n## Search opportunities\n\n`kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.\n\n```bash\nkenso opportunities search --data \'{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}\' --all\nkenso opportunities search --data \'{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}\'\nkenso opportunities search --limit 1 --data \'{"countBy": ["stage", "ownerMemberId"]}\' # how many opportunities hold each value\n```\n\n- **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.\n- **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.\n- `--account-id` keeps the search to one account. `closeDate` counts days in the member\'s app time zone.\n\nOne person\'s deals, meetings and campaign contacts, as their person page lists them:\n\n```bash\nkenso opportunities list --person-id 9001 # the deals they are on, or are the primary person of\nkenso meetings list --person-id 9001 # the meetings they attend, among the ones you can see\nkenso contacts list --person-id 9001 # their contact in each campaign they are in\n```\n\n## Write research you gathered\n\n`accounts write-research` and `people write-research` store research you gathered outside Kenso as the record\'s latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account\'s own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.\n\nThe body is the research block `accounts get --expand research` (or `people get-research`) returns, without its read-only fields: leave out `id`, `status`, `trigger`, `errorCode`, `researchedAt`, `isStale` and `appliedPrompt` (for a person also `mode`, `requestedAt`, `researchedMode`, `firecrawlCredits` and `webNote`), or the write fails with `unknown_field`. Pass it with `--data @file`:\n\n```bash\nkenso accounts write-research --account-id 501 --data @acme-dossier.json\nkenso people write-research --person-id 9001 --data @jane.json\n```\n\n```json\n{\n "tagline": { "text": "Payroll for EU contractors", "sourceUrls": ["https://acme.example"] },\n "description": { "text": "Acme runs payroll and compliance for companies hiring contractors in 30 EU countries.", "sourceUrls": ["https://acme.example"] },\n "links": { "website": "https://acme.example" },\n "whyNow": { "text": "Raised a $40M Series B in October", "sourceUrls": ["https://news.example/acme-b"], "date": "2026-10" },\n "fitScore": 82,\n "angle": "Lead with contractor onboarding time."\n}\n```\n\nMany records: one JSONL line per record, with the id next to the block\'s fields. Nested objects are sent as written. Use JSONL, not CSV: the block\'s fields are objects and lists, which a CSV cell cannot carry.\n\n```bash\nkenso accounts write-research --each dossiers.jsonl --dry-run # then the same with --yes\nkenso people write-research --each people-research.jsonl --yes --concurrency 8\n```\n\n```jsonl\n{"accountId": 501, "tagline": {"text": "Payroll for EU contractors"}, "links": {"website": "https://acme.example"}}\n{"accountId": 502, "description": {"text": "Cloud cost tooling for retailers."}, "links": {"website": "https://beta.example"}}\n```\n\nA row fails as a whole with the API\'s code: `validation_failed` (an unknown field is `unknown_field`, and `error.details` names every bad field), `research_in_progress` (`409`: Ken is researching that record now, write it again once the run ends; an account run waiting for credits counts too: it runs once the workspace has credits, and the write stays refused until that run ends) or `not_found`. Rerunning a file is safe: each write replaces the record\'s research shown.\n\n## CRM sync\n\nCRM sync has generated commands only: read connections, preview, start an import, and work through sync issues. Connect the CRM itself in the app.\n\n```bash\nkenso crm-connections list\nkenso crm-connections get --connection-id 7\nkenso crm-imports create --connection-id 7 --dry-run\nkenso crm-sync-issues list --connection-id 7 --all\n```\n\nRun `kenso crm-connections --help` (or add `--all-commands` when the actions are hidden) to see every action.\n\n## Pipelines\n\nA workspace with the `pipelines` flag on can run several deal pipelines, each with its own stages. These are generated commands (beta):\n\n```bash\nkenso pipelines list\nkenso pipelines list --query "[].{id: id, name: name, default: isDefault, stages: stages[].key}"\nkenso pipelines get --pipeline-id 5\n```\n\n`list` prints every pipeline in display order, archived ones included: `id`, `name`, `routingRule` (the one sentence Ken reads to decide whether a new deal belongs there), `isDefault`, `isArchived`, `position`, `opportunityCount`, `amountTotal` and `stages`, each stage as `kenso opportunity-stages list` prints it. A stage key is unique in the workspace, across pipelines, so a deal\'s `stage` names its pipeline and its `pipelineId` repeats it. The first read turns the workspace\'s stage list into its default pipeline, named Sales, with every deal in it. The same rows as the MCP\'s `pipelines(operation="list")`.\n\nShaping them needs the `workspace_settings` permission:\n\n```bash\nkenso pipelines create --name Renewals --routing-rule "The account is already a customer" --data \'{"stages": [{"label": "Up for renewal", "category": "open"}, {"label": "Won", "category": "won"}, {"label": "Lost", "category": "lost"}]}\'\nkenso pipelines update --pipeline-id 6 --name Expansion --position 0\nkenso pipelines update --pipeline-id 6 --data @stages.json\nkenso pipelines archive --pipeline-id 6\nkenso pipelines restore --pipeline-id 6\n```\n\n- **`create`** takes a unique `name`, the pipeline\'s `stages` in display order (at least one `open`, one `won` and one `lost`) and an optional `routingRule`: one sentence that says which deals belong there, which Ken reads to route a new deal that names no pipeline. Each stage gets a key from its label; a key another pipeline already uses gets the pipeline\'s name in front (`renewals_won`). A workspace has at most 10 pipelines.\n- **`update`** changes what you send. `stages` is the pipeline\'s whole stage list: read it with `pipelines get`, keep each stage\'s `key`, and add a new stage without one. A stage with live deals in it cannot be left out; archive it with `"isArchived": true` instead.\n- **`archive`** stops new deals from entering a pipeline and keeps the deals in it. The default pipeline cannot be archived, and nothing is deleted: `restore` brings a pipeline back.\n\n## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore 812\n```\n\nA deleted account can be restored for 30 days. `deleted-accounts list` shows each one with who deleted it, `expiresAt` (restore works until then) and what comes back: `personCount`, `opportunityCount` and `touchCount`. `accounts restore <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. A domain another account took since stays with that account and is listed in `domainsTaken`. A merged account is not listed and cannot be restored: a merge has no undo. Both commands are behind the `crm_import_export` feature flag (`404` while it is off).\n\n## Export accounts, people or deals\n\n```bash\nkenso export accounts --out accounts.csv\nkenso export accounts --view 12 --out tier-1.csv\nkenso export deals --filters \'[{"field":"stageCategory","operator":"is","values":["open"]}]\' > open-deals.csv\n```\n\nIt writes the CSV that `POST /v1/accounts/export`, `/v1/people/export` or `/v1/opportunities/export` returns, to stdout or to `--out` (then it prints the file and its row count). With no filter it exports every record. More than 50,000 rows is refused: narrow the filters. `--view <id>` exports a saved Accounts view (`kenso account-views list` shows the ids). `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields, so a deals or people view exports with its filters and sort. The accounts and deals files start with `id` and import back as they are. Each export writes an audit-log entry and needs the export permission. Accounts and deals also need the `crm_import_export` flag while it is in beta.\n\n## A deal\'s stage history\n\n```bash\nkenso opportunities stage-history 77\nkenso opportunities stage-history 77 --query "entries[].{to: stageLabel, at: enteredAt, by: changedBy}"\n```\n\nIt prints `GET /v1/opportunities/{id}/stage-history` as it is, the same rows as the deal page and the MCP\'s `opportunities(operation="get-stage-history")`: the stage now, `isComplete` and `entries`, oldest first, each with `fromStage`, `stage`, `stageLabel`, `enteredAt`, `leftAt`, `durationSeconds`, `actorKind`, `actorMemberId` and Ken\'s `reason` on a move its stage judge made. With the `deal_stage_rules` flag on, each entry also has `changedBy` (`member`, `agent`, `api_key`, `workflow`, `stage_judge`, `crm_sync` or `ken_automation`), `crmProvider` on a CRM sync, and on a move `fromStageLabel` and `fromStageDurationSeconds`, how long the deal sat in the stage it left. `isComplete` false means Kenso has no record of part of the history.\n\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier\nkenso pipelines stage-rules proposal --none\nkenso pipelines stage-rules lost --default\n```\n\nWith the `deal_stage_rules` flag on, each stage can name the fields a deal should have in it. Without a stage the command prints every stage\'s `key`, `label`, `category`, `isArchived`, `requiredFields` and `isDefault`, plus `requirableFields`: `amount`, `closeDate`, `ownerMemberId`, `primaryPersonId`, `nextStep`, `lostReasonKey`, `wonReasonKey` and `custom.<key>` for each custom deal field. `--require` sets the stage\'s whole list, in order, at most 10. `--none` requires nothing, and `--default` goes back to the default: a lost stage asks for `lostReasonKey`, any other stage nothing. Setting a rule needs the `workspace_settings` permission. The same as the MCP\'s `opportunities(operation="stages-set-required-fields")`.\n\nA missing field never stops a move. The deal moves, and it is flagged Missing on the board, the list and the deal page until the field is filled. A rule also applies to deals already in the stage.\n\n## Tasks\n\nTasks are to-dos a member owes: a title, an optional due day or time, an assignee and at most one account, person or deal. They need the `tasks` flag. The app calls deals "Deals"; the CLI keeps `--deal` for an opportunity id.\n\n```bash\nkenso tasks add "Send the deck" --due tomorrow --account 812\nkenso tasks add "Call Ada back" --due friday --at 16:00 --person 501 --assignee ada@acme.com\nkenso tasks list --assignee me --due overdue,today\nkenso tasks queue --scope mine\nkenso tasks assign 7 me\nkenso tasks done 7 8 9\nkenso tasks done 7 --undo\n```\n\n- `tasks add` sends `POST /v1/tasks`. `--due` takes `today`, `tomorrow`, a weekday (the next one: `friday` or `fri`), a day (`2026-11-20`) or an ISO 8601 time; `--at HH:MM` puts a time on that day (today without `--due`). Day words and `--at` read this computer\'s clock and time zone (`TZ`); a time\'s day is read in the assignee\'s app time zone. `--assignee` takes `me`, a member id or an email; without it the task is yours.\n- `tasks done` completes each task it names, in order (`PATCH /v1/tasks/{id}` with `status: done`); `--undo` reopens them. `tasks assign` gives a task to `me`, a member id or a member\'s email; that member gets a `task_assigned` notification.\n- `tasks queue` is `task-queue list` under the name you would try: the Tasks screen\'s open work by due day, with `--scope mine|assigned_by_me|everyone`. It lists tasks, manual touches, call tasks, inbox threads with a reminder due (when you can view the Inbox) and Ken\'s follow-ups to you, each with the app path in `href` (null for a task, which opens in its panel).\n- `tasks list`, `get`, `update`, `delete`, `restore` and `task-queue list` are generated from the API: `kenso tasks --help` lists them.\n';
|
|
7794
|
+
crm_default = '# CRM (beta)\n\nThe CRM commands work on Kenso\'s Accounts lane: accounts (companies), the people on them, and opportunities. They are beta: they need the `accounts` feature flag on your workspace (opportunities need `opportunities`, CRM sync needs `ingestion`). Help and `kenso describe` hide them until your workspace has the flag; `--all-commands` shows them.\n\n| Command | What it does |\n|---|---|\n| `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |\n| `people import` | Create or match people from a file, optionally onto accounts |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `deleted-accounts list`, `accounts restore <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved Accounts view, or what the filters match |\n| `capture status` | Your captured mailbox, its backfill progress and what teammates see of a captured email. Needs the `crm_capture` flag |\n| `capture connect` | Turn capture on for your own mailbox. `--private` starts it hidden from teammates; `--provider google` prints a sign-in link when no account is connected yet |\n| `capture private on\\|off` | Hide your captured email from teammates, or show it again. Email only: meetings stay visible. `--thread <id>` sets the switch for one thread |\n| `capture thread <threadId>` | One captured email thread: subject, people, time, Ken\'s summary, and each body you may open. The id is `capturedThread.id` on a timeline row |\n| `capture sync` | Read your captured mailbox now, instead of waiting for the next two-minute poll. Prints what the pass read, logged and created |\n| `capture disconnect` | Turn capture off and delete your stored email bodies. Asks first; `--yes` skips the question |\n| `capture teammates-see summary\\|full_email` | Workspace admin: what teammates see of captured email |\n| `pipelines stage-rules` | List or set the fields a deal should have in each stage |\n| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n| `tasks add`, `tasks done`, `tasks assign`, `tasks queue` | Add a to-do for a member on an account, person or deal, complete it, hand it on, or read your open work (needs `tasks`) |\n\nImport accounts first, then people: `people import` never creates an account.\n\n## Import accounts\n\n```bash\nkenso accounts import --file accounts.csv\nkenso accounts import --file accounts.csv --yes\n```\n\n```csv\nname,domain,industry,employeeCount\nAcme,acme.io,Software,120\nGlobex,globex.com,Manufacturing,"1,200"\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `name` (or `company`, `companyName`, `accountName`), `domains` (several, split on `,` or `;`) or one `domain` (or `website`, `companyDomain`), `industry`, `employeeCount`, `hqLocation`, `linkedinUrl`, `stage`, `angle`, `whyNow`, `fitScore`, `fundingRound`, `cadenceDays`, `ownerMemberId`, `kenCompanyId`, `sendsFromInboxId`, `sendsFromLinkedInAccountId` and `source`.\n- **A domain is required.** A file with no domain column is a usage error, and a row without a domain is `invalid` (`domain_required`).\n- **The dry run prices the research.** It asks for a credit estimate per 1,000 accounts and puts the sum in the plan: `kind`, `accountCount`, `totalMillicredits`, `availableMillicredits` and `sufficient`.\n- **Rows go 100 per call** to `POST /v1/accounts/bulk-create`.\n\nEach row comes back `created` (`id` is the new account; its research is queued, `researchQueued`, or waits for credits, `researchWaitingCredits`), `skipped` with reason `domain_taken` (already an account; `id` is that account) or `failed` (`reason` is the API\'s code, `error` names the field; an item Kenso failed to save is sent once more first). Rerunning the same file is safe: accounts that exist come back `domain_taken`.\n\n## Import people\n\n```bash\nkenso people import --file people.csv\nkenso people import --file people.csv --find-emails --yes\nkenso people import --file people.jsonl --dry-run\n```\n\n```csv\nfullName,email,title,accountDomain,role\nAnn Lee,ann@acme.io,VP Sales,acme.io,champion\nBob Ray,,CTO,acme.io,\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `email`, `fullName` (or `name`), `firstName`, `lastName`, `title`, `linkedinUrl` (or `linkedin`, `profileUrl`), `accountDomain` (or `domain`, `website`, `companyDomain`), `accountId`, `role` and `priority`. Other columns are ignored with one warning.\n- **A person needs a name:** `fullName`, or `firstName`, `lastName` or both (the CLI joins them). A row with none of them is `invalid` (`name_required`).\n- **To put a person on an account,** give `accountDomain` or `accountId`. A row with both sends only `accountId`.\n- **`--find-emails`** queues an email find (charged in credits) for each person without an email.\n- **Rows go 200 per call** to `POST /v1/people/batch`.\n\nPeople already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nobody twice. A row comes back `created` (a new person), `updated` (an existing person added to the account), `skipped` with reason `already_on_account`, `matched` (no account asked) or `previously_removed`, or `failed`: `account_not_found` saves the person without an account (import the account, then rerun to place them), any other reason is the API\'s. The summary adds `matched`, `addedToAccounts` and `emailFindsQueued`.\n\n## List and search accounts\n\n`accounts list` and `accounts search` sort and page on the server, so they reach every account in the workspace, however many there are.\n\n```bash\nkenso accounts list --sort score:desc --limit 100 # one page; the output\'s next: line is the following one\nkenso accounts list --sort score:desc --limit 100 --all # every page, to the end\nkenso accounts search --search hiring --sort latestSignalAt:desc --data \'{"qFields": ["name", "latestSignal"]}\'\nkenso accounts search --limit 1 --data \'{"countBy": ["stage"]}\' # how many accounts sit in each stage\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}]}, "sort": "tier,-pipelineAmount"}\' --all\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "hqLocation", "operator": "contains", "values": ["Germany"]}]}}\' --all\n# tier 1 accounts with no meeting in 30 days: none since then, or none ever\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}, {"match": "any", "conditions": [{"field": "lastMeeting", "operator": "older_than_days", "values": ["30"]}, {"field": "lastMeeting", "operator": "is_empty"}]}]}}\' --all\n```\n\n- **`--sort`** takes up to 3 comma-separated keys, each `field` (ascending), `field:asc` or `field:desc`. The API\'s `-field` form needs the equals sign here, `--sort=-score`, because a value that starts with a dash reads as a flag. Fields: `createdAt`, `name`, `score`, `tier` (ascending is tier 1 first), `latestSignalAt`, `committee`, `pipelineAmount`, `nextTouchAt`, `lastTouchAt`. An account with no value for a key comes last in both directions. The default is `-createdAt`.\n- **`--limit`** is 1 to 1000 (default 50). `--cursor` takes the previous page\'s `nextCursor` with the same filters and sort; `--all` follows the cursors for you.\n- **`--search`** (also `--q`) matches the name or a domain.\n- **Lists and objects go in `--data`** on `search`, as the API takes them (`kenso describe accounts search`); a flag beside it sets or replaces one key:\n - `qFields` picks where the search text looks: `name`, `domain`, `latestSignal` (the latest signal\'s title).\n - `countBy` (`stage`, `stageGroup`) adds `counts` to the output: every value with the number of matching accounts that hold it, whatever the page. The output is then one object: `data`, `pagination` and `counts`.\n - `filters` and `where` narrow the accounts.\n\nAn account\'s timeline pages the same way. `kenso accounts activity 812` returns the newest 100 earlier rows and, when older ones exist, `data.nextCursor`. Pass it back as `--cursor` (with the same `--category`) for the rows before them, until a page comes without one.\n\n## Edit accounts, people and opportunities\n\nApart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command\'s flags by API name or flag name, and the id column fills the route:\n\n```bash\nkenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes\nkenso people update --each people-edit.csv --dry-run\nkenso opportunities update --each deals.csv --dry-run\n```\n\n```csv\naccountId,stage,ownerMemberId,overwritePinned\n501,engaged,42,true\n502,customer,42,true\n```\n\nA row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person\'s OK). Every flag of an update command: `kenso accounts update --help`.\n\n## Search opportunities\n\n`kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.\n\n```bash\nkenso opportunities search --data \'{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}\' --all\nkenso opportunities search --data \'{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}\'\nkenso opportunities search --limit 1 --data \'{"countBy": ["stage", "ownerMemberId"]}\' # how many opportunities hold each value\n```\n\n- **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.\n- **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.\n- `--account-id` keeps the search to one account. `closeDate` counts days in the member\'s app time zone.\n\nOne person\'s deals, meetings and campaign contacts, as their person page lists them:\n\n```bash\nkenso opportunities list --person-id 9001 # the deals they are on, or are the primary person of\nkenso meetings list --person-id 9001 # the meetings they attend, among the ones you can see\nkenso contacts list --person-id 9001 # their contact in each campaign they are in\n```\n\n## Write research you gathered\n\n`accounts write-research` and `people write-research` store research you gathered outside Kenso as the record\'s latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account\'s own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.\n\nThe body is the research block `accounts get --expand research` (or `people get-research`) returns, without its read-only fields: leave out `id`, `status`, `trigger`, `errorCode`, `researchedAt`, `isStale` and `appliedPrompt` (for a person also `mode`, `requestedAt`, `researchedMode`, `firecrawlCredits` and `webNote`), or the write fails with `unknown_field`. Pass it with `--data @file`:\n\n```bash\nkenso accounts write-research --account-id 501 --data @acme-dossier.json\nkenso people write-research --person-id 9001 --data @jane.json\n```\n\n```json\n{\n "tagline": { "text": "Payroll for EU contractors", "sourceUrls": ["https://acme.example"] },\n "description": { "text": "Acme runs payroll and compliance for companies hiring contractors in 30 EU countries.", "sourceUrls": ["https://acme.example"] },\n "links": { "website": "https://acme.example" },\n "whyNow": { "text": "Raised a $40M Series B in October", "sourceUrls": ["https://news.example/acme-b"], "date": "2026-10" },\n "fitScore": 82,\n "angle": "Lead with contractor onboarding time."\n}\n```\n\nMany records: one JSONL line per record, with the id next to the block\'s fields. Nested objects are sent as written. Use JSONL, not CSV: the block\'s fields are objects and lists, which a CSV cell cannot carry.\n\n```bash\nkenso accounts write-research --each dossiers.jsonl --dry-run # then the same with --yes\nkenso people write-research --each people-research.jsonl --yes --concurrency 8\n```\n\n```jsonl\n{"accountId": 501, "tagline": {"text": "Payroll for EU contractors"}, "links": {"website": "https://acme.example"}}\n{"accountId": 502, "description": {"text": "Cloud cost tooling for retailers."}, "links": {"website": "https://beta.example"}}\n```\n\nA row fails as a whole with the API\'s code: `validation_failed` (an unknown field is `unknown_field`, and `error.details` names every bad field), `research_in_progress` (`409`: Ken is researching that record now, write it again once the run ends; an account run waiting for credits counts too: it runs once the workspace has credits, and the write stays refused until that run ends) or `not_found`. Rerunning a file is safe: each write replaces the record\'s research shown.\n\n## CRM sync\n\nCRM sync has generated commands only: read connections, preview, start an import, and work through sync issues. Connect the CRM itself in the app.\n\n```bash\nkenso crm-connections list\nkenso crm-connections get --connection-id 7\nkenso crm-imports create --connection-id 7 --dry-run\nkenso crm-sync-issues list --connection-id 7 --all\n```\n\nRun `kenso crm-connections --help` (or add `--all-commands` when the actions are hidden) to see every action.\n\n## Pipelines\n\nA workspace with the `pipelines` flag on can run several deal pipelines, each with its own stages. These are generated commands (beta):\n\n```bash\nkenso pipelines list\nkenso pipelines list --query "[].{id: id, name: name, default: isDefault, stages: stages[].key}"\nkenso pipelines get --pipeline-id 5\n```\n\n`list` prints every pipeline in display order, archived ones included: `id`, `name`, `routingRule` (the one sentence Ken reads to decide whether a new deal belongs there), `isDefault`, `isArchived`, `position`, `opportunityCount`, `amountTotal` and `stages`, each stage as `kenso opportunity-stages list` prints it. A stage key is unique in the workspace, across pipelines, so a deal\'s `stage` names its pipeline and its `pipelineId` repeats it. The first read turns the workspace\'s stage list into its default pipeline, named Sales, with every deal in it. The same rows as the MCP\'s `pipelines(operation="list")`.\n\nShaping them needs the `workspace_settings` permission:\n\n```bash\nkenso pipelines create --name Renewals --routing-rule "The account is already a customer" --data \'{"stages": [{"label": "Up for renewal", "category": "open"}, {"label": "Won", "category": "won"}, {"label": "Lost", "category": "lost"}]}\'\nkenso pipelines update --pipeline-id 6 --name Expansion --position 0\nkenso pipelines update --pipeline-id 6 --data @stages.json\nkenso pipelines archive --pipeline-id 6\nkenso pipelines restore --pipeline-id 6\n```\n\n- **`create`** takes a unique `name`, the pipeline\'s `stages` in display order (at least one `open`, one `won` and one `lost`) and an optional `routingRule`: one sentence that says which deals belong there, which Ken reads to route a new deal that names no pipeline. Each stage gets a key from its label; a key another pipeline already uses gets the pipeline\'s name in front (`renewals_won`). A workspace has at most 10 pipelines.\n- **`update`** changes what you send. `stages` is the pipeline\'s whole stage list: read it with `pipelines get`, keep each stage\'s `key`, and add a new stage without one. A stage with live deals in it cannot be left out; archive it with `"isArchived": true` instead.\n- **`archive`** stops new deals from entering a pipeline and keeps the deals in it. The default pipeline cannot be archived, and nothing is deleted: `restore` brings a pipeline back.\n\n## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore 812\n```\n\nA deleted account can be restored for 30 days. `deleted-accounts list` shows each one with who deleted it, `expiresAt` (restore works until then) and what comes back: `personCount`, `opportunityCount` and `touchCount`. `accounts restore <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. A domain another account took since stays with that account and is listed in `domainsTaken`. A merged account is not listed and cannot be restored: a merge has no undo. Both commands are behind the `crm_import_export` feature flag (`404` while it is off).\n\n## Export accounts, people or deals\n\n```bash\nkenso export accounts --out accounts.csv\nkenso export accounts --view 12 --out tier-1.csv\nkenso export deals --filters \'[{"field":"stageCategory","operator":"is","values":["open"]}]\' > open-deals.csv\n```\n\nIt writes the CSV that `POST /v1/accounts/export`, `/v1/people/export` or `/v1/opportunities/export` returns, to stdout or to `--out` (then it prints the file and its row count). With no filter it exports every record. More than 50,000 rows is refused: narrow the filters. `--view <id>` exports a saved Accounts view (`kenso account-views list` shows the ids). `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields, so a deals or people view exports with its filters and sort. The accounts and deals files start with `id` and import back as they are. Each export writes an audit-log entry and needs the export permission. Accounts and deals also need the `crm_import_export` flag while it is in beta.\n\n## A deal\'s stage history\n\n```bash\nkenso opportunities stage-history 77\nkenso opportunities stage-history 77 --query "entries[].{to: stageLabel, at: enteredAt, by: changedBy}"\n```\n\nIt prints `GET /v1/opportunities/{id}/stage-history` as it is, the same rows as the deal page and the MCP\'s `opportunities(operation="get-stage-history")`: the stage now, `isComplete` and `entries`, oldest first, each with `fromStage`, `stage`, `stageLabel`, `enteredAt`, `leftAt`, `durationSeconds`, `actorKind`, `actorMemberId` and Ken\'s `reason` on a move its stage judge made. With the `deal_stage_rules` flag on, each entry also has `changedBy` (`member`, `agent`, `api_key`, `workflow`, `stage_judge`, `crm_sync` or `ken_automation`), `crmProvider` on a CRM sync, and on a move `fromStageLabel` and `fromStageDurationSeconds`, how long the deal sat in the stage it left. `isComplete` false means Kenso has no record of part of the history.\n\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier\nkenso pipelines stage-rules proposal --none\nkenso pipelines stage-rules lost --default\n```\n\nWith the `deal_stage_rules` flag on, each stage can name the fields a deal should have in it. Without a stage the command prints every stage\'s `key`, `label`, `category`, `isArchived`, `requiredFields` and `isDefault`, plus `requirableFields`: `amount`, `closeDate`, `ownerMemberId`, `primaryPersonId`, `nextStep`, `lostReasonKey`, `wonReasonKey` and `custom.<key>` for each custom deal field. `--require` sets the stage\'s whole list, in order, at most 10. `--none` requires nothing, and `--default` goes back to the default: a lost stage asks for `lostReasonKey`, any other stage nothing. Setting a rule needs the `workspace_settings` permission. The same as the MCP\'s `opportunities(operation="stages-set-required-fields")`.\n\nA missing field never stops a move. The deal moves, and it is flagged Missing on the board, the list and the deal page until the field is filled. A rule also applies to deals already in the stage.\n\n```bash\nkenso opportunities update --opportunity-id 4401 --stage proposal\nkenso opportunities list --missing-fields\n```\n\nEvery deal then carries `missingFields` (`[{field, label}]`). A create, or an update that sends a stage, answers `warnings` beside the deal for each field the stage asks for that the deal leaves empty: each prints on stderr as `warning: <message>`, stdout stays the deal and the exit code stays 0. `--missing-fields` keeps only the deals flagged Missing (also `missingFields: true` on `kenso opportunities search`).\n\n## Tasks\n\nTasks are to-dos a member owes: a title, an optional due day or time, an assignee and at most one account, person or deal. They need the `tasks` flag. The app calls deals "Deals"; the CLI keeps `--deal` for an opportunity id.\n\n```bash\nkenso tasks add "Send the deck" --due tomorrow --account 812\nkenso tasks add "Call Ada back" --due friday --at 16:00 --person 501 --assignee ada@acme.com\nkenso tasks list --assignee me --due overdue,today\nkenso tasks queue --scope mine\nkenso tasks assign 7 me\nkenso tasks done 7 8 9\nkenso tasks done 7 --undo\n```\n\n- `tasks add` sends `POST /v1/tasks`. `--due` takes `today`, `tomorrow`, a weekday (the next one: `friday` or `fri`), a day (`2026-11-20`) or an ISO 8601 time; `--at HH:MM` puts a time on that day (today without `--due`). Day words and `--at` read this computer\'s clock and time zone (`TZ`); a time\'s day is read in the assignee\'s app time zone. `--assignee` takes `me`, a member id or an email; without it the task is yours.\n- `tasks done` completes each task it names, in order (`PATCH /v1/tasks/{id}` with `status: done`); `--undo` reopens them. `tasks assign` gives a task to `me`, a member id or a member\'s email; that member gets a `task_assigned` notification.\n- `tasks queue` is `task-queue list` under the name you would try: the Tasks screen\'s open work by due day, with `--scope mine|assigned_by_me|everyone`. It lists tasks, manual touches, call tasks, inbox threads with a reminder due (when you can view the Inbox) and Ken\'s follow-ups to you, each with the app path in `href` (null for a task, which opens in its panel).\n- `tasks list`, `get`, `update`, `delete`, `restore` and `task-queue list` are generated from the API: `kenso tasks --help` lists them.\n';
|
|
7788
7795
|
}
|
|
7789
7796
|
});
|
|
7790
7797
|
|
|
@@ -8976,8 +8983,8 @@ var init_browser_login = __esm({
|
|
|
8976
8983
|
defaultDeps = {
|
|
8977
8984
|
sleep: (ms, signal) => delay2(ms, void 0, signal ? { signal } : void 0),
|
|
8978
8985
|
now: () => Date.now(),
|
|
8979
|
-
spawn: (
|
|
8980
|
-
const child = nodeSpawn(
|
|
8986
|
+
spawn: (command60, args) => {
|
|
8987
|
+
const child = nodeSpawn(command60, args, { detached: true, stdio: "ignore" });
|
|
8981
8988
|
child.on("error", () => {
|
|
8982
8989
|
});
|
|
8983
8990
|
child.unref();
|
|
@@ -9416,34 +9423,77 @@ var init_connect2 = __esm({
|
|
|
9416
9423
|
}
|
|
9417
9424
|
});
|
|
9418
9425
|
|
|
9426
|
+
// src/commands/capture/thread.ts
|
|
9427
|
+
var thread_exports = {};
|
|
9428
|
+
__export(thread_exports, {
|
|
9429
|
+
default: () => thread_default,
|
|
9430
|
+
threadId: () => threadId
|
|
9431
|
+
});
|
|
9432
|
+
function threadId(value, from = { field: "threadId", example: "kenso capture thread 4821" }) {
|
|
9433
|
+
if (typeof value !== "string" || !/^\d+$/.test(value)) {
|
|
9434
|
+
throw usageError(`The thread id is a number: ${from.example}.`, { field: from.field });
|
|
9435
|
+
}
|
|
9436
|
+
return value;
|
|
9437
|
+
}
|
|
9438
|
+
var command10, thread_default;
|
|
9439
|
+
var init_thread = __esm({
|
|
9440
|
+
"src/commands/capture/thread.ts"() {
|
|
9441
|
+
"use strict";
|
|
9442
|
+
init_errors();
|
|
9443
|
+
init_exit_codes();
|
|
9444
|
+
init_http();
|
|
9445
|
+
command10 = {
|
|
9446
|
+
resource: "capture",
|
|
9447
|
+
action: "thread",
|
|
9448
|
+
summary: "Read one captured email thread",
|
|
9449
|
+
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.",
|
|
9450
|
+
flags: {},
|
|
9451
|
+
positionals: [{ name: "threadId", required: true, description: "The captured thread id (capturedThread.id on a timeline row)" }],
|
|
9452
|
+
examples: ["kenso capture thread 4821", "kenso capture thread 4821 --query 'messages[].{at: sentAt, from: fromEmail, access: access}'"],
|
|
9453
|
+
beta: { featureGates: { all: ["crm_capture"] } },
|
|
9454
|
+
operationIds: ["capture-threads.get"],
|
|
9455
|
+
async run(ctx, { positionals }) {
|
|
9456
|
+
const res = await ctx.client.request({ method: "GET", path: `/v1/capture/threads/${threadId(positionals[0])}`, signal: ctx.signal });
|
|
9457
|
+
ctx.output.object(unwrap(res.body));
|
|
9458
|
+
return ExitCode.Ok;
|
|
9459
|
+
}
|
|
9460
|
+
};
|
|
9461
|
+
thread_default = command10;
|
|
9462
|
+
}
|
|
9463
|
+
});
|
|
9464
|
+
|
|
9419
9465
|
// src/commands/capture/private.ts
|
|
9420
9466
|
var private_exports = {};
|
|
9421
9467
|
__export(private_exports, {
|
|
9422
9468
|
default: () => private_default
|
|
9423
9469
|
});
|
|
9424
|
-
var
|
|
9470
|
+
var THREAD_FLAG, command11, private_default;
|
|
9425
9471
|
var init_private = __esm({
|
|
9426
9472
|
"src/commands/capture/private.ts"() {
|
|
9427
9473
|
"use strict";
|
|
9428
9474
|
init_errors();
|
|
9429
9475
|
init_exit_codes();
|
|
9430
9476
|
init_http();
|
|
9431
|
-
|
|
9477
|
+
init_thread();
|
|
9478
|
+
THREAD_FLAG = { field: "thread", example: "kenso capture private on --thread 4821" };
|
|
9479
|
+
command11 = {
|
|
9432
9480
|
resource: "capture",
|
|
9433
9481
|
action: "private",
|
|
9434
9482
|
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: {
|
|
9483
|
+
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.",
|
|
9484
|
+
flags: {
|
|
9485
|
+
thread: { type: "string", description: "Set the switch for this one captured thread (its id), not the whole mailbox" }
|
|
9486
|
+
},
|
|
9437
9487
|
positionals: [{ name: "state", required: true, description: "on or off" }],
|
|
9438
|
-
examples: ["kenso capture private on", "kenso capture private off"],
|
|
9488
|
+
examples: ["kenso capture private on", "kenso capture private off", "kenso capture private on --thread 4821"],
|
|
9439
9489
|
beta: { featureGates: { all: ["crm_capture"] } },
|
|
9440
|
-
operationIds: ["capture-mailbox.update"],
|
|
9441
|
-
async run(ctx, { positionals }) {
|
|
9490
|
+
operationIds: ["capture-mailbox.update", "capture-threads.update"],
|
|
9491
|
+
async run(ctx, { positionals, flags }) {
|
|
9442
9492
|
const state = positionals[0];
|
|
9443
9493
|
if (state !== "on" && state !== "off") throw usageError("Say on or off: kenso capture private on.", { field: "state" });
|
|
9444
9494
|
const res = await ctx.client.request({
|
|
9445
9495
|
method: "PATCH",
|
|
9446
|
-
path: "/v1/capture/mailbox",
|
|
9496
|
+
path: flags.thread === void 0 ? "/v1/capture/mailbox" : `/v1/capture/threads/${threadId(flags.thread, THREAD_FLAG)}`,
|
|
9447
9497
|
body: { isPrivate: state === "on" },
|
|
9448
9498
|
signal: ctx.signal
|
|
9449
9499
|
});
|
|
@@ -9451,7 +9501,37 @@ var init_private = __esm({
|
|
|
9451
9501
|
return ExitCode.Ok;
|
|
9452
9502
|
}
|
|
9453
9503
|
};
|
|
9454
|
-
private_default =
|
|
9504
|
+
private_default = command11;
|
|
9505
|
+
}
|
|
9506
|
+
});
|
|
9507
|
+
|
|
9508
|
+
// src/commands/capture/sync.ts
|
|
9509
|
+
var sync_exports = {};
|
|
9510
|
+
__export(sync_exports, {
|
|
9511
|
+
default: () => sync_default
|
|
9512
|
+
});
|
|
9513
|
+
var command12, sync_default;
|
|
9514
|
+
var init_sync3 = __esm({
|
|
9515
|
+
"src/commands/capture/sync.ts"() {
|
|
9516
|
+
"use strict";
|
|
9517
|
+
init_exit_codes();
|
|
9518
|
+
init_http();
|
|
9519
|
+
command12 = {
|
|
9520
|
+
resource: "capture",
|
|
9521
|
+
action: "sync",
|
|
9522
|
+
summary: "Read your captured mailbox now",
|
|
9523
|
+
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.",
|
|
9524
|
+
flags: {},
|
|
9525
|
+
examples: ["kenso capture sync", "kenso capture sync --query '{outcome: outcome, logged: messagesLogged, more: hasMore}'"],
|
|
9526
|
+
beta: { featureGates: { all: ["crm_capture"] } },
|
|
9527
|
+
operationIds: ["capture-mailbox.sync"],
|
|
9528
|
+
async run(ctx) {
|
|
9529
|
+
const res = await ctx.client.request({ method: "POST", path: "/v1/capture/mailbox/sync", signal: ctx.signal });
|
|
9530
|
+
ctx.output.object(unwrap(res.body));
|
|
9531
|
+
return ExitCode.Ok;
|
|
9532
|
+
}
|
|
9533
|
+
};
|
|
9534
|
+
sync_default = command12;
|
|
9455
9535
|
}
|
|
9456
9536
|
});
|
|
9457
9537
|
|
|
@@ -9460,13 +9540,13 @@ var disconnect_exports = {};
|
|
|
9460
9540
|
__export(disconnect_exports, {
|
|
9461
9541
|
default: () => disconnect_default
|
|
9462
9542
|
});
|
|
9463
|
-
var
|
|
9543
|
+
var command13, disconnect_default;
|
|
9464
9544
|
var init_disconnect = __esm({
|
|
9465
9545
|
"src/commands/capture/disconnect.ts"() {
|
|
9466
9546
|
"use strict";
|
|
9467
9547
|
init_confirm();
|
|
9468
9548
|
init_exit_codes();
|
|
9469
|
-
|
|
9549
|
+
command13 = {
|
|
9470
9550
|
resource: "capture",
|
|
9471
9551
|
action: "disconnect",
|
|
9472
9552
|
summary: "Turn capture off for your own mailbox and delete its stored email bodies",
|
|
@@ -9482,7 +9562,7 @@ var init_disconnect = __esm({
|
|
|
9482
9562
|
return ExitCode.Ok;
|
|
9483
9563
|
}
|
|
9484
9564
|
};
|
|
9485
|
-
disconnect_default =
|
|
9565
|
+
disconnect_default = command13;
|
|
9486
9566
|
}
|
|
9487
9567
|
});
|
|
9488
9568
|
|
|
@@ -9491,7 +9571,7 @@ var teammates_see_exports = {};
|
|
|
9491
9571
|
__export(teammates_see_exports, {
|
|
9492
9572
|
default: () => teammates_see_default
|
|
9493
9573
|
});
|
|
9494
|
-
var VALUES,
|
|
9574
|
+
var VALUES, command14, teammates_see_default;
|
|
9495
9575
|
var init_teammates_see = __esm({
|
|
9496
9576
|
"src/commands/capture/teammates-see.ts"() {
|
|
9497
9577
|
"use strict";
|
|
@@ -9499,7 +9579,7 @@ var init_teammates_see = __esm({
|
|
|
9499
9579
|
init_exit_codes();
|
|
9500
9580
|
init_http();
|
|
9501
9581
|
VALUES = ["summary", "full_email"];
|
|
9502
|
-
|
|
9582
|
+
command14 = {
|
|
9503
9583
|
resource: "capture",
|
|
9504
9584
|
action: "teammates-see",
|
|
9505
9585
|
summary: "Pick what teammates see of captured email: the summary, or the full email (workspace admin)",
|
|
@@ -9519,7 +9599,7 @@ var init_teammates_see = __esm({
|
|
|
9519
9599
|
return ExitCode.Ok;
|
|
9520
9600
|
}
|
|
9521
9601
|
};
|
|
9522
|
-
teammates_see_default =
|
|
9602
|
+
teammates_see_default = command14;
|
|
9523
9603
|
}
|
|
9524
9604
|
});
|
|
9525
9605
|
|
|
@@ -9532,6 +9612,8 @@ var init_capture = __esm({
|
|
|
9532
9612
|
status: () => Promise.resolve().then(() => (init_status2(), status_exports2)).then((m) => m.default),
|
|
9533
9613
|
connect: () => Promise.resolve().then(() => (init_connect2(), connect_exports)).then((m) => m.default),
|
|
9534
9614
|
private: () => Promise.resolve().then(() => (init_private(), private_exports)).then((m) => m.default),
|
|
9615
|
+
sync: () => Promise.resolve().then(() => (init_sync3(), sync_exports)).then((m) => m.default),
|
|
9616
|
+
thread: () => Promise.resolve().then(() => (init_thread(), thread_exports)).then((m) => m.default),
|
|
9535
9617
|
disconnect: () => Promise.resolve().then(() => (init_disconnect(), disconnect_exports)).then((m) => m.default),
|
|
9536
9618
|
"teammates-see": () => Promise.resolve().then(() => (init_teammates_see(), teammates_see_exports)).then((m) => m.default)
|
|
9537
9619
|
};
|
|
@@ -9544,7 +9626,7 @@ __export(completion_exports, {
|
|
|
9544
9626
|
SCRIPTS: () => SCRIPTS,
|
|
9545
9627
|
default: () => completion_default
|
|
9546
9628
|
});
|
|
9547
|
-
var ZSH, BASH, FISH, SCRIPTS,
|
|
9629
|
+
var ZSH, BASH, FISH, SCRIPTS, command15, completion_default;
|
|
9548
9630
|
var init_completion = __esm({
|
|
9549
9631
|
"src/commands/completion/completion.ts"() {
|
|
9550
9632
|
"use strict";
|
|
@@ -9608,7 +9690,7 @@ end
|
|
|
9608
9690
|
complete -c kenso -f -a '(__kenso_complete)'
|
|
9609
9691
|
`;
|
|
9610
9692
|
SCRIPTS = { bash: BASH, zsh: ZSH, fish: FISH };
|
|
9611
|
-
|
|
9693
|
+
command15 = {
|
|
9612
9694
|
resource: "completion",
|
|
9613
9695
|
action: "",
|
|
9614
9696
|
summary: "Print the tab-completion script for bash, zsh or fish",
|
|
@@ -9636,7 +9718,7 @@ complete -c kenso -f -a '(__kenso_complete)'
|
|
|
9636
9718
|
return ExitCode.Ok;
|
|
9637
9719
|
}
|
|
9638
9720
|
};
|
|
9639
|
-
completion_default =
|
|
9721
|
+
completion_default = command15;
|
|
9640
9722
|
}
|
|
9641
9723
|
});
|
|
9642
9724
|
|
|
@@ -10166,8 +10248,8 @@ var init_run = __esm({
|
|
|
10166
10248
|
defaultDeps2 = {
|
|
10167
10249
|
sleep: (ms, signal) => delay3(ms, void 0, signal ? { signal } : void 0),
|
|
10168
10250
|
now: () => Date.now(),
|
|
10169
|
-
spawn: (
|
|
10170
|
-
const child = nodeSpawn2(
|
|
10251
|
+
spawn: (command60, args) => {
|
|
10252
|
+
const child = nodeSpawn2(command60, args, { detached: true, stdio: "ignore" });
|
|
10171
10253
|
child.on("error", () => {
|
|
10172
10254
|
});
|
|
10173
10255
|
child.unref();
|
|
@@ -10208,9 +10290,9 @@ function stringFlag2(flags, name) {
|
|
|
10208
10290
|
const text4 = value.trim();
|
|
10209
10291
|
return text4 === "" ? void 0 : text4;
|
|
10210
10292
|
}
|
|
10211
|
-
function requireFlag(flags, name,
|
|
10293
|
+
function requireFlag(flags, name, command60, hint) {
|
|
10212
10294
|
const value = stringFlag2(flags, name);
|
|
10213
|
-
if (value === void 0) throw usageError(`--${name} is required for ${
|
|
10295
|
+
if (value === void 0) throw usageError(`--${name} is required for ${command60}.`, { field: name, next: `${command60} --help`, ...hint ? { hint } : {} });
|
|
10214
10296
|
return value;
|
|
10215
10297
|
}
|
|
10216
10298
|
function positiveId(value) {
|
|
@@ -10219,8 +10301,8 @@ function positiveId(value) {
|
|
|
10219
10301
|
const id = Number(text4);
|
|
10220
10302
|
return Number.isSafeInteger(id) && id > 0 ? id : void 0;
|
|
10221
10303
|
}
|
|
10222
|
-
function idFlag(flags, name,
|
|
10223
|
-
const raw = requireFlag(flags, name,
|
|
10304
|
+
function idFlag(flags, name, command60) {
|
|
10305
|
+
const raw = requireFlag(flags, name, command60);
|
|
10224
10306
|
const id = positiveId(raw);
|
|
10225
10307
|
if (id === void 0) throw usageError(`--${name} must be a positive whole number (got "${raw}").`, { field: name });
|
|
10226
10308
|
return id;
|
|
@@ -10240,8 +10322,8 @@ function isDryRun(ctx) {
|
|
|
10240
10322
|
function shellQuote4(value) {
|
|
10241
10323
|
return /^[A-Za-z0-9_\-.,:/@=+%]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
|
|
10242
10324
|
}
|
|
10243
|
-
function sameCommand2(
|
|
10244
|
-
const parts2 = [
|
|
10325
|
+
function sameCommand2(command60, flags, ctx, extra = []) {
|
|
10326
|
+
const parts2 = [command60];
|
|
10245
10327
|
for (const [name, value] of Object.entries(flags)) {
|
|
10246
10328
|
if (value === void 0 || value === false) continue;
|
|
10247
10329
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -10841,7 +10923,7 @@ function parseDuration(text4) {
|
|
|
10841
10923
|
const ms = Number(match[1]) * (UNIT_MS[(match[2] || "s").toLowerCase()] ?? 1e3);
|
|
10842
10924
|
return Number.isFinite(ms) ? Math.round(ms) : void 0;
|
|
10843
10925
|
}
|
|
10844
|
-
var UNIT_MS,
|
|
10926
|
+
var UNIT_MS, command16, wait_default;
|
|
10845
10927
|
var init_wait = __esm({
|
|
10846
10928
|
"src/commands/jobs/wait.ts"() {
|
|
10847
10929
|
"use strict";
|
|
@@ -10849,7 +10931,7 @@ var init_wait = __esm({
|
|
|
10849
10931
|
init_errors();
|
|
10850
10932
|
init_exit_codes();
|
|
10851
10933
|
UNIT_MS = { s: 1e3, m: 6e4, h: 36e5 };
|
|
10852
|
-
|
|
10934
|
+
command16 = {
|
|
10853
10935
|
resource: "jobs",
|
|
10854
10936
|
action: "wait",
|
|
10855
10937
|
summary: "Wait for a background job and print it",
|
|
@@ -10888,7 +10970,7 @@ var init_wait = __esm({
|
|
|
10888
10970
|
});
|
|
10889
10971
|
}
|
|
10890
10972
|
};
|
|
10891
|
-
wait_default =
|
|
10973
|
+
wait_default = command16;
|
|
10892
10974
|
}
|
|
10893
10975
|
});
|
|
10894
10976
|
|
|
@@ -11070,7 +11152,7 @@ function summarize2(campaignId) {
|
|
|
11070
11152
|
notSendable: results.filter((r) => (r.status === "created" || r.status === "updated") && r.sendable === false).length
|
|
11071
11153
|
});
|
|
11072
11154
|
}
|
|
11073
|
-
var COMMAND2, CHUNK_SIZE2, LINKEDIN_ONLY_CHANNELS, TEMPLATE_HEADER,
|
|
11155
|
+
var COMMAND2, CHUNK_SIZE2, LINKEDIN_ONLY_CHANNELS, TEMPLATE_HEADER, command17, import_default2;
|
|
11074
11156
|
var init_import2 = __esm({
|
|
11075
11157
|
"src/commands/contacts/import.ts"() {
|
|
11076
11158
|
"use strict";
|
|
@@ -11089,7 +11171,7 @@ var init_import2 = __esm({
|
|
|
11089
11171
|
CHUNK_SIZE2 = 1e3;
|
|
11090
11172
|
LINKEDIN_ONLY_CHANNELS = /* @__PURE__ */ new Set(["linkedin", "linkedin_only"]);
|
|
11091
11173
|
TEMPLATE_HEADER = `${CONTACT_FIELDS.join(",")},<your custom columns>`;
|
|
11092
|
-
|
|
11174
|
+
command17 = {
|
|
11093
11175
|
resource: "contacts",
|
|
11094
11176
|
action: "import",
|
|
11095
11177
|
summary: "Add leads from a CSV or JSONL file to a campaign",
|
|
@@ -11178,7 +11260,7 @@ var init_import2 = __esm({
|
|
|
11178
11260
|
return outcome.exitCode;
|
|
11179
11261
|
}
|
|
11180
11262
|
};
|
|
11181
|
-
import_default2 =
|
|
11263
|
+
import_default2 = command17;
|
|
11182
11264
|
}
|
|
11183
11265
|
});
|
|
11184
11266
|
|
|
@@ -11282,7 +11364,7 @@ async function sendUpdateChunk(chunk, ctx) {
|
|
|
11282
11364
|
});
|
|
11283
11365
|
return { results: mapUpdateAnswer(chunk, res.body), rateLimitRemaining: rateLimitRemaining3(res.headers) };
|
|
11284
11366
|
}
|
|
11285
|
-
var COMMAND3, CHUNK_SIZE3, PAGE_SIZE,
|
|
11367
|
+
var COMMAND3, CHUNK_SIZE3, PAGE_SIZE, command18, update_default;
|
|
11286
11368
|
var init_update = __esm({
|
|
11287
11369
|
"src/commands/contacts/update.ts"() {
|
|
11288
11370
|
"use strict";
|
|
@@ -11296,7 +11378,7 @@ var init_update = __esm({
|
|
|
11296
11378
|
COMMAND3 = "kenso contacts update";
|
|
11297
11379
|
CHUNK_SIZE3 = 1e3;
|
|
11298
11380
|
PAGE_SIZE = 200;
|
|
11299
|
-
|
|
11381
|
+
command18 = {
|
|
11300
11382
|
resource: "contacts",
|
|
11301
11383
|
action: "update",
|
|
11302
11384
|
summary: "Edit leads from a CSV or JSONL file, by id or email (also one lead)",
|
|
@@ -11367,7 +11449,7 @@ var init_update = __esm({
|
|
|
11367
11449
|
return outcome.exitCode;
|
|
11368
11450
|
}
|
|
11369
11451
|
};
|
|
11370
|
-
update_default =
|
|
11452
|
+
update_default = command18;
|
|
11371
11453
|
}
|
|
11372
11454
|
});
|
|
11373
11455
|
|
|
@@ -11378,12 +11460,12 @@ import { join as join11 } from "node:path";
|
|
|
11378
11460
|
function whereDir(env) {
|
|
11379
11461
|
return join11(runsRoot(env), WHERE_DIR);
|
|
11380
11462
|
}
|
|
11381
|
-
async function unfinishedWhereIds(ctx,
|
|
11463
|
+
async function unfinishedWhereIds(ctx, command60, args) {
|
|
11382
11464
|
const dir = whereDir(ctx.env);
|
|
11383
11465
|
const identity = argsIdentity(args);
|
|
11384
11466
|
const workspaceId = ctx.client.workspaceId ?? ctx.auth.workspaceId;
|
|
11385
11467
|
for (const run of await listRuns(ctx.env)) {
|
|
11386
|
-
if (run.command !==
|
|
11468
|
+
if (run.command !== command60 || run.status === "done" || run.status === "planned") continue;
|
|
11387
11469
|
if ((run.workspaceId || void 0) !== (workspaceId || void 0) || argsIdentity(run.args) !== identity) continue;
|
|
11388
11470
|
if (run.inputPath?.startsWith(`${dir}/`) && existsSync6(run.inputPath)) return run.inputPath;
|
|
11389
11471
|
}
|
|
@@ -11529,14 +11611,14 @@ async function idsFromRun(ctx, runId) {
|
|
|
11529
11611
|
return { ...idItems(ids2), source: "run" };
|
|
11530
11612
|
}
|
|
11531
11613
|
async function collectIds(ctx, flags, kind, dryRun2) {
|
|
11532
|
-
const
|
|
11614
|
+
const command60 = `kenso contacts ${kind}`;
|
|
11533
11615
|
const ids2 = stringFlag2(flags, "ids");
|
|
11534
11616
|
const where = kind === "restore" ? void 0 : stringFlag2(flags, "where");
|
|
11535
11617
|
const run = kind === "restore" ? stringFlag2(flags, "run") : void 0;
|
|
11536
11618
|
const given = [ids2, where, run].filter((v) => v !== void 0).length;
|
|
11537
11619
|
if (given !== 1) {
|
|
11538
11620
|
const choices = kind === "restore" ? "--ids <file|-> or --run <runId>" : "--ids <file|-> or --where '<json>'";
|
|
11539
|
-
throw usageError(`${
|
|
11621
|
+
throw usageError(`${command60} needs exactly one of ${choices}.`, { field: "ids", next: `${command60} --help` });
|
|
11540
11622
|
}
|
|
11541
11623
|
if (ids2 !== void 0) return idsFromFile(ctx, ids2);
|
|
11542
11624
|
if (where !== void 0) return idsFromWhere(ctx, kind, flags, where, dryRun2);
|
|
@@ -11828,7 +11910,7 @@ async function download(ctx, job, exportId, out) {
|
|
|
11828
11910
|
const body2 = typeof res.body === "string" ? res.body : res.body === null ? "" : JSON.stringify(res.body);
|
|
11829
11911
|
return { format: "csv", rows: countRows(body2), path: await saveFile(out, res.raw ?? Buffer.from(body2, "utf8")) };
|
|
11830
11912
|
}
|
|
11831
|
-
var COMMAND4, JOB_TYPE, DEFAULT_TIMEOUT2, CONTENT_PATH,
|
|
11913
|
+
var COMMAND4, JOB_TYPE, DEFAULT_TIMEOUT2, CONTENT_PATH, command19, export_default;
|
|
11832
11914
|
var init_export = __esm({
|
|
11833
11915
|
"src/commands/contacts/export.ts"() {
|
|
11834
11916
|
"use strict";
|
|
@@ -11844,7 +11926,7 @@ var init_export = __esm({
|
|
|
11844
11926
|
JOB_TYPE = "contact_export";
|
|
11845
11927
|
DEFAULT_TIMEOUT2 = "30m";
|
|
11846
11928
|
CONTENT_PATH = /\/v1\/contact-exports\/([0-9]+)\/content/;
|
|
11847
|
-
|
|
11929
|
+
command19 = {
|
|
11848
11930
|
resource: "contacts",
|
|
11849
11931
|
action: "export",
|
|
11850
11932
|
summary: "Export a campaign's contacts to CSV (a segment: contact-exports create)",
|
|
@@ -11903,7 +11985,7 @@ var init_export = __esm({
|
|
|
11903
11985
|
return ExitCode.Ok;
|
|
11904
11986
|
}
|
|
11905
11987
|
};
|
|
11906
|
-
export_default =
|
|
11988
|
+
export_default = command19;
|
|
11907
11989
|
}
|
|
11908
11990
|
});
|
|
11909
11991
|
|
|
@@ -11931,14 +12013,14 @@ var show_exports = {};
|
|
|
11931
12013
|
__export(show_exports, {
|
|
11932
12014
|
default: () => show_default
|
|
11933
12015
|
});
|
|
11934
|
-
var
|
|
12016
|
+
var command20, show_default;
|
|
11935
12017
|
var init_show = __esm({
|
|
11936
12018
|
"src/commands/dashboards/show.ts"() {
|
|
11937
12019
|
"use strict";
|
|
11938
12020
|
init_errors();
|
|
11939
12021
|
init_exit_codes();
|
|
11940
12022
|
init_http();
|
|
11941
|
-
|
|
12023
|
+
command20 = {
|
|
11942
12024
|
resource: "dashboards",
|
|
11943
12025
|
action: "show",
|
|
11944
12026
|
summary: "Run a dashboard's charts and print their numbers",
|
|
@@ -11992,7 +12074,7 @@ var init_show = __esm({
|
|
|
11992
12074
|
return ExitCode.Ok;
|
|
11993
12075
|
}
|
|
11994
12076
|
};
|
|
11995
|
-
show_default =
|
|
12077
|
+
show_default = command20;
|
|
11996
12078
|
}
|
|
11997
12079
|
});
|
|
11998
12080
|
|
|
@@ -12115,7 +12197,7 @@ function unknown(words) {
|
|
|
12115
12197
|
next: "kenso describe"
|
|
12116
12198
|
});
|
|
12117
12199
|
}
|
|
12118
|
-
var
|
|
12200
|
+
var command21, describe_default;
|
|
12119
12201
|
var init_describe = __esm({
|
|
12120
12202
|
"src/commands/describe/describe.ts"() {
|
|
12121
12203
|
"use strict";
|
|
@@ -12128,7 +12210,7 @@ var init_describe = __esm({
|
|
|
12128
12210
|
init_manifest();
|
|
12129
12211
|
init_help();
|
|
12130
12212
|
init_registry();
|
|
12131
|
-
|
|
12213
|
+
command21 = {
|
|
12132
12214
|
resource: "describe",
|
|
12133
12215
|
action: "",
|
|
12134
12216
|
summary: "The command map as JSON: commands, flags, body schemas",
|
|
@@ -12169,7 +12251,7 @@ var init_describe = __esm({
|
|
|
12169
12251
|
return ExitCode.Ok;
|
|
12170
12252
|
}
|
|
12171
12253
|
};
|
|
12172
|
-
describe_default =
|
|
12254
|
+
describe_default = command21;
|
|
12173
12255
|
}
|
|
12174
12256
|
});
|
|
12175
12257
|
|
|
@@ -12193,7 +12275,7 @@ function findTopic(input) {
|
|
|
12193
12275
|
const name = input.trim().toLowerCase().replace(/\.md$/, "");
|
|
12194
12276
|
return TOPICS.find((t) => t.topic === name);
|
|
12195
12277
|
}
|
|
12196
|
-
var NAMES,
|
|
12278
|
+
var NAMES, command22, docs_default;
|
|
12197
12279
|
var init_docs = __esm({
|
|
12198
12280
|
"src/commands/docs/docs.ts"() {
|
|
12199
12281
|
"use strict";
|
|
@@ -12201,7 +12283,7 @@ var init_docs = __esm({
|
|
|
12201
12283
|
init_exit_codes();
|
|
12202
12284
|
init_content();
|
|
12203
12285
|
NAMES = TOPICS.map((t) => t.topic).join(", ");
|
|
12204
|
-
|
|
12286
|
+
command22 = {
|
|
12205
12287
|
resource: "docs",
|
|
12206
12288
|
action: "",
|
|
12207
12289
|
summary: "Offline docs: the topic list, or one topic",
|
|
@@ -12242,7 +12324,7 @@ var init_docs = __esm({
|
|
|
12242
12324
|
return ExitCode.Ok;
|
|
12243
12325
|
}
|
|
12244
12326
|
};
|
|
12245
|
-
docs_default =
|
|
12327
|
+
docs_default = command22;
|
|
12246
12328
|
}
|
|
12247
12329
|
});
|
|
12248
12330
|
|
|
@@ -12280,7 +12362,7 @@ function configCheck(env) {
|
|
|
12280
12362
|
const octal = mode.toString(8).padStart(4, "0");
|
|
12281
12363
|
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
12364
|
}
|
|
12283
|
-
var MIN_NODE_MAJOR,
|
|
12365
|
+
var MIN_NODE_MAJOR, command23, actions12;
|
|
12284
12366
|
var init_doctor = __esm({
|
|
12285
12367
|
"src/commands/doctor/index.ts"() {
|
|
12286
12368
|
"use strict";
|
|
@@ -12289,7 +12371,7 @@ var init_doctor = __esm({
|
|
|
12289
12371
|
init_exit_codes();
|
|
12290
12372
|
init_http();
|
|
12291
12373
|
MIN_NODE_MAJOR = 22;
|
|
12292
|
-
|
|
12374
|
+
command23 = {
|
|
12293
12375
|
resource: "doctor",
|
|
12294
12376
|
action: "",
|
|
12295
12377
|
summary: "Check Node, the config, the API and the key",
|
|
@@ -12354,7 +12436,7 @@ var init_doctor = __esm({
|
|
|
12354
12436
|
}
|
|
12355
12437
|
};
|
|
12356
12438
|
actions12 = {
|
|
12357
|
-
"": async () =>
|
|
12439
|
+
"": async () => command23
|
|
12358
12440
|
};
|
|
12359
12441
|
}
|
|
12360
12442
|
});
|
|
@@ -12393,7 +12475,7 @@ function recordCount(csv) {
|
|
|
12393
12475
|
}
|
|
12394
12476
|
return hasText ? records + 1 : records;
|
|
12395
12477
|
}
|
|
12396
|
-
var OBJECTS,
|
|
12478
|
+
var OBJECTS, command24, export_default2;
|
|
12397
12479
|
var init_export2 = __esm({
|
|
12398
12480
|
"src/commands/export/export.ts"() {
|
|
12399
12481
|
"use strict";
|
|
@@ -12408,7 +12490,7 @@ var init_export2 = __esm({
|
|
|
12408
12490
|
deals: { resource: "opportunities", noun: "deals" },
|
|
12409
12491
|
opportunities: { resource: "opportunities", noun: "deals" }
|
|
12410
12492
|
};
|
|
12411
|
-
|
|
12493
|
+
command24 = {
|
|
12412
12494
|
resource: "export",
|
|
12413
12495
|
action: "",
|
|
12414
12496
|
summary: "Export accounts, people or deals as CSV: everything, a saved view, or what the filters match",
|
|
@@ -12491,7 +12573,7 @@ var init_export2 = __esm({
|
|
|
12491
12573
|
return ExitCode.Ok;
|
|
12492
12574
|
}
|
|
12493
12575
|
};
|
|
12494
|
-
export_default2 =
|
|
12576
|
+
export_default2 = command24;
|
|
12495
12577
|
}
|
|
12496
12578
|
});
|
|
12497
12579
|
|
|
@@ -12544,7 +12626,7 @@ function readable(row) {
|
|
|
12544
12626
|
const parts2 = [time, `[${row.status}]`, row.method, row.pathTemplate, row.errorCode, `${row.durationMs}ms`, row.apiKeyId, row.requestId];
|
|
12545
12627
|
return parts2.filter((p) => p !== void 0 && p !== "").join(" ");
|
|
12546
12628
|
}
|
|
12547
|
-
var MIN_INTERVAL_MS, MAX_INTERVAL_MS, MAX_SINCE_MS, OVERLAP_MS, MAX_PAGES, RATE_LIMITED_WAIT_MS, isOwnPoll, pad,
|
|
12629
|
+
var MIN_INTERVAL_MS, MAX_INTERVAL_MS, MAX_SINCE_MS, OVERLAP_MS, MAX_PAGES, RATE_LIMITED_WAIT_MS, isOwnPoll, pad, command25, tail_default;
|
|
12548
12630
|
var init_tail = __esm({
|
|
12549
12631
|
"src/commands/logs/tail.ts"() {
|
|
12550
12632
|
"use strict";
|
|
@@ -12560,7 +12642,7 @@ var init_tail = __esm({
|
|
|
12560
12642
|
RATE_LIMITED_WAIT_MS = 3e4;
|
|
12561
12643
|
isOwnPoll = (row) => row.method === "GET" && row.pathTemplate === "/v1/api-requests" && row.userAgent?.startsWith("kenso-cli/") === true;
|
|
12562
12644
|
pad = (n) => String(n).padStart(2, "0");
|
|
12563
|
-
|
|
12645
|
+
command25 = {
|
|
12564
12646
|
resource: "logs",
|
|
12565
12647
|
action: "tail",
|
|
12566
12648
|
summary: "Stream your workspace's new API request log rows",
|
|
@@ -12666,7 +12748,7 @@ var init_tail = __esm({
|
|
|
12666
12748
|
return ExitCode.Ok;
|
|
12667
12749
|
}
|
|
12668
12750
|
};
|
|
12669
|
-
tail_default =
|
|
12751
|
+
tail_default = command25;
|
|
12670
12752
|
}
|
|
12671
12753
|
});
|
|
12672
12754
|
|
|
@@ -12731,7 +12813,7 @@ function isRecord7(value) {
|
|
|
12731
12813
|
function textOf(result) {
|
|
12732
12814
|
return (result.content ?? []).filter((part) => part.type === "text" && typeof part.text === "string").map((part) => part.text).join("\n");
|
|
12733
12815
|
}
|
|
12734
|
-
var
|
|
12816
|
+
var command26, call_default;
|
|
12735
12817
|
var init_call = __esm({
|
|
12736
12818
|
"src/commands/mcp/call.ts"() {
|
|
12737
12819
|
"use strict";
|
|
@@ -12739,7 +12821,7 @@ var init_call = __esm({
|
|
|
12739
12821
|
init_exit_codes();
|
|
12740
12822
|
init_input();
|
|
12741
12823
|
init_connect4();
|
|
12742
|
-
|
|
12824
|
+
command26 = {
|
|
12743
12825
|
resource: "mcp",
|
|
12744
12826
|
action: "call",
|
|
12745
12827
|
summary: "Call a hosted Kenso MCP tool, such as list_skills",
|
|
@@ -12792,7 +12874,7 @@ var init_call = __esm({
|
|
|
12792
12874
|
return ExitCode.Ok;
|
|
12793
12875
|
}
|
|
12794
12876
|
};
|
|
12795
|
-
call_default =
|
|
12877
|
+
call_default = command26;
|
|
12796
12878
|
}
|
|
12797
12879
|
});
|
|
12798
12880
|
|
|
@@ -12801,13 +12883,13 @@ var tools_exports = {};
|
|
|
12801
12883
|
__export(tools_exports, {
|
|
12802
12884
|
default: () => tools_default
|
|
12803
12885
|
});
|
|
12804
|
-
var
|
|
12886
|
+
var command27, tools_default;
|
|
12805
12887
|
var init_tools = __esm({
|
|
12806
12888
|
"src/commands/mcp/tools.ts"() {
|
|
12807
12889
|
"use strict";
|
|
12808
12890
|
init_exit_codes();
|
|
12809
12891
|
init_connect4();
|
|
12810
|
-
|
|
12892
|
+
command27 = {
|
|
12811
12893
|
resource: "mcp",
|
|
12812
12894
|
action: "tools",
|
|
12813
12895
|
summary: "List the hosted Kenso MCP's tools",
|
|
@@ -12822,7 +12904,7 @@ var init_tools = __esm({
|
|
|
12822
12904
|
return ExitCode.Ok;
|
|
12823
12905
|
}
|
|
12824
12906
|
};
|
|
12825
|
-
tools_default =
|
|
12907
|
+
tools_default = command27;
|
|
12826
12908
|
}
|
|
12827
12909
|
});
|
|
12828
12910
|
|
|
@@ -12843,14 +12925,14 @@ var stage_history_exports = {};
|
|
|
12843
12925
|
__export(stage_history_exports, {
|
|
12844
12926
|
default: () => stage_history_default
|
|
12845
12927
|
});
|
|
12846
|
-
var
|
|
12928
|
+
var command28, stage_history_default;
|
|
12847
12929
|
var init_stage_history = __esm({
|
|
12848
12930
|
"src/commands/opportunities/stage-history.ts"() {
|
|
12849
12931
|
"use strict";
|
|
12850
12932
|
init_errors();
|
|
12851
12933
|
init_exit_codes();
|
|
12852
12934
|
init_http();
|
|
12853
|
-
|
|
12935
|
+
command28 = {
|
|
12854
12936
|
resource: "opportunities",
|
|
12855
12937
|
action: "stage-history",
|
|
12856
12938
|
summary: "Show a deal's stage history: each stage, when, who moved it and how long it sat there",
|
|
@@ -12874,7 +12956,7 @@ var init_stage_history = __esm({
|
|
|
12874
12956
|
return ExitCode.Ok;
|
|
12875
12957
|
}
|
|
12876
12958
|
};
|
|
12877
|
-
stage_history_default =
|
|
12959
|
+
stage_history_default = command28;
|
|
12878
12960
|
}
|
|
12879
12961
|
});
|
|
12880
12962
|
|
|
@@ -12960,7 +13042,7 @@ function summarize3(results) {
|
|
|
12960
13042
|
}
|
|
12961
13043
|
return { matched, addedToAccounts, emailFindsQueued };
|
|
12962
13044
|
}
|
|
12963
|
-
var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND,
|
|
13045
|
+
var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND, command29, import_default3;
|
|
12964
13046
|
var init_import3 = __esm({
|
|
12965
13047
|
"src/commands/people/import.ts"() {
|
|
12966
13048
|
"use strict";
|
|
@@ -12992,7 +13074,7 @@ var init_import3 = __esm({
|
|
|
12992
13074
|
};
|
|
12993
13075
|
PERSON_FIELDS = ["email", "fullName", "firstName", "lastName", "linkedinUrl", "title"];
|
|
12994
13076
|
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
|
-
|
|
13077
|
+
command29 = {
|
|
12996
13078
|
resource: "people",
|
|
12997
13079
|
action: "import",
|
|
12998
13080
|
summary: "Create or match people from a CSV or JSONL file, optionally onto accounts",
|
|
@@ -13057,7 +13139,7 @@ var init_import3 = __esm({
|
|
|
13057
13139
|
return outcome.exitCode;
|
|
13058
13140
|
}
|
|
13059
13141
|
};
|
|
13060
|
-
import_default3 =
|
|
13142
|
+
import_default3 = command29;
|
|
13061
13143
|
}
|
|
13062
13144
|
});
|
|
13063
13145
|
|
|
@@ -13087,14 +13169,14 @@ function rule(stage) {
|
|
|
13087
13169
|
isDefault: stage.isDefaultRequiredFields
|
|
13088
13170
|
};
|
|
13089
13171
|
}
|
|
13090
|
-
var
|
|
13172
|
+
var command30, stage_rules_default;
|
|
13091
13173
|
var init_stage_rules = __esm({
|
|
13092
13174
|
"src/commands/pipelines/stage-rules.ts"() {
|
|
13093
13175
|
"use strict";
|
|
13094
13176
|
init_errors();
|
|
13095
13177
|
init_exit_codes();
|
|
13096
13178
|
init_http();
|
|
13097
|
-
|
|
13179
|
+
command30 = {
|
|
13098
13180
|
resource: "pipelines",
|
|
13099
13181
|
action: "stage-rules",
|
|
13100
13182
|
summary: "List or set the fields a deal should have in each stage",
|
|
@@ -13147,7 +13229,7 @@ var init_stage_rules = __esm({
|
|
|
13147
13229
|
return ExitCode.Ok;
|
|
13148
13230
|
}
|
|
13149
13231
|
};
|
|
13150
|
-
stage_rules_default =
|
|
13232
|
+
stage_rules_default = command30;
|
|
13151
13233
|
}
|
|
13152
13234
|
});
|
|
13153
13235
|
|
|
@@ -13167,7 +13249,7 @@ var run_exports2 = {};
|
|
|
13167
13249
|
__export(run_exports2, {
|
|
13168
13250
|
default: () => run_default
|
|
13169
13251
|
});
|
|
13170
|
-
var REPORTS,
|
|
13252
|
+
var REPORTS, command31, run_default;
|
|
13171
13253
|
var init_run2 = __esm({
|
|
13172
13254
|
"src/commands/reports/run.ts"() {
|
|
13173
13255
|
"use strict";
|
|
@@ -13175,7 +13257,7 @@ var init_run2 = __esm({
|
|
|
13175
13257
|
init_exit_codes();
|
|
13176
13258
|
init_http();
|
|
13177
13259
|
REPORTS = ["pipeline_by_stage", "won_by_month", "stage_conversion", "time_in_stage", "won_by_source_campaign", "activity_by_member"];
|
|
13178
|
-
|
|
13260
|
+
command31 = {
|
|
13179
13261
|
resource: "reports",
|
|
13180
13262
|
action: "run",
|
|
13181
13263
|
summary: "Run a stock pipeline report and print its table",
|
|
@@ -13237,7 +13319,7 @@ var init_run2 = __esm({
|
|
|
13237
13319
|
return ExitCode.Ok;
|
|
13238
13320
|
}
|
|
13239
13321
|
};
|
|
13240
|
-
run_default =
|
|
13322
|
+
run_default = command31;
|
|
13241
13323
|
}
|
|
13242
13324
|
});
|
|
13243
13325
|
|
|
@@ -13246,14 +13328,14 @@ var summary_exports = {};
|
|
|
13246
13328
|
__export(summary_exports, {
|
|
13247
13329
|
default: () => summary_default
|
|
13248
13330
|
});
|
|
13249
|
-
var
|
|
13331
|
+
var command32, summary_default;
|
|
13250
13332
|
var init_summary = __esm({
|
|
13251
13333
|
"src/commands/reports/summary.ts"() {
|
|
13252
13334
|
"use strict";
|
|
13253
13335
|
init_errors();
|
|
13254
13336
|
init_exit_codes();
|
|
13255
13337
|
init_http();
|
|
13256
|
-
|
|
13338
|
+
command32 = {
|
|
13257
13339
|
resource: "reports",
|
|
13258
13340
|
action: "summary",
|
|
13259
13341
|
summary: "Read where the period stands and what needs you",
|
|
@@ -13308,7 +13390,7 @@ var init_summary = __esm({
|
|
|
13308
13390
|
return ExitCode.Ok;
|
|
13309
13391
|
}
|
|
13310
13392
|
};
|
|
13311
|
-
summary_default =
|
|
13393
|
+
summary_default = command32;
|
|
13312
13394
|
}
|
|
13313
13395
|
});
|
|
13314
13396
|
|
|
@@ -13329,14 +13411,14 @@ var list_exports = {};
|
|
|
13329
13411
|
__export(list_exports, {
|
|
13330
13412
|
default: () => list_default
|
|
13331
13413
|
});
|
|
13332
|
-
var
|
|
13414
|
+
var command33, list_default;
|
|
13333
13415
|
var init_list = __esm({
|
|
13334
13416
|
"src/commands/runs/list.ts"() {
|
|
13335
13417
|
"use strict";
|
|
13336
13418
|
init_runs();
|
|
13337
13419
|
init_errors();
|
|
13338
13420
|
init_exit_codes();
|
|
13339
|
-
|
|
13421
|
+
command33 = {
|
|
13340
13422
|
resource: "runs",
|
|
13341
13423
|
action: "list",
|
|
13342
13424
|
summary: "List batch runs, newest first (finds an interrupted run)",
|
|
@@ -13357,7 +13439,7 @@ var init_list = __esm({
|
|
|
13357
13439
|
return ExitCode.Ok;
|
|
13358
13440
|
}
|
|
13359
13441
|
};
|
|
13360
|
-
list_default =
|
|
13442
|
+
list_default = command33;
|
|
13361
13443
|
}
|
|
13362
13444
|
});
|
|
13363
13445
|
|
|
@@ -13368,7 +13450,7 @@ __export(show_exports2, {
|
|
|
13368
13450
|
});
|
|
13369
13451
|
import { existsSync as existsSync7, readFileSync as readFileSync9 } from "node:fs";
|
|
13370
13452
|
import { join as join12 } from "node:path";
|
|
13371
|
-
var FILES,
|
|
13453
|
+
var FILES, command34, show_default2;
|
|
13372
13454
|
var init_show2 = __esm({
|
|
13373
13455
|
"src/commands/runs/show.ts"() {
|
|
13374
13456
|
"use strict";
|
|
@@ -13383,7 +13465,7 @@ var init_show2 = __esm({
|
|
|
13383
13465
|
["plan", "plan.json"],
|
|
13384
13466
|
["summary", "summary.json"]
|
|
13385
13467
|
];
|
|
13386
|
-
|
|
13468
|
+
command34 = {
|
|
13387
13469
|
resource: "runs",
|
|
13388
13470
|
action: "show",
|
|
13389
13471
|
summary: "Show one batch run and its files",
|
|
@@ -13410,7 +13492,7 @@ var init_show2 = __esm({
|
|
|
13410
13492
|
return ExitCode.Ok;
|
|
13411
13493
|
}
|
|
13412
13494
|
};
|
|
13413
|
-
show_default2 =
|
|
13495
|
+
show_default2 = command34;
|
|
13414
13496
|
}
|
|
13415
13497
|
});
|
|
13416
13498
|
|
|
@@ -13469,14 +13551,14 @@ function resumeArgv(run, globals = {}) {
|
|
|
13469
13551
|
async function sha256(path) {
|
|
13470
13552
|
return createHash5("sha256").update(await readFile9(path)).digest("hex");
|
|
13471
13553
|
}
|
|
13472
|
-
var SKIPPED_KEYS,
|
|
13554
|
+
var SKIPPED_KEYS, command35, resume_default;
|
|
13473
13555
|
var init_resume = __esm({
|
|
13474
13556
|
"src/commands/runs/resume.ts"() {
|
|
13475
13557
|
"use strict";
|
|
13476
13558
|
init_runs();
|
|
13477
13559
|
init_errors();
|
|
13478
13560
|
SKIPPED_KEYS = /* @__PURE__ */ new Set(["positionals", "yes", "dryRun", "dry-run", "help", "version"]);
|
|
13479
|
-
|
|
13561
|
+
command35 = {
|
|
13480
13562
|
resource: "runs",
|
|
13481
13563
|
action: "resume",
|
|
13482
13564
|
summary: "Continue an interrupted batch run (its command with --yes, no dry run)",
|
|
@@ -13531,7 +13613,7 @@ var init_resume = __esm({
|
|
|
13531
13613
|
}
|
|
13532
13614
|
}
|
|
13533
13615
|
};
|
|
13534
|
-
resume_default =
|
|
13616
|
+
resume_default = command35;
|
|
13535
13617
|
}
|
|
13536
13618
|
});
|
|
13537
13619
|
|
|
@@ -13639,7 +13721,7 @@ var create_exports = {};
|
|
|
13639
13721
|
__export(create_exports, {
|
|
13640
13722
|
default: () => create_default
|
|
13641
13723
|
});
|
|
13642
|
-
var
|
|
13724
|
+
var command36, create_default;
|
|
13643
13725
|
var init_create = __esm({
|
|
13644
13726
|
"src/commands/sandbox/create.ts"() {
|
|
13645
13727
|
"use strict";
|
|
@@ -13647,7 +13729,7 @@ var init_create = __esm({
|
|
|
13647
13729
|
init_exit_codes();
|
|
13648
13730
|
init_http();
|
|
13649
13731
|
init_shared();
|
|
13650
|
-
|
|
13732
|
+
command36 = {
|
|
13651
13733
|
resource: "sandbox",
|
|
13652
13734
|
action: "create",
|
|
13653
13735
|
summary: "Create your developer sandbox and save its test key as the sandbox profile",
|
|
@@ -13689,7 +13771,7 @@ var init_create = __esm({
|
|
|
13689
13771
|
return ExitCode.Ok;
|
|
13690
13772
|
}
|
|
13691
13773
|
};
|
|
13692
|
-
create_default =
|
|
13774
|
+
create_default = command36;
|
|
13693
13775
|
}
|
|
13694
13776
|
});
|
|
13695
13777
|
|
|
@@ -13698,7 +13780,7 @@ var delete_exports = {};
|
|
|
13698
13780
|
__export(delete_exports, {
|
|
13699
13781
|
default: () => delete_default
|
|
13700
13782
|
});
|
|
13701
|
-
var
|
|
13783
|
+
var command37, delete_default;
|
|
13702
13784
|
var init_delete = __esm({
|
|
13703
13785
|
"src/commands/sandbox/delete.ts"() {
|
|
13704
13786
|
"use strict";
|
|
@@ -13706,7 +13788,7 @@ var init_delete = __esm({
|
|
|
13706
13788
|
init_confirm();
|
|
13707
13789
|
init_exit_codes();
|
|
13708
13790
|
init_shared();
|
|
13709
|
-
|
|
13791
|
+
command37 = {
|
|
13710
13792
|
resource: "sandbox",
|
|
13711
13793
|
action: "delete",
|
|
13712
13794
|
summary: "Delete your sandbox and its test keys",
|
|
@@ -13733,7 +13815,7 @@ var init_delete = __esm({
|
|
|
13733
13815
|
return ExitCode.Ok;
|
|
13734
13816
|
}
|
|
13735
13817
|
};
|
|
13736
|
-
delete_default =
|
|
13818
|
+
delete_default = command37;
|
|
13737
13819
|
}
|
|
13738
13820
|
});
|
|
13739
13821
|
|
|
@@ -13742,14 +13824,14 @@ var key_exports = {};
|
|
|
13742
13824
|
__export(key_exports, {
|
|
13743
13825
|
default: () => key_default
|
|
13744
13826
|
});
|
|
13745
|
-
var
|
|
13827
|
+
var command38, key_default;
|
|
13746
13828
|
var init_key = __esm({
|
|
13747
13829
|
"src/commands/sandbox/key.ts"() {
|
|
13748
13830
|
"use strict";
|
|
13749
13831
|
init_exit_codes();
|
|
13750
13832
|
init_http();
|
|
13751
13833
|
init_shared();
|
|
13752
|
-
|
|
13834
|
+
command38 = {
|
|
13753
13835
|
resource: "sandbox",
|
|
13754
13836
|
action: "key",
|
|
13755
13837
|
summary: "Create a new test key for your sandbox and save it as the sandbox profile",
|
|
@@ -13769,7 +13851,7 @@ var init_key = __esm({
|
|
|
13769
13851
|
return ExitCode.Ok;
|
|
13770
13852
|
}
|
|
13771
13853
|
};
|
|
13772
|
-
key_default =
|
|
13854
|
+
key_default = command38;
|
|
13773
13855
|
}
|
|
13774
13856
|
});
|
|
13775
13857
|
|
|
@@ -13778,13 +13860,13 @@ var list_exports2 = {};
|
|
|
13778
13860
|
__export(list_exports2, {
|
|
13779
13861
|
default: () => list_default2
|
|
13780
13862
|
});
|
|
13781
|
-
var
|
|
13863
|
+
var command39, list_default2;
|
|
13782
13864
|
var init_list2 = __esm({
|
|
13783
13865
|
"src/commands/sandbox/list.ts"() {
|
|
13784
13866
|
"use strict";
|
|
13785
13867
|
init_exit_codes();
|
|
13786
13868
|
init_shared();
|
|
13787
|
-
|
|
13869
|
+
command39 = {
|
|
13788
13870
|
resource: "sandbox",
|
|
13789
13871
|
action: "list",
|
|
13790
13872
|
summary: "List your developer sandbox",
|
|
@@ -13800,7 +13882,7 @@ var init_list2 = __esm({
|
|
|
13800
13882
|
return ExitCode.Ok;
|
|
13801
13883
|
}
|
|
13802
13884
|
};
|
|
13803
|
-
list_default2 =
|
|
13885
|
+
list_default2 = command39;
|
|
13804
13886
|
}
|
|
13805
13887
|
});
|
|
13806
13888
|
|
|
@@ -13809,14 +13891,14 @@ var reset_exports = {};
|
|
|
13809
13891
|
__export(reset_exports, {
|
|
13810
13892
|
default: () => reset_default
|
|
13811
13893
|
});
|
|
13812
|
-
var
|
|
13894
|
+
var command40, reset_default;
|
|
13813
13895
|
var init_reset = __esm({
|
|
13814
13896
|
"src/commands/sandbox/reset.ts"() {
|
|
13815
13897
|
"use strict";
|
|
13816
13898
|
init_exit_codes();
|
|
13817
13899
|
init_http();
|
|
13818
13900
|
init_shared();
|
|
13819
|
-
|
|
13901
|
+
command40 = {
|
|
13820
13902
|
resource: "sandbox",
|
|
13821
13903
|
action: "reset",
|
|
13822
13904
|
summary: "Reset your sandbox to its seed data",
|
|
@@ -13834,7 +13916,7 @@ var init_reset = __esm({
|
|
|
13834
13916
|
return ExitCode.Ok;
|
|
13835
13917
|
}
|
|
13836
13918
|
};
|
|
13837
|
-
reset_default =
|
|
13919
|
+
reset_default = command40;
|
|
13838
13920
|
}
|
|
13839
13921
|
});
|
|
13840
13922
|
|
|
@@ -14094,7 +14176,7 @@ __export(pull_exports, {
|
|
|
14094
14176
|
});
|
|
14095
14177
|
import { mkdir, writeFile as writeFile4 } from "node:fs/promises";
|
|
14096
14178
|
import { dirname as dirname2, resolve as resolve11 } from "node:path";
|
|
14097
|
-
var
|
|
14179
|
+
var command41, pull_default;
|
|
14098
14180
|
var init_pull = __esm({
|
|
14099
14181
|
"src/commands/studio/pull.ts"() {
|
|
14100
14182
|
"use strict";
|
|
@@ -14104,7 +14186,7 @@ var init_pull = __esm({
|
|
|
14104
14186
|
init_common2();
|
|
14105
14187
|
init_folder();
|
|
14106
14188
|
init_transfer2();
|
|
14107
|
-
|
|
14189
|
+
command41 = {
|
|
14108
14190
|
resource: "studio",
|
|
14109
14191
|
action: "pull",
|
|
14110
14192
|
summary: "Write a template version's files to a folder",
|
|
@@ -14151,7 +14233,7 @@ var init_pull = __esm({
|
|
|
14151
14233
|
return ExitCode.Ok;
|
|
14152
14234
|
}
|
|
14153
14235
|
};
|
|
14154
|
-
pull_default =
|
|
14236
|
+
pull_default = command41;
|
|
14155
14237
|
}
|
|
14156
14238
|
});
|
|
14157
14239
|
|
|
@@ -14184,7 +14266,7 @@ var push_exports = {};
|
|
|
14184
14266
|
__export(push_exports, {
|
|
14185
14267
|
default: () => push_default
|
|
14186
14268
|
});
|
|
14187
|
-
var BUILT_BY, DEFAULT_MESSAGE,
|
|
14269
|
+
var BUILT_BY, DEFAULT_MESSAGE, command42, push_default;
|
|
14188
14270
|
var init_push = __esm({
|
|
14189
14271
|
"src/commands/studio/push.ts"() {
|
|
14190
14272
|
"use strict";
|
|
@@ -14196,7 +14278,7 @@ var init_push = __esm({
|
|
|
14196
14278
|
init_read();
|
|
14197
14279
|
BUILT_BY = "customer_agent";
|
|
14198
14280
|
DEFAULT_MESSAGE = "Pushed with the Kenso CLI";
|
|
14199
|
-
|
|
14281
|
+
command42 = {
|
|
14200
14282
|
resource: "studio",
|
|
14201
14283
|
action: "push",
|
|
14202
14284
|
summary: "Save a folder's files to a template's draft and print the validation",
|
|
@@ -14288,7 +14370,7 @@ var init_push = __esm({
|
|
|
14288
14370
|
);
|
|
14289
14371
|
}
|
|
14290
14372
|
};
|
|
14291
|
-
push_default =
|
|
14373
|
+
push_default = command42;
|
|
14292
14374
|
}
|
|
14293
14375
|
});
|
|
14294
14376
|
|
|
@@ -14297,7 +14379,7 @@ var validate_exports = {};
|
|
|
14297
14379
|
__export(validate_exports, {
|
|
14298
14380
|
default: () => validate_default
|
|
14299
14381
|
});
|
|
14300
|
-
var
|
|
14382
|
+
var command43, validate_default;
|
|
14301
14383
|
var init_validate = __esm({
|
|
14302
14384
|
"src/commands/studio/validate.ts"() {
|
|
14303
14385
|
"use strict";
|
|
@@ -14306,7 +14388,7 @@ var init_validate = __esm({
|
|
|
14306
14388
|
init_columns();
|
|
14307
14389
|
init_common2();
|
|
14308
14390
|
init_read();
|
|
14309
|
-
|
|
14391
|
+
command43 = {
|
|
14310
14392
|
resource: "studio",
|
|
14311
14393
|
action: "validate",
|
|
14312
14394
|
summary: "Validate a folder's files against a template without saving them",
|
|
@@ -14335,7 +14417,7 @@ var init_validate = __esm({
|
|
|
14335
14417
|
throw validationFailed(validation, "The files have validation errors", commandLine2(ctx, "studio validate", args));
|
|
14336
14418
|
}
|
|
14337
14419
|
};
|
|
14338
|
-
validate_default =
|
|
14420
|
+
validate_default = command43;
|
|
14339
14421
|
}
|
|
14340
14422
|
});
|
|
14341
14423
|
|
|
@@ -14384,7 +14466,7 @@ function accountIds(value) {
|
|
|
14384
14466
|
}
|
|
14385
14467
|
return ids2.map(Number);
|
|
14386
14468
|
}
|
|
14387
|
-
var SHOWN,
|
|
14469
|
+
var SHOWN, command44, preview_default;
|
|
14388
14470
|
var init_preview = __esm({
|
|
14389
14471
|
"src/commands/studio/preview.ts"() {
|
|
14390
14472
|
"use strict";
|
|
@@ -14396,7 +14478,7 @@ var init_preview = __esm({
|
|
|
14396
14478
|
init_common2();
|
|
14397
14479
|
init_folder();
|
|
14398
14480
|
SHOWN = 5;
|
|
14399
|
-
|
|
14481
|
+
command44 = {
|
|
14400
14482
|
resource: "studio",
|
|
14401
14483
|
action: "preview",
|
|
14402
14484
|
summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
|
|
@@ -14445,7 +14527,7 @@ var init_preview = __esm({
|
|
|
14445
14527
|
return ExitCode.Ok;
|
|
14446
14528
|
}
|
|
14447
14529
|
};
|
|
14448
|
-
preview_default =
|
|
14530
|
+
preview_default = command44;
|
|
14449
14531
|
}
|
|
14450
14532
|
});
|
|
14451
14533
|
|
|
@@ -14646,7 +14728,7 @@ function estimateOutput(templateId, target, estimate2) {
|
|
|
14646
14728
|
...target.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
|
|
14647
14729
|
};
|
|
14648
14730
|
}
|
|
14649
|
-
var COMMAND6, sha2562,
|
|
14731
|
+
var COMMAND6, sha2562, command45, fill_default;
|
|
14650
14732
|
var init_fill = __esm({
|
|
14651
14733
|
"src/commands/studio/fill.ts"() {
|
|
14652
14734
|
"use strict";
|
|
@@ -14662,7 +14744,7 @@ var init_fill = __esm({
|
|
|
14662
14744
|
init_fill_runs();
|
|
14663
14745
|
COMMAND6 = "studio fill";
|
|
14664
14746
|
sha2562 = (data) => createHash8("sha256").update(data).digest("hex");
|
|
14665
|
-
|
|
14747
|
+
command45 = {
|
|
14666
14748
|
resource: "studio",
|
|
14667
14749
|
action: "fill",
|
|
14668
14750
|
summary: "Fill a template on many accounts or campaign leads (estimate first)",
|
|
@@ -14722,7 +14804,7 @@ var init_fill = __esm({
|
|
|
14722
14804
|
return outcome.exitCode;
|
|
14723
14805
|
}
|
|
14724
14806
|
};
|
|
14725
|
-
fill_default =
|
|
14807
|
+
fill_default = command45;
|
|
14726
14808
|
}
|
|
14727
14809
|
});
|
|
14728
14810
|
|
|
@@ -14824,7 +14906,7 @@ var add_exports = {};
|
|
|
14824
14906
|
__export(add_exports, {
|
|
14825
14907
|
default: () => add_default
|
|
14826
14908
|
});
|
|
14827
|
-
var NEXT,
|
|
14909
|
+
var NEXT, command46, add_default;
|
|
14828
14910
|
var init_add = __esm({
|
|
14829
14911
|
"src/commands/tasks/add.ts"() {
|
|
14830
14912
|
"use strict";
|
|
@@ -14833,7 +14915,7 @@ var init_add = __esm({
|
|
|
14833
14915
|
init_http();
|
|
14834
14916
|
init_shared2();
|
|
14835
14917
|
NEXT = 'kenso tasks add "Send the deck" --due tomorrow --account 812';
|
|
14836
|
-
|
|
14918
|
+
command46 = {
|
|
14837
14919
|
resource: "tasks",
|
|
14838
14920
|
action: "add",
|
|
14839
14921
|
summary: "Add a task: a title, an optional due day and time, assignee and the account, person or deal it is about",
|
|
@@ -14868,7 +14950,7 @@ var init_add = __esm({
|
|
|
14868
14950
|
return ExitCode.Ok;
|
|
14869
14951
|
}
|
|
14870
14952
|
};
|
|
14871
|
-
add_default =
|
|
14953
|
+
add_default = command46;
|
|
14872
14954
|
}
|
|
14873
14955
|
});
|
|
14874
14956
|
|
|
@@ -14887,7 +14969,7 @@ async function patchTask(ctx, taskId, change) {
|
|
|
14887
14969
|
return unwrap((await send2()).body);
|
|
14888
14970
|
}
|
|
14889
14971
|
}
|
|
14890
|
-
var
|
|
14972
|
+
var command47, done_default;
|
|
14891
14973
|
var init_done = __esm({
|
|
14892
14974
|
"src/commands/tasks/done.ts"() {
|
|
14893
14975
|
"use strict";
|
|
@@ -14895,7 +14977,7 @@ var init_done = __esm({
|
|
|
14895
14977
|
init_exit_codes();
|
|
14896
14978
|
init_http();
|
|
14897
14979
|
init_shared2();
|
|
14898
|
-
|
|
14980
|
+
command47 = {
|
|
14899
14981
|
resource: "tasks",
|
|
14900
14982
|
action: "done",
|
|
14901
14983
|
summary: "Complete one or more tasks (--undo reopens them)",
|
|
@@ -14918,7 +15000,7 @@ var init_done = __esm({
|
|
|
14918
15000
|
return ExitCode.Ok;
|
|
14919
15001
|
}
|
|
14920
15002
|
};
|
|
14921
|
-
done_default =
|
|
15003
|
+
done_default = command47;
|
|
14922
15004
|
}
|
|
14923
15005
|
});
|
|
14924
15006
|
|
|
@@ -14927,7 +15009,7 @@ var assign_exports = {};
|
|
|
14927
15009
|
__export(assign_exports, {
|
|
14928
15010
|
default: () => assign_default
|
|
14929
15011
|
});
|
|
14930
|
-
var NEXT2,
|
|
15012
|
+
var NEXT2, command48, assign_default;
|
|
14931
15013
|
var init_assign = __esm({
|
|
14932
15014
|
"src/commands/tasks/assign.ts"() {
|
|
14933
15015
|
"use strict";
|
|
@@ -14935,7 +15017,7 @@ var init_assign = __esm({
|
|
|
14935
15017
|
init_done();
|
|
14936
15018
|
init_shared2();
|
|
14937
15019
|
NEXT2 = "kenso tasks assign <taskId> <me|memberId|email>";
|
|
14938
|
-
|
|
15020
|
+
command48 = {
|
|
14939
15021
|
resource: "tasks",
|
|
14940
15022
|
action: "assign",
|
|
14941
15023
|
summary: "Give a task to a member",
|
|
@@ -14955,7 +15037,7 @@ var init_assign = __esm({
|
|
|
14955
15037
|
return ExitCode.Ok;
|
|
14956
15038
|
}
|
|
14957
15039
|
};
|
|
14958
|
-
assign_default =
|
|
15040
|
+
assign_default = command48;
|
|
14959
15041
|
}
|
|
14960
15042
|
});
|
|
14961
15043
|
|
|
@@ -14964,14 +15046,14 @@ var queue_exports = {};
|
|
|
14964
15046
|
__export(queue_exports, {
|
|
14965
15047
|
default: () => queue_default
|
|
14966
15048
|
});
|
|
14967
|
-
var SCOPES,
|
|
15049
|
+
var SCOPES, command49, queue_default;
|
|
14968
15050
|
var init_queue = __esm({
|
|
14969
15051
|
"src/commands/tasks/queue.ts"() {
|
|
14970
15052
|
"use strict";
|
|
14971
15053
|
init_errors();
|
|
14972
15054
|
init_exit_codes();
|
|
14973
15055
|
SCOPES = ["mine", "assigned_by_me", "everyone"];
|
|
14974
|
-
|
|
15056
|
+
command49 = {
|
|
14975
15057
|
resource: "tasks",
|
|
14976
15058
|
action: "queue",
|
|
14977
15059
|
summary: "Your open work by due day: tasks, touches, call tasks, reply reminders and Ken follow-ups",
|
|
@@ -14992,7 +15074,7 @@ var init_queue = __esm({
|
|
|
14992
15074
|
return ExitCode.Ok;
|
|
14993
15075
|
}
|
|
14994
15076
|
};
|
|
14995
|
-
queue_default =
|
|
15077
|
+
queue_default = command49;
|
|
14996
15078
|
}
|
|
14997
15079
|
});
|
|
14998
15080
|
|
|
@@ -15142,7 +15224,7 @@ function readBody(req) {
|
|
|
15142
15224
|
function reply(res, status, body2) {
|
|
15143
15225
|
res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
|
|
15144
15226
|
}
|
|
15145
|
-
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES,
|
|
15227
|
+
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command50, listen_default;
|
|
15146
15228
|
var init_listen = __esm({
|
|
15147
15229
|
"src/commands/webhooks/listen.ts"() {
|
|
15148
15230
|
"use strict";
|
|
@@ -15153,7 +15235,7 @@ var init_listen = __esm({
|
|
|
15153
15235
|
MIN_POLL_MS = 1e3;
|
|
15154
15236
|
MAX_POLL_MS = 6e4;
|
|
15155
15237
|
MAX_TRIGGER_BYTES = 1e6;
|
|
15156
|
-
|
|
15238
|
+
command50 = {
|
|
15157
15239
|
resource: "webhooks",
|
|
15158
15240
|
action: "listen",
|
|
15159
15241
|
summary: "Stream the workspace's events and forward them, signed, to a local handler",
|
|
@@ -15259,7 +15341,7 @@ var init_listen = __esm({
|
|
|
15259
15341
|
return ExitCode.Ok;
|
|
15260
15342
|
}
|
|
15261
15343
|
};
|
|
15262
|
-
listen_default =
|
|
15344
|
+
listen_default = command50;
|
|
15263
15345
|
}
|
|
15264
15346
|
});
|
|
15265
15347
|
|
|
@@ -15278,7 +15360,7 @@ function notRunning() {
|
|
|
15278
15360
|
next: LISTEN_NEXT
|
|
15279
15361
|
});
|
|
15280
15362
|
}
|
|
15281
|
-
var LISTEN_NEXT,
|
|
15363
|
+
var LISTEN_NEXT, command51, trigger_default;
|
|
15282
15364
|
var init_trigger = __esm({
|
|
15283
15365
|
"src/commands/webhooks/trigger.ts"() {
|
|
15284
15366
|
"use strict";
|
|
@@ -15287,7 +15369,7 @@ var init_trigger = __esm({
|
|
|
15287
15369
|
init_http();
|
|
15288
15370
|
init_local();
|
|
15289
15371
|
LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
|
|
15290
|
-
|
|
15372
|
+
command51 = {
|
|
15291
15373
|
resource: "webhooks",
|
|
15292
15374
|
action: "trigger",
|
|
15293
15375
|
summary: "Send a sample event of one type through the running kenso webhooks listen",
|
|
@@ -15344,7 +15426,7 @@ var init_trigger = __esm({
|
|
|
15344
15426
|
return ExitCode.Ok;
|
|
15345
15427
|
}
|
|
15346
15428
|
};
|
|
15347
|
-
trigger_default =
|
|
15429
|
+
trigger_default = command51;
|
|
15348
15430
|
}
|
|
15349
15431
|
});
|
|
15350
15432
|
|
|
@@ -15548,14 +15630,14 @@ var status_exports3 = {};
|
|
|
15548
15630
|
__export(status_exports3, {
|
|
15549
15631
|
default: () => status_default3
|
|
15550
15632
|
});
|
|
15551
|
-
var
|
|
15633
|
+
var command52, status_default3;
|
|
15552
15634
|
var init_status3 = __esm({
|
|
15553
15635
|
"src/commands/work/status.ts"() {
|
|
15554
15636
|
"use strict";
|
|
15555
15637
|
init_exit_codes();
|
|
15556
15638
|
init_http();
|
|
15557
15639
|
init_common3();
|
|
15558
|
-
|
|
15640
|
+
command52 = {
|
|
15559
15641
|
resource: "work",
|
|
15560
15642
|
action: "status",
|
|
15561
15643
|
summary: "Show the Kenso AI work waiting for your own agent, per kind",
|
|
@@ -15589,7 +15671,7 @@ var init_status3 = __esm({
|
|
|
15589
15671
|
return ExitCode.Ok;
|
|
15590
15672
|
}
|
|
15591
15673
|
};
|
|
15592
|
-
status_default3 =
|
|
15674
|
+
status_default3 = command52;
|
|
15593
15675
|
}
|
|
15594
15676
|
});
|
|
15595
15677
|
|
|
@@ -15721,9 +15803,9 @@ var init_files = __esm({
|
|
|
15721
15803
|
import { execFile, spawnSync as spawnSync2 } from "node:child_process";
|
|
15722
15804
|
import { readFileSync as readFileSync12 } from "node:fs";
|
|
15723
15805
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
15724
|
-
function sudoArgs(user,
|
|
15806
|
+
function sudoArgs(user, command60, args, keep = [], set = {}) {
|
|
15725
15807
|
const assignments = Object.entries(set).map(([name, value]) => `${name}=${value}`);
|
|
15726
|
-
return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--",
|
|
15808
|
+
return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command60, ...args];
|
|
15727
15809
|
}
|
|
15728
15810
|
function agentKensoEnv(opts) {
|
|
15729
15811
|
return {
|
|
@@ -15733,12 +15815,12 @@ function agentKensoEnv(opts) {
|
|
|
15733
15815
|
AI_AGENT: opts.agentName
|
|
15734
15816
|
};
|
|
15735
15817
|
}
|
|
15736
|
-
function sudoExec(user,
|
|
15818
|
+
function sudoExec(user, command60, args, opts = {}) {
|
|
15737
15819
|
const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
|
|
15738
15820
|
return new Promise((resolve16) => {
|
|
15739
15821
|
execFile(
|
|
15740
15822
|
sudo,
|
|
15741
|
-
[...lead, ...sudoArgs(user.name,
|
|
15823
|
+
[...lead, ...sudoArgs(user.name, command60, args)],
|
|
15742
15824
|
{ env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
|
|
15743
15825
|
(err, stdout, stderr) => {
|
|
15744
15826
|
const code = err ? err.code : 0;
|
|
@@ -15848,9 +15930,9 @@ var init_folder2 = __esm({
|
|
|
15848
15930
|
init_redact();
|
|
15849
15931
|
init_agent_user();
|
|
15850
15932
|
WorkRunFolder = class {
|
|
15851
|
-
constructor(ctx,
|
|
15933
|
+
constructor(ctx, command60, args, outDir, shared = false) {
|
|
15852
15934
|
this.ctx = ctx;
|
|
15853
|
-
this.command =
|
|
15935
|
+
this.command = command60;
|
|
15854
15936
|
this.args = args;
|
|
15855
15937
|
this.outDir = outDir;
|
|
15856
15938
|
this.shared = shared;
|
|
@@ -15965,7 +16047,7 @@ var pull_exports2 = {};
|
|
|
15965
16047
|
__export(pull_exports2, {
|
|
15966
16048
|
default: () => pull_default2
|
|
15967
16049
|
});
|
|
15968
|
-
var MAX_FILES,
|
|
16050
|
+
var MAX_FILES, command53, pull_default2;
|
|
15969
16051
|
var init_pull2 = __esm({
|
|
15970
16052
|
"src/commands/work/pull.ts"() {
|
|
15971
16053
|
"use strict";
|
|
@@ -15974,7 +16056,7 @@ var init_pull2 = __esm({
|
|
|
15974
16056
|
init_common3();
|
|
15975
16057
|
init_folder2();
|
|
15976
16058
|
MAX_FILES = 100;
|
|
15977
|
-
|
|
16059
|
+
command53 = {
|
|
15978
16060
|
resource: "work",
|
|
15979
16061
|
action: "pull",
|
|
15980
16062
|
summary: "Claim waiting work into local work files, to answer by hand",
|
|
@@ -16052,7 +16134,7 @@ var init_pull2 = __esm({
|
|
|
16052
16134
|
return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
|
|
16053
16135
|
}
|
|
16054
16136
|
};
|
|
16055
|
-
pull_default2 =
|
|
16137
|
+
pull_default2 = command53;
|
|
16056
16138
|
}
|
|
16057
16139
|
});
|
|
16058
16140
|
|
|
@@ -16194,7 +16276,7 @@ __export(submit_exports, {
|
|
|
16194
16276
|
default: () => submit_default
|
|
16195
16277
|
});
|
|
16196
16278
|
import { resolve as resolve14 } from "node:path";
|
|
16197
|
-
var
|
|
16279
|
+
var command54, submit_default;
|
|
16198
16280
|
var init_submit = __esm({
|
|
16199
16281
|
"src/commands/work/submit.ts"() {
|
|
16200
16282
|
"use strict";
|
|
@@ -16203,7 +16285,7 @@ var init_submit = __esm({
|
|
|
16203
16285
|
init_files();
|
|
16204
16286
|
init_answers();
|
|
16205
16287
|
init_common3();
|
|
16206
|
-
|
|
16288
|
+
command54 = {
|
|
16207
16289
|
resource: "work",
|
|
16208
16290
|
action: "submit",
|
|
16209
16291
|
summary: "Send answers files to Kenso and write each one's results",
|
|
@@ -16235,7 +16317,7 @@ var init_submit = __esm({
|
|
|
16235
16317
|
return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
|
|
16236
16318
|
}
|
|
16237
16319
|
};
|
|
16238
|
-
submit_default =
|
|
16320
|
+
submit_default = command54;
|
|
16239
16321
|
}
|
|
16240
16322
|
});
|
|
16241
16323
|
|
|
@@ -16256,7 +16338,7 @@ function claimIdOf(arg) {
|
|
|
16256
16338
|
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
16339
|
return arg;
|
|
16258
16340
|
}
|
|
16259
|
-
var CLAIM_ID,
|
|
16341
|
+
var CLAIM_ID, command55, release_default;
|
|
16260
16342
|
var init_release = __esm({
|
|
16261
16343
|
"src/commands/work/release.ts"() {
|
|
16262
16344
|
"use strict";
|
|
@@ -16265,7 +16347,7 @@ var init_release = __esm({
|
|
|
16265
16347
|
init_files();
|
|
16266
16348
|
init_common3();
|
|
16267
16349
|
CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
16268
|
-
|
|
16350
|
+
command55 = {
|
|
16269
16351
|
resource: "work",
|
|
16270
16352
|
action: "release",
|
|
16271
16353
|
summary: "Give claimed work back to the queue now",
|
|
@@ -16284,7 +16366,7 @@ var init_release = __esm({
|
|
|
16284
16366
|
return ExitCode.Ok;
|
|
16285
16367
|
}
|
|
16286
16368
|
};
|
|
16287
|
-
release_default =
|
|
16369
|
+
release_default = command55;
|
|
16288
16370
|
}
|
|
16289
16371
|
});
|
|
16290
16372
|
|
|
@@ -16623,12 +16705,12 @@ function plain(text4) {
|
|
|
16623
16705
|
return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
|
|
16624
16706
|
}
|
|
16625
16707
|
function runStatus(bin, args, env, adapter, runAs) {
|
|
16626
|
-
const
|
|
16708
|
+
const command60 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
|
|
16627
16709
|
const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
|
|
16628
16710
|
const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
|
|
16629
16711
|
return new Promise((resolve16) => {
|
|
16630
16712
|
execFile2(
|
|
16631
|
-
|
|
16713
|
+
command60,
|
|
16632
16714
|
commandArgs2,
|
|
16633
16715
|
{ ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
|
|
16634
16716
|
(err, stdout, stderr) => {
|
|
@@ -17710,7 +17792,7 @@ var run_exports3 = {};
|
|
|
17710
17792
|
__export(run_exports3, {
|
|
17711
17793
|
default: () => run_default2
|
|
17712
17794
|
});
|
|
17713
|
-
var FAILURES_IN_A_ROW,
|
|
17795
|
+
var FAILURES_IN_A_ROW, command56, run_default2;
|
|
17714
17796
|
var init_run3 = __esm({
|
|
17715
17797
|
"src/commands/work/run.ts"() {
|
|
17716
17798
|
"use strict";
|
|
@@ -17731,7 +17813,7 @@ var init_run3 = __esm({
|
|
|
17731
17813
|
init_folder2();
|
|
17732
17814
|
init_stop();
|
|
17733
17815
|
FAILURES_IN_A_ROW = 3;
|
|
17734
|
-
|
|
17816
|
+
command56 = {
|
|
17735
17817
|
resource: "work",
|
|
17736
17818
|
action: "run",
|
|
17737
17819
|
summary: "Run your own coding agent on the waiting work until the queue is empty",
|
|
@@ -18056,7 +18138,7 @@ var init_run3 = __esm({
|
|
|
18056
18138
|
return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
|
|
18057
18139
|
}
|
|
18058
18140
|
};
|
|
18059
|
-
run_default2 =
|
|
18141
|
+
run_default2 = command56;
|
|
18060
18142
|
}
|
|
18061
18143
|
});
|
|
18062
18144
|
|
|
@@ -18096,7 +18178,7 @@ function rewrap(err, overrides) {
|
|
|
18096
18178
|
details: err.details
|
|
18097
18179
|
});
|
|
18098
18180
|
}
|
|
18099
|
-
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE,
|
|
18181
|
+
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE, command57, keys_default;
|
|
18100
18182
|
var init_keys = __esm({
|
|
18101
18183
|
"src/commands/workspace/keys.ts"() {
|
|
18102
18184
|
"use strict";
|
|
@@ -18106,7 +18188,7 @@ var init_keys = __esm({
|
|
|
18106
18188
|
TEMPLATES = ["admin", "editor", "viewer"];
|
|
18107
18189
|
APP_NEXT_STEP = "A workspace admin can create it in the app: Settings > API keys > Workspace keys";
|
|
18108
18190
|
NOT_AVAILABLE = "Workspace keys are not available for this workspace yet.";
|
|
18109
|
-
|
|
18191
|
+
command57 = {
|
|
18110
18192
|
resource: "workspace",
|
|
18111
18193
|
action: "keys",
|
|
18112
18194
|
summary: "Create an API key the workspace owns",
|
|
@@ -18167,7 +18249,7 @@ var init_keys = __esm({
|
|
|
18167
18249
|
return ExitCode.Ok;
|
|
18168
18250
|
}
|
|
18169
18251
|
};
|
|
18170
|
-
keys_default =
|
|
18252
|
+
keys_default = command57;
|
|
18171
18253
|
}
|
|
18172
18254
|
});
|
|
18173
18255
|
|
|
@@ -18185,14 +18267,14 @@ function parseLimit(value) {
|
|
|
18185
18267
|
}
|
|
18186
18268
|
return limit;
|
|
18187
18269
|
}
|
|
18188
|
-
var MAX_LIMIT,
|
|
18270
|
+
var MAX_LIMIT, command58, list_default3;
|
|
18189
18271
|
var init_list3 = __esm({
|
|
18190
18272
|
"src/commands/workspace/list.ts"() {
|
|
18191
18273
|
"use strict";
|
|
18192
18274
|
init_errors();
|
|
18193
18275
|
init_exit_codes();
|
|
18194
18276
|
MAX_LIMIT = 200;
|
|
18195
|
-
|
|
18277
|
+
command58 = {
|
|
18196
18278
|
resource: "workspace",
|
|
18197
18279
|
action: "list",
|
|
18198
18280
|
summary: "List the workspaces your key can use",
|
|
@@ -18220,7 +18302,7 @@ var init_list3 = __esm({
|
|
|
18220
18302
|
return ExitCode.Ok;
|
|
18221
18303
|
}
|
|
18222
18304
|
};
|
|
18223
|
-
list_default3 =
|
|
18305
|
+
list_default3 = command58;
|
|
18224
18306
|
}
|
|
18225
18307
|
});
|
|
18226
18308
|
|
|
@@ -18229,7 +18311,7 @@ var use_exports = {};
|
|
|
18229
18311
|
__export(use_exports, {
|
|
18230
18312
|
default: () => use_default
|
|
18231
18313
|
});
|
|
18232
|
-
var
|
|
18314
|
+
var command59, use_default;
|
|
18233
18315
|
var init_use = __esm({
|
|
18234
18316
|
"src/commands/workspace/use.ts"() {
|
|
18235
18317
|
"use strict";
|
|
@@ -18237,7 +18319,7 @@ var init_use = __esm({
|
|
|
18237
18319
|
init_errors();
|
|
18238
18320
|
init_exit_codes();
|
|
18239
18321
|
init_http();
|
|
18240
|
-
|
|
18322
|
+
command59 = {
|
|
18241
18323
|
resource: "workspace",
|
|
18242
18324
|
action: "use",
|
|
18243
18325
|
summary: "Set the profile's default workspace",
|
|
@@ -18294,7 +18376,7 @@ var init_use = __esm({
|
|
|
18294
18376
|
return ExitCode.Ok;
|
|
18295
18377
|
}
|
|
18296
18378
|
};
|
|
18297
|
-
use_default =
|
|
18379
|
+
use_default = command59;
|
|
18298
18380
|
}
|
|
18299
18381
|
});
|
|
18300
18382
|
|
|
@@ -18864,8 +18946,8 @@ function startUpdateNotice(argv, opts = {}) {
|
|
|
18864
18946
|
if (!found) return;
|
|
18865
18947
|
writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
|
|
18866
18948
|
if (isNewer(found, version)) {
|
|
18867
|
-
const
|
|
18868
|
-
stderr.write(`kenso ${found} is out (you have ${version}): ${
|
|
18949
|
+
const command60 = updateCommand(install, opts.platform ?? process.platform);
|
|
18950
|
+
stderr.write(`kenso ${found} is out (you have ${version}): ${command60}
|
|
18869
18951
|
Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
|
|
18870
18952
|
`);
|
|
18871
18953
|
}
|