@keystrokehq/cli 0.1.112 → 0.1.114

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.
@@ -118,17 +118,28 @@ To discover apps/integrations and their actions, query the live catalog with the
118
118
  ```bash
119
119
  keystroke apps search "{query}" # find an app and its slug in the full catalog — start here
120
120
  keystroke apps list # apps registered/connectable in your org
121
- keystroke apps actions list <app> --search <q> # actions an app exposes
122
- keystroke apps actions get <app> <tool> # schema + how to run/import one action
121
+ keystroke apps get <slug> # catalog toolkit OR custom org template (see kind)
122
+ keystroke apps actions list <app> --search <q> # catalog toolkit actions (custom org apps → kind:custom guidance)
123
+ keystroke apps actions get <app> <tool> # schema + how to run/import one catalog action
123
124
  keystroke apps execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
124
125
  keystroke credentials list # what's already connected — check before asking the user to connect
125
126
  ```
126
127
 
128
+ Custom org apps (`{org}/{name}`) do not have catalog toolkit actions — use `apps get` / `apps sync` / `defineApp(...).action(...)` instead.
129
+
130
+ **Gateway / channel binding:** to put an agent in a Slack channel, connect **`slackbot`** (not `slack`), then verify `channels accounts --platform slack` is non-empty before bind. Full detail: `search_docs "external channels"` → `/learn/agents/external-channels`.
131
+
127
132
  To connect an app's credentials, use the `connect_app` tool to get a link for the user — a browser cannot open in this workspace, so do not use `keystroke connect`. See `search_docs "use credentials"` for binding credentials to workflow steps and agent tools.
128
133
 
129
134
  Credentials are for secrets. Non-secret config — spreadsheet IDs, channel names, base URLs — belongs in code as a literal constant or a workflow input. Keystroke projects don't use `.env`.
130
135
 
131
- If an integration or a required action isn't supported, it is *extremely* easy to build a custom oneconnections to any HTTP API or MCP server, including internal or private ones. Research the system's docs/spec first, then let `keystroke apps create --mcp|--openapi|--graphql <url>` scaffold it from the source, or hand-write it. `search_docs "custom integration"`.
136
+ If a **credentialed** integration isn't supported, build a proper custom appdo not invent standalone `defineCredential` + a lone action. Research the system's docs/spec first, then:
137
+
138
+ 1. Register a connectable org app with `keystroke apps create --mcp|--openapi|--graphql <url>` (or manual `--name` / `--description` / `--field`) when the user should enter secrets in the Apps UI — URL create is catalog registration, not only code scaffolding.
139
+ 2. Author with `defineApp` in `src/apps/` + `app.action(...)`.
140
+ 3. Have the user connect (`connect_app` link), then deploy.
141
+
142
+ Use `defineMcp` for MCP servers on agents. Credential-free project actions stay as plain `defineAction`. `search_docs "custom integration"`.
132
143
 
133
144
  ## Docs
134
145
 
@@ -150,6 +161,7 @@ Common pages to read with `query_docs` (e.g. `cat /learn/agents/build-agents.mdx
150
161
  | `/cli` | Full command reference, flags, JSON output |
151
162
  | `/explore-features` | Guide to find relevant feature documentation |
152
163
  | `/learn/agents/build-agents` | Models, tools, subagents, sandboxes, MCP tools on agents |
164
+ | `/learn/agents/external-channels` | Slack vs Slackbot; connect `slackbot` and bind channels |
153
165
  | `/learn/workflows/build-workflows` | Steps, orchestration, sandboxes, durable waits |
154
166
  | `/learn/workflows/authoring-best-practices` | Canvas-legible, replayable workflow patterns (hard + soft rules) |
155
167
  | `/learn/actions/overview` | Action rules (leaf units, no action-in-action) |
@@ -253,15 +253,16 @@ run: async ({ state, setState }) => {
253
253
 
254
254
  Keystroke has 1,000+ built-in integrations, and it's easy to build a custom one for any HTTP API or MCP server (including private/internal). **Research first, then build:** search the catalog thoroughly before assuming an app is missing; for anything custom or unfamiliar, web-fetch/search the system's real docs — `llms.txt`, OpenAPI/GraphQL specs, API reference — before writing code. Never guess endpoints or payloads.
255
255
 
256
- Discover apps and actions with the CLI — the docs integration index is **not** reliable for discovery. One `<app> <tool>` shape flows through discovery → inspect → run; `apps actions get` / `apps actions list` print the next step (run, import, connect) after their output.
256
+ Discover apps and actions with the CLI — the docs integration index is **not** reliable for discovery. One `<app> <tool>` shape flows through discovery → inspect → run for **catalog** apps; `apps actions get` / `apps actions list` print the next step after their output. Custom org apps (`{org}/{name}` from `apps create`) are different: `apps get` returns `kind:"custom"` (credential template); `apps actions list` returns guidance, not toolkit tools — actions live in project code via `defineApp(...).action(...)`.
257
257
 
258
258
  Think about testing as you build. Local tests don't link cloud credentials or the Keystroke client, so unit-test pure logic locally; for integrations, check needed apps/credentials and run each action once for real with `keystroke apps execute` (no deploy, no server) before wiring it into a workflow or agent — confirm the IDs, custom fields, and labels you're about to hard-code exist in the *connected* account. Schema inspection and dry-run flags prove nothing about the mutating path.
259
259
 
260
260
  ```bash
261
261
  keystroke apps list # all registered apps
262
262
  keystroke apps search "{query}" # find an app + slug in the full catalog
263
- keystroke apps actions list <app> --search <q> # actions an app exposes
264
- keystroke apps actions get <app> <tool> # schema + how to run/import one action
263
+ keystroke apps get <slug> # catalog toolkit OR custom credential template (kind)
264
+ keystroke apps actions list <app> --search <q> # catalog toolkit actions (custom kind:custom guidance)
265
+ keystroke apps actions get <app> <tool> # schema + how to run/import one catalog action
265
266
  keystroke apps execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
266
267
  keystroke credentials list # what's already connected
267
268
  keystroke connect <slug> # connect an app credential (opens web OAuth/api key flow for the user)
@@ -270,7 +271,27 @@ keystroke credentials create <key> --set apiKey=@env:MY_KEY # static API key
270
271
 
271
272
  `keystroke credentials list` is the **only** reliable connection check (`apps actions get` doesn't show status) — check it before connecting anything; the credential often already exists.
272
273
 
273
- Credentials are for secrets. Non-secret config — spreadsheet IDs, channel names, base URLs — belongs in code as a literal constant or a workflow input. Keystroke projects don't use `.env`. Missing a built-in integration? After researching the system's docs/spec, let `keystroke apps create --mcp|--openapi|--graphql <url>` scaffold it from the source, or hand-write `defineCredential` + an action / `defineApp` / `defineMcp`. See `/learn/credentials/custom-integrations`.
274
+ ### Gateway / channel binding
275
+
276
+ To put an agent in a Slack channel, connect **`slackbot`** — not `slack`.
277
+
278
+ ```bash
279
+ keystroke connect slackbot
280
+ keystroke channels accounts --platform slack # must be non-empty
281
+ keystroke channels bind --agent <slug> --platform slack --account <team-id> --channel <channel-id>
282
+ ```
283
+
284
+ Full detail: `/learn/agents/external-channels`.
285
+
286
+ Credentials are for secrets. Non-secret config — spreadsheet IDs, channel names, base URLs — belongs in code as a literal constant or a workflow input. Keystroke projects don't use `.env`.
287
+
288
+ Missing a built-in **credentialed** integration? After researching the system's docs/spec:
289
+
290
+ 1. **Catalog registration** (when the user should connect via Apps / `connect`) — `keystroke apps create --mcp|--openapi|--graphql <url>`, or manual `apps create --name … --description … --field …`. URL-based create registers a connectable org app; it is not only local code scaffolding.
291
+ 2. **Code authoring** — always `defineApp` in `src/apps/` + `app.action(...)`. Do **not** invent `src/credentials/foo.ts` + a lone `defineAction` for a new API.
292
+ 3. **Connect** — `keystroke connect <slug>` (or `credentials create` when you already have the secret), then deploy.
293
+
294
+ Use `defineMcp` for MCP servers attached to agents. Plain `defineAction` (no credentials) does not need an app. See `/learn/credentials/custom-integrations`.
274
295
 
275
296
  ## Skills & files
276
297
 
@@ -337,6 +358,7 @@ Invoke/inspect commands print JSON to stdout (exit 0 on success, 1 on failure)
337
358
  9. **Missing `name`/`description`** — required on every primitive (agents, workflows, actions, trigger sources). Typecheck passes without them; module load throws at deploy.
338
359
  10. **Integration actions throw on failure** — prebuilt actions return their typed output directly (the shape `keystroke apps actions get` shows) and **throw** on failure; don't port `{ data, error, successful }` envelope checks from Composio docs.
339
360
  11. **`.default()` on an input field makes it required in the `run()` call type** — action/workflow `run` inputs are typed from the schema's *parsed* output, so a defaulted field must still be passed at the call site. When callers should be able to omit a field, use `.optional()` and apply the fallback inside `run`.
361
+ 12. **Slack gateway** — connect agents to Slack channels with `slackbot` (`keystroke connect slackbot`). See [Gateway / channel binding](#gateway--channel-binding).
340
362
 
341
363
  ## Documentation
342
364
 
@@ -353,7 +375,7 @@ Key pages (every `Full detail:` pointer in this guide is also a docs path; the i
353
375
  | `/cli` | Full command reference, flags, JSON output |
354
376
  | `/explore-features` | Map of all feature documentation |
355
377
  | `/learn/agents/build-agents` | Models, tools, subagents, sandboxes, MCP tools on agents |
356
- | `/learn/agents/external-channels` | Slack / external channel bindings |
378
+ | `/learn/agents/external-channels` | Slack vs Slackbot; connect `slackbot` and bind channels |
357
379
  | `/learn/workflows/authoring-best-practices` | Canvas-legible, replayable workflow patterns |
358
380
  | `/learn/triggers/overview` | Choosing a trigger type (per-source pages live alongside) |
359
381
  | `/learn/credentials/connect-credentials` | `keystroke connect`, OAuth, project credentials |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/cli",
3
- "version": "0.1.112",
3
+ "version": "0.1.114",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/keystrokehq/keystroke.git",
@@ -43,8 +43,8 @@
43
43
  "tsdown": "^0.22.0",
44
44
  "tsx": "^4.22.3",
45
45
  "@keystrokehq/oxlint-config": "0.0.4",
46
- "@keystrokehq/tsdown-config": "0.0.5",
47
46
  "@keystrokehq/tsconfig": "0.0.3",
47
+ "@keystrokehq/tsdown-config": "0.0.5",
48
48
  "@keystrokehq/vitest-config": "0.0.7"
49
49
  },
50
50
  "scripts": {