kenso 0.1.71 → 0.1.73
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/README.md +3 -0
- package/dist/kenso.js +1492 -621
- package/dist/operations.json +1 -1
- package/docs/README.md +2 -1
- package/docs/connect.md +73 -0
- package/docs/output-and-errors.md +27 -0
- package/docs/reference.md +73 -4
- package/package.json +2 -2
- package/skill/kenso-cli/SKILL.md +2 -0
package/docs/README.md
CHANGED
|
@@ -98,12 +98,13 @@ Every page is in the package and prints offline with `kenso docs <topic>`.
|
|
|
98
98
|
| [Authentication](auth.md) | `auth` | API keys, browser login, profiles, workspaces, `doctor` |
|
|
99
99
|
| [Leads](leads.md) | `leads` | Import, update, remove, pause, tag and export leads, with recipes |
|
|
100
100
|
| [Batch runs](batch.md) | `batch` | Dry run and apply, run folders, results files, resume, rate limits, `--each` |
|
|
101
|
-
| [Output and errors](output-and-errors.md) | `output-and-errors` | The output contract, error JSON, error codes, exit codes |
|
|
101
|
+
| [Output and errors](output-and-errors.md) | `output-and-errors` | The output contract, error JSON, error codes, exit codes, live streams |
|
|
102
102
|
| [CRM (beta)](crm.md) | `crm` | Accounts, people, opportunities and CRM sync |
|
|
103
103
|
| [Studio (beta)](studio.md) | `studio` | Pull, push, validate, preview and fill templates |
|
|
104
104
|
| [Agent work (beta)](work.md) | `work` | My agent: your own coding agent writes Kenso's AI work with `kenso work run`, or pull and submit |
|
|
105
105
|
| [Webhooks](webhooks.md) | `webhooks` | Build a webhook handler locally: `kenso webhooks listen --forward-to`, `trigger`, the signature |
|
|
106
106
|
| [Developer sandbox](sandbox.md) | `sandbox` | `kenso sandbox`: a workspace of your own where sends are simulated, its test key, the reserved test leads |
|
|
107
|
+
| [Connect accounts](connect.md) | `connect` | `kenso connect`: an inbox, calendar, CRM, GitHub or other OAuth account, signed in by the person in a browser |
|
|
107
108
|
| [Coding agents](agents.md) | `agents` | Claude Code, Codex, Cursor, the Agent Skill, environment variables, sandboxes |
|
|
108
109
|
| Command reference | `reference` | Every command with its flags, generated from the CLI at build time: `kenso docs reference`, or `docs/reference.md` in the installed package |
|
|
109
110
|
|
package/docs/connect.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Connect accounts in the browser
|
|
2
|
+
|
|
3
|
+
`kenso connect <kind>` connects an inbox, a calendar, a CRM, GitHub or another account that signs in with OAuth. It starts the connect, prints the link, waits until the connection shows up in Kenso, and prints it as JSON.
|
|
4
|
+
|
|
5
|
+
The sign-in itself happens in a browser, always. Kenso refuses to finish an OAuth connect for an API key or an agent, on purpose: the account belongs to the person who signs in. So the CLI never finishes it. It hands the link to the person and watches.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
kenso connect inbox --provider google
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
To connect the mailbox, open https://accounts.google.com/o/oauth2/v2/auth?...
|
|
13
|
+
Waiting up to 10 minutes for the connection (Ctrl-C stops waiting).
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Once the person signs in, it prints the new inbox and exits 0:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{"connected":true,"kind":"inbox","connection":{"id":4812,"email":"sam@acme.com","provider":"google","status":"warmup"}}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Kinds
|
|
23
|
+
|
|
24
|
+
| Command | Connects | Watches |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `connect inbox --provider google\|microsoft` | A sending inbox (`--purpose campaign`, the default) or your own mailbox (`--purpose primary`) | `GET /v1/inboxes` for a new inbox, or one signed in again |
|
|
27
|
+
| `connect calendar --provider google\|microsoft` | A calendar, with email unless `--access calendar_only`. `--account-id cacc_...` signs one in again | `GET /v1/calendar-accounts` |
|
|
28
|
+
| `connect video --provider zoom\|webex` | Nothing: only a signed-in person can start a Zoom or Webex connect, so it says where in the app and waits | `GET /v1/video-connections` |
|
|
29
|
+
| `connect crm --provider <crm>` | hubspot, salesforce, pipedrive, attio, highlevel, dynamics (`--base-url`), zoho | `GET /v1/crm-connections` |
|
|
30
|
+
| `connect hubspot-knowledge` | HubSpot as a Knowledge source | `GET /v1/knowledge/sources` |
|
|
31
|
+
| `connect github` | The Kenso GitHub app, for Knowledge | `GET /v1/integrations/github/installations` |
|
|
32
|
+
| `connect migration` | Outreach, as a migration source. `--connection-id` signs one in again | `GET /v1/migration-connections` |
|
|
33
|
+
| `connect linkedin` | A LinkedIn account. `--linkedin-account-id` signs one in again | The account the start adds |
|
|
34
|
+
| `connect whatsapp` | A WhatsApp account. `--whatsapp-account-id` signs one in again | The account the start adds |
|
|
35
|
+
| `connect facebook`, `connect instagram` | A Facebook or Instagram account (beta workspaces) | The account the start adds |
|
|
36
|
+
|
|
37
|
+
CRMs that connect with an API key (close, twenty) and the API-key migration sources (Instantly, Smartlead, ...) need no browser: use `kenso crm-connections create` and `kenso migration-connections create`. Slack, Teams and the dialers have their own generated commands, such as `kenso slack-connection start`.
|
|
38
|
+
|
|
39
|
+
## Under a coding agent
|
|
40
|
+
|
|
41
|
+
When the CLI runs under a coding agent (Claude Code, Codex, Cursor ...), it never opens a browser. It prints the link on stderr and asks the agent to hand it to its person:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
To connect the mailbox, open https://accounts.google.com/o/oauth2/v2/auth?...
|
|
45
|
+
Ask the person you are working with to open the link and finish the sign-in in their browser. Waiting up to 10 minutes.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
A person at a desktop gets the link opened in their browser too. `--no-browser` only prints it.
|
|
49
|
+
|
|
50
|
+
An agent that cannot wait runs `--no-wait`: the command prints the start answer, link included, as JSON and ends. It then checks the list itself, for example `kenso inboxes list`.
|
|
51
|
+
|
|
52
|
+
## Flags
|
|
53
|
+
|
|
54
|
+
| Flag | What it does |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `--timeout <seconds>` | How long to wait, 600 by default. Most links expire after 10 minutes; LinkedIn and WhatsApp links after an hour |
|
|
57
|
+
| `--no-wait` | Print the start answer and end |
|
|
58
|
+
| `--no-browser` | Never open a browser |
|
|
59
|
+
| `--dry-run` | Print the request it would send and the route it would watch, and send nothing |
|
|
60
|
+
|
|
61
|
+
It checks every 5 seconds, and only items of the provider (or vendor, or account) you named. A connect counts when a new item shows up, or when a known one takes a new sign-in: its `connectedAt` moves, or it comes back from a disconnected status. So signing an account in again counts, and another inbox leaving warmup or a CRM resuming its sync does not.
|
|
62
|
+
|
|
63
|
+
## Exit codes
|
|
64
|
+
|
|
65
|
+
| Code | When |
|
|
66
|
+
|---|---|
|
|
67
|
+
| 0 | Connected (or, for `video`, connected already) |
|
|
68
|
+
| 1 | `connect_timeout`: nothing showed up in time. `connect_failed`: the account's sign-in failed (`credentials_error`, `connect_failed`) |
|
|
69
|
+
| 2 | A bad flag, such as an unknown `--provider` |
|
|
70
|
+
| 3, 4, 6, 8 | The API's answer, as for every command (`kenso docs output-and-errors`) |
|
|
71
|
+
| 130 | Ctrl-C |
|
|
72
|
+
|
|
73
|
+
A Google or Microsoft mailbox you connect as `--purpose primary` that is not your login email waits for a confirmation in app.ken.so after the sign-in. It shows up only once you confirm it there, so the command times out with that hint.
|
|
@@ -54,6 +54,33 @@ kenso tags list --limit 50
|
|
|
54
54
|
kenso tags list --all
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
## Live streams
|
|
58
|
+
|
|
59
|
+
`kenso sync events` and `kenso onboarding-builds events` follow a live stream of server-sent events. They print one JSON line per event as it arrives, on a terminal too, with the event's name, its id when it has one, and its data:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{"event":"hello","data":{"buildId":"obd_2x","status":"building","stage":"read","lastEventId":0}}
|
|
63
|
+
{"event":"stage","id":"41","data":{"stage":"plan"}}
|
|
64
|
+
{"event":"done","id":"42","data":{}}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
A stream has no time limit while events arrive. The server ends each connection after 15 minutes with a `bye` event; the command then connects again at once, and after a dropped connection or 60 s without even a keepalive, after a second. A connection that brought nothing but `hello` and `bye` (a server that is restarting) backs off 1, 2, 4 ... 30 s. Once events carry an id (`onboarding-builds events`), it sends the last whole event's id as `Last-Event-ID`, so no event is lost or printed twice. A refusal (401, 403, 404) ends it at once; eight failed or empty connects in a row end it with the last error.
|
|
68
|
+
|
|
69
|
+
It runs until Ctrl-C (exit 130; every line printed is whole), or until one of these:
|
|
70
|
+
|
|
71
|
+
| Flag | Ends the command |
|
|
72
|
+
|---|---|
|
|
73
|
+
| `--until <event>` | After the first event with that name; several names are comma-separated: `--until done,error` |
|
|
74
|
+
| `--max-events <n>` | After n events, `hello` and `bye` included |
|
|
75
|
+
| `--once` | When the server closes the connection, instead of connecting again |
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
kenso onboarding-builds events --build-id obd_2x --until done,error
|
|
79
|
+
kenso sync events --max-events 2 # hello, then the first poke
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`--output`, `--fields` and `--query` do not apply to a stream. `--last-event-id` starts an onboarding build stream after that id.
|
|
83
|
+
|
|
57
84
|
## Errors
|
|
58
85
|
|
|
59
86
|
When stderr is not a terminal, an error is one JSON line on stderr:
|
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.73 (API contracts 0ecb8c577385) by `scripts/build-reference.ts`. Do not edit it: `pnpm build` writes it again.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
1676 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
|
|
|
@@ -133,6 +133,7 @@ Exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 some rows failed, 6 r
|
|
|
133
133
|
- [companies](#companies) (2)
|
|
134
134
|
- [company-data](#company-data) (1)
|
|
135
135
|
- [completion](#completion) (1)
|
|
136
|
+
- [connect](#connect) (11)
|
|
136
137
|
- [contact-behavior](#contact-behavior) (1)
|
|
137
138
|
- [contact-exports](#contact-exports) (3)
|
|
138
139
|
- [contact-fields](#contact-fields) (1)
|
|
@@ -3218,6 +3219,74 @@ Print the tab-completion script for bash, zsh or fish.
|
|
|
3218
3219
|
|
|
3219
3220
|
Arguments: `<shell>`.
|
|
3220
3221
|
|
|
3222
|
+
## connect
|
|
3223
|
+
|
|
3224
|
+
### kenso connect calendar
|
|
3225
|
+
|
|
3226
|
+
Connect a Google or Microsoft calendar in the browser. API operations: `calendar-accounts.create-connect-session`, `calendar-accounts.list`.
|
|
3227
|
+
|
|
3228
|
+
Flags: `--access`, `--account-id`, `--no-browser`, `--no-wait`, `--provider`, `--timeout`.
|
|
3229
|
+
|
|
3230
|
+
### kenso connect crm
|
|
3231
|
+
|
|
3232
|
+
Connect a CRM (HubSpot, Salesforce, Pipedrive ...) in the browser. API operations: `crm-connections.create`, `crm-connections.list`.
|
|
3233
|
+
|
|
3234
|
+
Flags: `--base-url`, `--no-browser`, `--no-wait`, `--provider`, `--return-path`, `--timeout`.
|
|
3235
|
+
|
|
3236
|
+
### kenso connect facebook
|
|
3237
|
+
|
|
3238
|
+
Connect a Facebook account in the browser. API operations: `facebook-accounts.create-connect-session`, `facebook-accounts.create-reconnect-session`, `facebook-accounts.get`.
|
|
3239
|
+
|
|
3240
|
+
Flags: `--facebook-account-id`, `--no-browser`, `--no-wait`, `--timeout`.
|
|
3241
|
+
|
|
3242
|
+
### kenso connect github
|
|
3243
|
+
|
|
3244
|
+
Install the Kenso GitHub app in the browser. API operations: `github-installations.get-install-url`, `github-installations.list`.
|
|
3245
|
+
|
|
3246
|
+
Flags: `--no-browser`, `--no-wait`, `--timeout`.
|
|
3247
|
+
|
|
3248
|
+
### kenso connect hubspot-knowledge
|
|
3249
|
+
|
|
3250
|
+
Connect HubSpot as a Knowledge source in the browser. API operations: `knowledge-hubspot.create-connect-session`, `knowledge-sources.list`.
|
|
3251
|
+
|
|
3252
|
+
Flags: `--no-browser`, `--no-wait`, `--timeout`.
|
|
3253
|
+
|
|
3254
|
+
### kenso connect inbox
|
|
3255
|
+
|
|
3256
|
+
Connect a Google or Microsoft inbox in the browser. API operations: `inboxes.create-connect-session`, `inboxes.list`.
|
|
3257
|
+
|
|
3258
|
+
Flags: `--no-browser`, `--no-wait`, `--provider`, `--purpose`, `--return-to`, `--timeout`.
|
|
3259
|
+
|
|
3260
|
+
### kenso connect instagram
|
|
3261
|
+
|
|
3262
|
+
Connect an Instagram account in the browser. API operations: `instagram-accounts.create-connect-session`, `instagram-accounts.get`.
|
|
3263
|
+
|
|
3264
|
+
Flags: `--instagram-account-id`, `--name`, `--no-browser`, `--no-wait`, `--timeout`.
|
|
3265
|
+
|
|
3266
|
+
### kenso connect linkedin
|
|
3267
|
+
|
|
3268
|
+
Connect a LinkedIn account in the browser. API operations: `linkedin-accounts.create-connect-session`, `linkedin-accounts.get`.
|
|
3269
|
+
|
|
3270
|
+
Flags: `--import-connections`, `--linkedin-account-id`, `--network-only`, `--no-browser`, `--no-wait`, `--timeout`.
|
|
3271
|
+
|
|
3272
|
+
### kenso connect migration
|
|
3273
|
+
|
|
3274
|
+
Connect a migration source (Outreach) in the browser. API operations: `migration-connections.create-connect-session`, `migration-connections.list`.
|
|
3275
|
+
|
|
3276
|
+
Flags: `--connection-id`, `--no-browser`, `--no-wait`, `--timeout`, `--vendor`.
|
|
3277
|
+
|
|
3278
|
+
### kenso connect video
|
|
3279
|
+
|
|
3280
|
+
Wait for a Zoom or Webex connection made in the app. `GET /v1/video-connections`.
|
|
3281
|
+
|
|
3282
|
+
Flags: `--no-browser`, `--no-wait`, `--provider`, `--timeout`.
|
|
3283
|
+
|
|
3284
|
+
### kenso connect whatsapp
|
|
3285
|
+
|
|
3286
|
+
Connect a WhatsApp account in the browser. API operations: `whatsapp-accounts.create-connect-session`, `whatsapp-accounts.get`.
|
|
3287
|
+
|
|
3288
|
+
Flags: `--no-browser`, `--no-wait`, `--timeout`, `--whatsapp-account-id`.
|
|
3289
|
+
|
|
3221
3290
|
## contact-behavior
|
|
3222
3291
|
|
|
3223
3292
|
### kenso contact-behavior get
|
|
@@ -7326,7 +7395,7 @@ Flags: `--source`, `--brief`, `--website`, `--mode`, `--experience`, `--list-inv
|
|
|
7326
7395
|
|
|
7327
7396
|
Stream an onboarding build's frames. `GET /v1/onboarding/builds/{buildId}/events`. Beta: needs `onboarding_v5`.
|
|
7328
7397
|
|
|
7329
|
-
Flags: `--build-id` (required), `--last-event-id`, `--
|
|
7398
|
+
Flags: `--build-id` (required), `--last-event-id`, `--until`, `--max-events`, `--once`.
|
|
7330
7399
|
|
|
7331
7400
|
### kenso onboarding-builds get
|
|
7332
7401
|
|
|
@@ -9670,7 +9739,7 @@ Flags: `--limit`, `--since`, `--each`, `--concurrency`.
|
|
|
9670
9739
|
|
|
9671
9740
|
Hold open a stream that says when the workspace changed. `GET /v1/sync/events`. Beta: needs `sync_engine`.
|
|
9672
9741
|
|
|
9673
|
-
Flags: `--
|
|
9742
|
+
Flags: `--until`, `--max-events`, `--once`.
|
|
9674
9743
|
|
|
9675
9744
|
### kenso sync hello
|
|
9676
9745
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kenso",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
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": "0415c31c7f371b35ca905fae0ec26dc56d63454d"
|
|
53
53
|
}
|
package/skill/kenso-cli/SKILL.md
CHANGED
|
@@ -23,6 +23,8 @@ kenso studio fill 12 --accounts ids.txt --dry-run # or --campaign 10546 --cont
|
|
|
23
23
|
kenso opportunities update --each rows.csv --dry-run # any API command on a file of rows (CSV or JSONL; keys fill flags and body). One record: kenso campaigns update --campaign-id 812 --name Q4 --dry-run
|
|
24
24
|
kenso mcp call list_skills # only to list Ken's skills
|
|
25
25
|
kenso logs tail --status 4xx,5xx --since 10m # stream the workspace's failed API calls, one line each; Ctrl-C stops (exit 4 = not on for the workspace yet)
|
|
26
|
+
kenso connect inbox --provider google # also calendar, crm, github, linkedin ...: hand the printed link to the person (only they can sign in), it waits and prints the connection
|
|
27
|
+
kenso onboarding-builds events --build-id obd_2x --until done,error # live streams: one JSON line per event, reconnects itself
|
|
26
28
|
```
|
|
27
29
|
|
|
28
30
|
Charges: `accounts import` per new account, `studio fill` per page (again for ids from another file): show the estimate. `pinned_by_user`: with the person's OK, rerun with `--overwrite-pinned`. Workflows: `kenso workflows brief` 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.
|