kenso 0.1.158 → 0.1.159

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/docs/agents.md CHANGED
@@ -12,6 +12,8 @@ kenso auth login
12
12
  kenso workspace use 1234
13
13
  ```
14
14
 
15
+ An agent with no key hands the login to you: `kenso login --no-wait` prints a link and a code without waiting, you open the link and approve, then the agent runs `kenso auth wait` to save the key. Under an agent, `kenso doctor` names `kenso login --no-wait` as the key check's `next`.
16
+
15
17
  3. Install the Agent Skill and connect the Kenso MCP server in one step, then check everything:
16
18
 
17
19
  ```bash
@@ -114,7 +116,7 @@ kenso skill show workflows --reference files.md
114
116
  - **Branch on the exit code:** 0 ok, 2 fix the command, 3 fix the key, 5 some rows failed, 6 wait or raise a limit, 130 resume.
115
117
  - **Look things up, do not guess.** `kenso describe <resource> <action>` prints any command's flags and body schema as JSON.
116
118
  - **Find, then look up.** `kenso discover` turns a plain request into the command, doc, skill or workflow step for it, offline, with the next command to run.
117
- - **See the cost first.** Every dry run of paid work prints `credits` with `needed`, `available` and `sufficient`. `kenso credits` reads the balance, usage and prices.
119
+ - **See the cost first.** The dry run of every `spend` command, one call or an `--each` file, and of `kenso workflows run` prints `credits` with `needed`, `available` and `sufficient`, each `null` when the CLI cannot read or price it. A generated command has a `needed` only where one call charges one unit (an email find, a place opened): its rate-card price times the calls. Every other generated spend prints `needed: null`, because the API decides how many units one call charges (an AI run charges each contact of the campaign). `null` is unknown, never free. A dry run without a key still prints its plan, with `available: null`. `kenso credits` reads the balance, usage and prices.
118
120
 
119
121
  ## What a command does and what it costs
120
122
 
@@ -128,12 +130,12 @@ Every command declares its effect. Help and `kenso describe` print it, so an age
128
130
  | `send` | Sends an email, a LinkedIn message, a call or an invitation, or starts or resumes sending |
129
131
  | `destructive` | Deletes, archives, removes or merges |
130
132
 
131
- A `write` is not proof that a command is free: the API contract does not mark every route that charges. The dry run's `credits` and estimate are the authority on what a command costs.
133
+ A `write` or a `send` is not proof that a command is free: the API contract does not mark every route that charges, and `kenso workflows run` is a `send` that charges for the workflow's steps. The dry run's `credits` and estimate are the authority on what a command costs.
132
134
 
133
135
  - Command help prints `Effect: <effect>.` under the summary. A command that charges adds a `Cost:` line in credits, priced from your workspace's rate card; signed out or offline it shows both rate cards, labelled `rate card v1` and `rate card v2`. Work your plan bills another way reads `not charged in credits`. No price is typed into the CLI: it comes from the rate card or a dry run's estimate.
134
136
  - A command that spends, sends or deletes, and each command an agent starts with (`kenso doctor`, `kenso describe`, `kenso docs`, `kenso agent setup`, `kenso skill install`, `kenso auth login`), also prints `When:` (when to pick it) and `Next:` (what to run after it) under its description.
135
137
  - A command that only reads says `Read-only.` under its global flags line.
136
- - `kenso describe <resource> <action>` has the same `effect` and `cost` as JSON.
138
+ - `kenso describe <resource> <action>` has the same `effect` and `cost` as JSON. `cost` is `null` only for a command that declares no charge; a hand-written command that says what it charges has it as `cost.text`, whatever its effect.
137
139
  - `kenso api`, `kenso mcp call` and `kenso runs resume` read `destructive`, because one call of theirs can do anything. Read-only mode judges each call on its own.
138
140
 
139
141
  ```bash
package/docs/reference.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Kenso CLI command reference
2
2
 
3
- Generated from kenso 0.1.158 (API contracts 581ef9c14543) by `scripts/build-reference.ts`. Do not edit it: `pnpm build` writes it again.
3
+ Generated from kenso 0.1.159 (API contracts 581ef9c14543) by `scripts/build-reference.ts`. Do not edit it: `pnpm build` writes it again.
4
4
 
5
5
  1955 commands, one entry each: summary, API route, feature gate and flag names. Beta commands work only on workspaces with their feature flag; `kenso describe` hides the ones yours cannot use. Every command also takes the global flags below. A command's notes, flag descriptions, body schema and examples: `kenso <resource> <action> --help`, or `kenso describe <resource> <action>` as JSON.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kenso",
3
- "version": "0.1.158",
3
+ "version": "0.1.159",
4
4
  "description": "The Kenso CLI: bulk lead, CRM and Studio work for people and coding agents",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -49,5 +49,5 @@
49
49
  "typescript-eslint": "8.71.1",
50
50
  "vitest": "5.0.3"
51
51
  },
52
- "gitHead": "3b70b74c22d58457d05024e1200768c4605956ab"
52
+ "gitHead": "7f56610e26658aae47edf700f2c7cf3352ddf188"
53
53
  }
@@ -17,6 +17,7 @@ kenso credits balance
17
17
  ```
18
18
 
19
19
  - `kenso doctor` checks the CLI, the key, the skills and the MCP. When a check fails, run its `next` before anything else.
20
+ - No key, or `key_valid` failed: hand the sign-in to the person. `kenso login --no-wait` prints a link and a code; give both to the person, and once they say they approved it, run `kenso auth wait`.
20
21
  - `kenso whoami` shows the workspace this folder and key use (`activeWorkspace`, with its `id` and `name`) and where it comes from (`workspaceSource`); `kenso workspace list` lists every workspace the key reaches. Before any change, tell the person: "I will work in <name> (<id>)."
21
22
  - `kenso credits balance` shows the credits `available`. Read it before you plan anything that charges.
22
23
 
@@ -29,7 +30,7 @@ kenso describe email-finds create
29
30
 
30
31
  1. `kenso discover` with the request in plain words finds the command, doc, skill or workflow step for it, offline. Each hit has its `effect` (read, write, spend, send or destructive), its cost line and the `describe` command to run next.
31
32
  2. `kenso describe <resource> <action>` prints the command's flags, body, `effect` and `cost` as JSON.
32
- 3. Run it with `--dry-run` and read the plan: what it would send and, for paid work, `credits` with `needed`, `available` and `sufficient`.
33
+ 3. Run it with `--dry-run` and read the plan: what it would send and, for paid work, `credits` with `needed`, `available` and `sufficient` (`null` where the CLI could not read or price it). A `null` `needed` is unknown, never free: ask before you run it.
33
34
  4. Run it for real only as the rules below allow, with the plan's `next`.
34
35
 
35
36
  While you only look around, set `KENSO_READ_ONLY=1`: any command that is not a read is then refused before it sends anything, and a `--dry-run` still prints its plan.
@@ -103,8 +104,10 @@ These rules hold in every Kenso skill.
103
104
 
104
105
  - A bounded request ("find emails for these 200 people") covers that scope and nothing wider. An open one ("find me leads") needs a row count and a budget from the person first.
105
106
  - Sample first. When a paid step covers more than 25 records, or the estimate's `credits.needed` is over 10, run 3 to 5 records first, show the result and the projected cost of the rest, and ask before the rest. These four numbers are thresholds of this contract, not prices.
107
+ - A workflow samples on the full ids file, never on a separate file of a few ids, which the full run would start again: `kenso workflows run` with a `--max-credits` that covers 3 to 5 records starts only those. After the yes, run the same command with only `--max-credits` changed: it stops with `already_started`, and its `next` runs only the records the sample did not start.
108
+ - Any other paid batch: sample with a file of 3 to 5 rows, then run the rest from a file without them.
106
109
  - Prices come from a `--dry-run`, `kenso credits quote` or `kenso credits rate-card`, never from memory or from a skill.
107
- - `Effect: write.` in a command's help is not proof that it is free: not every route that charges is marked. The dry run or `kenso credits quote` is the authority.
110
+ - `Effect: write.` or `Effect: send.` in a command's help is not proof that it is free: not every route that charges is marked, and `kenso workflows run` is a send that charges for its steps. The dry run or `kenso credits quote` is the authority.
108
111
  - Ask once, with one approval block, and wait for the yes:
109
112
 
110
113
  ```text
@@ -27,7 +27,7 @@ kenso connect inbox --provider google # also calendar, crm, github, linkedin .
27
27
  kenso onboarding-builds events --build-id obd_2x --until done,error # live streams: one JSON line per event, reconnects itself
28
28
  ```
29
29
 
30
- Charges: follow the kenso skill's spend rules; every dry run prints the credit estimate. `pinned_by_user`: with the person's OK, rerun with `--overwrite-pinned`. Workflows: `kenso docs workflows` first; secrets only as `{{secrets.NAME}}`. Key: `KENSO_API_KEY`, or pipe a variable, no check: `printf '%s' "$KEY" | kenso auth login --with-key`; never in a flag, output or file.
30
+ Charges: follow the kenso skill's spend rules; the dry run of a `spend` command (one call or an `--each` file) and of `kenso workflows run` prints `credits` (`needed`, `available`, `sufficient`; `null` where it cannot tell, and an unknown `needed` is never free). `pinned_by_user`: with the person's OK, rerun with `--overwrite-pinned`. Workflows: `kenso docs workflows` first; secrets only as `{{secrets.NAME}}`. Key: `KENSO_API_KEY`, or pipe a variable, no check: `printf '%s' "$KEY" | kenso auth login --with-key`; never in a flag, output or file.
31
31
 
32
32
  ## Work (beta): My agent
33
33
 
@@ -45,7 +45,7 @@ By hand in a chat: run `kenso work pull`, then give each work file to its own su
45
45
 
46
46
  ## Setup
47
47
 
48
- `kenso` missing: `curl -fsSL https://ken.so/install.sh | sh` (macOS or Linux, no Node needed) or `npm i -g kenso` (Node 22 or newer), or run a command as `npx -y kenso@latest <command>`. Then `kenso auth login` (the person approves in the browser) and `kenso doctor`. `kenso agent setup -y` installs this skill and the Kenso MCP server (`https://mcp.ken.so/mcp`) for the agent; the person signs in to the MCP once in the agent.
48
+ `kenso` missing: `curl -fsSL https://ken.so/install.sh | sh` (macOS or Linux, no Node needed) or `npm i -g kenso` (Node 22 or newer), or run a command as `npx -y kenso@latest <command>`. Then sign in: `kenso login --no-wait` prints a link and a code for the person to open and approve, then `kenso auth wait` saves the key. Then `kenso doctor`. `kenso agent setup -y` installs this skill and the Kenso MCP server (`https://mcp.ken.so/mcp`) for the agent; the person signs in to the MCP once in the agent.
49
49
 
50
50
  ## No Kenso account yet
51
51
 
@@ -26,9 +26,13 @@
26
26
  "8e79d18098e6ed3b79c3bce771a46180b50e9ed1b741e64ffcb301601282eb12",
27
27
  "fcac2e80b3d818394465a491bad232025d1c201515ef7fb778e4aa51669b3e61",
28
28
  "42fa3f163ab9aa70260040b443830c57dc7926e935a557c40896038e8817b088",
29
- "b34e186f56f36b509bffa0dea2ee78b09e91654b90a659d6665563df4fa88f76"
29
+ "b34e186f56f36b509bffa0dea2ee78b09e91654b90a659d6665563df4fa88f76",
30
+ "df7d86e0af12727cf15cf0620f26ef4fe9aac63f0180f3594e4d357cf14b40d2",
31
+ "812bb97591cefa7eb23596105ce63dfd382c0bd4c68e8b5d179775e9b72e927a"
30
32
  ],
31
33
  "kenso": [
32
- "6fb333a826726d51ba2ea3927745f843343490c8aa9098e5da682d24172323f7"
34
+ "6fb333a826726d51ba2ea3927745f843343490c8aa9098e5da682d24172323f7",
35
+ "7d88215cf4e6eb7aaeb28d22839fc3006c57a0491e12dde86db7623b635d6f90",
36
+ "875c8ed2738ecdc963377be449c21f40c623a0750baf361d3e51b22818cf8e9d"
33
37
  ]
34
38
  }