kenso 0.1.136 → 0.1.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kenso.js +311 -115
- package/dist/operations.index.json +1 -1
- package/dist/operations.json +1 -1
- package/docs/reference.md +11 -2
- package/package.json +2 -2
package/dist/kenso.js
CHANGED
|
@@ -340,14 +340,18 @@ function resolveAuth(flags, env = process.env) {
|
|
|
340
340
|
const envKey = nonEmpty(env.KENSO_API_KEY);
|
|
341
341
|
const apiKey = envKey ?? profile.apiKey;
|
|
342
342
|
const source = envKey ? "env" : profile.apiKey ? "profile" : "none";
|
|
343
|
-
const
|
|
343
|
+
const flagWorkspace = nonEmpty(flags.workspace);
|
|
344
|
+
const envWorkspace = nonEmpty(env.KENSO_WORKSPACE_ID);
|
|
345
|
+
const workspaceId = flagWorkspace ?? envWorkspace ?? profile.workspaceId;
|
|
346
|
+
const workspaceSource = flagWorkspace ? "flag" : envWorkspace ? "env" : profile.workspaceId ? "profile" : "none";
|
|
344
347
|
const apiUrl = (nonEmpty(env.KENSO_API_URL) ?? profile.apiUrl ?? DEFAULT_API_URL).replace(/\/+$/, "");
|
|
345
|
-
return { apiKey, workspaceId, apiUrl, profileName, source };
|
|
348
|
+
return { apiKey, workspaceId, workspaceSource, apiUrl, profileName, source };
|
|
346
349
|
}
|
|
347
350
|
function authWithoutConfig(flags, env = process.env) {
|
|
348
|
-
const
|
|
351
|
+
const flagWorkspace = nonEmpty(flags.workspace);
|
|
352
|
+
const envWorkspace = nonEmpty(env.KENSO_WORKSPACE_ID);
|
|
349
353
|
const apiUrl = (nonEmpty(env.KENSO_API_URL) ?? DEFAULT_API_URL).replace(/\/+$/, "");
|
|
350
|
-
return { workspaceId, apiUrl, profileName: "none", source: "none" };
|
|
354
|
+
return { workspaceId: flagWorkspace ?? envWorkspace, workspaceSource: flagWorkspace ? "flag" : envWorkspace ? "env" : "none", apiUrl, profileName: "none", source: "none" };
|
|
351
355
|
}
|
|
352
356
|
var DEFAULT_API_URL, DEFAULT_PROFILE, CONFIG_FILE, PROFILE_KEYS;
|
|
353
357
|
var init_config = __esm({
|
|
@@ -2481,7 +2485,7 @@ var VERSION;
|
|
|
2481
2485
|
var init_version = __esm({
|
|
2482
2486
|
"src/core/version.ts"() {
|
|
2483
2487
|
"use strict";
|
|
2484
|
-
VERSION = true ? "0.1.
|
|
2488
|
+
VERSION = true ? "0.1.138" : "0.0.0-dev";
|
|
2485
2489
|
}
|
|
2486
2490
|
});
|
|
2487
2491
|
|
|
@@ -7512,6 +7516,9 @@ ${STREAM_HELP}` : op.method === "GET" ? "" : op.read === true ? "\nA read: it se
|
|
|
7512
7516
|
resource: op.resource,
|
|
7513
7517
|
action: op.action,
|
|
7514
7518
|
summary: op.summary ?? `${op.method} ${op.path}`,
|
|
7519
|
+
// A manifest written before effects existed has none: a write, so read-only mode refuses it.
|
|
7520
|
+
effect: op.effect ?? "write",
|
|
7521
|
+
...op.credits ? { cost: op.credits } : {},
|
|
7515
7522
|
description: op.description ? `${helpNotes(op)}
|
|
7516
7523
|
|
|
7517
7524
|
${api}` : api,
|
|
@@ -7933,6 +7940,7 @@ var init_import = __esm({
|
|
|
7933
7940
|
action: "import",
|
|
7934
7941
|
summary: "Create accounts (companies) from a CSV or JSONL file, charged per created account; a file of people: people import",
|
|
7935
7942
|
brief: "companies, charged per new account",
|
|
7943
|
+
effect: "spend",
|
|
7936
7944
|
description: "Sends the rows to accounts.bulk-create, 100 per call. Columns map by name (case, spaces and dashes ignored) to the account fields: name (or company), domains (split on , or ;) or one domain (domain, website, companyDomain), industry, employeeCount, hqLocation, linkedinUrl, stage, angle, whyNow, fitScore, fundingRound, cadenceDays, ownerMemberId, kenCompanyId, sendsFromInboxId, sendsFromLinkedInAccountId and source. A company that is already an account is skipped (domain_taken) with that account's id. Without --yes it prints the plan with a credit estimate; research runs for each created account.",
|
|
7937
7945
|
flags: {
|
|
7938
7946
|
file: { type: "string", required: true, description: "The CSV or JSONL file, or - for stdin" },
|
|
@@ -8182,6 +8190,7 @@ var init_wait = __esm({
|
|
|
8182
8190
|
resource: "jobs",
|
|
8183
8191
|
action: "wait",
|
|
8184
8192
|
summary: "Wait for a background job and print it",
|
|
8193
|
+
effect: "read",
|
|
8185
8194
|
description: "Polls GET /v1/jobs/{jobId}?type=<type> every 2 s (every 10 s after the first minute) until the job succeeds, fails or is canceled, then prints the job. Exit 0 when it succeeded, 1 when it failed, was canceled or is still running when --timeout passes.",
|
|
8186
8195
|
flags: {
|
|
8187
8196
|
type: { type: "string", required: true, description: "The job type, for example contact_import or contact_export" },
|
|
@@ -8339,6 +8348,7 @@ function bulkUpdateCommand(target2) {
|
|
|
8339
8348
|
action: "bulk-update",
|
|
8340
8349
|
summary: `Change fields on many ${target2.plural} at once: by --ids, or everything a --filter matches`,
|
|
8341
8350
|
brief: "--filter --set",
|
|
8351
|
+
effect: "write",
|
|
8342
8352
|
description: `Calls POST /v1/${target2.resource}/bulk-update, which makes a change set: the ${target2.plural} it names and, for each, the field, its value before and its value after. Without --yes (or with --dry-run) it only previews: it prints count and a sample, writes nothing, and names the command that applies exactly those ${target2.plural}. With --yes it writes them in the background and waits. Fields for --set: ${target2.fields.join(", ")}${Object.keys(target2.aliases).length > 0 ? ` (${Object.entries(target2.aliases).map(([short, field]) => `${short} = ${field}`).join(", ")})` : ""}. A custom field is custom.<key> with a value of its type (GET /v1/fields gives the keys). ` + (target2.tags ? "--add-tag and --remove-tag put tags on or take them off (kenso tags list gives the ids); undo takes off only what the change put on. " : "") + `A value of null clears the field. A ${target2.noun} that changed after the preview is left alone and counted as a conflict. Exit 5 when some records failed or conflicted.`,
|
|
8343
8353
|
flags: {
|
|
8344
8354
|
ids: FLAGS.ids(target2),
|
|
@@ -8372,6 +8382,7 @@ function bulkDeleteCommand(target2) {
|
|
|
8372
8382
|
action: "bulk-delete",
|
|
8373
8383
|
summary: `Delete many ${target2.plural} at once: by --ids, or everything a --filter matches`,
|
|
8374
8384
|
brief: "--filter --yes",
|
|
8385
|
+
effect: "destructive",
|
|
8375
8386
|
description: `Calls POST /v1/${target2.resource}/bulk-delete, which makes a change set that lists every ${target2.noun} it would delete. Without --yes (or with --dry-run) it only previews: it prints count and a sample, deletes nothing, and names the command that deletes exactly those ${target2.plural}. With --yes it deletes them in the background and waits. Each ${target2.noun} is deleted as kenso ${target2.resource} delete deletes it, so one that cannot be deleted is counted as failed and the rest go on. ` + (target2.resource === "accounts" ? "kenso changes undo restores the accounts for 30 days. " : "A delete is not undone with kenso changes undo. ") + "Exit 5 when some records failed.",
|
|
8376
8387
|
flags: {
|
|
8377
8388
|
ids: FLAGS.ids(target2),
|
|
@@ -8498,6 +8509,7 @@ var init_merge = __esm({
|
|
|
8498
8509
|
resource: "accounts",
|
|
8499
8510
|
action: "merge",
|
|
8500
8511
|
summary: "Merge an account into the one you keep. --dry-run shows what would change and writes nothing",
|
|
8512
|
+
effect: "destructive",
|
|
8501
8513
|
description: "Sends POST /v1/accounts/{accountId}/merge with intoAccountId, the account to keep. The kept account keeps every field a person set and takes the merged account's value where its own is blank; domains, people, deals, touches, research and tags move to it. A merge cannot be undone. With --dry-run the API runs the merge, answers mergeSummary (fieldChanges with the value before and after, and the counts moved) and rolls it back: nothing is written. A real merge answers the kept account with the same mergeSummary and its mergeId, which `kenso accounts merges <mergeId>` opens later with the merged account's values as they were.",
|
|
8502
8514
|
flags: {
|
|
8503
8515
|
into: { type: "string", description: "The id of the account to keep" },
|
|
@@ -8748,6 +8760,7 @@ var init_duplicates = __esm({
|
|
|
8748
8760
|
resource: "accounts",
|
|
8749
8761
|
action: "duplicates",
|
|
8750
8762
|
summary: "List the account pairs that look like duplicates. --scan looks for new pairs first",
|
|
8763
|
+
effect: "write",
|
|
8751
8764
|
description: "Reads GET /v1/account-duplicates: each pair with both accounts (account and otherAccount: name, domain, stage, owner, last touch), why they were paired (reasons: domain, linkedin, name) and isCertain (same domain and same name, the pairs Ken merges itself where that is on; heldReason says why Ken left one). --status picks open (the default), dismissed or merged. --scan sends POST /v1/account-duplicates/scan first, which compares every account of the workspace and needs a plan with accounts. Merge a pair with `kenso accounts merge <accountId> --into <id>`, or answer that it is not a duplicate with `kenso account-duplicates dismiss --duplicate-id <duplicateId>`.",
|
|
8752
8765
|
flags: {
|
|
8753
8766
|
status: { type: "string", description: "open (default), dismissed or merged" },
|
|
@@ -8821,6 +8834,7 @@ var init_merges = __esm({
|
|
|
8821
8834
|
resource: "accounts",
|
|
8822
8835
|
action: "merges",
|
|
8823
8836
|
summary: "List the account merges, newest first, or open one with the merged account's values as they were",
|
|
8837
|
+
effect: "read",
|
|
8824
8838
|
description: "`kenso accounts merges list` reads GET /v1/account-merges: each merge with the kept and the merged-away account, who merged, when and what moved. --merged-by system shows the merges Ken made itself of certain duplicates (same domain and same name). `kenso accounts merges <mergeId>` reads GET /v1/account-merges/{mergeId}, which adds mergedValues: the merged-away account before the merge (name, domains, stage, owner, tier, firmographics, custom fields), the values to copy back by hand when a merge was wrong.",
|
|
8825
8839
|
flags: {
|
|
8826
8840
|
"merged-by": { type: "string", description: "user, agent, api_key, workflow or system (Ken's own merges)" },
|
|
@@ -9357,6 +9371,7 @@ var init_install = __esm({
|
|
|
9357
9371
|
action: "install",
|
|
9358
9372
|
summary: "Install the kenso-cli skill for Claude Code, Codex, Cursor, Gemini CLI or OpenCode",
|
|
9359
9373
|
brief: "",
|
|
9374
|
+
effect: "read",
|
|
9360
9375
|
description: "Writes the Agent Skill bundled with this CLI to SKILL.md in each agent's skills folder: ~/.claude/skills/kenso-cli (Claude Code; $CLAUDE_CONFIG_DIR/skills when that is set), ~/.agents/skills/kenso-cli (Codex), ~/.cursor/skills/kenso-cli (Cursor), ~/.gemini/skills/kenso-cli (Gemini CLI) and ~/.config/opencode/skills/kenso-cli (OpenCode). The default client is the coding agent running the command when it is Claude Code, Codex or Cursor, else all of them. --dir writes into that folder instead. A different SKILL.md already there is replaced only with --force (exit 7 without it). --dry-run prints the plan and writes nothing. To also connect the Kenso MCP server: kenso agent setup.",
|
|
9361
9376
|
flags: {
|
|
9362
9377
|
client: { type: "string", description: "claude-code, codex, cursor, gemini, opencode or all (default: the detected agent, else all)" },
|
|
@@ -9657,6 +9672,7 @@ var init_setup = __esm({
|
|
|
9657
9672
|
action: "setup",
|
|
9658
9673
|
summary: "Set up a coding agent for Kenso: the kenso-cli skill and the Kenso MCP server",
|
|
9659
9674
|
brief: "",
|
|
9675
|
+
effect: "read",
|
|
9660
9676
|
description: "Installs the kenso-cli Agent Skill (as kenso skill install does) and registers the Kenso MCP server (https://mcp.ken.so/mcp, or KENSO_MCP_URL) with Claude Code, Codex, Cursor, Gemini CLI or OpenCode. Claude Code, Codex and Gemini CLI register it with their own mcp add command at user scope; Cursor's ~/.cursor/mcp.json and OpenCode's opencode.json get the entry written. An MCP entry with the same URL under another name counts as registered; a kenso entry with another URL is left alone (status conflict). The default client is the coding agent running the command, else every one found on this machine. Without --yes it prints the plan and changes nothing. --status reports what is set up for every client and changes nothing. The person signs in to the MCP server once in the agent (OAuth in the browser): each client's next says how. Exits 1 when a client could not be set up, and 7 when a different SKILL.md is in the way without --force.",
|
|
9661
9677
|
flags: {
|
|
9662
9678
|
client: { type: "string", description: "claude-code, codex, cursor, gemini, opencode or all (default: the detected agent, else every one found)" },
|
|
@@ -9796,6 +9812,7 @@ var init_api3 = __esm({
|
|
|
9796
9812
|
action: "",
|
|
9797
9813
|
summary: "Call any API route, only when no command fits",
|
|
9798
9814
|
brief: "only when no command fits",
|
|
9815
|
+
effect: "destructive",
|
|
9799
9816
|
description: "The raw escape hatch: sends Authorization, Ken-Version: 1.1 and X-Ken-Workspace-Id, prints the full JSON body. It reaches the legacy routes that have no command. The path may carry a query string. --all (GET only) follows pagination.nextCursor and prints the data[] items as a list. --file sends a multipart upload. An answer that is not JSON (a CSV, an image, a ZIP) prints as it came; --out saves it byte for byte, and a binary one is never printed to a terminal. POST, PUT and PATCH send at once; DELETE needs --yes (on a terminal it asks). --dry-run prints the request (method, path, body) and sends nothing.",
|
|
9800
9817
|
flags: {
|
|
9801
9818
|
data: { type: "string", description: "Request body: inline JSON, @file or - for stdin. With --file, its keys are form fields" },
|
|
@@ -10181,6 +10198,7 @@ var init_login = __esm({
|
|
|
10181
10198
|
action: "login",
|
|
10182
10199
|
summary: "Log in through the browser, or save an API key from stdin with --with-key",
|
|
10183
10200
|
brief: "--with-key reads the key from stdin",
|
|
10201
|
+
effect: "read",
|
|
10184
10202
|
description: "With --with-key, reads one API key from stdin, checks it with GET /v1/me and saves it to the profile (--profile, KENSO_PROFILE or the active one) in ~/.kenso/config.json with mode 0600. The workspace is --workspace when the key can reach it, else the key's only workspace (a developer sandbox counts only when every workspace is one). The key is never a flag value: to use a key from an environment variable, pipe the variable in as the first example shows (an empty or malformed key is refused, exit 2, without printing it).",
|
|
10185
10203
|
flags: {
|
|
10186
10204
|
"with-key": { type: "boolean", description: "Read the API key from stdin" },
|
|
@@ -10324,6 +10342,7 @@ var init_logout = __esm({
|
|
|
10324
10342
|
resource: "auth",
|
|
10325
10343
|
action: "logout",
|
|
10326
10344
|
summary: "Remove a saved profile, and revoke the key browser login made",
|
|
10345
|
+
effect: "destructive",
|
|
10327
10346
|
description: "Removes the profile (--profile, KENSO_PROFILE or the active one) from ~/.kenso/config.json. When browser login made its key, it revokes that key first (--keep-key keeps it valid); if the revoke fails it warns and still removes the profile. A key saved with --with-key stays valid: revoke it at Settings > Integrations > API keys.",
|
|
10328
10347
|
flags: {
|
|
10329
10348
|
"keep-key": { type: "boolean", description: "Remove the profile but leave its key valid" }
|
|
@@ -10366,6 +10385,7 @@ var init_status = __esm({
|
|
|
10366
10385
|
resource: "auth",
|
|
10367
10386
|
action: "status",
|
|
10368
10387
|
summary: "Show the key's user, workspace and expiry",
|
|
10388
|
+
effect: "read",
|
|
10369
10389
|
description: `Reads GET /v1/me for the email and workspaces, and GET /v1/api-keys for the key's expiry. Warns on stderr when the key expires within ${EXPIRY_WARNING_DAYS} days. A sandbox test key (kenso_test_) adds keyKind "test" and the sandbox it works in.`,
|
|
10370
10390
|
flags: {},
|
|
10371
10391
|
examples: ["kenso auth status", "kenso auth status --profile client-a"],
|
|
@@ -10473,6 +10493,7 @@ var init_status2 = __esm({
|
|
|
10473
10493
|
resource: "capture",
|
|
10474
10494
|
action: "status",
|
|
10475
10495
|
summary: "Show your captured mailbox, its backfill progress and what teammates see of a captured email",
|
|
10496
|
+
effect: "read",
|
|
10476
10497
|
description: "Reads GET /v1/capture and prints it. mailbox is your own captured mailbox, or null when capture is not on for you: provider (google, microsoft), email, status (catching_up while the 90-day backfill runs, active, reconnect_needed, failed), failureReason, isPrivate (teammates see none of its email; meetings stay visible), connectedAt, lastSyncedAt and backfill (from, coveredFrom, isDone, messagesRead, messagesLogged). connection is the Google or Microsoft account you connected in Kenso with email access, or null: connect one in the app first. teammatesSee is summary (teammates read subject, people, time and Ken's summary; only the mailbox owner opens the body) or full_email. A workspace admin also gets members: every member's mailbox status, never mail. Needs an API key bound to a member (kenso auth login creates one).",
|
|
10477
10498
|
flags: {},
|
|
10478
10499
|
examples: ["kenso capture status", "kenso capture status --query 'mailbox.{status: status, read: backfill.messagesRead, logged: backfill.messagesLogged}'"],
|
|
@@ -10524,6 +10545,7 @@ var init_connect2 = __esm({
|
|
|
10524
10545
|
resource: "capture",
|
|
10525
10546
|
action: "connect",
|
|
10526
10547
|
summary: "Turn capture on for your own mailbox",
|
|
10548
|
+
effect: "write",
|
|
10527
10549
|
description: "Sends PUT /v1/capture/mailbox. Kenso then logs your email with people in Kenso on the person, the account and its open deals, starting with the newest mail and going back 90 days; kenso capture status shows the progress. Running it again changes nothing. It uses the Google or Microsoft account you connected in Kenso with email access. With none, the answer is mailbox_not_connected: run it with --provider to get a sign-in link (POST /v1/calendar-accounts/connect-sessions), open the link, sign in, then run kenso capture connect again. other_mailbox_connected means your captured mailbox needs its sign-in again and the account connected now is another one: sign in to the captured mailbox again, or run kenso capture disconnect and then connect. --dry-run prints the PUT and turns nothing on.",
|
|
10528
10550
|
flags: {
|
|
10529
10551
|
private: { type: "boolean", description: "Start with the Private switch on: teammates see none of this mailbox's email" },
|
|
@@ -10601,6 +10623,7 @@ var init_thread = __esm({
|
|
|
10601
10623
|
resource: "capture",
|
|
10602
10624
|
action: "thread",
|
|
10603
10625
|
summary: "Read one captured email thread",
|
|
10626
|
+
effect: "read",
|
|
10604
10627
|
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), holders (the members whose mailbox holds a message shown, most first, you included; a private mailbox is never named) 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.",
|
|
10605
10628
|
flags: {},
|
|
10606
10629
|
positionals: [{ name: "threadId", required: true, description: "The captured thread id (capturedThread.id on a timeline row)" }],
|
|
@@ -10636,6 +10659,7 @@ var init_private = __esm({
|
|
|
10636
10659
|
resource: "capture",
|
|
10637
10660
|
action: "private",
|
|
10638
10661
|
summary: "Hide your captured email from teammates, or show it again",
|
|
10662
|
+
effect: "write",
|
|
10639
10663
|
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. --dry-run prints the PATCH and changes nothing.",
|
|
10640
10664
|
flags: {
|
|
10641
10665
|
thread: { type: "string", description: "Set the switch for this one captured thread (its id), not the whole mailbox" }
|
|
@@ -10679,6 +10703,7 @@ var init_sync3 = __esm({
|
|
|
10679
10703
|
resource: "capture",
|
|
10680
10704
|
action: "sync",
|
|
10681
10705
|
summary: "Read your captured mailbox now",
|
|
10706
|
+
effect: "write",
|
|
10682
10707
|
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. --dry-run prints the POST and reads nothing.",
|
|
10683
10708
|
flags: {},
|
|
10684
10709
|
examples: ["kenso capture sync", "kenso capture sync --query '{outcome: outcome, logged: messagesLogged, more: hasMore}'"],
|
|
@@ -10712,6 +10737,7 @@ var init_disconnect = __esm({
|
|
|
10712
10737
|
resource: "capture",
|
|
10713
10738
|
action: "disconnect",
|
|
10714
10739
|
summary: "Turn capture off for your own mailbox and delete its stored email bodies",
|
|
10740
|
+
effect: "destructive",
|
|
10715
10741
|
description: "Sends DELETE /v1/capture/mailbox. Sync stops and Kenso deletes the stored body of every email only your mailbox holds. Subject, people, time and Ken's summary stay on the records. Your Google or Microsoft account stays connected for calendar and scheduling. Deleted bodies do not come back, so it asks first: add --yes to run it without the question. --dry-run prints the DELETE and deletes nothing.",
|
|
10716
10742
|
flags: {},
|
|
10717
10743
|
examples: ["kenso capture disconnect --dry-run", "kenso capture disconnect --yes"],
|
|
@@ -10748,6 +10774,7 @@ var init_teammates_see = __esm({
|
|
|
10748
10774
|
resource: "capture",
|
|
10749
10775
|
action: "teammates-see",
|
|
10750
10776
|
summary: "Pick what teammates see of captured email: the summary, or the full email (workspace admin)",
|
|
10777
|
+
effect: "write",
|
|
10751
10778
|
description: "Sends PATCH /v1/capture with teammatesSee. summary (the default): teammates read subject, people, time and Ken's summary, and only the mailbox owner opens the body. full_email: every member can open a captured body. It applies to every read from then on, mail already captured included. A member's Private switch still hides their email either way. Only a workspace admin can change it. --dry-run prints the PATCH and changes nothing.",
|
|
10752
10779
|
flags: {},
|
|
10753
10780
|
positionals: [{ name: "value", required: true, description: "summary or full_email" }],
|
|
@@ -10862,6 +10889,7 @@ complete -c kenso -f -a '(__kenso_complete)'
|
|
|
10862
10889
|
action: "",
|
|
10863
10890
|
summary: "Print the tab-completion script for bash, zsh or fish",
|
|
10864
10891
|
brief: "",
|
|
10892
|
+
effect: "read",
|
|
10865
10893
|
description: "Prints a script that makes Tab complete kenso's resources, actions and flags. The script asks kenso for the candidates on each Tab, so it stays right as kenso updates: install it once.",
|
|
10866
10894
|
flags: {},
|
|
10867
10895
|
positionals: [{ name: "shell", required: true, description: "bash, zsh or fish" }],
|
|
@@ -11390,6 +11418,7 @@ function connectCommand(kind) {
|
|
|
11390
11418
|
resource: "connect",
|
|
11391
11419
|
action: kind.name,
|
|
11392
11420
|
summary: kind.summary,
|
|
11421
|
+
effect: KIND_EFFECTS[kind.name] ?? "write",
|
|
11393
11422
|
description: `${kind.description}
|
|
11394
11423
|
|
|
11395
11424
|
The connect finishes in a browser: Kenso refuses to complete a sign-in for an API key or an agent, so the person you work for opens the link. It prints the link on stderr (and opens it at a desktop when no coding agent runs it), checks every ${POLL_INTERVAL_MS / 1e3} s, and prints {connected, kind, connection} on stdout once the connection shows up. --no-wait prints the start answer, link included, and ends.`,
|
|
@@ -11400,7 +11429,7 @@ The connect finishes in a browser: Kenso refuses to complete a sign-in for an AP
|
|
|
11400
11429
|
run: (ctx, args) => runConnect(ctx, kind, args.flags)
|
|
11401
11430
|
};
|
|
11402
11431
|
}
|
|
11403
|
-
var POLL_INTERVAL_MS, DEFAULT_TIMEOUT_SECONDS, MAX_POLL_FAILURES, LINK_FIELDS, defaultDeps2, COMMON_FLAGS;
|
|
11432
|
+
var POLL_INTERVAL_MS, DEFAULT_TIMEOUT_SECONDS, MAX_POLL_FAILURES, LINK_FIELDS, defaultDeps2, COMMON_FLAGS, KIND_EFFECTS;
|
|
11404
11433
|
var init_run = __esm({
|
|
11405
11434
|
"src/commands/connect/run.ts"() {
|
|
11406
11435
|
"use strict";
|
|
@@ -11428,6 +11457,7 @@ var init_run = __esm({
|
|
|
11428
11457
|
"no-wait": { type: "boolean", description: "Print the link as JSON and end, without waiting for the connection" },
|
|
11429
11458
|
"no-browser": { type: "boolean", description: "Print the link only; never open a browser" }
|
|
11430
11459
|
};
|
|
11460
|
+
KIND_EFFECTS = { linkedin: "spend", whatsapp: "spend", video: "read", github: "read" };
|
|
11431
11461
|
}
|
|
11432
11462
|
});
|
|
11433
11463
|
|
|
@@ -11447,6 +11477,45 @@ var init_connect3 = __esm({
|
|
|
11447
11477
|
}
|
|
11448
11478
|
});
|
|
11449
11479
|
|
|
11480
|
+
// src/core/estimate.ts
|
|
11481
|
+
function isRecord8(value) {
|
|
11482
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
11483
|
+
}
|
|
11484
|
+
function mustRethrow(err) {
|
|
11485
|
+
return err instanceof KensoError && (err.exitCode === ExitCode.Auth || err.exitCode === ExitCode.Interrupted);
|
|
11486
|
+
}
|
|
11487
|
+
async function ask(ctx, path, body2, read2) {
|
|
11488
|
+
try {
|
|
11489
|
+
const res = await ctx.client.request({ method: "POST", path, body: body2 });
|
|
11490
|
+
const data = unwrap(res.body);
|
|
11491
|
+
if (!isRecord8(data)) return { estimate: data ?? null };
|
|
11492
|
+
const estimate = Object.fromEntries(Object.entries(data).filter(([key]) => key !== "totalAmount" && !/usd/i.test(key)));
|
|
11493
|
+
return { estimate, credits: await read2(data) };
|
|
11494
|
+
} catch (err) {
|
|
11495
|
+
if (mustRethrow(err)) throw err;
|
|
11496
|
+
ctx.output.warn(`Could not estimate the credits: ${err instanceof Error ? err.message : String(err)}`);
|
|
11497
|
+
return { estimate: null, estimateError: err instanceof KensoError ? { code: err.code, message: err.message } : { message: String(err) } };
|
|
11498
|
+
}
|
|
11499
|
+
}
|
|
11500
|
+
async function creditEstimate(ctx, body2) {
|
|
11501
|
+
return ask(ctx, "/v1/credits/estimates", body2, (data) => {
|
|
11502
|
+
const credits = (key) => typeof data[key] === "number" ? data[key] / 1e3 : null;
|
|
11503
|
+
return {
|
|
11504
|
+
needed: credits("totalMillicredits"),
|
|
11505
|
+
available: credits("availableMillicredits"),
|
|
11506
|
+
sufficient: typeof data.sufficient === "boolean" ? data.sufficient : null
|
|
11507
|
+
};
|
|
11508
|
+
});
|
|
11509
|
+
}
|
|
11510
|
+
var init_estimate2 = __esm({
|
|
11511
|
+
"src/core/estimate.ts"() {
|
|
11512
|
+
"use strict";
|
|
11513
|
+
init_errors();
|
|
11514
|
+
init_exit_codes();
|
|
11515
|
+
init_http();
|
|
11516
|
+
}
|
|
11517
|
+
});
|
|
11518
|
+
|
|
11450
11519
|
// src/commands/contacts/normalize.ts
|
|
11451
11520
|
function normalizeVariableName(name) {
|
|
11452
11521
|
if (name === null || name === void 0 || name.trim() === "") return "";
|
|
@@ -12069,23 +12138,6 @@ async function readCampaign(ctx, campaignId) {
|
|
|
12069
12138
|
const channel = isRecord4(campaign) && typeof campaign.channel === "string" ? campaign.channel.toLowerCase() : "";
|
|
12070
12139
|
return { linkedInOnly: LINKEDIN_ONLY_CHANNELS.has(channel) ? true : void 0 };
|
|
12071
12140
|
}
|
|
12072
|
-
async function estimate(ctx, leadCount) {
|
|
12073
|
-
if (leadCount === 0) return { estimate: null };
|
|
12074
|
-
try {
|
|
12075
|
-
const res = await ctx.client.request({ method: "POST", path: "/v1/credits/estimates", body: { kind: "leads", leadCount } });
|
|
12076
|
-
const data = unwrap(res.body);
|
|
12077
|
-
if (!isRecord4(data)) return { estimate: data ?? null };
|
|
12078
|
-
const credits = (key) => typeof data[key] === "number" ? data[key] / 1e3 : void 0;
|
|
12079
|
-
return {
|
|
12080
|
-
estimate: data,
|
|
12081
|
-
credits: { needed: credits("totalMillicredits"), available: credits("availableMillicredits"), sufficient: data.sufficient }
|
|
12082
|
-
};
|
|
12083
|
-
} catch (err) {
|
|
12084
|
-
if (err instanceof KensoError && (err.exitCode === ExitCode.Auth || err.exitCode === ExitCode.Interrupted)) throw err;
|
|
12085
|
-
ctx.output.warn(`Could not estimate the credits: ${err instanceof Error ? err.message : String(err)}`);
|
|
12086
|
-
return { estimate: null, estimateError: err instanceof KensoError ? { code: err.code, message: err.message } : { message: String(err) } };
|
|
12087
|
-
}
|
|
12088
|
-
}
|
|
12089
12141
|
function summarize2(campaignId) {
|
|
12090
12142
|
return (results) => ({
|
|
12091
12143
|
campaignId,
|
|
@@ -12099,6 +12151,7 @@ var init_import2 = __esm({
|
|
|
12099
12151
|
init_engine();
|
|
12100
12152
|
init_input2();
|
|
12101
12153
|
init_errors();
|
|
12154
|
+
init_estimate2();
|
|
12102
12155
|
init_exit_codes();
|
|
12103
12156
|
init_http();
|
|
12104
12157
|
init_input();
|
|
@@ -12116,6 +12169,7 @@ var init_import2 = __esm({
|
|
|
12116
12169
|
action: "import",
|
|
12117
12170
|
summary: "Add leads from a CSV or JSONL file to a campaign",
|
|
12118
12171
|
brief: "a file into a campaign",
|
|
12172
|
+
effect: "spend",
|
|
12119
12173
|
description: "Maps columns by header (email, firstName, lastName, title, linkedInUrl, companyName, companyDomain; every other column becomes a custom variable), checks every row locally, then sends 1,000 rows per call to POST /v1/campaigns/{campaignId}/contacts. Without --yes it prints the plan and the credit estimate. Rerunning the same command on the same file resumes the run. Exit 5 when some rows failed or were invalid, 6 when the contact limit stopped the run.",
|
|
12120
12174
|
flags: {
|
|
12121
12175
|
campaign: { type: "string", description: "The campaign id (required unless --template)", aliases: ["campaign-id"] },
|
|
@@ -12177,7 +12231,7 @@ var init_import2 = __esm({
|
|
|
12177
12231
|
...Object.keys(mapping.dropped).length > 0 ? { droppedColumns: mapping.dropped } : {},
|
|
12178
12232
|
...emailLess > 0 ? { emailLessRows: emailLess } : {}
|
|
12179
12233
|
};
|
|
12180
|
-
if (dryRun2) Object.assign(dryRunExtra, await
|
|
12234
|
+
if (dryRun2) Object.assign(dryRunExtra, items.length === 0 ? { estimate: null } : await creditEstimate(ctx, { kind: "leads", leadCount: items.length }));
|
|
12181
12235
|
const outcome = await runBatch(
|
|
12182
12236
|
{
|
|
12183
12237
|
command: "contacts import",
|
|
@@ -12324,6 +12378,7 @@ var init_update = __esm({
|
|
|
12324
12378
|
action: "update",
|
|
12325
12379
|
summary: "Edit leads from a CSV or JSONL file, by id or email (also one lead)",
|
|
12326
12380
|
brief: "a file, by id or email; also one lead",
|
|
12381
|
+
effect: "write",
|
|
12327
12382
|
description: "Matches each row to a contact by its id (--match id, an id or contactId column) or by email within a campaign (--match email --campaign <id>), then sends 1,000 items per call to POST /v1/contacts/bulk-update. A column that is absent or a blank cell leaves the field unchanged; the literal null clears it. Other columns are custom variables. Without --yes it prints the plan. Exit 5 when some rows failed or were not found.",
|
|
12328
12383
|
flags: {
|
|
12329
12384
|
file: { type: "string", description: "CSV (with a header row) or JSONL file, or - for stdin" },
|
|
@@ -12608,6 +12663,7 @@ function bulkCommand(kind) {
|
|
|
12608
12663
|
action: kind,
|
|
12609
12664
|
summary: kind === "restore" ? `${route.verb} contacts by --ids or by a remove run (--run)` : `${route.verb} contacts by --ids file or --where filters`,
|
|
12610
12665
|
brief: kind === "restore" ? "--ids or --run" : "--ids file or --where, no search first",
|
|
12666
|
+
effect: kind === "remove" ? "destructive" : kind === "resume" ? "send" : "write",
|
|
12611
12667
|
description: `Sends the ids to POST ${route.path} in chunks of 1,000 and reports each id: ok, skipped (nothing to do), not_found or failed. Ids come from --ids` + (kind === "restore" ? " or from an earlier remove run (--run <runId>)" : " or from a contacts search (--where); a rerun of an unfinished --where run keeps its ids") + ". Without --yes it prints the count and the first ids." + (kind === "remove" ? " More than 1,000 ids also needs --confirm <count>. The summary prints the undo command." : ""),
|
|
12612
12668
|
flags,
|
|
12613
12669
|
examples: [
|
|
@@ -12773,6 +12829,7 @@ function tagCommand(kind) {
|
|
|
12773
12829
|
action: kind,
|
|
12774
12830
|
summary: `${kind === "tag" ? "Add a tag to" : "Remove a tag from"} contacts by --ids only (a campaign: list its ids first)`,
|
|
12775
12831
|
brief: "--ids only",
|
|
12832
|
+
effect: kind === "tag" ? "write" : "destructive",
|
|
12776
12833
|
description: `Sends the ids to POST /v1/tags/{tagId}/assignments/${kind === "tag" ? "bulk-create" : "bulk-delete"}, 250 per call. Ids come one per line, or from a CSV/JSONL with an id column. Without --yes it prints the count. Exit 5 when some ids failed or were not found.`,
|
|
12777
12834
|
flags: {
|
|
12778
12835
|
tag: { type: "string", description: "The tag id (see kenso tags list)", aliases: ["tag-id"] },
|
|
@@ -12891,6 +12948,7 @@ var init_export = __esm({
|
|
|
12891
12948
|
action: "export",
|
|
12892
12949
|
summary: "Export a campaign's contacts to CSV (a segment: contact-exports create)",
|
|
12893
12950
|
brief: "a campaign to CSV; a segment: contact-exports create",
|
|
12951
|
+
effect: "write",
|
|
12894
12952
|
description: "Creates a contact export of the campaign (POST /v1/contact-exports, kind contacts), waits for the contact_export job, then downloads GET /v1/contact-exports/{exportId}/content to --out. Without --out it prints the job (add --wait to wait for it).",
|
|
12895
12953
|
flags: {
|
|
12896
12954
|
campaign: { type: "string", description: "The campaign id", aliases: ["campaign-id"] },
|
|
@@ -12968,6 +13026,15 @@ var init_contacts = __esm({
|
|
|
12968
13026
|
}
|
|
12969
13027
|
});
|
|
12970
13028
|
|
|
13029
|
+
// src/commands/credits/index.ts
|
|
13030
|
+
var actions9;
|
|
13031
|
+
var init_credits = __esm({
|
|
13032
|
+
"src/commands/credits/index.ts"() {
|
|
13033
|
+
"use strict";
|
|
13034
|
+
actions9 = {};
|
|
13035
|
+
}
|
|
13036
|
+
});
|
|
13037
|
+
|
|
12971
13038
|
// src/commands/dashboards/show.ts
|
|
12972
13039
|
var show_exports = {};
|
|
12973
13040
|
__export(show_exports, {
|
|
@@ -12984,6 +13051,7 @@ var init_show = __esm({
|
|
|
12984
13051
|
resource: "dashboards",
|
|
12985
13052
|
action: "show",
|
|
12986
13053
|
summary: "Run a dashboard's charts and print their numbers",
|
|
13054
|
+
effect: "read",
|
|
12987
13055
|
description: "Reads GET /v1/dashboards/{dashboardId}?include=results and prints one row per chart bucket: the chart's id and title, the bucket's label, the measure the chart draws (valueKey) and its value. Amounts are in the workspace currency. The dashboard's name, each chart's total and any chart that could not run are printed to stderr. The numbers cover the deals you may read. --full prints the whole answer as one object, each chart with its stored report or query and its full result. List dashboards with kenso dashboards list.",
|
|
12988
13056
|
flags: {
|
|
12989
13057
|
"time-zone": { type: "string", description: "IANA zone days start in when you have no app time zone (default UTC)" },
|
|
@@ -13039,11 +13107,11 @@ var init_show = __esm({
|
|
|
13039
13107
|
});
|
|
13040
13108
|
|
|
13041
13109
|
// src/commands/dashboards/index.ts
|
|
13042
|
-
var
|
|
13110
|
+
var actions10;
|
|
13043
13111
|
var init_dashboards = __esm({
|
|
13044
13112
|
"src/commands/dashboards/index.ts"() {
|
|
13045
13113
|
"use strict";
|
|
13046
|
-
|
|
13114
|
+
actions10 = {
|
|
13047
13115
|
show: () => Promise.resolve().then(() => (init_show(), show_exports)).then((m) => m.default)
|
|
13048
13116
|
};
|
|
13049
13117
|
}
|
|
@@ -13175,6 +13243,7 @@ var init_describe = __esm({
|
|
|
13175
13243
|
action: "",
|
|
13176
13244
|
summary: "The command map as JSON: commands, flags, body schemas",
|
|
13177
13245
|
brief: "",
|
|
13246
|
+
effect: "read",
|
|
13178
13247
|
description: "Always JSON. No arguments: every command with its summary. A resource: its commands with their flags. A resource and an action: one command in full (method, path, flags, body schema, examples). Beta commands your workspace has not enabled are left out unless --all-commands; calling one still works.",
|
|
13179
13248
|
flags: {
|
|
13180
13249
|
// Used by scripts/build-reference.ts to write docs/reference.md in one call.
|
|
@@ -13216,16 +13285,25 @@ var init_describe = __esm({
|
|
|
13216
13285
|
});
|
|
13217
13286
|
|
|
13218
13287
|
// src/commands/describe/index.ts
|
|
13219
|
-
var
|
|
13288
|
+
var actions11;
|
|
13220
13289
|
var init_describe2 = __esm({
|
|
13221
13290
|
"src/commands/describe/index.ts"() {
|
|
13222
13291
|
"use strict";
|
|
13223
|
-
|
|
13292
|
+
actions11 = {
|
|
13224
13293
|
"": () => Promise.resolve().then(() => (init_describe(), describe_exports)).then((m) => m.default)
|
|
13225
13294
|
};
|
|
13226
13295
|
}
|
|
13227
13296
|
});
|
|
13228
13297
|
|
|
13298
|
+
// src/commands/discover/index.ts
|
|
13299
|
+
var actions12;
|
|
13300
|
+
var init_discover = __esm({
|
|
13301
|
+
"src/commands/discover/index.ts"() {
|
|
13302
|
+
"use strict";
|
|
13303
|
+
actions12 = {};
|
|
13304
|
+
}
|
|
13305
|
+
});
|
|
13306
|
+
|
|
13229
13307
|
// src/commands/docs/docs.ts
|
|
13230
13308
|
var docs_exports = {};
|
|
13231
13309
|
__export(docs_exports, {
|
|
@@ -13248,6 +13326,7 @@ var init_docs = __esm({
|
|
|
13248
13326
|
action: "",
|
|
13249
13327
|
summary: "Offline docs: the topic list, or one topic",
|
|
13250
13328
|
brief: "",
|
|
13329
|
+
effect: "read",
|
|
13251
13330
|
description: "Without a topic, lists the topics with one line each (NDJSON when piped). With a topic, prints that page's Markdown to stdout. The same pages are in the package's docs/ folder.",
|
|
13252
13331
|
flags: {},
|
|
13253
13332
|
positionals: [{ name: "topic", description: `One of ${NAMES}` }],
|
|
@@ -13289,11 +13368,11 @@ var init_docs = __esm({
|
|
|
13289
13368
|
});
|
|
13290
13369
|
|
|
13291
13370
|
// src/commands/docs/index.ts
|
|
13292
|
-
var
|
|
13371
|
+
var actions13;
|
|
13293
13372
|
var init_docs2 = __esm({
|
|
13294
13373
|
"src/commands/docs/index.ts"() {
|
|
13295
13374
|
"use strict";
|
|
13296
|
-
|
|
13375
|
+
actions13 = {
|
|
13297
13376
|
"": () => Promise.resolve().then(() => (init_docs(), docs_exports)).then((m) => m.default)
|
|
13298
13377
|
};
|
|
13299
13378
|
}
|
|
@@ -13322,7 +13401,7 @@ function configCheck(env) {
|
|
|
13322
13401
|
const octal = mode.toString(8).padStart(4, "0");
|
|
13323
13402
|
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}` };
|
|
13324
13403
|
}
|
|
13325
|
-
var MIN_NODE_MAJOR, command26,
|
|
13404
|
+
var MIN_NODE_MAJOR, command26, actions14;
|
|
13326
13405
|
var init_doctor = __esm({
|
|
13327
13406
|
"src/commands/doctor/index.ts"() {
|
|
13328
13407
|
"use strict";
|
|
@@ -13336,6 +13415,7 @@ var init_doctor = __esm({
|
|
|
13336
13415
|
action: "",
|
|
13337
13416
|
summary: "Check Node, the config, the API and the key",
|
|
13338
13417
|
brief: "",
|
|
13418
|
+
effect: "read",
|
|
13339
13419
|
description: "Prints the version, Node, platform, config location, profile, key source, API URL, workspace and detected agent, plus checks node_version, config_permissions, api_reachable and key_valid. Exits 0 when every check passes, 3 when the key check fails, else 1.",
|
|
13340
13420
|
flags: {},
|
|
13341
13421
|
examples: ["kenso doctor", "kenso doctor --profile client-a --output json"],
|
|
@@ -13395,7 +13475,7 @@ var init_doctor = __esm({
|
|
|
13395
13475
|
return keyFailed ? ExitCode.Auth : ExitCode.Error;
|
|
13396
13476
|
}
|
|
13397
13477
|
};
|
|
13398
|
-
|
|
13478
|
+
actions14 = {
|
|
13399
13479
|
"": async () => command26
|
|
13400
13480
|
};
|
|
13401
13481
|
}
|
|
@@ -13498,6 +13578,7 @@ var init_export2 = __esm({
|
|
|
13498
13578
|
action: "",
|
|
13499
13579
|
summary: "Export accounts, people or deals as CSV: everything, a saved view, or what the filters match",
|
|
13500
13580
|
brief: "<accounts|people|deals> [--view <id>] [--out <file>]",
|
|
13581
|
+
effect: "write",
|
|
13501
13582
|
description: "Writes the CSV that POST /v1/accounts/export, /v1/people/export or /v1/opportunities/export returns, to stdout or to --out. With no filter it exports every record; more than 50,000 rows is refused (narrow the filters). --view exports a saved view of that object, yours or a shared one: the whole filter and the sort GET /v1/views/{viewId} answers, so the file holds the rows the view lists. --filters, --where (accounts), --q and --sort are the search operation's own fields; given with --view, each replaces that key of the view's. The accounts and deals files start with id and import back as they are. Each export writes an audit-log entry. Needs the export permission.",
|
|
13502
13583
|
flags: {
|
|
13503
13584
|
view: { type: "string", description: "A saved view's id (kenso views list): export what that view lists, in its sort" },
|
|
@@ -13573,11 +13654,11 @@ var init_export2 = __esm({
|
|
|
13573
13654
|
});
|
|
13574
13655
|
|
|
13575
13656
|
// src/commands/export/index.ts
|
|
13576
|
-
var
|
|
13657
|
+
var actions15;
|
|
13577
13658
|
var init_export3 = __esm({
|
|
13578
13659
|
"src/commands/export/index.ts"() {
|
|
13579
13660
|
"use strict";
|
|
13580
|
-
|
|
13661
|
+
actions15 = {
|
|
13581
13662
|
"": async () => (await Promise.resolve().then(() => (init_export2(), export_exports2))).default
|
|
13582
13663
|
};
|
|
13583
13664
|
}
|
|
@@ -13690,6 +13771,7 @@ var init_import3 = __esm({
|
|
|
13690
13771
|
action: "",
|
|
13691
13772
|
summary: "Import accounts, people or deals from a CSV file: Kenso proposes the mapping, you approve, it runs in the background",
|
|
13692
13773
|
brief: "<accounts|people|deals> <file.csv> [--map Header=field] [--yes]",
|
|
13774
|
+
effect: "spend",
|
|
13693
13775
|
description: `Uploads the file to POST /v1/record-imports and prints Kenso's plan: what each column becomes, how owner and stage values are read, and what it could not settle. Nothing is written to your accounts until the import starts. Without --yes it stops there and names the command that starts it: the file is uploaded and planned, and no record is written. With --yes it starts the import and waits for it. --dry-run sends nothing: with a file it prints the upload it would make (the plan needs the upload), and with --id it reads the planned import and prints what --map, --source and --research would change on it. A row whose domain is already an account only fills that account's empty fields; a new domain creates an account; an account deleted in the last 30 days is restored. Research of new accounts is off unless --research (charged per account). --source names the system the file's record ids come from (twenty, hubspot): ids are kept and matched under that name, so pass the same one for every file of an export. --map changes the plan's columns ("Header=new" adds the custom field Kenso proposes for a column no field matches); owner and stage values change with kenso record-imports update. What happened to each row: kenso record-import-rows list --import-id <id>. Take a finished import back: kenso record-imports undo --import-id <id>. kenso import people matches a row by email, then LinkedIn URL, then name on its company, fills only the empty fields of a person it finds, and places a person on the account that holds their company id (from an accounts file imported before) or their company domain. It never creates an account: import accounts first. kenso import deals opens a deal on the account that holds the row's company id or company domain (a row whose account Kenso does not know is skipped), links the contact a people file imported before, maps the file's stages to the workspace's deal stages, and keeps amounts in the workspace currency. A row whose deal id an earlier import kept only fills that deal's empty fields. So does a row no id names a deal for, when one deal on its account has its name and contact and is open, won or lost as the row is; a row that matches two such deals is skipped.`,
|
|
13694
13776
|
flags: {
|
|
13695
13777
|
map: { type: "string", multiple: true, description: 'Map a column: "Header=field". "Header=" skips it. Repeatable' },
|
|
@@ -13796,22 +13878,22 @@ var init_import3 = __esm({
|
|
|
13796
13878
|
});
|
|
13797
13879
|
|
|
13798
13880
|
// src/commands/import/index.ts
|
|
13799
|
-
var
|
|
13881
|
+
var actions16;
|
|
13800
13882
|
var init_import4 = __esm({
|
|
13801
13883
|
"src/commands/import/index.ts"() {
|
|
13802
13884
|
"use strict";
|
|
13803
|
-
|
|
13885
|
+
actions16 = {
|
|
13804
13886
|
"": async () => (await Promise.resolve().then(() => (init_import3(), import_exports3))).default
|
|
13805
13887
|
};
|
|
13806
13888
|
}
|
|
13807
13889
|
});
|
|
13808
13890
|
|
|
13809
13891
|
// src/commands/jobs/index.ts
|
|
13810
|
-
var
|
|
13892
|
+
var actions17;
|
|
13811
13893
|
var init_jobs2 = __esm({
|
|
13812
13894
|
"src/commands/jobs/index.ts"() {
|
|
13813
13895
|
"use strict";
|
|
13814
|
-
|
|
13896
|
+
actions17 = {
|
|
13815
13897
|
wait: () => Promise.resolve().then(() => (init_wait(), wait_exports)).then((m) => m.default)
|
|
13816
13898
|
};
|
|
13817
13899
|
}
|
|
@@ -13879,6 +13961,7 @@ var init_layouts = __esm({
|
|
|
13879
13961
|
resource: "layouts",
|
|
13880
13962
|
action: "show",
|
|
13881
13963
|
summary: "Show how the workspace's account, person or deal pages lay out their fields",
|
|
13964
|
+
effect: "read",
|
|
13882
13965
|
description: "Reads GET /v1/record-layouts/{object} and prints it: isDefault, version, headerFields (up to 6, pinned under the record's name), railSections ({name, fields}), hiddenFields (under the rail's More), sections ({key, label, placement, locked, hidden}, in page order) and availableFields ({key, label, custom}). A custom field's key is custom.<field_key>. The default answers while nobody saved a layout.",
|
|
13883
13966
|
flags: {},
|
|
13884
13967
|
positionals: [OBJECT_ARG],
|
|
@@ -13894,6 +13977,7 @@ var init_layouts = __esm({
|
|
|
13894
13977
|
resource: "layouts",
|
|
13895
13978
|
action: "set",
|
|
13896
13979
|
summary: "Save the layout every account, person or deal page in the workspace draws",
|
|
13980
|
+
effect: "write",
|
|
13897
13981
|
description: "PUT /v1/record-layouts/{object}. --header pins up to 6 fields to the header: it reads the layout, takes those fields out of the rail and the hidden list, puts the fields it unpins at the top of the first rail section, and saves the rest as it was. --data sends a whole layout (headerFields, railSections, hiddenFields, sections, version) inline, from @file or from - (stdin); start from `kenso layouts show <object>`. A save after someone else's answers conflict: show it again. Needs the workspace_settings permission; it changes the page for every member. --dry-run prints the PUT and saves nothing.",
|
|
13898
13982
|
flags: {
|
|
13899
13983
|
header: { type: "string", description: "Field keys to pin to the header, comma separated (tier,custom.arr)" },
|
|
@@ -13935,6 +14019,7 @@ var init_layouts = __esm({
|
|
|
13935
14019
|
resource: "layouts",
|
|
13936
14020
|
action: "reset",
|
|
13937
14021
|
summary: "Put the account, person or deal page back to Kenso's default layout",
|
|
14022
|
+
effect: "destructive",
|
|
13938
14023
|
description: "DELETE /v1/record-layouts/{object}: drops the saved layout for the whole workspace, so every member's page goes back to the default (the version keeps counting), and prints the default. Needs --yes, or a yes at the prompt; --dry-run prints the DELETE and drops nothing. Save the layout first with `kenso layouts show <object> > layout.json`.",
|
|
13939
14024
|
flags: {},
|
|
13940
14025
|
positionals: [OBJECT_ARG],
|
|
@@ -13958,11 +14043,11 @@ var init_layouts = __esm({
|
|
|
13958
14043
|
});
|
|
13959
14044
|
|
|
13960
14045
|
// src/commands/layouts/index.ts
|
|
13961
|
-
var
|
|
14046
|
+
var actions18;
|
|
13962
14047
|
var init_layouts2 = __esm({
|
|
13963
14048
|
"src/commands/layouts/index.ts"() {
|
|
13964
14049
|
"use strict";
|
|
13965
|
-
|
|
14050
|
+
actions18 = {
|
|
13966
14051
|
show: () => Promise.resolve().then(() => (init_layouts(), layouts_exports)).then((m) => m.show),
|
|
13967
14052
|
set: () => Promise.resolve().then(() => (init_layouts(), layouts_exports)).then((m) => m.set),
|
|
13968
14053
|
reset: () => Promise.resolve().then(() => (init_layouts(), layouts_exports)).then((m) => m.reset)
|
|
@@ -14018,6 +14103,7 @@ var init_tail = __esm({
|
|
|
14018
14103
|
action: "tail",
|
|
14019
14104
|
summary: "Stream your workspace's new API request log rows",
|
|
14020
14105
|
brief: "--status, --key",
|
|
14106
|
+
effect: "read",
|
|
14021
14107
|
description: "Polls GET /v1/api-requests and prints each new row as it is logged, oldest first within a poll: one line per request on a terminal (time, [status], method, path template, error code, duration, API key id, request id), one JSON object per line when piped or with -o json or -o ndjson. It starts from now; --since 10m starts earlier. A row is logged after its request finishes, so each poll looks 60 s back and a slow request can print up to a minute out of order.",
|
|
14022
14108
|
flags: {
|
|
14023
14109
|
status: { type: "string", description: "Only these statuses: codes or classes, comma-separated (429,5xx)" },
|
|
@@ -14124,11 +14210,11 @@ var init_tail = __esm({
|
|
|
14124
14210
|
});
|
|
14125
14211
|
|
|
14126
14212
|
// src/commands/logs/index.ts
|
|
14127
|
-
var
|
|
14213
|
+
var actions19;
|
|
14128
14214
|
var init_logs = __esm({
|
|
14129
14215
|
"src/commands/logs/index.ts"() {
|
|
14130
14216
|
"use strict";
|
|
14131
|
-
|
|
14217
|
+
actions19 = {
|
|
14132
14218
|
tail: () => Promise.resolve().then(() => (init_tail(), tail_exports)).then((m) => m.default)
|
|
14133
14219
|
};
|
|
14134
14220
|
}
|
|
@@ -14178,7 +14264,7 @@ var call_exports = {};
|
|
|
14178
14264
|
__export(call_exports, {
|
|
14179
14265
|
default: () => call_default
|
|
14180
14266
|
});
|
|
14181
|
-
function
|
|
14267
|
+
function isRecord9(value) {
|
|
14182
14268
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
14183
14269
|
}
|
|
14184
14270
|
function textOf(result) {
|
|
@@ -14197,6 +14283,7 @@ var init_call = __esm({
|
|
|
14197
14283
|
action: "call",
|
|
14198
14284
|
summary: "Call a hosted Kenso MCP tool, such as list_skills",
|
|
14199
14285
|
brief: "list_skills runs directly",
|
|
14286
|
+
effect: "destructive",
|
|
14200
14287
|
description: "Calls one Kenso MCP tool with the same API key and prints its result: structuredContent when the tool returns it, else its text parsed as JSON, else the text. Covers MCP-only tools, such as the skills: list_skills and load_skill take no kenso mcp tools first. A tool error exits 1 with the tool's message. A facade tool takes its operation with --operation. --dry-run prints the tools/call request (tool and arguments) and sends nothing.",
|
|
14201
14288
|
flags: {
|
|
14202
14289
|
operation: { type: "string", description: "The facade operation, for example list" },
|
|
@@ -14211,7 +14298,7 @@ var init_call = __esm({
|
|
|
14211
14298
|
let args = {};
|
|
14212
14299
|
if (typeof flags.args === "string") {
|
|
14213
14300
|
const parsed3 = await readDataArg(flags.args, ctx.stdin);
|
|
14214
|
-
if (!
|
|
14301
|
+
if (!isRecord9(parsed3)) throw usageError("--args must be a JSON object.", { field: "args", hint: `For example --args '{"limit":5}'.` });
|
|
14215
14302
|
args = parsed3;
|
|
14216
14303
|
}
|
|
14217
14304
|
if (typeof flags.operation === "string") args = { ...args, operation: flags.operation };
|
|
@@ -14265,6 +14352,7 @@ var init_tools = __esm({
|
|
|
14265
14352
|
action: "tools",
|
|
14266
14353
|
summary: "List the hosted Kenso MCP's tools",
|
|
14267
14354
|
brief: "only to find a tool name",
|
|
14355
|
+
effect: "read",
|
|
14268
14356
|
description: "Lists every tool of the Kenso MCP (KENSO_MCP_URL, default https://mcp.ken.so/mcp) as { name, description }, with the same API key. Call one with kenso mcp call <tool>.",
|
|
14269
14357
|
flags: {},
|
|
14270
14358
|
examples: ["kenso mcp tools", "kenso mcp tools --fields name"],
|
|
@@ -14280,11 +14368,11 @@ var init_tools = __esm({
|
|
|
14280
14368
|
});
|
|
14281
14369
|
|
|
14282
14370
|
// src/commands/mcp/index.ts
|
|
14283
|
-
var
|
|
14371
|
+
var actions20;
|
|
14284
14372
|
var init_mcp = __esm({
|
|
14285
14373
|
"src/commands/mcp/index.ts"() {
|
|
14286
14374
|
"use strict";
|
|
14287
|
-
|
|
14375
|
+
actions20 = {
|
|
14288
14376
|
call: () => Promise.resolve().then(() => (init_call(), call_exports)).then((m) => m.default),
|
|
14289
14377
|
tools: () => Promise.resolve().then(() => (init_tools(), tools_exports)).then((m) => m.default)
|
|
14290
14378
|
};
|
|
@@ -14339,6 +14427,7 @@ var init_list = __esm({
|
|
|
14339
14427
|
resource: "notes",
|
|
14340
14428
|
action: "list",
|
|
14341
14429
|
summary: "List the notes on an account, a person or a deal, or every comment under one note",
|
|
14430
|
+
effect: "read",
|
|
14342
14431
|
description: "Reads GET /v1/notes for the one record you name and follows every page. Each note has id, body (markdown, mentions as @[Name](memberId)), mentions, isPinned, createdBy, createdAt, editedAt, commentCount and its first 50 comments, oldest first. When commentCount is above 50, --parent <noteId> (alone, no record flag) lists every comment under that note, oldest first. --account with --related adds the notes on the account's deals and on the people with a role on it, each naming its own record. A record or note outside your workspace or account scope is not_found.",
|
|
14343
14432
|
flags: {
|
|
14344
14433
|
...targetFlags,
|
|
@@ -14397,6 +14486,7 @@ var init_add = __esm({
|
|
|
14397
14486
|
resource: "notes",
|
|
14398
14487
|
action: "add",
|
|
14399
14488
|
summary: "Write a note on an account, a person or a deal, or a comment under a note",
|
|
14489
|
+
effect: "write",
|
|
14400
14490
|
description: "Sends POST /v1/notes and prints the note. Name the record with one of --account, --person and --deal, or answer a note with --parent. The body is markdown, up to 20,000 characters; mention a teammate as @[Name](memberId) and they are notified. The note shows on the record's Notes tab and its Activity timeline. A note on an account needs the accounts plan feature. --dry-run prints the POST and writes nothing.",
|
|
14401
14491
|
flags: {
|
|
14402
14492
|
...targetFlags,
|
|
@@ -14449,6 +14539,7 @@ var init_edit = __esm({
|
|
|
14449
14539
|
resource: "notes",
|
|
14450
14540
|
action: "edit",
|
|
14451
14541
|
summary: "Change a note's text, or pin or unpin it",
|
|
14542
|
+
effect: "write",
|
|
14452
14543
|
description: "Sends PATCH /v1/notes/{noteId} and prints the note. Only the note's author changes its text; anyone who can edit accounts pins or unpins a note (not a comment). Teammates a new text mentions for the first time are notified. --dry-run prints the PATCH and changes nothing.",
|
|
14453
14544
|
flags: {
|
|
14454
14545
|
body: { type: "string", description: "The new text, in markdown. - reads it from stdin" },
|
|
@@ -14496,6 +14587,7 @@ var init_delete = __esm({
|
|
|
14496
14587
|
resource: "notes",
|
|
14497
14588
|
action: "delete",
|
|
14498
14589
|
summary: "Delete a note or a comment (its author or a workspace admin)",
|
|
14590
|
+
effect: "destructive",
|
|
14499
14591
|
description: "Sends DELETE /v1/notes/{noteId}. The note leaves the record's Notes tab and Activity timeline; `kenso notes restore --note-id <noteId>` brings it back. Needs --yes, or a yes at the prompt; --dry-run prints the DELETE and deletes nothing.",
|
|
14500
14592
|
flags: {},
|
|
14501
14593
|
positionals: [{ name: "noteId", required: true, description: "The note or comment id" }],
|
|
@@ -14518,11 +14610,11 @@ var init_delete = __esm({
|
|
|
14518
14610
|
});
|
|
14519
14611
|
|
|
14520
14612
|
// src/commands/notes/index.ts
|
|
14521
|
-
var
|
|
14613
|
+
var actions21;
|
|
14522
14614
|
var init_notes = __esm({
|
|
14523
14615
|
"src/commands/notes/index.ts"() {
|
|
14524
14616
|
"use strict";
|
|
14525
|
-
|
|
14617
|
+
actions21 = {
|
|
14526
14618
|
list: () => Promise.resolve().then(() => (init_list(), list_exports)).then((m) => m.default),
|
|
14527
14619
|
add: () => Promise.resolve().then(() => (init_add(), add_exports)).then((m) => m.default),
|
|
14528
14620
|
edit: () => Promise.resolve().then(() => (init_edit(), edit_exports)).then((m) => m.default),
|
|
@@ -14563,6 +14655,7 @@ var init_move = __esm({
|
|
|
14563
14655
|
resource: "opportunities",
|
|
14564
14656
|
action: "move",
|
|
14565
14657
|
summary: "Move a deal to a stage or another pipeline, with its won or lost reason",
|
|
14658
|
+
effect: "write",
|
|
14566
14659
|
description: "Sends PATCH /v1/opportunities/{opportunityId} with stage, pipelineId or both, and prints the deal. With --pipeline alone the deal keeps its category (open, won or lost): it lands in that pipeline's live stage of the category with the same label as its stage now, else in the category's first live stage. Read where it landed from the printed stage. With --stage too, the stage must be that pipeline's. --stage alone moves the deal to that stage, in whichever pipeline holds it. An archived pipeline takes no deal from another one. A stage a person set is refused with pinned_by_user unless --overwrite-pinned. Pipeline ids and stage keys: kenso pipelines list. With --reason (it needs --stage) the reason key goes as wonReasonKey for a won stage or lostReasonKey for a lost stage (it reads GET /v1/opportunity-stages, and GET /v1/pipelines for a stage of another pipeline, to tell which; an open stage takes no reason). Reason keys come from kenso opportunity-reasons get. A move never waits for a field the stage asks for: the deal moves, each missing field prints a warning on stderr, and the deal is flagged Missing until the field is filled (kenso opportunities list --missing-fields). --dry-run prints the PATCH and moves nothing.",
|
|
14567
14660
|
flags: {
|
|
14568
14661
|
stage: { type: "string", description: "The stage key to move to (kenso pipelines list lists every pipeline's). Without it, --pipeline maps the stage" },
|
|
@@ -14647,6 +14740,7 @@ var init_stage_history = __esm({
|
|
|
14647
14740
|
resource: "opportunities",
|
|
14648
14741
|
action: "stage-history",
|
|
14649
14742
|
summary: "Show a deal's stage history: each stage, when, who moved it and how long it sat there",
|
|
14743
|
+
effect: "read",
|
|
14650
14744
|
description: "Reads GET /v1/opportunities/{opportunityId}/stage-history and prints it: the stage now, isComplete and entries, oldest first. Each entry has kind (created, stage_changed, won, lost), fromStage, stage, stageLabel, enteredAt, leftAt, durationSeconds, actorKind, actorMemberId and, on a move Ken's stage judge made, reason. The created entry of a deal a CSV import brought in has imported: true, entered on the file's close date when it came in closed. With the deal_stage_rules flag on, each entry also says who changed it (changedBy: member, agent, api_key, workflow, stage_judge, crm_sync or ken_automation, with crmProvider on a CRM sync) and, on a move, fromStageLabel and fromStageDurationSeconds (how long the deal sat in the stage it left). With the pipelines flag on, a move between pipelines also has pipeline and fromPipeline ({id, name}). isComplete false means Kenso has no record of part of the history.",
|
|
14651
14745
|
flags: {},
|
|
14652
14746
|
positionals: [{ name: "opportunityId", required: true, description: "The deal (opportunity) id" }],
|
|
@@ -14723,11 +14817,11 @@ var init_bulk_delete2 = __esm({
|
|
|
14723
14817
|
});
|
|
14724
14818
|
|
|
14725
14819
|
// src/commands/opportunities/index.ts
|
|
14726
|
-
var
|
|
14820
|
+
var actions22;
|
|
14727
14821
|
var init_opportunities = __esm({
|
|
14728
14822
|
"src/commands/opportunities/index.ts"() {
|
|
14729
14823
|
"use strict";
|
|
14730
|
-
|
|
14824
|
+
actions22 = {
|
|
14731
14825
|
move: () => Promise.resolve().then(() => (init_move(), move_exports)).then((m) => m.default),
|
|
14732
14826
|
"stage-history": () => Promise.resolve().then(() => (init_stage_history(), stage_history_exports)).then((m) => m.default),
|
|
14733
14827
|
"bulk-update": () => Promise.resolve().then(() => (init_bulk_update3(), bulk_update_exports2)).then((m) => m.default),
|
|
@@ -14844,6 +14938,7 @@ var init_import5 = __esm({
|
|
|
14844
14938
|
action: "import",
|
|
14845
14939
|
summary: "Create or match people from a CSV or JSONL file, optionally onto accounts",
|
|
14846
14940
|
brief: "a file of people",
|
|
14941
|
+
effect: "spend",
|
|
14847
14942
|
description: "Sends the rows to people.batch, 200 per call. Columns map by name (case, spaces and dashes ignored): email, fullName (or name), firstName, lastName, linkedinUrl (or linkedin, profileUrl), title, accountDomain (or domain, website, companyDomain), accountId, role and priority. A person needs a name: fullName, or firstName and lastName. Other columns are ignored with a warning. People already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nothing. It never creates accounts: a row whose accountDomain matches no account fails with account_not_found. Without --yes it only prints the plan.",
|
|
14848
14943
|
flags: {
|
|
14849
14944
|
file: { type: "string", required: true, description: "The CSV or JSONL file, or - for stdin" },
|
|
@@ -14979,6 +15074,7 @@ var init_merge2 = __esm({
|
|
|
14979
15074
|
resource: "people",
|
|
14980
15075
|
action: "merge",
|
|
14981
15076
|
summary: "Merge a person into the one you keep. --dry-run shows what would move and writes nothing",
|
|
15077
|
+
effect: "destructive",
|
|
14982
15078
|
description: "Sends POST /v1/people/{personId}/merge with intoPersonId, the person to keep. The kept person keeps every value they have and takes the merged person's values for their blank fields, custom fields included; account places, deals, meetings, tasks, notes and captured email and meetings move to them. A merge cannot be undone. With --dry-run the API runs the merge, answers the kept person with mergeSummary (fieldChanges the merge would fill, and moved: accountCount, combinedAccountCount, opportunityCount, meetingCount, taskCount, noteCount, timelineEventCount) and rolls it back: nothing is written. The dry run needs the crm_import_export flag.",
|
|
14983
15079
|
flags: {
|
|
14984
15080
|
into: { type: "string", description: "The id of the person to keep" },
|
|
@@ -15026,11 +15122,11 @@ var init_merge2 = __esm({
|
|
|
15026
15122
|
});
|
|
15027
15123
|
|
|
15028
15124
|
// src/commands/people/index.ts
|
|
15029
|
-
var
|
|
15125
|
+
var actions23;
|
|
15030
15126
|
var init_people = __esm({
|
|
15031
15127
|
"src/commands/people/index.ts"() {
|
|
15032
15128
|
"use strict";
|
|
15033
|
-
|
|
15129
|
+
actions23 = {
|
|
15034
15130
|
import: () => Promise.resolve().then(() => (init_import5(), import_exports4)).then((m) => m.default),
|
|
15035
15131
|
"bulk-update": () => Promise.resolve().then(() => (init_bulk_update4(), bulk_update_exports3)).then((m) => m.default),
|
|
15036
15132
|
"bulk-delete": () => Promise.resolve().then(() => (init_bulk_delete3(), bulk_delete_exports3)).then((m) => m.default),
|
|
@@ -15072,6 +15168,7 @@ var init_stage_rules = __esm({
|
|
|
15072
15168
|
resource: "pipelines",
|
|
15073
15169
|
action: "stage-rules",
|
|
15074
15170
|
summary: "List or set the fields a deal should have in each stage",
|
|
15171
|
+
effect: "write",
|
|
15075
15172
|
description: "Without a stage, reads GET /v1/opportunity-stages (the default pipeline's stages; --pipeline <id> reads that pipeline's from GET /v1/pipelines/{pipelineId}) and prints each stage's key, label, category, isArchived, requiredFields and isDefault, plus requirableFields: every field a stage can require (amount, closeDate, ownerMemberId, primaryPersonId, nextStep, lostReasonKey, wonReasonKey, and custom.<key> for each custom deal field). With a stage and --require, --default or --none, sends PUT /v1/opportunity-stages/{stageKey}/required-fields and prints that stage's rule. --require is the stage's whole list, in order, at most 10. --default puts it back on the default: a lost stage asks for lostReasonKey, any other stage nothing. A missing field never stops a move: the deal moves, the move prints a warning, and the deal is flagged Missing until the field is filled. Setting a rule needs the workspace_settings permission. A stage key is unique across pipelines, so it sets a stage of any pipeline; with --pipeline it first checks the stage is that pipeline's. --dry-run prints the PUT and changes nothing.",
|
|
15076
15173
|
flags: {
|
|
15077
15174
|
require: { type: "string", description: "Comma-separated field ids the stage requires, in order (amount,closeDate,custom.tier)" },
|
|
@@ -15145,11 +15242,11 @@ var init_stage_rules = __esm({
|
|
|
15145
15242
|
});
|
|
15146
15243
|
|
|
15147
15244
|
// src/commands/pipelines/index.ts
|
|
15148
|
-
var
|
|
15245
|
+
var actions24;
|
|
15149
15246
|
var init_pipelines = __esm({
|
|
15150
15247
|
"src/commands/pipelines/index.ts"() {
|
|
15151
15248
|
"use strict";
|
|
15152
|
-
|
|
15249
|
+
actions24 = {
|
|
15153
15250
|
"stage-rules": () => Promise.resolve().then(() => (init_stage_rules(), stage_rules_exports)).then((m) => m.default)
|
|
15154
15251
|
};
|
|
15155
15252
|
}
|
|
@@ -15172,6 +15269,7 @@ var init_run2 = __esm({
|
|
|
15172
15269
|
resource: "reports",
|
|
15173
15270
|
action: "run",
|
|
15174
15271
|
summary: "Run a stock pipeline report and print its table",
|
|
15272
|
+
effect: "read",
|
|
15175
15273
|
description: `Reads GET /v1/reports/{reportKey} and prints one row per bucket: the bucket's label under the dimension's name (stage, closedAt, sourceCampaignId) and each measure under its key (count, sumAmount, weightedAmount, avgAmount). Amounts are in the workspace currency. The report's title, its finding, the days it covers and the totals are printed to stderr. stage_conversion reads one pipeline: with no --pipeline in a workspace with several, the default one, named after the title. --full prints the whole answer as one object: headline, finding, stats, chart, the stored query, and result with each bucket's filter for opportunities search. Reports: ${REPORTS.join(", ")}; kenso reports list prints the ones your workspace has now.`,
|
|
15176
15274
|
flags: {
|
|
15177
15275
|
period: {
|
|
@@ -15259,6 +15357,7 @@ var init_summary = __esm({
|
|
|
15259
15357
|
resource: "reports",
|
|
15260
15358
|
action: "summary",
|
|
15261
15359
|
summary: "Read where the period stands and what needs you",
|
|
15360
|
+
effect: "read",
|
|
15262
15361
|
description: "Reads GET /v1/reports/summary. Prints the summary in words, the four numbers (closed won, open pipeline, weighted, win rate; a fraction from 0 to 1) and each thing that needs you with the report that shows it to stderr, then one row per stock report: its key, the question it answers and its headline value, format and label. Run a report with kenso reports run <report>. --full prints the whole answer as one object.",
|
|
15263
15362
|
flags: {
|
|
15264
15363
|
period: {
|
|
@@ -15321,11 +15420,11 @@ var init_summary = __esm({
|
|
|
15321
15420
|
});
|
|
15322
15421
|
|
|
15323
15422
|
// src/commands/reports/index.ts
|
|
15324
|
-
var
|
|
15423
|
+
var actions25;
|
|
15325
15424
|
var init_reports = __esm({
|
|
15326
15425
|
"src/commands/reports/index.ts"() {
|
|
15327
15426
|
"use strict";
|
|
15328
|
-
|
|
15427
|
+
actions25 = {
|
|
15329
15428
|
run: () => Promise.resolve().then(() => (init_run2(), run_exports2)).then((m) => m.default),
|
|
15330
15429
|
summary: () => Promise.resolve().then(() => (init_summary(), summary_exports)).then((m) => m.default)
|
|
15331
15430
|
};
|
|
@@ -15349,6 +15448,7 @@ var init_list2 = __esm({
|
|
|
15349
15448
|
action: "list",
|
|
15350
15449
|
summary: "List batch runs, newest first (finds an interrupted run)",
|
|
15351
15450
|
brief: "finds an interrupted run",
|
|
15451
|
+
effect: "read",
|
|
15352
15452
|
description: "Lists the runs under the runs directory (KENSO_RUNS_DIR, else ~/.kenso/runs). Needs no API key.",
|
|
15353
15453
|
flags: {
|
|
15354
15454
|
limit: { type: "string", default: "20", description: "How many runs to list, 1-1000 (default 20)" }
|
|
@@ -15395,6 +15495,7 @@ var init_show2 = __esm({
|
|
|
15395
15495
|
resource: "runs",
|
|
15396
15496
|
action: "show",
|
|
15397
15497
|
summary: "Show one batch run and its files",
|
|
15498
|
+
effect: "read",
|
|
15398
15499
|
flags: {},
|
|
15399
15500
|
positionals: [{ name: "runId", required: true, description: "The run id (see kenso runs list)" }],
|
|
15400
15501
|
examples: ["kenso runs show r_ab3dxk2q"],
|
|
@@ -15523,6 +15624,7 @@ var init_resume = __esm({
|
|
|
15523
15624
|
action: "resume",
|
|
15524
15625
|
summary: "Continue an interrupted batch run (its command with --yes, no dry run)",
|
|
15525
15626
|
brief: "with --yes, no dry run",
|
|
15627
|
+
effect: "destructive",
|
|
15526
15628
|
description: "Rebuilds the run's command from run.json and runs it with --yes from the directory it started in. The engine finds the run by its identity and skips the chunks already done. Refused when the input file is gone or changed, when the run is not a batch run or names a flag its command does not take, and when its folder or run.json is not yours alone.",
|
|
15527
15629
|
flags: {},
|
|
15528
15630
|
positionals: [{ name: "runId", required: true, description: "The run id (see kenso runs list)" }],
|
|
@@ -15573,11 +15675,11 @@ var init_resume = __esm({
|
|
|
15573
15675
|
});
|
|
15574
15676
|
|
|
15575
15677
|
// src/commands/runs/index.ts
|
|
15576
|
-
var
|
|
15678
|
+
var actions26;
|
|
15577
15679
|
var init_runs2 = __esm({
|
|
15578
15680
|
"src/commands/runs/index.ts"() {
|
|
15579
15681
|
"use strict";
|
|
15580
|
-
|
|
15682
|
+
actions26 = {
|
|
15581
15683
|
list: () => Promise.resolve().then(() => (init_list2(), list_exports2)).then((m) => m.default),
|
|
15582
15684
|
show: () => Promise.resolve().then(() => (init_show2(), show_exports2)).then((m) => m.default),
|
|
15583
15685
|
resume: () => Promise.resolve().then(() => (init_resume(), resume_exports)).then((m) => m.default)
|
|
@@ -15688,6 +15790,7 @@ var init_create = __esm({
|
|
|
15688
15790
|
resource: "sandbox",
|
|
15689
15791
|
action: "create",
|
|
15690
15792
|
summary: "Create your developer sandbox and save its test key as the sandbox profile",
|
|
15793
|
+
effect: "write",
|
|
15691
15794
|
description: `Calls POST /v1/sandboxes with your live key. Kenso creates a sandbox workspace of your own, seeds it with campaigns, contacts, inboxes and threads, and returns a test key (kenso_test_...) that works only there. The key is saved as the profile "${SANDBOX_PROFILE}" and the active profile stays as it is: add --profile ${SANDBOX_PROFILE} to run a command in the sandbox. In a sandbox, sends are simulated: nothing leaves Kenso.`,
|
|
15692
15795
|
flags: {},
|
|
15693
15796
|
examples: ["kenso sandbox create", "kenso campaigns list --profile sandbox"],
|
|
@@ -15747,6 +15850,7 @@ var init_delete2 = __esm({
|
|
|
15747
15850
|
resource: "sandbox",
|
|
15748
15851
|
action: "delete",
|
|
15749
15852
|
summary: "Delete your sandbox and its test keys",
|
|
15853
|
+
effect: "destructive",
|
|
15750
15854
|
description: `Calls DELETE /v1/sandboxes/{sandboxId} with your live key: the sandbox's data, its webhook endpoints and their delivery history are gone for good and its test keys are revoked. Then removes the profile "${SANDBOX_PROFILE}" when it holds this sandbox. Without an id it deletes your one sandbox. It asks first on a terminal; anywhere else it needs --yes.`,
|
|
15751
15855
|
flags: {},
|
|
15752
15856
|
positionals: [SANDBOX_ID_POSITIONAL],
|
|
@@ -15790,6 +15894,7 @@ var init_key = __esm({
|
|
|
15790
15894
|
resource: "sandbox",
|
|
15791
15895
|
action: "key",
|
|
15792
15896
|
summary: "Create a new test key for your sandbox and save it as the sandbox profile",
|
|
15897
|
+
effect: "write",
|
|
15793
15898
|
description: `Calls POST /v1/sandboxes/{sandboxId}/test-keys with your live key and saves the new key as the profile "${SANDBOX_PROFILE}" (the active profile stays as it is). A sandbox has 5 active test keys at most. Without an id it uses your one sandbox.`,
|
|
15794
15899
|
flags: {},
|
|
15795
15900
|
positionals: [SANDBOX_ID_POSITIONAL],
|
|
@@ -15825,6 +15930,7 @@ var init_list3 = __esm({
|
|
|
15825
15930
|
resource: "sandbox",
|
|
15826
15931
|
action: "list",
|
|
15827
15932
|
summary: "List your developer sandbox",
|
|
15933
|
+
effect: "read",
|
|
15828
15934
|
description: "Calls GET /v1/sandboxes with your live key. You have one sandbox at most, so this prints one row or none.",
|
|
15829
15935
|
flags: {},
|
|
15830
15936
|
examples: ["kenso sandbox list"],
|
|
@@ -15857,6 +15963,7 @@ var init_reset = __esm({
|
|
|
15857
15963
|
resource: "sandbox",
|
|
15858
15964
|
action: "reset",
|
|
15859
15965
|
summary: "Reset your sandbox to its seed data",
|
|
15966
|
+
effect: "destructive",
|
|
15860
15967
|
description: "Calls POST /v1/sandboxes/{sandboxId}/reset with your live key: everything in the sandbox is deleted and seeded again. Its test keys and webhook endpoints stay. Without an id it resets your one sandbox.",
|
|
15861
15968
|
flags: {},
|
|
15862
15969
|
positionals: [SANDBOX_ID_POSITIONAL],
|
|
@@ -15876,11 +15983,11 @@ var init_reset = __esm({
|
|
|
15876
15983
|
});
|
|
15877
15984
|
|
|
15878
15985
|
// src/commands/sandbox/index.ts
|
|
15879
|
-
var
|
|
15986
|
+
var actions27;
|
|
15880
15987
|
var init_sandbox2 = __esm({
|
|
15881
15988
|
"src/commands/sandbox/index.ts"() {
|
|
15882
15989
|
"use strict";
|
|
15883
|
-
|
|
15990
|
+
actions27 = {
|
|
15884
15991
|
create: () => Promise.resolve().then(() => (init_create(), create_exports)).then((m) => m.default),
|
|
15885
15992
|
delete: () => Promise.resolve().then(() => (init_delete2(), delete_exports2)).then((m) => m.default),
|
|
15886
15993
|
key: () => Promise.resolve().then(() => (init_key(), key_exports)).then((m) => m.default),
|
|
@@ -15890,12 +15997,21 @@ var init_sandbox2 = __esm({
|
|
|
15890
15997
|
}
|
|
15891
15998
|
});
|
|
15892
15999
|
|
|
16000
|
+
// src/commands/signals/index.ts
|
|
16001
|
+
var actions28;
|
|
16002
|
+
var init_signals = __esm({
|
|
16003
|
+
"src/commands/signals/index.ts"() {
|
|
16004
|
+
"use strict";
|
|
16005
|
+
actions28 = {};
|
|
16006
|
+
}
|
|
16007
|
+
});
|
|
16008
|
+
|
|
15893
16009
|
// src/commands/skill/index.ts
|
|
15894
|
-
var
|
|
16010
|
+
var actions29;
|
|
15895
16011
|
var init_skill = __esm({
|
|
15896
16012
|
"src/commands/skill/index.ts"() {
|
|
15897
16013
|
"use strict";
|
|
15898
|
-
|
|
16014
|
+
actions29 = {
|
|
15899
16015
|
install: () => Promise.resolve().then(() => (init_install(), install_exports)).then((m) => m.default)
|
|
15900
16016
|
};
|
|
15901
16017
|
}
|
|
@@ -16242,6 +16358,7 @@ var init_pull = __esm({
|
|
|
16242
16358
|
resource: "studio",
|
|
16243
16359
|
action: "pull",
|
|
16244
16360
|
summary: "Write a template version's files to a folder",
|
|
16361
|
+
effect: "read",
|
|
16245
16362
|
description: `Reads GET /v1/asset-templates/{templateId}/pull and writes every file under --dir: text files from the answer, binaries downloaded from their signed links. It replaces an existing file only when an earlier pull wrote it or a push sent it and it has not changed since (${PULL_STATE} in the folder records both), or with --force; other files in the folder are left alone. Every path is checked before anything is written: one that is not a file of the Studio bundle layout (studio.json, template.liquid, fallback.liquid, README.md, brief.md, ideas.md, assets/, samples/), would land outside --dir, or passes through a symbolic link is refused. --template-version picks the version: draft, latest (published) or a version id; the default is the draft, else the latest published version. --dry-run lists the paths, and the files it would not replace, without writing or downloading anything.`,
|
|
16246
16363
|
flags: {
|
|
16247
16364
|
dir: { type: "string", required: true, description: "The folder to write the files to (created when missing)" },
|
|
@@ -16378,6 +16495,7 @@ var init_push = __esm({
|
|
|
16378
16495
|
resource: "studio",
|
|
16379
16496
|
action: "push",
|
|
16380
16497
|
summary: "Save a folder's files to a template's draft and print the validation",
|
|
16498
|
+
effect: "write",
|
|
16381
16499
|
description: "Reads the files of the Studio bundle layout in --dir: studio.json, template.liquid, fallback.liquid, README.md, brief.md, ideas.md, assets/ (images, fonts, pdf, csv) and samples/ (.json, .csv, named in lowercase, never a tool's config name such as package.json). Anything else is skipped, with a note for each file or folder that is not a dotfile or node_modules. Text files (valid UTF-8, no NUL byte, under 1 MB) go inline; every other file is uploaded through a signed upload URL first, 4 at a time, up to 5 MB each. Then one push saves them into the draft and prints the validation result. Files not in the folder stay in the draft unless --delete-missing. With --publish, the new version is published when validation passes. Exit 2 when validation finds errors (the draft is still saved). --dry-run only lists the files a push would send; kenso studio validate checks them without saving.",
|
|
16382
16500
|
flags: {
|
|
16383
16501
|
dir: { type: "string", required: true, description: "The template folder" },
|
|
@@ -16490,6 +16608,7 @@ var init_validate = __esm({
|
|
|
16490
16608
|
resource: "studio",
|
|
16491
16609
|
action: "validate",
|
|
16492
16610
|
summary: "Validate a folder's files against a template without saving them",
|
|
16611
|
+
effect: "write",
|
|
16493
16612
|
description: "Reads --dir the same way as studio push (binaries are uploaded through signed URLs so they can be checked) and validates the files laid over the draft, as a push would. Nothing is saved. With --delete-missing it validates exactly the folder's files. Prints the validation; exit 2 when it has errors.",
|
|
16494
16613
|
flags: {
|
|
16495
16614
|
dir: { type: "string", required: true, description: "The template folder" },
|
|
@@ -16581,6 +16700,7 @@ var init_preview = __esm({
|
|
|
16581
16700
|
action: "preview",
|
|
16582
16701
|
summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
|
|
16583
16702
|
brief: "push local edits first",
|
|
16703
|
+
effect: "write",
|
|
16584
16704
|
description: "Calls asset-templates.preview: renders the draft (else the latest published version, or --version-id) for --account-ids (up to 3; default the 3 most recently touched accounts, else the bundle's samples) and prints each preview's link, screenshots, console errors and link issues. It takes up to a minute per account. The preview renders what is saved, not local files: with --dir it compares the folder to that version and warns when they differ (run kenso studio push first).",
|
|
16585
16705
|
flags: {
|
|
16586
16706
|
dir: { type: "string", description: "A template folder to compare with the version being rendered; it renders no local edits (studio push them first)" },
|
|
@@ -16815,14 +16935,14 @@ async function fillChunk(ctx, templateId, target2, wait3, chunk, chunkCtx) {
|
|
|
16815
16935
|
}
|
|
16816
16936
|
return { results: runResults(chunk, run, target2.key) };
|
|
16817
16937
|
}
|
|
16818
|
-
function estimateOutput(templateId, target2,
|
|
16938
|
+
function estimateOutput(templateId, target2, estimate) {
|
|
16819
16939
|
return {
|
|
16820
16940
|
templateId,
|
|
16821
16941
|
...target2.campaignId !== void 0 ? { campaignId: target2.campaignId } : {},
|
|
16822
16942
|
[target2.flag]: target2.items.length,
|
|
16823
16943
|
...target2.duplicates > 0 ? { duplicates: target2.duplicates } : {},
|
|
16824
16944
|
runs: Math.ceil(target2.items.length / RUN_SIZE),
|
|
16825
|
-
estimate
|
|
16945
|
+
estimate,
|
|
16826
16946
|
...target2.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
|
|
16827
16947
|
};
|
|
16828
16948
|
}
|
|
@@ -16847,6 +16967,7 @@ var init_fill = __esm({
|
|
|
16847
16967
|
action: "fill",
|
|
16848
16968
|
summary: "Fill a template on many accounts or campaign leads (estimate first)",
|
|
16849
16969
|
brief: "estimate first",
|
|
16970
|
+
effect: "spend",
|
|
16850
16971
|
description: "Reads ids one per line, or a CSV/JSONL with an id column (--column, else id, else contactId), from --accounts, or from --contacts with --campaign for a campaign's leads. It always asks for the cost first (asset-runs.estimate) and prints it; --yes then creates one fill run per 500 ids, one after another, and --wait follows each run (every 5 s) until it completes, fails or is cancelled. The summary lists the run ids and their states. A fill charges for every page it builds, so the same ids are not filled twice: an unfinished fill continues, and a finished one is refused (exit 7) with how to retry only the failed ids.",
|
|
16851
16972
|
flags: {
|
|
16852
16973
|
accounts: { type: "string", description: "Account ids: a file, or - for stdin" },
|
|
@@ -16873,10 +16994,10 @@ var init_fill = __esm({
|
|
|
16873
16994
|
const target2 = await readTarget(ctx, flags);
|
|
16874
16995
|
const batchArgs = { ...flags, positionals };
|
|
16875
16996
|
if (ctx.flags.yes === true) await refuseRefill(ctx, batchArgs, target2);
|
|
16876
|
-
const
|
|
16997
|
+
const estimate = await estimateFill(ctx, templateId, target2.items.length);
|
|
16877
16998
|
if (ctx.flags.yes !== true) {
|
|
16878
16999
|
const next = commandLine2(ctx, COMMAND6, { flags: { ...flags, estimate: void 0 }, positionals }, ["--yes"]);
|
|
16879
|
-
ctx.output.object({ ...estimateOutput(templateId, target2,
|
|
17000
|
+
ctx.output.object({ ...estimateOutput(templateId, target2, estimate), next });
|
|
16880
17001
|
return ExitCode.Ok;
|
|
16881
17002
|
}
|
|
16882
17003
|
const wait3 = flags.wait === true;
|
|
@@ -16894,7 +17015,7 @@ var init_fill = __esm({
|
|
|
16894
17015
|
templateId,
|
|
16895
17016
|
...target2.campaignId !== void 0 ? { campaignId: target2.campaignId } : {},
|
|
16896
17017
|
...target2.duplicates > 0 ? { duplicates: target2.duplicates } : {},
|
|
16897
|
-
estimatedMillicredits:
|
|
17018
|
+
estimatedMillicredits: estimate.millicredits,
|
|
16898
17019
|
runs: runsOf(results)
|
|
16899
17020
|
})
|
|
16900
17021
|
},
|
|
@@ -16908,11 +17029,11 @@ var init_fill = __esm({
|
|
|
16908
17029
|
});
|
|
16909
17030
|
|
|
16910
17031
|
// src/commands/studio/index.ts
|
|
16911
|
-
var
|
|
17032
|
+
var actions30;
|
|
16912
17033
|
var init_studio2 = __esm({
|
|
16913
17034
|
"src/commands/studio/index.ts"() {
|
|
16914
17035
|
"use strict";
|
|
16915
|
-
|
|
17036
|
+
actions30 = {
|
|
16916
17037
|
pull: () => Promise.resolve().then(() => (init_pull(), pull_exports)).then((m) => m.default),
|
|
16917
17038
|
push: () => Promise.resolve().then(() => (init_push(), push_exports)).then((m) => m.default),
|
|
16918
17039
|
validate: () => Promise.resolve().then(() => (init_validate(), validate_exports)).then((m) => m.default),
|
|
@@ -17024,6 +17145,7 @@ var init_add2 = __esm({
|
|
|
17024
17145
|
resource: "tasks",
|
|
17025
17146
|
action: "add",
|
|
17026
17147
|
summary: "Add a task: a title, an optional due day and time, assignee and the account, person or deal it is about",
|
|
17148
|
+
effect: "write",
|
|
17027
17149
|
description: "Sends POST /v1/tasks and prints the task. The words after add are the title (1-500 characters). --due takes today, tomorrow, a weekday (the next one: friday or fri), a day (2026-11-20) or an ISO 8601 time with its offset; --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. Link at most one of --account, --person, --deal: a person's task also shows on their first account, a deal's on its account and primary person. Linking an account on a plan without Accounts is plan_required. --dry-run prints the POST and writes nothing.",
|
|
17028
17150
|
flags: {
|
|
17029
17151
|
due: { type: "string", description: "Due day: today, tomorrow, a weekday, YYYY-MM-DD, or an ISO 8601 time with an offset" },
|
|
@@ -17107,6 +17229,7 @@ var init_done = __esm({
|
|
|
17107
17229
|
resource: "tasks",
|
|
17108
17230
|
action: "done",
|
|
17109
17231
|
summary: "Complete one or more tasks (--undo reopens them)",
|
|
17232
|
+
effect: "write",
|
|
17110
17233
|
description: "Sends PATCH /v1/tasks/{taskId} with status done for each id, in order, and prints the task (one line per task for several): completedAt and completedByMemberId set, and task.completed written on the record's timeline. --undo sends status open, which reopens it and writes task.reopened. A task on an account is plan_required on a plan without Accounts. An error stops at that id; its message names the ids before it, which are done. --dry-run prints the PATCH for each id and changes nothing.",
|
|
17111
17234
|
flags: { undo: { type: "boolean", description: "Reopen the task instead" } },
|
|
17112
17235
|
positionals: [{ name: "taskId", required: true, variadic: true, description: "One or more task ids" }],
|
|
@@ -17158,6 +17281,7 @@ var init_assign = __esm({
|
|
|
17158
17281
|
resource: "tasks",
|
|
17159
17282
|
action: "assign",
|
|
17160
17283
|
summary: "Give a task to a member",
|
|
17284
|
+
effect: "write",
|
|
17161
17285
|
description: "Sends PATCH /v1/tasks/{taskId} with assigneeMemberId and prints the task. The member is me, a member id or a member's email. They get a task_assigned notification unless they assigned it themselves. A member id outside the workspace is invalid_member. A task on an account is plan_required on a plan without Accounts. --dry-run prints the PATCH and changes nothing.",
|
|
17162
17286
|
flags: {},
|
|
17163
17287
|
positionals: [
|
|
@@ -17197,6 +17321,7 @@ var init_queue = __esm({
|
|
|
17197
17321
|
resource: "tasks",
|
|
17198
17322
|
action: "queue",
|
|
17199
17323
|
summary: "Your open work by due day: tasks, touches, call tasks, reply reminders and Ken follow-ups",
|
|
17324
|
+
effect: "read",
|
|
17200
17325
|
description: "Reads every page of GET /v1/task-queue, the rows of the app's Tasks screen and of kenso task-queue list, by due day, due time, then id. Each row has kind (task, touch, call_task, reply_reminder or ken_follow_up), id, title, dueDate, dueAt, dueBucket, overdue, record and href, the app path where it is worked (a task opens in its panel). --scope mine (default), assigned_by_me (tasks only) or everyone.",
|
|
17201
17326
|
flags: {
|
|
17202
17327
|
scope: { type: "string", description: "mine (default), assigned_by_me or everyone" },
|
|
@@ -17219,11 +17344,11 @@ var init_queue = __esm({
|
|
|
17219
17344
|
});
|
|
17220
17345
|
|
|
17221
17346
|
// src/commands/tasks/index.ts
|
|
17222
|
-
var
|
|
17347
|
+
var actions31;
|
|
17223
17348
|
var init_tasks = __esm({
|
|
17224
17349
|
"src/commands/tasks/index.ts"() {
|
|
17225
17350
|
"use strict";
|
|
17226
|
-
|
|
17351
|
+
actions31 = {
|
|
17227
17352
|
add: () => Promise.resolve().then(() => (init_add2(), add_exports2)).then((m) => m.default),
|
|
17228
17353
|
done: () => Promise.resolve().then(() => (init_done(), done_exports)).then((m) => m.default),
|
|
17229
17354
|
assign: () => Promise.resolve().then(() => (init_assign(), assign_exports)).then((m) => m.default),
|
|
@@ -17264,6 +17389,7 @@ var init_pin = __esm({
|
|
|
17264
17389
|
resource: "views",
|
|
17265
17390
|
action: "pin",
|
|
17266
17391
|
summary: "Pin a saved view to your sidebar",
|
|
17392
|
+
effect: "write",
|
|
17267
17393
|
description: "Sends POST /v1/pins with kind view and the view's id, and prints the pin. The view nests under its list's row in your sidebar (an account view under Accounts). Pins are your own: a teammate pins a shared view for themselves. A view already pinned answers its pin. Pinning a person or deal view pins People or Deals too. Same as kenso pins add --kind view --view-id <viewId>; kenso views unpin <viewId> undoes it. --dry-run prints the POST and pins nothing.",
|
|
17268
17394
|
flags: {},
|
|
17269
17395
|
positionals: [{ name: "viewId", required: true, description: "The saved view's id (kenso views list)" }],
|
|
@@ -17283,6 +17409,7 @@ var init_pin = __esm({
|
|
|
17283
17409
|
resource: "views",
|
|
17284
17410
|
action: "unpin",
|
|
17285
17411
|
summary: "Unpin a saved view from your sidebar",
|
|
17412
|
+
effect: "destructive",
|
|
17286
17413
|
description: "Finds your pin of the view (GET /v1/pins) and sends DELETE /v1/pins/{pinId}. Prints the view id and whether a pin was removed: a view you had not pinned prints removed false and changes nothing. The view itself stays. Same as kenso pins remove --pin-id <pinId>. --dry-run reads your pins and prints the DELETE (or removed false), removing nothing.",
|
|
17287
17414
|
flags: {},
|
|
17288
17415
|
positionals: [{ name: "viewId", required: true, description: "The saved view's id (kenso views list)" }],
|
|
@@ -17307,11 +17434,11 @@ var init_pin = __esm({
|
|
|
17307
17434
|
});
|
|
17308
17435
|
|
|
17309
17436
|
// src/commands/views/index.ts
|
|
17310
|
-
var
|
|
17437
|
+
var actions32;
|
|
17311
17438
|
var init_views = __esm({
|
|
17312
17439
|
"src/commands/views/index.ts"() {
|
|
17313
17440
|
"use strict";
|
|
17314
|
-
|
|
17441
|
+
actions32 = {
|
|
17315
17442
|
pin: () => Promise.resolve().then(() => (init_pin(), pin_exports)).then((m) => m.pin),
|
|
17316
17443
|
unpin: () => Promise.resolve().then(() => (init_pin(), pin_exports)).then((m) => m.unpin)
|
|
17317
17444
|
};
|
|
@@ -17466,6 +17593,7 @@ var init_listen = __esm({
|
|
|
17466
17593
|
action: "listen",
|
|
17467
17594
|
summary: "Stream the workspace's events and forward them, signed, to a local handler",
|
|
17468
17595
|
brief: "--forward-to",
|
|
17596
|
+
effect: "read",
|
|
17469
17597
|
description: "Polls GET /v1/event-occurrences and prints each event as one JSON line. With --forward-to it also POSTs each event to your handler with the svix-id, svix-timestamp and svix-signature headers a Kenso delivery carries, signed with a local whsec_ secret the documented verifier accepts. The secret is printed at start and stays the same on every run. A live event's body is sparse: the delivery's eventType, eventId, timestamp and clientId, and only the ids, statuses and links the event log keeps, at their delivery paths (no names, emails or reply text). kenso webhooks trigger <event-type> sends a full sample body through the running listener. No webhook endpoint, subscription or tunnel is created.",
|
|
17470
17598
|
flags: {
|
|
17471
17599
|
"forward-to": { type: "string", description: "Your handler's URL, for example http://localhost:3000/hook (http:// is assumed)" },
|
|
@@ -17599,6 +17727,7 @@ var init_trigger = __esm({
|
|
|
17599
17727
|
resource: "webhooks",
|
|
17600
17728
|
action: "trigger",
|
|
17601
17729
|
summary: "Send a sample event of one type through the running kenso webhooks listen",
|
|
17730
|
+
effect: "read",
|
|
17602
17731
|
description: "Takes the event type's sample body from GET /v1/webhook-event-types, gives it a new eventId and the current timestamp, and hands it to the kenso webhooks listen running for this workspace, which prints it and forwards it, signed, like a live event. Nothing is sent to anyone else. Exit 1 when the handler did not answer 2xx.",
|
|
17603
17732
|
flags: {},
|
|
17604
17733
|
positionals: [{ name: "event-type", required: true, description: "An event type, for example reply.received (kenso webhook-event-types list)" }],
|
|
@@ -17657,11 +17786,11 @@ var init_trigger = __esm({
|
|
|
17657
17786
|
});
|
|
17658
17787
|
|
|
17659
17788
|
// src/commands/webhooks/index.ts
|
|
17660
|
-
var
|
|
17789
|
+
var actions33;
|
|
17661
17790
|
var init_webhooks2 = __esm({
|
|
17662
17791
|
"src/commands/webhooks/index.ts"() {
|
|
17663
17792
|
"use strict";
|
|
17664
|
-
|
|
17793
|
+
actions33 = {
|
|
17665
17794
|
listen: () => Promise.resolve().then(() => (init_listen(), listen_exports)).then((m) => m.default),
|
|
17666
17795
|
trigger: () => Promise.resolve().then(() => (init_trigger(), trigger_exports)).then((m) => m.default)
|
|
17667
17796
|
};
|
|
@@ -17685,6 +17814,7 @@ var init_status3 = __esm({
|
|
|
17685
17814
|
action: "status",
|
|
17686
17815
|
summary: "Show the Kenso AI work waiting for your own agent, per kind",
|
|
17687
17816
|
brief: "what waits for your agent",
|
|
17817
|
+
effect: "read",
|
|
17688
17818
|
description: "Calls GET /v1/agent-work and prints one row per kind: executor (kenso_ai, or my_agent when the workspace gave the kind to its agent in Settings), waiting (items your agent can claim now), claimed (items held by open claims), heldBy (billing_blocked, out_of_credits or ai_paused when Kenso holds the kind back) and lastAcceptedAt. --live-only counts only the campaigns Kenso's AI works on by itself, as kenso work run --live-only takes them. A table on a terminal, NDJSON when piped, a JSON array with -o json.",
|
|
17689
17819
|
flags: { campaign: CAMPAIGN_FLAG, "live-only": LIVE_ONLY_FLAG },
|
|
17690
17820
|
examples: ["kenso work status", "kenso work status --live-only", "kenso work status --campaign 812 -o json"],
|
|
@@ -18104,6 +18234,7 @@ var init_pull2 = __esm({
|
|
|
18104
18234
|
action: "pull",
|
|
18105
18235
|
summary: "Claim waiting work into local work files, to answer by hand",
|
|
18106
18236
|
brief: "claims work into files",
|
|
18237
|
+
effect: "write",
|
|
18107
18238
|
description: "Makes one claim per file (POST /v1/agent-work/claims, --per-file items each) up to --files claims, and writes <claimId>.work.json for each into --out or a new folder under the runs directory. Stops early when a claim comes back empty. Prints the folder and, per file, its claim, kind, item count and expiry; never the items' text. Answer each file into <claimId>.answers.json next to it (its rules say how), then send them with kenso work submit. Unanswered items go back to the queue when the claim expires, or at once with kenso work release.",
|
|
18108
18239
|
flags: {
|
|
18109
18240
|
kind: KIND_FLAG,
|
|
@@ -18333,6 +18464,7 @@ var init_submit = __esm({
|
|
|
18333
18464
|
action: "submit",
|
|
18334
18465
|
summary: "Send answers files to Kenso and write each one's results",
|
|
18335
18466
|
brief: "sends answers files",
|
|
18467
|
+
effect: "write",
|
|
18336
18468
|
description: "Reads each <claimId>.answers.json against its <claimId>.work.json (next to it), sends its answers to POST /v1/agent-work/claims/{claimId}/answers, at most 50 per call, with the agent's cli and model from the file, and writes <claimId>.results.json next to it with one result per item. Every file is checked before anything is sent. Prints one JSON line with the counts: accepted, rejected, expired, duplicate and dropped (answers the file could not use). Exit 5 when an answer was rejected; expired and duplicate answers do not fail the command.",
|
|
18337
18469
|
flags: {},
|
|
18338
18470
|
positionals: [{ name: "answers-file", required: true, variadic: true, description: "One or more <claimId>.answers.json files" }],
|
|
@@ -18395,6 +18527,7 @@ var init_release = __esm({
|
|
|
18395
18527
|
action: "release",
|
|
18396
18528
|
summary: "Give claimed work back to the queue now",
|
|
18397
18529
|
brief: "gives claims back",
|
|
18530
|
+
effect: "write",
|
|
18398
18531
|
description: "Calls DELETE /v1/agent-work/claims/{claimId} for each claim id or <claimId>.work.json given. Its unanswered items go back to the queue at once instead of when the claim expires; answers already accepted stay. A claim already closed releases 0 items.",
|
|
18399
18532
|
flags: {},
|
|
18400
18533
|
positionals: [{ name: "claim", required: true, variadic: true, description: "Claim ids (awc_...) or <claimId>.work.json files" }],
|
|
@@ -19861,6 +19994,7 @@ var init_run3 = __esm({
|
|
|
19861
19994
|
action: "run",
|
|
19862
19995
|
summary: "Run your own coding agent on the waiting work until the queue is empty",
|
|
19863
19996
|
brief: "runs your agent on the queue",
|
|
19997
|
+
effect: "write",
|
|
19864
19998
|
description: "Claims one work file's worth of items, runs the agent headless on it in a folder that holds only that file, submits the answers the agent wrote, and takes the next, with up to --parallel agents at once. The agent uses its own login and plan, never the Kenso API key. A failed job's claim is released at once; 3 failed jobs in a row stop the run. Stops when the queue is empty (with --watch it checks again every 60 s), at --max-items, when the agent's plan hits its usage limit (exit 6) or its login ends (exit 3), or on Ctrl-C, which stops the agents and releases every open claim. One progress line per job on stderr; one JSON summary on stdout. Only claude is held to the job folder; every other agent needs --allow-unconfined.",
|
|
19865
19999
|
flags: {
|
|
19866
20000
|
agent: { type: "string", required: true, description: `The agent CLI: ${Object.keys(ADAPTERS).join(", ")}` },
|
|
@@ -20186,11 +20320,11 @@ var init_run3 = __esm({
|
|
|
20186
20320
|
});
|
|
20187
20321
|
|
|
20188
20322
|
// src/commands/work/index.ts
|
|
20189
|
-
var
|
|
20323
|
+
var actions34;
|
|
20190
20324
|
var init_work2 = __esm({
|
|
20191
20325
|
"src/commands/work/index.ts"() {
|
|
20192
20326
|
"use strict";
|
|
20193
|
-
|
|
20327
|
+
actions34 = {
|
|
20194
20328
|
status: () => Promise.resolve().then(() => (init_status3(), status_exports3)).then((m) => m.default),
|
|
20195
20329
|
pull: () => Promise.resolve().then(() => (init_pull2(), pull_exports2)).then((m) => m.default),
|
|
20196
20330
|
submit: () => Promise.resolve().then(() => (init_submit(), submit_exports)).then((m) => m.default),
|
|
@@ -20200,6 +20334,44 @@ var init_work2 = __esm({
|
|
|
20200
20334
|
}
|
|
20201
20335
|
});
|
|
20202
20336
|
|
|
20337
|
+
// src/commands/workflow-runs/index.ts
|
|
20338
|
+
var actions35;
|
|
20339
|
+
var init_workflow_runs = __esm({
|
|
20340
|
+
"src/commands/workflow-runs/index.ts"() {
|
|
20341
|
+
"use strict";
|
|
20342
|
+
actions35 = {};
|
|
20343
|
+
}
|
|
20344
|
+
});
|
|
20345
|
+
|
|
20346
|
+
// src/commands/workflows/file-actions.ts
|
|
20347
|
+
var fileActions;
|
|
20348
|
+
var init_file_actions = __esm({
|
|
20349
|
+
"src/commands/workflows/file-actions.ts"() {
|
|
20350
|
+
"use strict";
|
|
20351
|
+
fileActions = {};
|
|
20352
|
+
}
|
|
20353
|
+
});
|
|
20354
|
+
|
|
20355
|
+
// src/commands/workflows/run-actions.ts
|
|
20356
|
+
var runActions;
|
|
20357
|
+
var init_run_actions = __esm({
|
|
20358
|
+
"src/commands/workflows/run-actions.ts"() {
|
|
20359
|
+
"use strict";
|
|
20360
|
+
runActions = {};
|
|
20361
|
+
}
|
|
20362
|
+
});
|
|
20363
|
+
|
|
20364
|
+
// src/commands/workflows/index.ts
|
|
20365
|
+
var actions36;
|
|
20366
|
+
var init_workflows = __esm({
|
|
20367
|
+
"src/commands/workflows/index.ts"() {
|
|
20368
|
+
"use strict";
|
|
20369
|
+
init_file_actions();
|
|
20370
|
+
init_run_actions();
|
|
20371
|
+
actions36 = { ...fileActions, ...runActions };
|
|
20372
|
+
}
|
|
20373
|
+
});
|
|
20374
|
+
|
|
20203
20375
|
// src/commands/workspace/keys.ts
|
|
20204
20376
|
var keys_exports = {};
|
|
20205
20377
|
__export(keys_exports, {
|
|
@@ -20236,6 +20408,7 @@ var init_keys = __esm({
|
|
|
20236
20408
|
action: "keys",
|
|
20237
20409
|
summary: "Create an API key the workspace owns",
|
|
20238
20410
|
brief: "create",
|
|
20411
|
+
effect: "write",
|
|
20239
20412
|
description: "Calls POST /v1/workspace-api-keys. The key belongs to the workspace, not to you: it keeps working when you leave and acts with exactly the permissions of the template it is held to (admin, editor or viewer). Workspace admins only. The secret is printed once. No API key may create one (a CLI login key included), so the command reports the API's refusal and the app path (exit 3). In a workspace with workspace keys turned off, the API answers 404 and the command says they are not available (exit 4).",
|
|
20240
20413
|
flags: {
|
|
20241
20414
|
name: { type: "string", required: true, description: "The key's name, 1 to 100 characters" },
|
|
@@ -20321,6 +20494,7 @@ var init_list4 = __esm({
|
|
|
20321
20494
|
resource: "workspace",
|
|
20322
20495
|
action: "list",
|
|
20323
20496
|
summary: "List the workspaces your key can use",
|
|
20497
|
+
effect: "read",
|
|
20324
20498
|
description: "Calls GET /v1/workspaces. Kenso staff are members of many workspaces, so filter by name with --search. Without --all it prints one page and says on stderr when there are more.",
|
|
20325
20499
|
flags: {
|
|
20326
20500
|
search: { type: "string", description: "Only workspaces whose name matches this text", aliases: ["q"] },
|
|
@@ -20366,6 +20540,7 @@ var init_use = __esm({
|
|
|
20366
20540
|
resource: "workspace",
|
|
20367
20541
|
action: "use",
|
|
20368
20542
|
summary: "Set the profile's default workspace",
|
|
20543
|
+
effect: "read",
|
|
20369
20544
|
description: "Checks the workspace with GET /v1/workspaces/{workspaceId}, then saves it to the profile (--profile, KENSO_PROFILE or the active one). --workspace and KENSO_WORKSPACE_ID still win for a single command.",
|
|
20370
20545
|
flags: {},
|
|
20371
20546
|
positionals: [{ name: "workspaceId", required: true, description: "The workspace id (see kenso workspace list)" }],
|
|
@@ -20424,11 +20599,11 @@ var init_use = __esm({
|
|
|
20424
20599
|
});
|
|
20425
20600
|
|
|
20426
20601
|
// src/commands/workspace/index.ts
|
|
20427
|
-
var
|
|
20602
|
+
var actions37;
|
|
20428
20603
|
var init_workspace = __esm({
|
|
20429
20604
|
"src/commands/workspace/index.ts"() {
|
|
20430
20605
|
"use strict";
|
|
20431
|
-
|
|
20606
|
+
actions37 = {
|
|
20432
20607
|
keys: () => Promise.resolve().then(() => (init_keys(), keys_exports)).then((m) => m.default),
|
|
20433
20608
|
list: () => Promise.resolve().then(() => (init_list4(), list_exports4)).then((m) => m.default),
|
|
20434
20609
|
use: () => Promise.resolve().then(() => (init_use(), use_exports)).then((m) => m.default)
|
|
@@ -20457,8 +20632,10 @@ var init_registry = __esm({
|
|
|
20457
20632
|
init_completion2();
|
|
20458
20633
|
init_connect3();
|
|
20459
20634
|
init_contacts();
|
|
20635
|
+
init_credits();
|
|
20460
20636
|
init_dashboards();
|
|
20461
20637
|
init_describe2();
|
|
20638
|
+
init_discover();
|
|
20462
20639
|
init_docs2();
|
|
20463
20640
|
init_doctor();
|
|
20464
20641
|
init_export3();
|
|
@@ -20474,12 +20651,15 @@ var init_registry = __esm({
|
|
|
20474
20651
|
init_reports();
|
|
20475
20652
|
init_runs2();
|
|
20476
20653
|
init_sandbox2();
|
|
20654
|
+
init_signals();
|
|
20477
20655
|
init_skill();
|
|
20478
20656
|
init_studio2();
|
|
20479
20657
|
init_tasks();
|
|
20480
20658
|
init_views();
|
|
20481
20659
|
init_webhooks2();
|
|
20482
20660
|
init_work2();
|
|
20661
|
+
init_workflow_runs();
|
|
20662
|
+
init_workflows();
|
|
20483
20663
|
init_workspace();
|
|
20484
20664
|
handWritten = {
|
|
20485
20665
|
accounts: actions,
|
|
@@ -20490,33 +20670,38 @@ var init_registry = __esm({
|
|
|
20490
20670
|
completion: actions6,
|
|
20491
20671
|
connect: actions7,
|
|
20492
20672
|
contacts: actions8,
|
|
20493
|
-
|
|
20494
|
-
|
|
20495
|
-
|
|
20496
|
-
|
|
20497
|
-
|
|
20498
|
-
|
|
20499
|
-
|
|
20500
|
-
|
|
20673
|
+
credits: actions9,
|
|
20674
|
+
dashboards: actions10,
|
|
20675
|
+
describe: actions11,
|
|
20676
|
+
discover: actions12,
|
|
20677
|
+
docs: actions13,
|
|
20678
|
+
doctor: actions14,
|
|
20679
|
+
export: actions15,
|
|
20680
|
+
import: actions16,
|
|
20681
|
+
jobs: actions17,
|
|
20682
|
+
layouts: actions18,
|
|
20501
20683
|
login: topLevel("login", actions4.login, "kenso auth login"),
|
|
20502
20684
|
logout: topLevel("logout", actions4.logout, "kenso auth logout"),
|
|
20503
|
-
logs:
|
|
20504
|
-
mcp:
|
|
20505
|
-
notes:
|
|
20506
|
-
opportunities:
|
|
20507
|
-
people:
|
|
20508
|
-
pipelines:
|
|
20509
|
-
reports:
|
|
20510
|
-
runs:
|
|
20511
|
-
sandbox:
|
|
20512
|
-
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20516
|
-
|
|
20685
|
+
logs: actions19,
|
|
20686
|
+
mcp: actions20,
|
|
20687
|
+
notes: actions21,
|
|
20688
|
+
opportunities: actions22,
|
|
20689
|
+
people: actions23,
|
|
20690
|
+
pipelines: actions24,
|
|
20691
|
+
reports: actions25,
|
|
20692
|
+
runs: actions26,
|
|
20693
|
+
sandbox: actions27,
|
|
20694
|
+
signals: actions28,
|
|
20695
|
+
skill: actions29,
|
|
20696
|
+
studio: actions30,
|
|
20697
|
+
tasks: actions31,
|
|
20698
|
+
views: actions32,
|
|
20699
|
+
webhooks: actions33,
|
|
20517
20700
|
whoami: topLevel("whoami", actions4.status, "kenso auth status"),
|
|
20518
|
-
work:
|
|
20519
|
-
|
|
20701
|
+
work: actions34,
|
|
20702
|
+
"workflow-runs": actions35,
|
|
20703
|
+
workflows: actions36,
|
|
20704
|
+
workspace: actions37
|
|
20520
20705
|
};
|
|
20521
20706
|
resourceAliases = { leads: "contacts" };
|
|
20522
20707
|
}
|
|
@@ -20653,8 +20838,8 @@ async function renderTopHelp(opts) {
|
|
|
20653
20838
|
names.push(withPositionals(spec, spec.action));
|
|
20654
20839
|
groups.set(hint, names);
|
|
20655
20840
|
}
|
|
20656
|
-
const
|
|
20657
|
-
if (
|
|
20841
|
+
const actions39 = [...groups.entries()].map(([hint, names]) => `${names.join(", ")}${hint}`);
|
|
20842
|
+
if (actions39.length > 0) rows.push([resource, actions39.join(", ")]);
|
|
20658
20843
|
}
|
|
20659
20844
|
const at = 4 + Math.min(22, Math.max(0, ...rows.map(([left]) => left.length)));
|
|
20660
20845
|
lines.push(
|
|
@@ -20667,7 +20852,7 @@ async function renderTopHelp(opts) {
|
|
|
20667
20852
|
const [area = "", action = ""] = name.split(" ");
|
|
20668
20853
|
byArea.set(area, [...byArea.get(area) ?? [], action]);
|
|
20669
20854
|
}
|
|
20670
|
-
const named = [...byArea.entries()].map(([area,
|
|
20855
|
+
const named = [...byArea.entries()].map(([area, actions39]) => `${area} ${actions39.join("|")}`);
|
|
20671
20856
|
lines.push(wrap(`Beta, hidden here but they run (the server decides): ${named.join(", ")}.`, " "));
|
|
20672
20857
|
}
|
|
20673
20858
|
const generated = await listGenerated({ features: opts.allCommands ? [] : getFeatures, env: opts.env });
|
|
@@ -20675,13 +20860,13 @@ async function renderTopHelp(opts) {
|
|
|
20675
20860
|
if (visible.length > 0) {
|
|
20676
20861
|
const byResource = /* @__PURE__ */ new Map();
|
|
20677
20862
|
for (const g of visible) {
|
|
20678
|
-
const
|
|
20679
|
-
|
|
20680
|
-
byResource.set(g.resource,
|
|
20863
|
+
const actions39 = byResource.get(g.resource) ?? [];
|
|
20864
|
+
actions39.push(`${g.action}${g.beta ? " (beta)" : ""}`);
|
|
20865
|
+
byResource.set(g.resource, actions39);
|
|
20681
20866
|
}
|
|
20682
20867
|
const sorted2 = [...byResource.entries()].sort(([a], [b]) => a.localeCompare(b));
|
|
20683
20868
|
if (opts.allCommands) {
|
|
20684
|
-
const generatedRows = sorted2.map(([resource,
|
|
20869
|
+
const generatedRows = sorted2.map(([resource, actions39]) => [resource, actions39.sort().join(", ")]);
|
|
20685
20870
|
lines.push("", "API resources (kenso <resource> <action>):", columns(generatedRows));
|
|
20686
20871
|
} else {
|
|
20687
20872
|
const names = new Set(sorted2.map(([resource]) => resource));
|
|
@@ -20910,6 +21095,15 @@ var init_invoked = __esm({
|
|
|
20910
21095
|
}
|
|
20911
21096
|
});
|
|
20912
21097
|
|
|
21098
|
+
// src/core/pre-run.ts
|
|
21099
|
+
async function beforeRun(_ctx, _spec, _args) {
|
|
21100
|
+
}
|
|
21101
|
+
var init_pre_run = __esm({
|
|
21102
|
+
"src/core/pre-run.ts"() {
|
|
21103
|
+
"use strict";
|
|
21104
|
+
}
|
|
21105
|
+
});
|
|
21106
|
+
|
|
20913
21107
|
// src/core/update-notice.ts
|
|
20914
21108
|
import { mkdirSync as mkdirSync5, readFileSync as readFileSync13, realpathSync as realpathSync2, renameSync as renameSync4, writeFileSync as writeFileSync7 } from "node:fs";
|
|
20915
21109
|
import { dirname as dirname5, join as join26, sep as sep3 } from "node:path";
|
|
@@ -21040,7 +21234,7 @@ function resources() {
|
|
|
21040
21234
|
const names = Object.entries(handWritten).filter(([, area]) => Object.keys(area).length > 0).map(([resource]) => resource);
|
|
21041
21235
|
return sorted([...names, ...Object.keys(resourceAliases), ...listOperations().map((op) => op.resource)]);
|
|
21042
21236
|
}
|
|
21043
|
-
function
|
|
21237
|
+
function actions38(resource) {
|
|
21044
21238
|
const own = Object.keys(handWritten[resource] ?? {}).filter((action) => action !== "");
|
|
21045
21239
|
return sorted([...own, ...listOperations().filter((op) => op.resource === resource).map((op) => op.action)]);
|
|
21046
21240
|
}
|
|
@@ -21105,7 +21299,7 @@ async function completions(words, globals) {
|
|
|
21105
21299
|
return flagsOf2(spec, globals, positionals.length === 0);
|
|
21106
21300
|
}
|
|
21107
21301
|
if (positionals.length === 0) return resources();
|
|
21108
|
-
if (!spec) return positionals.length === 1 ?
|
|
21302
|
+
if (!spec) return positionals.length === 1 ? actions38(resourceAliases[positionals[0]] ?? positionals[0]) : [];
|
|
21109
21303
|
const given = positionals.length - commandWords2;
|
|
21110
21304
|
const declared = spec.positionals ?? [];
|
|
21111
21305
|
if (given < declared.length || declared.at(-1)?.variadic === true) {
|
|
@@ -21199,9 +21393,9 @@ function normalizeBooleans(argv, names, strict) {
|
|
|
21199
21393
|
async function knownCommands() {
|
|
21200
21394
|
const commands = /* @__PURE__ */ new Set();
|
|
21201
21395
|
for (const [resource, area] of Object.entries(handWritten)) {
|
|
21202
|
-
const
|
|
21203
|
-
if (
|
|
21204
|
-
for (const action of
|
|
21396
|
+
const actions39 = Object.keys(area);
|
|
21397
|
+
if (actions39.length > 0) commands.add(resource);
|
|
21398
|
+
for (const action of actions39) commands.add(action ? `${resource} ${action}` : resource);
|
|
21205
21399
|
}
|
|
21206
21400
|
for (const g of await listGenerated({ features: [] })) {
|
|
21207
21401
|
commands.add(g.resource);
|
|
@@ -21423,6 +21617,7 @@ async function main(argv, env = process.env, overrides = {}) {
|
|
|
21423
21617
|
const ctx = createContext(flags, env, { ...overrides, signal: controller.signal, noConfig: spec.ownCredential?.(args.flags) === true });
|
|
21424
21618
|
output = ctx.output;
|
|
21425
21619
|
active.graceMs = spec.interruptGraceMs;
|
|
21620
|
+
await beforeRun(ctx, spec, args);
|
|
21426
21621
|
enterRun(active);
|
|
21427
21622
|
try {
|
|
21428
21623
|
const code = await spec.run(ctx, args);
|
|
@@ -21463,6 +21658,7 @@ var init_main = __esm({
|
|
|
21463
21658
|
init_flag_names();
|
|
21464
21659
|
init_invoked();
|
|
21465
21660
|
init_output();
|
|
21661
|
+
init_pre_run();
|
|
21466
21662
|
init_redact();
|
|
21467
21663
|
init_update_notice();
|
|
21468
21664
|
init_version();
|