@keystrokehq/cli 0.1.49 → 0.1.51
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/README.md +38 -3
- package/dist/dist-B4IgTkp3.mjs.map +1 -1
- package/dist/{dist-DJFUIl5O.mjs → dist-BVw5-nbD.mjs} +3 -3
- package/dist/{dist-DJFUIl5O.mjs.map → dist-BVw5-nbD.mjs.map} +1 -1
- package/dist/dist-DGiFjeeF.mjs +3 -0
- package/dist/{dist-rdfKnOL3.mjs → dist-GOTKB94Y.mjs} +151 -9
- package/dist/dist-GOTKB94Y.mjs.map +1 -0
- package/dist/index.mjs +288 -246
- package/dist/index.mjs.map +1 -1
- package/dist/skills-bundle/_AGENTS.mcp.md +19 -19
- package/dist/skills-bundle/_AGENTS.md +25 -25
- package/dist/templates/hello-world/README.md +1 -1
- package/package.json +1 -1
- package/dist/dist-rdfKnOL3.mjs.map +0 -1
- package/dist/dist-vpjsc5px.mjs +0 -3
|
@@ -17,7 +17,7 @@ The **keystroke platform** is the hosted control plane and the shared web worksp
|
|
|
17
17
|
| Workflows | `src/workflows/` | `@keystrokehq/keystroke/workflow` |
|
|
18
18
|
| Triggers | `src/triggers/` | `@keystrokehq/keystroke/trigger` |
|
|
19
19
|
| Apps | `src/apps/` | `@keystrokehq/keystroke/app` |
|
|
20
|
-
| Integrations | npm packages + catalog | `@keystrokehq/exa`, `@keystrokehq/slack`, … — discover with `exec_command` + `keystroke
|
|
20
|
+
| Integrations | npm packages + catalog | `@keystrokehq/exa`, `@keystrokehq/slack`, … — discover with `exec_command` + `keystroke apps search` |
|
|
21
21
|
| Skills / files | `src/skills/`, `src/files/` | attached on `defineAgent` |
|
|
22
22
|
|
|
23
23
|
Default-export each module — the server discovers files under `src/`.
|
|
@@ -66,7 +66,7 @@ Workflows also render as an interactive **canvas** in the platform. Keep durable
|
|
|
66
66
|
- **Research real APIs before mirroring them** — building actions for custom integrations is very common; web search and fetch the actual reference & explore relevant docs, don't guess endpoints or payload shapes.
|
|
67
67
|
- **Run before you claim you are finished** — deploy with `deploy_project`, run it in the cloud via `exec_command`, and read the real output before activating live triggers or claiming you are finished. Chat with agents and run workflows to confirm they behave correctly.
|
|
68
68
|
- **Cover obvious edge cases** and write simple tests as needed (null field, empty array, a step that throws).
|
|
69
|
-
- **Verify integration prerequisites** — before composing a catalog action into a workflow, run it once with `keystroke
|
|
69
|
+
- **Verify integration prerequisites** — before composing a catalog action into a workflow, run it once with `keystroke apps execute` (via `exec_command`) to confirm the IDs and fields exist in the connected account.
|
|
70
70
|
- **Connected apps aren't in `.env`** — deploy never uploads `.env`; use the `connect_app` tool to get a link for the user to connect integrations in the web app (a browser cannot open in this workspace).
|
|
71
71
|
- **Filtered deploys** — determine if you should do a full vs filtered deploy, or use WIP ignore directives (`search_docs "filtered deploy"`).
|
|
72
72
|
- **Dependencies** — use the project's existing package manager (`package.json` `packageManager` field or lockfile); default to npm only on a freshly created project with no lockfile. Deploy uploads only the built `dist/` artifact — a lockfile is not part of what ships to the platform.
|
|
@@ -78,22 +78,22 @@ Use `exec_command` with the keystroke CLI — credentials are injected automatic
|
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
80
|
# Workflows
|
|
81
|
-
keystroke
|
|
82
|
-
keystroke
|
|
83
|
-
keystroke
|
|
84
|
-
keystroke
|
|
81
|
+
keystroke workflows list # list deployed workflows
|
|
82
|
+
keystroke workflows run <workflow-key> --input '{}' # invoke a workflow
|
|
83
|
+
keystroke workflows runs list <workflow-key> # recent runs for a workflow
|
|
84
|
+
keystroke workflows runs get <workflow-key> <run-id> --include steps,trace # one run in full: input, each step, execution trace
|
|
85
85
|
|
|
86
86
|
# Agents
|
|
87
|
-
keystroke
|
|
88
|
-
keystroke
|
|
89
|
-
keystroke
|
|
90
|
-
keystroke
|
|
87
|
+
keystroke agents list # list deployed agents
|
|
88
|
+
keystroke agents prompt <agent-key> --message "Hi" # send a message (add --session-id to continue a session)
|
|
89
|
+
keystroke agents sessions list <agent-key> # recent sessions for an agent
|
|
90
|
+
keystroke agents sessions get <agent-key> <session-id> --include messages,trace # one session in full: messages, execution trace
|
|
91
91
|
|
|
92
92
|
# Triggers (attachment id is <trigger-key>:<workflow-key>)
|
|
93
|
-
keystroke
|
|
94
|
-
keystroke
|
|
95
|
-
keystroke
|
|
96
|
-
keystroke
|
|
93
|
+
keystroke triggers list # list deployed triggers
|
|
94
|
+
keystroke triggers url <trigger-key> # print a trigger's webhook URL
|
|
95
|
+
keystroke triggers runs list <trigger-key>:<workflow-key> # recent runs for a trigger→workflow attachment
|
|
96
|
+
keystroke triggers runs get <trigger-key>:<workflow-key> <run-id> --include workflows,trace # one run in full: workflows fired, execution trace
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
Read `src/` first — existing agents, workflows, actions, and triggers are your best map of how this project works.
|
|
@@ -103,11 +103,11 @@ Read `src/` first — existing agents, workflows, actions, and triggers are your
|
|
|
103
103
|
To discover apps/integrations and their actions, query the live catalog with the CLI via `exec_command` (the docs integration index is unreliable):
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
|
-
keystroke
|
|
107
|
-
keystroke
|
|
108
|
-
keystroke
|
|
109
|
-
keystroke
|
|
110
|
-
keystroke
|
|
106
|
+
keystroke apps list # apps registered/connectable in your org
|
|
107
|
+
keystroke apps search <query> # find an app and its slug in the full catalog
|
|
108
|
+
keystroke apps actions <app> --search <q> # actions an app exposes
|
|
109
|
+
keystroke apps action <app> <tool> # schema + how to run/import one action
|
|
110
|
+
keystroke apps execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
|
|
111
111
|
keystroke credentials list # what's already connected — check before asking the user to connect
|
|
112
112
|
```
|
|
113
113
|
|
|
@@ -67,20 +67,20 @@ pnpm test # same — package.json scripts call the CLI
|
|
|
67
67
|
Keystroke is deploy-first: build, ship, then run and inspect what's live. Deploy often.
|
|
68
68
|
|
|
69
69
|
1. **Auth once** — `keystroke auth login` (token is stored and reused).
|
|
70
|
-
2. **Verify prerequisites** — `keystroke
|
|
70
|
+
2. **Verify prerequisites** — `keystroke apps execute <app> <tool> --input '{...}'` runs any connected catalog action against the cloud with no deploy and no server. Before wiring an integration into a workflow, execute it once for real: confirm the IDs, custom fields, and labels you're about to hard-code actually exist in the *connected* account. Schema inspection and hand-rolled dry-run flags prove nothing about the mutating path.
|
|
71
71
|
3. **Edit** primitives under `src/`. Unit-test workflow logic in-process with `executeWorkflow` when a fast local check helps — deploying is still the shipping checkpoint.
|
|
72
72
|
4. **Deploy** — `keystroke deploy` (full) or `keystroke deploy --filter agents/support` (one module). Deploy runs lint and typecheck first — attempt it directly; do not pre-run lint, typecheck, or build.
|
|
73
|
-
5. **Run** — `keystroke
|
|
73
|
+
5. **Run** — `keystroke workflows run <slug> --input '{...}'` / `keystroke agents prompt <slug> --message "..."`.
|
|
74
74
|
6. **Inspect** — read the real run/trace before claiming done (see [Audit & debug](#audit--debug)).
|
|
75
75
|
7. Repeat.
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
78
|
keystroke auth status # current user + org
|
|
79
|
-
keystroke
|
|
79
|
+
keystroke projects list # your platform projects
|
|
80
80
|
keystroke deploy # lint + typecheck + build + ship dist/ (first deploy must be full)
|
|
81
|
-
keystroke
|
|
82
|
-
keystroke
|
|
83
|
-
keystroke
|
|
81
|
+
keystroke workflows run greeting --input '{"name":"Ada"}' # run a workflow
|
|
82
|
+
keystroke agents prompt hello --message "Hi" # prompt an agent
|
|
83
|
+
keystroke apps execute github github_get_the_authenticated_user # run a connected catalog action
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
New project: `keystroke init my-app --yes`, then deploy. Join an existing cloud project: `keystroke pull --project <slug>`.
|
|
@@ -216,7 +216,7 @@ export default defineWebhookSource({
|
|
|
216
216
|
|
|
217
217
|
Filters live on the source; `transform` lives on the workflow attachment. Agents use `.attach({ agent, prompt })` (not `transform`). Attachment id: `{sourceSlug}:{targetSlug}`.
|
|
218
218
|
|
|
219
|
-
**Deploy timing** — webhooks are passive and safe to deploy any time. A poll fires immediately on deploy; a cron waits for its next scheduled slot, then runs unattended. Until the workflow is verified, pause with `keystroke
|
|
219
|
+
**Deploy timing** — webhooks are passive and safe to deploy any time. A poll fires immediately on deploy; a cron waits for its next scheduled slot, then runs unattended. Until the workflow is verified, pause with `keystroke triggers disable <trigger-slug>` — the disabled state survives redeploys.
|
|
220
220
|
|
|
221
221
|
## Integrations & credentials
|
|
222
222
|
|
|
@@ -224,20 +224,20 @@ Keystroke has 1,000+ built-in integrations, and it's easy to build a custom one
|
|
|
224
224
|
|
|
225
225
|
Discover apps and actions with the CLI — the docs integration index is **not** reliable for discovery:
|
|
226
226
|
|
|
227
|
-
One `<app> <tool>` shape flows through discovery → inspect → run. `
|
|
227
|
+
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.
|
|
228
228
|
|
|
229
229
|
```bash
|
|
230
|
-
keystroke
|
|
231
|
-
keystroke
|
|
232
|
-
keystroke
|
|
233
|
-
keystroke
|
|
234
|
-
keystroke
|
|
230
|
+
keystroke apps list # all registered apps
|
|
231
|
+
keystroke apps search <query> # find an app + slug in the full catalog
|
|
232
|
+
keystroke apps actions list <app> --search <q> # actions an app exposes
|
|
233
|
+
keystroke apps actions get <app> <tool> # schema + how to run/import one action
|
|
234
|
+
keystroke apps execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
|
|
235
235
|
keystroke credentials list # what's already connected — check before asking the user to connect
|
|
236
236
|
keystroke connect <slug> # connect an app credential (opens web OAuth/api key flow for the user)
|
|
237
|
-
keystroke credentials
|
|
237
|
+
keystroke credentials create <key> --set apiKey=@env:MY_KEY # static API key
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
Check `keystroke credentials list` before telling the user to connect anything — the credential often already exists (each row shows the app and scope; `
|
|
240
|
+
Check `keystroke credentials list` before telling the user to connect anything — the credential often already exists (each row shows the app and scope; `apps actions get` output does *not* show connection status, so the list is the only reliable check).
|
|
241
241
|
|
|
242
242
|
Credentials are for secrets. Non-secret config — spreadsheet IDs, channel names, base URLs — belongs in code as a literal constant or a workflow input. There is no platform variable store and `keystroke deploy` **never uploads `.env`**, so a constant in source is the correct home, not a workaround. Missing a built-in integration? Use `defineCredential` + an action, `defineApp`, or `defineMcp`. See `/learn/credentials/custom-integrations`.
|
|
243
243
|
|
|
@@ -259,16 +259,16 @@ Both materialize into the agent's `/workspace/agent/...` environment before each
|
|
|
259
259
|
Inspect deployed runs with `--include` to see full traces:
|
|
260
260
|
|
|
261
261
|
```bash
|
|
262
|
-
keystroke
|
|
263
|
-
keystroke
|
|
262
|
+
keystroke workflows runs list <workflow-slug>
|
|
263
|
+
keystroke workflows runs get <workflow-slug> <run-id> --include steps,trace
|
|
264
264
|
|
|
265
|
-
keystroke
|
|
266
|
-
keystroke
|
|
265
|
+
keystroke agents sessions list <agent-slug>
|
|
266
|
+
keystroke agents sessions get <agent-slug> <session-id> --include messages,trace
|
|
267
267
|
|
|
268
|
-
keystroke
|
|
269
|
-
keystroke
|
|
270
|
-
keystroke
|
|
271
|
-
keystroke
|
|
268
|
+
keystroke triggers list
|
|
269
|
+
keystroke triggers url <trigger-slug> # webhook URL (+ ?token= on platform)
|
|
270
|
+
keystroke triggers runs get <trigger-slug> <run-id> --workflow <workflow-slug> --include workflows,trace
|
|
271
|
+
keystroke triggers disable <trigger-slug> # pause without redeploy; --workflow/--agent narrows to one attachment
|
|
272
272
|
|
|
273
273
|
keystroke history list --kind workflow --status failed
|
|
274
274
|
```
|
|
@@ -280,10 +280,10 @@ Invoke/inspect commands print JSON to stdout (exit 0 on success, 1 on failure)
|
|
|
280
280
|
- [ ] Deployed the change and read the real run output/trace — not just "it should work".
|
|
281
281
|
- [ ] Prompted agents / ran workflows with realistic input and verified behavior.
|
|
282
282
|
- [ ] Researched real APIs before mirroring them in custom integration actions — no guessed endpoints or payloads.
|
|
283
|
-
- [ ] Executed each mutating integration action once via `keystroke
|
|
283
|
+
- [ ] Executed each mutating integration action once via `keystroke apps execute` before composing it — a passing dry-run flag doesn't count.
|
|
284
284
|
- [ ] Covered obvious edge cases (null field, empty array, a step that throws) with a simple test where warranted.
|
|
285
285
|
- [ ] Checked `keystroke credentials list` before connecting; connected any new apps with `keystroke connect` (not `.env`).
|
|
286
|
-
- [ ] Tested manually before deploying attached cron/polling triggers, or used `
|
|
286
|
+
- [ ] Tested manually before deploying attached cron/polling triggers, or used `triggers disable` to pause until ready.
|
|
287
287
|
|
|
288
288
|
## Common gotchas
|
|
289
289
|
|
|
@@ -7,7 +7,7 @@ Lint, typecheck, and test configs live in the CLI; this project only adds the pa
|
|
|
7
7
|
```bash
|
|
8
8
|
pnpm install
|
|
9
9
|
keystroke auth login # once
|
|
10
|
-
keystroke
|
|
10
|
+
keystroke projects link --project <slug> # keystroke projects list
|
|
11
11
|
keystroke deploy # lint + typecheck + build + ship dist/ (no pre-steps needed)
|
|
12
12
|
```
|
|
13
13
|
|