@keystrokehq/cli 0.1.59 → 0.1.60

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.
@@ -46,12 +46,16 @@ my-app/
46
46
 
47
47
  Each primitive imports from `@keystrokehq/keystroke/<piece>` (`/agent`, `/action`, `/workflow`, `/trigger`, `/sandbox`). Integrations are `@keystrokehq/<slug>` packages.
48
48
 
49
+ When you add any `@keystrokehq/*` package, pin it to `"latest"` in `package.json` — e.g. `"@keystrokehq/gmail": "latest"`. Don't use exact semver (`"1.2.3"`) or caret ranges (`"^1.2.3"`); `"latest"` matches how `keystroke init` scaffolds deps and lets build/deploy auto-update keep you current.
50
+
49
51
  ### Dev tooling
50
52
 
51
53
  Lint, typecheck, and test run through the CLI. Projects depend on `@keystrokehq/keystroke`, `zod`, and `@keystrokehq/cli` — not oxlint, TypeScript, vitest, or `@types/node`. Configs live in the CLI bundle; these commands write no files into the project.
52
54
 
53
55
  **Deploy is the gate.** `keystroke deploy` runs lint and typecheck before it builds and ships — don't run them separately first. Attempt deploy, fix what it reports, redeploy. Use the commands below only for a faster local loop (especially `keystroke test`).
54
56
 
57
+ **Keep `@keystrokehq/*` on latest.** The CLI auto-updates itself on every run, and `keystroke deploy` / `keystroke build` auto-update every `@keystrokehq/*` dep to latest first — but CI (`CI=true` or `CI=1`) skips all updates, and a registry minimum-release-age setting can hold a release back. When a build or deploy fails in a way that doesn't point at your code, check versions **first**: update every `@keystrokehq/*` dep to latest, reinstall, and retry before debugging anything else.
58
+
55
59
  ```bash
56
60
  keystroke deploy # lint + typecheck + build + ship dist/ — start here
57
61
  keystroke test # optional local loop (unit + integration)
@@ -279,13 +283,14 @@ Invoke/inspect commands print JSON to stdout (exit 0 on success, 1 on failure)
279
283
 
280
284
  ## Common gotchas
281
285
 
282
- 1. **Action calling an action** — throws at runtime and fails lint. Compose in a workflow, or attach the integration action directly.
283
- 2. **Bad model id** — must be exact `vendor/model-id` from the catalog; don't kebab the version. Fails at deploy, not typecheck.
284
- 3. **LLM structured output: use `.nullish()`, not `.optional()`** models emit `"field": null` for "not applicable", and Zod `.optional()` rejects `null` (the step fails). Use `.nullish()` (or `.nullable()`) for any optional field in an `outputSchema`.
285
- 4. **Structured output + tools is vendor-specific**Anthropic Sonnet/Opus and OpenAI/Google/xAI are reliable; z-ai GLM uses a submit tool when tools are present; Alibaba Qwen is best-effort. See [structured output with tools](/learn/agents/build-agents#structured-output-with-tools).
286
- 5. **Silent fallbacks hide real failures** — for live config (Sheets, DBs, credentials), don't `catch` and quietly substitute fallback/empty data in production paths; a run that "completes" with empty inputs looks like success in the trace but is a silent failure. Throw when required config is missing or empty, and validate response shape, not just status.
287
- 6. **Side effects outside steps** — they re-run on every replay. Keep them inside `.run()` / `.prompt()`.
288
- 7. **Schedule input** — a cron trigger passes `{}`; give the workflow `input: z.object({})`.
286
+ 1. **Stale `@keystrokehq/*` versions** — the first suspect for any build or deploy failure. Auto-update is skipped in CI and can be held back by minimum-release-age; ensure every `@keystrokehq/*` dep is on latest before debugging anything else (see [Dev tooling](#dev-tooling)).
287
+ 2. **Action calling an action** — throws at runtime and fails lint. Compose in a workflow, or attach the integration action directly.
288
+ 3. **Bad model id**must be exact `vendor/model-id` from the catalog; don't kebab the version. Fails at deploy, not typecheck.
289
+ 4. **LLM structured output: use `.nullish()`, not `.optional()`**models emit `"field": null` for "not applicable", and Zod `.optional()` rejects `null` (the step fails). Use `.nullish()` (or `.nullable()`) for any optional field in an `outputSchema`.
290
+ 5. **Structured output + tools is vendor-specific** — Anthropic Sonnet/Opus and OpenAI/Google/xAI are reliable; z-ai GLM uses a submit tool when tools are present; Alibaba Qwen is best-effort. See [structured output with tools](/learn/agents/build-agents#structured-output-with-tools).
291
+ 6. **Silent fallbacks hide real failures** — for live config (Sheets, DBs, credentials), don't `catch` and quietly substitute fallback/empty data in production paths; a run that "completes" with empty inputs looks like success in the trace but is a silent failure. Throw when required config is missing or empty, and validate response shape, not just status.
292
+ 7. **Side effects outside steps** — they re-run on every replay. Keep them inside `.run()` / `.prompt()`.
293
+ 8. **Schedule input** — a cron trigger passes `{}`; give the workflow `input: z.object({})`.
289
294
 
290
295
  ## Documentation
291
296
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/cli",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/keystrokehq/keystroke.git",
@@ -42,8 +42,8 @@
42
42
  "tsx": "^4.22.3",
43
43
  "@keystrokehq/oxlint-config": "0.0.4",
44
44
  "@keystrokehq/tsconfig": "0.0.3",
45
- "@keystrokehq/tsdown-config": "0.0.5",
46
- "@keystrokehq/vitest-config": "0.0.7"
45
+ "@keystrokehq/vitest-config": "0.0.7",
46
+ "@keystrokehq/tsdown-config": "0.0.5"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsdown && node scripts/copy-templates.mjs && node scripts/copy-skills-bundle.mjs && node scripts/copy-configs.mjs",