kenso 0.1.157 → 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/CHANGELOG.md +4 -0
- package/dist/discover.json +1 -1
- package/dist/kenso.js +356 -231
- package/dist/operations.index.json +1 -1
- package/dist/operations.json +1 -1
- package/dist/step-types.json +1 -1
- package/docs/agents.md +5 -3
- package/docs/auth.md +3 -1
- package/docs/output-and-errors.md +4 -2
- package/docs/reference.md +177 -3
- package/docs/workflows.md +7 -6
- package/package.json +2 -2
- package/skill/kenso/SKILL.md +5 -2
- package/skill/kenso-cli/SKILL.md +2 -2
- package/skill/shipped.json +6 -2
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.**
|
|
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/auth.md
CHANGED
|
@@ -72,6 +72,7 @@ Under a coding agent, a command that is not a read prints one line on stderr bef
|
|
|
72
72
|
```text
|
|
73
73
|
workspace: 1234 (--workspace)
|
|
74
74
|
workspace: 1234 (KENSO_WORKSPACE_ID)
|
|
75
|
+
workspace: 1234 (kenso.json)
|
|
75
76
|
workspace: 1234 (profile client-a)
|
|
76
77
|
workspace: none set (the API picks the key's only workspace or answers workspace_required)
|
|
77
78
|
```
|
|
@@ -96,7 +97,8 @@ A key reaches every workspace its user belongs to. Each command runs in one work
|
|
|
96
97
|
|
|
97
98
|
1. `--workspace <id>` on the command
|
|
98
99
|
2. `KENSO_WORKSPACE_ID`
|
|
99
|
-
3.
|
|
100
|
+
3. `workspaceId` in a `kenso.json` in this folder or a folder above it, up to the repository root or your home folder (see [kenso.json](workflows.md#kensojson))
|
|
101
|
+
4. the workspace saved in the profile (`kenso workspace use`)
|
|
100
102
|
|
|
101
103
|
```bash
|
|
102
104
|
kenso workspace list --search acme
|
|
@@ -156,6 +156,7 @@ Two API codes change the exit code: `workspace_required` exits 2 with `"next":"k
|
|
|
156
156
|
| `cancelled` | 2 | A person answered no to the confirmation: nothing was sent |
|
|
157
157
|
| `file_unreadable` | 2 | An input file is missing, is a folder, cannot be opened, or cannot be parsed; the message names the line, such as `leads.csv line 3: a quote is not closed.` |
|
|
158
158
|
| `config_invalid` | 2 | `~/.kenso/config.json` is not valid JSON: fix or delete it |
|
|
159
|
+
| `folder_file_untrusted` | 2 | A workflow command would read or write a `kenso.json` that another user owns or anyone can write: kenso skips such a file and names it on stderr, and nothing was written or sent. Make it yours and writable only by you, or work in a folder only you can write |
|
|
159
160
|
| `feature_not_enabled` | 2 | Every action of the resource is a beta command your workspace has not enabled |
|
|
160
161
|
| `invalid_key_format`, `key_required` | 2 | `auth login --with-key` read something that is not a Kenso key, or stdin is a terminal instead of a pipe |
|
|
161
162
|
| `invalid_workspace_id` | 2 | `kenso workspace use` got an id that is not a positive whole number |
|
|
@@ -166,7 +167,8 @@ Two API codes change the exit code: `workspace_required` exits 2 with `"next":"k
|
|
|
166
167
|
| `browser_login_unavailable`, `access_denied`, `login_expired` | 3 | Browser login is off, was denied, or timed out |
|
|
167
168
|
| `run_not_found` | 4 | `kenso runs show` or `resume` got an unknown run id |
|
|
168
169
|
| `docs_not_found` | 4 | `kenso docs reference` before the reference was generated (a source checkout without `pnpm build`) |
|
|
169
|
-
| `run_in_progress`, `already_filled` | 7 | Another process is working on the run, or `studio fill` already ran with this file and these flags |
|
|
170
|
+
| `run_in_progress`, `already_filled` | 7 | Another process is working on the run (for `kenso workflows run`, a run on the same input), or `studio fill` already ran with this file and these flags |
|
|
171
|
+
| `already_started` | 7 | `kenso workflows run`: an earlier run on the same input already sent starts, and this one would start records differently (another `--max-credits`), so it would start them twice. Nothing was sent: `not-started.txt` in that run's folder holds the ids it did not start, and `next` runs only those |
|
|
170
172
|
| `local_changes` | 7 | `studio pull` would replace files that no earlier pull wrote or push sent, or that changed since; nothing was written, and `next` adds `--force` to replace them |
|
|
171
173
|
| `job_timeout`, `job_failed`, `job_canceled` | 1 | `kenso jobs wait` (or a command that waits on a job) ran out of time, or the job failed or was canceled |
|
|
172
174
|
| `mcp_tool_error` | 1 | `kenso mcp call`: the MCP tool answered with an error |
|
|
@@ -189,7 +191,7 @@ Two API codes change the exit code: `workspace_required` exits 2 with `"next":"k
|
|
|
189
191
|
| 4 | Not found |
|
|
190
192
|
| 5 | Partial: the batch finished and some rows failed, were not found or were invalid. See `results.csv` |
|
|
191
193
|
| 6 | Rate limited after retries, or a plan or campaign lead limit stopped the run (`limit_reached`) |
|
|
192
|
-
| 7 | Conflict or invalid state (HTTP 409),
|
|
194
|
+
| 7 | Conflict or invalid state (HTTP 409), a run another process holds (`run_in_progress`), or a workflow run that would start records twice (`already_started`) |
|
|
193
195
|
| 8 | Server error after retries (5xx), or the API is unreachable |
|
|
194
196
|
| 9 | Answer refused: a Kenso sandbox run stopped because an answer held a credential or something shaped like one |
|
|
195
197
|
| 130 | Interrupted. A batch run can be resumed: see its `next` |
|
package/docs/reference.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Kenso CLI command reference
|
|
2
2
|
|
|
3
|
-
Generated from kenso 0.1.
|
|
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
|
|
|
7
7
|
## Global flags
|
|
8
8
|
|
|
@@ -182,7 +182,8 @@ Exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 some rows failed, 6 r
|
|
|
182
182
|
- [dashboard](#dashboard) (1)
|
|
183
183
|
- [dashboards](#dashboards) (8)
|
|
184
184
|
- [data-retention](#data-retention) (2)
|
|
185
|
-
- [deal-
|
|
185
|
+
- [deal-room-content](#deal-room-content) (1)
|
|
186
|
+
- [deal-rooms](#deal-rooms) (4)
|
|
186
187
|
- [deleted-accounts](#deleted-accounts) (1)
|
|
187
188
|
- [deliverability-rules](#deliverability-rules) (1)
|
|
188
189
|
- [delivery-defaults](#delivery-defaults) (3)
|
|
@@ -495,15 +496,24 @@ Exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 some rows failed, 6 r
|
|
|
495
496
|
- [white-label-intake-submissions](#white-label-intake-submissions) (1)
|
|
496
497
|
- [whoami](#whoami) (1)
|
|
497
498
|
- [work](#work) (5)
|
|
499
|
+
- [workflow-approvals](#workflow-approvals) (3)
|
|
498
500
|
- [workflow-builder](#workflow-builder) (6)
|
|
501
|
+
- [workflow-calls](#workflow-calls) (1)
|
|
502
|
+
- [workflow-connections](#workflow-connections) (6)
|
|
499
503
|
- [workflow-estimates](#workflow-estimates) (1)
|
|
500
504
|
- [workflow-fields](#workflow-fields) (4)
|
|
505
|
+
- [workflow-formula-functions](#workflow-formula-functions) (1)
|
|
506
|
+
- [workflow-formulas](#workflow-formulas) (1)
|
|
501
507
|
- [workflow-runs](#workflow-runs) (15)
|
|
508
|
+
- [workflow-schedules](#workflow-schedules) (1)
|
|
502
509
|
- [workflow-secrets](#workflow-secrets) (4)
|
|
503
510
|
- [workflow-slack-channels](#workflow-slack-channels) (1)
|
|
504
511
|
- [workflow-slack-connection](#workflow-slack-connection) (1)
|
|
505
512
|
- [workflow-spend-limits](#workflow-spend-limits) (3)
|
|
513
|
+
- [workflow-step-tests](#workflow-step-tests) (1)
|
|
506
514
|
- [workflow-step-types](#workflow-step-types) (2)
|
|
515
|
+
- [workflow-table-rows](#workflow-table-rows) (3)
|
|
516
|
+
- [workflow-tables](#workflow-tables) (5)
|
|
507
517
|
- [workflow-templates](#workflow-templates) (2)
|
|
508
518
|
- [workflow-variables](#workflow-variables) (3)
|
|
509
519
|
- [workflow-versions](#workflow-versions) (4)
|
|
@@ -4313,6 +4323,14 @@ Change the workspace's data retention period. `PATCH /v1/data-retention`. Beta:
|
|
|
4313
4323
|
|
|
4314
4324
|
Flags: `--months`, `--data`, `--each`, `--concurrency`.
|
|
4315
4325
|
|
|
4326
|
+
## deal-room-content
|
|
4327
|
+
|
|
4328
|
+
### kenso deal-room-content update-section
|
|
4329
|
+
|
|
4330
|
+
Edit, approve or switch off a section. `PATCH /v1/deal-rooms/{dealRoomId}/sections/{sectionKey}`. Beta: needs `deal_room`.
|
|
4331
|
+
|
|
4332
|
+
Flags: `--deal-room-id` (required), `--section-key` (required), `--status`, `--data`, `--each`, `--concurrency`.
|
|
4333
|
+
|
|
4316
4334
|
## deal-rooms
|
|
4317
4335
|
|
|
4318
4336
|
### kenso deal-rooms create
|
|
@@ -4333,6 +4351,12 @@ List deal rooms. `GET /v1/deal-rooms` (a list). Beta: needs `deal_room`.
|
|
|
4333
4351
|
|
|
4334
4352
|
Flags: `--cursor`, `--limit`, `--opportunity-id`, `--all`, `--each`, `--concurrency`.
|
|
4335
4353
|
|
|
4354
|
+
### kenso deal-rooms share
|
|
4355
|
+
|
|
4356
|
+
Share a deal room. `POST /v1/deal-rooms/{dealRoomId}/share`. Beta: needs `deal_room`.
|
|
4357
|
+
|
|
4358
|
+
Flags: `--deal-room-id` (required), `--data`, `--each`, `--concurrency`.
|
|
4359
|
+
|
|
4336
4360
|
## deleted-accounts
|
|
4337
4361
|
|
|
4338
4362
|
### kenso deleted-accounts list
|
|
@@ -12503,6 +12527,26 @@ Send answers files to Kenso and write each one's results. `POST /v1/agent-work/c
|
|
|
12503
12527
|
|
|
12504
12528
|
Arguments: `<answers-file>`.
|
|
12505
12529
|
|
|
12530
|
+
## workflow-approvals
|
|
12531
|
+
|
|
12532
|
+
### kenso workflow-approvals decide
|
|
12533
|
+
|
|
12534
|
+
Approve or reject a workflow approval. `POST /v1/workflow-approvals/{approvalId}/decisions`. Beta: needs `workflows` and `workflows_power`.
|
|
12535
|
+
|
|
12536
|
+
Flags: `--approval-id` (required), `--decision`, `--note`, `--data`, `--each`, `--concurrency`.
|
|
12537
|
+
|
|
12538
|
+
### kenso workflow-approvals get
|
|
12539
|
+
|
|
12540
|
+
Get one workflow approval. `GET /v1/workflow-approvals/{approvalId}`. Beta: needs `workflows` and `workflows_power`.
|
|
12541
|
+
|
|
12542
|
+
Flags: `--approval-id` (required), `--each`, `--concurrency`.
|
|
12543
|
+
|
|
12544
|
+
### kenso workflow-approvals list
|
|
12545
|
+
|
|
12546
|
+
List the workspace's workflow approvals, newest first. `GET /v1/workflow-approvals` (a list). Beta: needs `workflows` and `workflows_power`.
|
|
12547
|
+
|
|
12548
|
+
Flags: `--assignee`, `--cursor`, `--limit`, `--status`, `--workflow-id`, `--all`, `--each`, `--concurrency`.
|
|
12549
|
+
|
|
12506
12550
|
## workflow-builder
|
|
12507
12551
|
|
|
12508
12552
|
### kenso workflow-builder build
|
|
@@ -12541,6 +12585,52 @@ List records to try the workflow on. `GET /v1/workflows/{workflowId}/test-record
|
|
|
12541
12585
|
|
|
12542
12586
|
Flags: `--workflow-id` (required), `--limit`, `--each`, `--concurrency`.
|
|
12543
12587
|
|
|
12588
|
+
## workflow-calls
|
|
12589
|
+
|
|
12590
|
+
### kenso workflow-calls create
|
|
12591
|
+
|
|
12592
|
+
Call a published workflow. `POST /v1/workflows/{workflowId}/calls`. Beta: needs `workflows` and `workflows_power`.
|
|
12593
|
+
|
|
12594
|
+
Flags: `--workflow-id` (required), `--wait-seconds`, `--data`, `--each`, `--concurrency`.
|
|
12595
|
+
|
|
12596
|
+
## workflow-connections
|
|
12597
|
+
|
|
12598
|
+
### kenso workflow-connections create
|
|
12599
|
+
|
|
12600
|
+
Create a workflow connection. `POST /v1/workflow-connections`. Beta: needs `workflows` and `workflows_power`.
|
|
12601
|
+
|
|
12602
|
+
Flags: `--name`, `--type`, `--secret-name`, `--base-url`, `--auth-name`, `--description`, `--data`, `--each`, `--concurrency`.
|
|
12603
|
+
|
|
12604
|
+
### kenso workflow-connections delete
|
|
12605
|
+
|
|
12606
|
+
Delete a workflow connection. `DELETE /v1/workflow-connections/{connectionName}`. Beta: needs `workflows` and `workflows_power`.
|
|
12607
|
+
|
|
12608
|
+
Flags: `--connection-name` (required), `--each`, `--concurrency`.
|
|
12609
|
+
|
|
12610
|
+
### kenso workflow-connections get
|
|
12611
|
+
|
|
12612
|
+
Get a workflow connection. `GET /v1/workflow-connections/{connectionName}`. Beta: needs `workflows` and `workflows_power`.
|
|
12613
|
+
|
|
12614
|
+
Flags: `--connection-name` (required), `--each`, `--concurrency`.
|
|
12615
|
+
|
|
12616
|
+
### kenso workflow-connections list
|
|
12617
|
+
|
|
12618
|
+
List the workspace's workflow connections. `GET /v1/workflow-connections` (a list). Beta: needs `workflows` and `workflows_power`.
|
|
12619
|
+
|
|
12620
|
+
Flags: `--cursor`, `--limit`, `--all`, `--each`, `--concurrency`.
|
|
12621
|
+
|
|
12622
|
+
### kenso workflow-connections test
|
|
12623
|
+
|
|
12624
|
+
Send one GET or HEAD through a workflow connection and report the status. `POST /v1/workflow-connections/{connectionName}/tests`. Beta: needs `workflows` and `workflows_power`.
|
|
12625
|
+
|
|
12626
|
+
Flags: `--connection-name` (required), `--method`, `--path`, `--expect-status`, `--data`, `--each`, `--concurrency`.
|
|
12627
|
+
|
|
12628
|
+
### kenso workflow-connections update
|
|
12629
|
+
|
|
12630
|
+
Update a workflow connection. `PATCH /v1/workflow-connections/{connectionName}`. Beta: needs `workflows` and `workflows_power`.
|
|
12631
|
+
|
|
12632
|
+
Flags: `--connection-name` (required), `--base-url`, `--secret-name`, `--auth-name`, `--description`, `--data`, `--each`, `--concurrency`.
|
|
12633
|
+
|
|
12544
12634
|
## workflow-estimates
|
|
12545
12635
|
|
|
12546
12636
|
### kenso workflow-estimates create
|
|
@@ -12575,6 +12665,22 @@ Rename a custom field. `PATCH /v1/workflow-fields/{fieldTarget}`. Beta: needs `w
|
|
|
12575
12665
|
|
|
12576
12666
|
Flags: `--field-target` (required), `--label`, `--data`, `--each`, `--concurrency`.
|
|
12577
12667
|
|
|
12668
|
+
## workflow-formula-functions
|
|
12669
|
+
|
|
12670
|
+
### kenso workflow-formula-functions list
|
|
12671
|
+
|
|
12672
|
+
List the formula functions. `GET /v1/workflow-formula-functions` (a list). Beta: needs `workflows` and `workflows_power`.
|
|
12673
|
+
|
|
12674
|
+
Flags: `--cursor`, `--limit`, `--all`, `--each`, `--concurrency`.
|
|
12675
|
+
|
|
12676
|
+
## workflow-formulas
|
|
12677
|
+
|
|
12678
|
+
### kenso workflow-formulas evaluate
|
|
12679
|
+
|
|
12680
|
+
Evaluate a workflow formula on a sample. `POST /v1/workflow-formulas/evaluate`. Beta: needs `workflows` and `workflows_power`.
|
|
12681
|
+
|
|
12682
|
+
Flags: `--formula`, `--data`, `--each`, `--concurrency`.
|
|
12683
|
+
|
|
12578
12684
|
## workflow-runs
|
|
12579
12685
|
|
|
12580
12686
|
### kenso workflow-runs bulk-cancel
|
|
@@ -12669,6 +12775,14 @@ Per-step aggregates of one workflow's runs. `GET /v1/workflow-runs/step-overview
|
|
|
12669
12775
|
|
|
12670
12776
|
Flags: `--created-after`, `--created-before`, `--is-test`, `--workflow-id`, `--no-is-test`, `--each`, `--concurrency`.
|
|
12671
12777
|
|
|
12778
|
+
## workflow-schedules
|
|
12779
|
+
|
|
12780
|
+
### kenso workflow-schedules get
|
|
12781
|
+
|
|
12782
|
+
Return when the workflow's schedules fire next. `GET /v1/workflows/{workflowId}/schedule`. Beta: needs `workflows` and `workflows_power`.
|
|
12783
|
+
|
|
12784
|
+
Flags: `--workflow-id` (required), `--param-version`, `--each`, `--concurrency`.
|
|
12785
|
+
|
|
12672
12786
|
## workflow-secrets
|
|
12673
12787
|
|
|
12674
12788
|
### kenso workflow-secrets create
|
|
@@ -12731,6 +12845,14 @@ Change one workflow's spend limits. `PATCH /v1/workflows/{workflowId}/spend-limi
|
|
|
12731
12845
|
|
|
12732
12846
|
Flags: `--workflow-id` (required), `--monthly-limit-millicredits`, `--per-run-limit-millicredits`, `--runs-per-day`, `--alert-percent`, `--at-limit`, `--data`, `--each`, `--concurrency`.
|
|
12733
12847
|
|
|
12848
|
+
## workflow-step-tests
|
|
12849
|
+
|
|
12850
|
+
### kenso workflow-step-tests create
|
|
12851
|
+
|
|
12852
|
+
Test one step against a sample. `POST /v1/workflow-step-tests`. Beta: needs `workflows` and `workflows_power`.
|
|
12853
|
+
|
|
12854
|
+
Flags: `--type`, `--data`, `--each`, `--concurrency`.
|
|
12855
|
+
|
|
12734
12856
|
## workflow-step-types
|
|
12735
12857
|
|
|
12736
12858
|
### kenso workflow-step-types get
|
|
@@ -12745,6 +12867,58 @@ List every step type, or one kind. `GET /v1/workflow-step-types` (a list). Beta:
|
|
|
12745
12867
|
|
|
12746
12868
|
Flags: `--cursor`, `--kind`, `--limit`, `--workflow-type`, `--all`, `--each`, `--concurrency`.
|
|
12747
12869
|
|
|
12870
|
+
## workflow-table-rows
|
|
12871
|
+
|
|
12872
|
+
### kenso workflow-table-rows delete
|
|
12873
|
+
|
|
12874
|
+
Delete rows of a data table by key or by a filter. `POST /v1/workflow-tables/{tableName}/row-deletions`. Beta: needs `workflows` and `workflows_power`.
|
|
12875
|
+
|
|
12876
|
+
Flags: `--table-name` (required), `--body-dry-run`, `--no-body-dry-run`, `--data`, `--each`, `--concurrency`.
|
|
12877
|
+
|
|
12878
|
+
### kenso workflow-table-rows list
|
|
12879
|
+
|
|
12880
|
+
List the rows of a data table. `GET /v1/workflow-tables/{tableName}/rows` (a list). Beta: needs `workflows` and `workflows_power`.
|
|
12881
|
+
|
|
12882
|
+
Flags: `--table-name` (required), `--cursor`, `--limit`, `--sort`, `--where`, `--all`, `--each`, `--concurrency`.
|
|
12883
|
+
|
|
12884
|
+
### kenso workflow-table-rows upsert
|
|
12885
|
+
|
|
12886
|
+
Insert or update rows of a data table by its key. `PUT /v1/workflow-tables/{tableName}/rows`. Beta: needs `workflows` and `workflows_power`.
|
|
12887
|
+
|
|
12888
|
+
Flags: `--table-name` (required), `--body-dry-run`, `--no-body-dry-run`, `--data`, `--each`, `--concurrency`.
|
|
12889
|
+
|
|
12890
|
+
## workflow-tables
|
|
12891
|
+
|
|
12892
|
+
### kenso workflow-tables create
|
|
12893
|
+
|
|
12894
|
+
Create a data table. `POST /v1/workflow-tables`. Beta: needs `workflows` and `workflows_power`.
|
|
12895
|
+
|
|
12896
|
+
Flags: `--name`, `--description`, `--data`, `--each`, `--concurrency`.
|
|
12897
|
+
|
|
12898
|
+
### kenso workflow-tables delete
|
|
12899
|
+
|
|
12900
|
+
Delete a data table and its rows. `DELETE /v1/workflow-tables/{tableName}`. Beta: needs `workflows` and `workflows_power`.
|
|
12901
|
+
|
|
12902
|
+
Flags: `--table-name` (required), `--each`, `--concurrency`.
|
|
12903
|
+
|
|
12904
|
+
### kenso workflow-tables get
|
|
12905
|
+
|
|
12906
|
+
Get a data table by name. `GET /v1/workflow-tables/{tableName}`. Beta: needs `workflows` and `workflows_power`.
|
|
12907
|
+
|
|
12908
|
+
Flags: `--table-name` (required), `--each`, `--concurrency`.
|
|
12909
|
+
|
|
12910
|
+
### kenso workflow-tables list
|
|
12911
|
+
|
|
12912
|
+
List the workspace's data tables. `GET /v1/workflow-tables` (a list). Beta: needs `workflows` and `workflows_power`.
|
|
12913
|
+
|
|
12914
|
+
Flags: `--cursor`, `--limit`, `--all`, `--each`, `--concurrency`.
|
|
12915
|
+
|
|
12916
|
+
### kenso workflow-tables update
|
|
12917
|
+
|
|
12918
|
+
Change a data table's description or add columns. `PATCH /v1/workflow-tables/{tableName}`. Beta: needs `workflows` and `workflows_power`.
|
|
12919
|
+
|
|
12920
|
+
Flags: `--table-name` (required), `--description`, `--data`, `--each`, `--concurrency`.
|
|
12921
|
+
|
|
12748
12922
|
## workflow-templates
|
|
12749
12923
|
|
|
12750
12924
|
### kenso workflow-templates get
|
package/docs/workflows.md
CHANGED
|
@@ -56,7 +56,7 @@ kenso mcp call load_skill --args '{"name":"workflows","reference":"references/de
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
- All three keys are optional. `workspaceId` is a string of digits. `profile` is a profile name. `workflows` maps a path relative to `kenso.json` (forward slashes) to a workflow id. One file holds one workflow and one workflow is bound to one file: binding a second is `already_bound` (exit 7). Other keys are kept when the CLI rewrites the file.
|
|
59
|
-
- The CLI looks for it from the current folder up to the first folder that holds `.git
|
|
59
|
+
- The CLI looks for it from the current folder up to the first folder that holds `.git`, else up to your home folder, never above it; for a command given a file, from that file's folder. It skips a `kenso.json` another user owns, or that anyone can write or sits in a folder anyone can write (such as `/tmp`): another user could have put it there to pick your workspace. A skipped file is named on stderr, and `init`, `pull`, `push` or `run` on a workflow file beside it stops with `folder_file_untrusted` (exit 2) instead of reading or writing over its bindings. Some mounts show every file as anyone's to write (WSL `/mnt/c`, SMB, exFAT): keep workflow files on a Linux folder there.
|
|
60
60
|
- The workspace is `--workspace`, else `KENSO_WORKSPACE_ID`, else `kenso.json`, else the profile's. The profile is `--profile`, else `KENSO_PROFILE`, else `kenso.json`, else the active profile. `kenso.json` never changes the API URL or the key.
|
|
61
61
|
- A file command run in another workspace than the one `kenso.json` names stops with `workspace_mismatch` (exit 2): its workflow ids belong to that workspace.
|
|
62
62
|
- It never holds a key or an API URL. A file with `apiKey`, `key`, `token`, a value starting with `kenso_`, or `apiUrl` is `folder_file_invalid` (exit 2), "kenso.json never holds a key or an API URL: remove <name>.", and nothing reads it. Invalid JSON, or a key of the wrong type, is the same error with the path and the key.
|
|
@@ -165,12 +165,13 @@ kenso workflows run 412 --file people.csv --record-type person --dry-run
|
|
|
165
165
|
- **Target.** A number is a workflow id. A file must be bound in `kenso.json` and equal to the published version, else `unpublished_changes` (exit 7), "This file differs from the published version.", with `next` naming the push that publishes it (with `--expected-hash` when the saved draft holds the file). A workflow that is not live is `invalid_state` (exit 7) with `next: kenso workflows publish --workflow-id <id>`. Nothing publishes by itself.
|
|
166
166
|
- **Record type** is the trigger's (`trigger.manual@1` takes its `with.recordType`); `--record-type` (`account`, `person`, `lead` or `place`) overrides it. A trigger that names no record type needs the flag (`not_runnable_on_records`, exit 2).
|
|
167
167
|
- **Input.** `--ids` is one id per line (`-` reads stdin). `--file` is a CSV: with an `id` column, those ids; without one and with record type `person`, each row is matched or created as a person in chunks of 200, with the columns `kenso people import` accepts and no email finding. Any other record type without an `id` column is `ids_required` (exit 2), which names `kenso contacts import` or `kenso accounts import`. Duplicated ids run once. A saved list runs through a workflow whose trigger is `trigger.saved_list@1` or `trigger.csv@1`; `--list` is not a flag.
|
|
168
|
-
- **Dry run.** `--dry-run`, and a run without `--yes`, estimate per chunk of up to 1,000 records, start nothing, and print `{dryRun, workflowId, records, recordType, credits: {needed, available, sufficient}, perRecord, expectedCredits, cap, next}`. `needed` is the estimate's maximum. A CSV without ids is estimated on its row count and creates no person.
|
|
168
|
+
- **Dry run.** `--dry-run`, and a run without `--yes`, estimate per chunk of up to 1,000 records, start nothing, and print `{dryRun, workflowId, records, recordType, credits: {needed, available, sufficient}, perRecord, expectedCredits, cap, next}`. `needed` is the estimate's maximum and `available` the workspace's balance. A value that could not be read is `null`, and the plan adds `estimateError` or `balanceError` with the reason. A CSV without ids is estimated on its row count and creates no person.
|
|
169
169
|
- **Confirmation.** Without `--yes`, a person at a terminal is asked once with the plan on screen. Under a coding agent the command prints the plan and stops, with `next` naming the same command with `--yes`.
|
|
170
170
|
- **`--max-credits <n>`** is enforced by the CLI; the server is sent no cap. The ceiling per record is the definition's `limits.creditsPerRun` when set (`cap.kind: "hard"`), else the estimate's maximum per record (`cap.kind: "estimate"`). The CLI starts the first `floor(n / ceiling)` records and reports the rest as `not_started` with reason `over --max-credits`. The plan and the summary print `cap: {maxCredits, kind, perRecord, willStart, notStarted}`. A cap below one record's ceiling starts nothing: `cap_too_low` (exit 6), with `next` naming the smallest cap that starts one record. A workspace out of credits starts nothing either (`out_of_credits`, exit 6).
|
|
171
171
|
- **`--wait`** follows each started run, up to 8 reads at a time, until it leaves `queued`, `running` and `waiting`, or `--timeout` (90s, 10m, 1h; default 30m) passes. A run still `waiting` at the timeout is reported as `waiting`. `--timeout` goes with `--wait`.
|
|
172
172
|
- **`--out <results.csv>`** (needs `--wait`) writes one row per input record when the batch ends: `row, id, status, runId, runStatus, creditsCharged, missReason, error`, then one column per step id holding that step's output as compact JSON. The path is checked before the first request: its folder must exist, and an existing file is refused (`file_exists`, exit 7) unless it is this run's own.
|
|
173
|
-
- **Summary.** One JSON object with `records`, `started`, `deduplicated`, `notStarted`, `succeeded`, `failed`, `waiting`, `missed` (reason to count), `creditsCharged` (`"pending"` without `--wait` or while runs are open), `cap`, `resultsCsv`, `appUrl` (the workflow's page in the app) and `next`, and the same counts on one stderr line. With `--wait`, a run that failed makes `next` its `kenso workflow-runs logs <runId>`.
|
|
173
|
+
- **Summary.** One JSON object with `records`, `started`, `deduplicated`, `notStarted`, `succeeded`, `failed`, `waiting`, `missed` (reason to count), `creditsCharged` (`"pending"` without `--wait` or while runs are open), `cap`, `resultsCsv`, `appUrl` (the workflow's page in the app, in the run's workspace: `https://app.ken.so/<workspaceId>/workflows/<id>`) and `next`, and the same counts on one stderr line. With `--wait`, a run that failed makes `next` its `kenso workflow-runs logs <runId>`.
|
|
174
|
+
- **Never twice.** A run is known by its input file's content, the workflow it resolves to and the workspace, not by how the command was typed: `ids.txt`, `./ids.txt` and a copy of the file are one input, and so are a bound file and its workflow id. The same run again starts nothing and answers from the finished run's folder with `alreadyDone: true`; with `--wait` and `--out` it reads that run's runs and writes the results file. A run on that input that would start records differently (another `--max-credits`, or a people file whose matches changed) is refused with `already_started` (exit 7) once the earlier run sent starts: `not-started.txt` in its folder holds the ids it did not start, and `next` runs only those. A run on that input that another kenso process is running now is `run_in_progress` (exit 7).
|
|
174
175
|
|
|
175
176
|
## The run folder
|
|
176
177
|
|
|
@@ -188,7 +189,7 @@ kenso workflow-runs logs <runId>
|
|
|
188
189
|
kenso workflow-runs logs <runId> --step qualify --full
|
|
189
190
|
```
|
|
190
191
|
|
|
191
|
-
One row per step run in start order: `{nodeId, stepType, status, attempt, startedAt, endedAt, ms, credits, error}`, NDJSON when piped. `--step` keeps one node; `--full` adds each step's `input`, `output` and `attempts`. A header line on stderr gives the run's status, workflow, record and the credits it charged, and `needs attention: <reason>` when one is set. A failed run ends with `next: kenso workflow-runs
|
|
192
|
+
One row per step run in start order: `{nodeId, stepType, status, attempt, startedAt, endedAt, ms, credits, error}`, NDJSON when piped. `--step` keeps one node; `--full` adds each step's `input`, `output` and `attempts`. A header line on stderr gives the run's status, workflow, record and the credits it charged, and `needs attention: <reason>` when one is set. A failed run ends with `next: kenso workflow-runs restart --run-id <id> --dry-run`, because `retry` refuses a run that has ended.
|
|
192
193
|
|
|
193
194
|
## Step outputs are kept 7 days
|
|
194
195
|
|
|
@@ -200,10 +201,10 @@ A succeeded run's step outputs are dropped 7 days after it finishes, unless the
|
|
|
200
201
|
|---|---|
|
|
201
202
|
| 0 | Done. For `run`, every record started and, with `--wait`, none failed |
|
|
202
203
|
| 1 | `test`: the test did not pass |
|
|
203
|
-
| 2 | Usage: `workflow_not_bound`, `folder_file_invalid`, `workspace_mismatch`, `not_runnable_on_records`, `ids_required`, or `--publish` without `--expected-hash` under a coding agent |
|
|
204
|
+
| 2 | Usage: `workflow_not_bound`, `folder_file_invalid`, `folder_file_untrusted`, `workspace_mismatch`, `not_runnable_on_records`, `ids_required`, or `--publish` without `--expected-hash` under a coding agent |
|
|
204
205
|
| 4 | `test`: `runtime_off`, the workspace cannot run workflows yet |
|
|
205
206
|
| 5 | `check` found the file not valid, the server refused a definition (`invalid_definition`), `run` has records that failed, were not found or were not started, or resume met `chunk_outcome_unknown` |
|
|
206
207
|
| 6 | `run`: the cap started nothing (`cap_too_low`), or the workspace is out of credits |
|
|
207
|
-
| 7 | A conflict: `file_exists`, `already_bound`, `draft_out_of_sync`, `hash_mismatch`, `test_required`, `version_conflict`, `unpublished_changes`, `invalid_state`,
|
|
208
|
+
| 7 | A conflict: `file_exists`, `already_bound`, `draft_out_of_sync`, `hash_mismatch`, `test_required`, `version_conflict`, `unpublished_changes`, `invalid_state`, an existing `--out` file, or a `run` on an input an earlier run started (`already_started`) or another process is running (`run_in_progress`) |
|
|
208
209
|
|
|
209
210
|
Every error is one JSON line on stderr with `code`, `message`, `hint` and `next`: see [Output and errors](output-and-errors.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kenso",
|
|
3
|
-
"version": "0.1.
|
|
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": "
|
|
52
|
+
"gitHead": "7f56610e26658aae47edf700f2c7cf3352ddf188"
|
|
53
53
|
}
|
package/skill/kenso/SKILL.md
CHANGED
|
@@ -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
|
package/skill/kenso-cli/SKILL.md
CHANGED
|
@@ -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;
|
|
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
|
|
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
|
|
package/skill/shipped.json
CHANGED
|
@@ -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
|
}
|