@keystrokehq/cli 0.1.14 → 0.1.16
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/dist/{dist-CCMjOqMx.mjs → dist-B4pkCJsM.mjs} +2 -2
- package/dist/{dist-CCMjOqMx.mjs.map → dist-B4pkCJsM.mjs.map} +1 -1
- package/dist/{dist-CE8k4aAC.mjs → dist-BW3AMCud.mjs} +5 -3
- package/dist/dist-BW3AMCud.mjs.map +1 -0
- package/dist/{dist-D638kKxn.mjs → dist-BnIugffH.mjs} +10 -2
- package/dist/{dist-D638kKxn.mjs.map → dist-BnIugffH.mjs.map} +1 -1
- package/dist/{dist-CXBALGTP.mjs → dist-PBiyADK0.mjs} +3 -3
- package/dist/{dist-CXBALGTP.mjs.map → dist-PBiyADK0.mjs.map} +1 -1
- package/dist/dist-c4WWC9_F.mjs +3 -0
- package/dist/index.mjs +30 -15
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-CT8ROK99.mjs → maybe-auto-update-BIarxWf3.mjs} +2 -2
- package/dist/{maybe-auto-update-CT8ROK99.mjs.map → maybe-auto-update-BIarxWf3.mjs.map} +1 -1
- package/dist/skills-bundle/_AGENTS.mcp.md +10 -3
- package/dist/skills-bundle/_AGENTS.md +61 -70
- package/dist/skills-bundle/skills/keystroke-actions/SKILL.md +60 -12
- package/dist/skills-bundle/skills/keystroke-actions/references/catalog-and-imports.md +32 -3
- package/dist/skills-bundle/skills/keystroke-agents/SKILL.md +50 -8
- package/dist/skills-bundle/skills/keystroke-agents/references/models.md +11 -13
- package/dist/skills-bundle/skills/keystroke-agents/references/tools-mcp-codemode.md +45 -3
- package/dist/skills-bundle/skills/keystroke-agents/references/workflows-and-testing.md +1 -1
- package/dist/skills-bundle/skills/keystroke-apps/SKILL.md +26 -13
- package/dist/skills-bundle/skills/keystroke-apps/references/cli-and-catalog.md +47 -16
- package/dist/skills-bundle/skills/keystroke-channels/SKILL.md +66 -0
- package/dist/skills-bundle/skills/keystroke-channels/references/slack-setup.md +41 -0
- package/dist/skills-bundle/skills/keystroke-cli/SKILL.md +41 -93
- package/dist/skills-bundle/skills/keystroke-deploy/SKILL.md +10 -9
- package/dist/skills-bundle/skills/keystroke-deploy/references/build-and-full-deploy.md +3 -1
- package/dist/skills-bundle/skills/keystroke-deploy/references/filtered-deploy.md +3 -2
- package/dist/skills-bundle/skills/keystroke-deploy/references/wip-ignore.md +5 -2
- package/dist/skills-bundle/skills/keystroke-files/SKILL.md +12 -4
- package/dist/skills-bundle/skills/keystroke-skills/SKILL.md +7 -2
- package/dist/skills-bundle/skills/keystroke-triggers/SKILL.md +30 -17
- package/dist/skills-bundle/skills/keystroke-workflows/SKILL.md +27 -12
- package/dist/skills-bundle/skills/keystroke-workflows/references/authoring.md +116 -4
- package/dist/skills-bundle/skills/keystroke-workflows/references/testing.md +17 -9
- package/dist/templates/hello-world/README.md +19 -8
- package/dist/templates/hello-world/src/workflows/greeting.test.ts +1 -1
- package/dist/{version-Brfe7Lb_.mjs → version-DScIhncv.mjs} +2 -2
- package/dist/{version-Brfe7Lb_.mjs.map → version-DScIhncv.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/dist-CE8k4aAC.mjs.map +0 -1
- package/dist/dist-CEqY8MN8.mjs +0 -3
- package/dist/skills-bundle/skills/keystroke-cli/references/api-targets.md +0 -87
- package/dist/skills-bundle/skills/keystroke-gateways/SKILL.md +0 -43
- package/dist/skills-bundle/skills/keystroke-gateways/references/slack-setup.md +0 -27
package/dist/dist-CEqY8MN8.mjs
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# API target routing
|
|
2
|
-
|
|
3
|
-
The CLI resolves a `baseUrl` before runtime commands (`workflow`, `agent`, `trigger`, `app`, `connect`, `health`). Implementation: `apps/cli/src/resolve-api-target.ts`.
|
|
4
|
-
|
|
5
|
-
## Mental model
|
|
6
|
-
|
|
7
|
-
- **Local** = your **keystroke server** (`keystroke dev` / `keystroke start`). Use for authoring, unit/integration tests in the repo, and manual runs while iterating.
|
|
8
|
-
- **Cloud** = **keystroke platform** control plane routes to a deployed keystroke server (`/api/projects/:projectId/*`). Use for live invocation, listing triggers on deploy, webhook URLs, and auditing production runs.
|
|
9
|
-
|
|
10
|
-
Auth is independent of target. `keystroke auth login` stores a bearer token in the OS keychain keyed by `webUrl` hostname and persists matching `webUrl` / `platformUrl` in config. Cloud API calls attach that token; local dev often runs without auth unless `BETTER_AUTH_SECRET` is set.
|
|
11
|
-
|
|
12
|
-
## Config (`~/.keystroke`)
|
|
13
|
-
|
|
14
|
-
| Key | Default | Role |
|
|
15
|
-
| ----------------- | -------------------------- | -------------------------------- |
|
|
16
|
-
| `platformUrl` | `https://api.keystroke.ai` | Keystroke platform control plane |
|
|
17
|
-
| `webUrl` | `https://keystroke.ai` | Dashboard + device login |
|
|
18
|
-
| `activeProjectId` | unset | Deployed project id (persistent) |
|
|
19
|
-
| `apiTarget` | inferred | `local` or `platform` |
|
|
20
|
-
|
|
21
|
-
Local commands use `PUBLIC_PLATFORM_URL` from the project `.env` (dev default `http://localhost:3002` when unset). They do not read `platformUrl` when `apiTarget=local`, so cloud login does not redirect local workflow runs to production.
|
|
22
|
-
|
|
23
|
-
If `apiTarget` is unset and `activeProjectId` exists, effective target is **platform** (backward compatible). Explicit `apiTarget=local` overrides that without clearing `activeProjectId`.
|
|
24
|
-
|
|
25
|
-
`keystroke config show` prints effective `apiTarget` and any active dev session.
|
|
26
|
-
|
|
27
|
-
## Switching without losing cloud state
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
keystroke deploy --project proj_abc # activeProjectId=proj_abc, apiTarget=platform
|
|
31
|
-
keystroke config use local # apiTarget=local; proj_abc unchanged
|
|
32
|
-
keystroke workflow run foo --input '{}' # → localhost:3002
|
|
33
|
-
keystroke config use cloud # apiTarget=platform; same proj_abc
|
|
34
|
-
keystroke trigger list # → platform runtime
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Swap cloud project:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
keystroke config use project proj_xyz
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Target another project once:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
keystroke --project proj_xyz workflow runs list my-workflow
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Dev session auto-local
|
|
50
|
-
|
|
51
|
-
`keystroke dev` writes `dev-session.json` beside config (pid, port, serverUrl). While that process is alive, resolved target is **local** even if `apiTarget=platform`. Stopping dev removes the session; routing falls back to config.
|
|
52
|
-
|
|
53
|
-
`--project` still wins over the dev session when you need to hit cloud while dev is up.
|
|
54
|
-
|
|
55
|
-
## Global flags
|
|
56
|
-
|
|
57
|
-
| Flag | Effect |
|
|
58
|
-
| ---------------- | -------------------------------------------------------------------------- |
|
|
59
|
-
| `--local` | Force local API (`PUBLIC_PLATFORM_URL` / project `.env`) for this command |
|
|
60
|
-
| `--project <id>` | Force platform runtime for that project; does not update `activeProjectId` |
|
|
61
|
-
|
|
62
|
-
## Platform projects
|
|
63
|
-
|
|
64
|
-
Platform projects are deploy targets on the control plane. List or create them before the first deploy:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
keystroke project list
|
|
68
|
-
keystroke project create --name "My app"
|
|
69
|
-
keystroke deploy --project <id> # activates runtime; sets activeProjectId
|
|
70
|
-
keystroke config use project <id> # swap default cloud target
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
New projects start **inactive**. The CLI hints with `keystroke deploy --project <id>` when appropriate.
|
|
74
|
-
|
|
75
|
-
## When agents should choose local
|
|
76
|
-
|
|
77
|
-
- User is editing `src/` and wants to test a workflow or agent change
|
|
78
|
-
- `keystroke dev` or `keystroke start` is running (or should be started first)
|
|
79
|
-
- Debugging with fast iteration; no deploy mentioned
|
|
80
|
-
|
|
81
|
-
## When agents should choose cloud
|
|
82
|
-
|
|
83
|
-
- User asks about deployed triggers, webhook URLs, or production runs
|
|
84
|
-
- After `keystroke deploy` or when operating an existing platform project
|
|
85
|
-
- Listing or invoking resources on the live environment
|
|
86
|
-
|
|
87
|
-
If unsure, run `keystroke config show` and prefer **local** when the task is development/testing.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: keystroke-gateways
|
|
3
|
-
description: Chat with keystroke agents from Slack via @keystrokehq/slack — OAuth, dashboard binding, channel attach. Use when setting up messaging for agents.
|
|
4
|
-
metadata:
|
|
5
|
-
keystroke-domain: gateways
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Gateways
|
|
9
|
-
|
|
10
|
-
Gateways route **Slack (and similar) messages** to an agent — users chat in-channel instead of using the CLI.
|
|
11
|
-
|
|
12
|
-
## Setup (Slack)
|
|
13
|
-
|
|
14
|
-
1. Set Slack app env vars in `.env` (see apps skill)
|
|
15
|
-
2. `keystroke start` — open dashboard at `:3000`
|
|
16
|
-
3. Complete Slack OAuth install
|
|
17
|
-
4. **Gateways → Slack → Attach** — pick an agent key + channel
|
|
18
|
-
5. Message the bot in Slack
|
|
19
|
-
|
|
20
|
-
## What happens at runtime
|
|
21
|
-
|
|
22
|
-
Inbound Slack event → lookup channel attachment → `runPrompt` for the bound agent → reply in thread.
|
|
23
|
-
|
|
24
|
-
## Audit agent behavior from gateway traffic
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
keystroke agent sessions list <agent-key> --source gateway
|
|
28
|
-
keystroke agent sessions get <agent-key> <session-id> --include messages,trace
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Troubleshooting
|
|
32
|
-
|
|
33
|
-
| Issue | Check |
|
|
34
|
-
| ----------- | ------------------------------------------------------------------- |
|
|
35
|
-
| Bot silent | `keystroke agent sessions list` for errors; agent key on attachment |
|
|
36
|
-
| OAuth fails | Slack redirect URLs match your dashboard origin |
|
|
37
|
-
| Wrong agent | Re-bind attachment in dashboard |
|
|
38
|
-
|
|
39
|
-
## Next references
|
|
40
|
-
|
|
41
|
-
- [slack-setup.md](references/slack-setup.md) — env vars, attach flow
|
|
42
|
-
|
|
43
|
-
Related: [agents](.agents/skills/keystroke-agents/SKILL.md), [apps](.agents/skills/keystroke-apps/SKILL.md).
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Slack gateway
|
|
2
|
-
|
|
3
|
-
## .env
|
|
4
|
-
|
|
5
|
-
Set Slack OAuth provider env vars in `.env` (client id, secret, signing secret) — then connect the Slack app with `keystroke connect slack`.
|
|
6
|
-
|
|
7
|
-
## Install & bind
|
|
8
|
-
|
|
9
|
-
1. `keystroke start`
|
|
10
|
-
2. Dashboard → install Slack app (OAuth) — includes `chat:write.customize` for agent-named replies
|
|
11
|
-
3. **Gateways → Slack → Attach** — agent key + channel (attach URLs include `team` + `channel` query params)
|
|
12
|
-
4. Send a test message in Slack
|
|
13
|
-
|
|
14
|
-
## Audit
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
keystroke agent sessions list <agent-key> --source gateway
|
|
18
|
-
keystroke agent sessions get <agent-key> <session-id> --include messages,trace
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Common fixes
|
|
22
|
-
|
|
23
|
-
| Issue | Fix |
|
|
24
|
-
| ------------- | -------------------------------------------------- |
|
|
25
|
-
| 401 on events | Check signing secret in `.env` |
|
|
26
|
-
| No reply | Session errors via `keystroke agent sessions list` |
|
|
27
|
-
| Wrong agent | Re-attach in dashboard |
|