@keystrokehq/skills 0.0.1 → 0.0.2

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: keystroke-cli-workspace
3
- description: Use the Keystroke CLI to initialize projects, inspect commands, build workflows, deploy workflows or tasks, manage credentials, connect integrations, and debug authoring work. Use when the user needs Keystroke CLI usage or project lifecycle guidance.
3
+ description: Use the Keystroke CLI to initialize projects, inspect commands, build workflows, deploy or manually run deployed workflows, manage credentials, connect integrations, and debug authoring work. Use when the user needs Keystroke CLI usage, workflow run/log guidance, or project lifecycle guidance.
4
4
  ---
5
5
 
6
6
  # Keystroke CLI Workspace
@@ -37,6 +37,7 @@ Teach the CLI as the operational companion to authored code:
37
37
  - initialize a project
38
38
  - inspect and validate workflows
39
39
  - deploy workflows, agents, and tasks
40
+ - manually run deployed workflows from the current deployment
40
41
  - connect official integrations
41
42
  - inspect and upload credentials
42
43
  - sync Keystroke-authored skills into local IDE skill directories
@@ -67,6 +68,7 @@ Important distinctions:
67
68
  - `keystroke deploy --target <file>` deploys a focused workflow, agent, or task source file
68
69
  - `keystroke logs` is CLI diagnostics
69
70
  - `keystroke workflows logs` is workflow run inspection
71
+ - `keystroke workflows run <authoredWorkflowId>` manually starts the currently deployed workflow snapshot
70
72
 
71
73
  ## Default CLI process
72
74
 
@@ -75,7 +77,8 @@ Important distinctions:
75
77
  3. Build or validate authored workflows.
76
78
  4. Check credentials or connect integrations when required.
77
79
  5. Deploy the project or focused target with the right command.
78
- 6. Use logs and inspect commands for debugging.
80
+ 6. Run deployed workflows manually when needed.
81
+ 7. Use logs and inspect commands for debugging.
79
82
 
80
83
  ## CLI rules
81
84
 
@@ -84,6 +87,7 @@ Important distinctions:
84
87
  - Use `keystroke connect <integration>` for official integration connection flows.
85
88
  - Use `keystroke credentials ...` for credential inspection and upload flows.
86
89
  - Use `keystroke skills sync` to copy `@keystrokehq/skills` into local editor skill directories.
90
+ - Use `keystroke workflows run <authoredWorkflowId>` for deployed-workflow manual invocation; use `try-deploy` only when testing a temporary build artifact.
87
91
 
88
92
  ## References
89
93
 
@@ -36,7 +36,7 @@ Root help shows these directly. Subcommand help focuses on the local flags for t
36
36
  - `projects`: inspect cached project state
37
37
  - `connect`: connect official integrations through OAuth
38
38
  - `credentials`: list requirements and upload credentials
39
- - `workflows`: build, validate, inspect, diff, env, logs, paused, try-deploy
39
+ - `workflows`: build, validate, inspect, diff, env, logs, paused, run, try-deploy
40
40
  - `test`: test workflows and agent-callable tools
41
41
  - `deploy`: deploy workflows, agents, tasks, or focused targets via `--target <file>`
42
42
  - `sync`: local sync operations
@@ -46,5 +46,39 @@ Root help shows these directly. Subcommand help focuses on the local flags for t
46
46
  ## Command notes
47
47
 
48
48
  - `keystroke workflows logs` is different from `keystroke logs`
49
+ - `keystroke workflows run <authoredWorkflowId>` executes the current deployed workflow snapshot via the workflow execute API; it does not build or upload local code
50
+ - `keystroke workflows try-deploy <workflow>` builds local code, uploads or references a test bundle, and runs that temporary artifact
49
51
  - `keystroke deploy --target <file>` is the focused deploy path
50
52
  - many commands support `--json`
53
+
54
+ ## Deployed workflow manual run
55
+
56
+ Inspect first:
57
+
58
+ ```bash
59
+ keystroke workflows run --help
60
+ ```
61
+
62
+ Common forms:
63
+
64
+ ```bash
65
+ keystroke workflows run wf_onboard_user --input '{"email":"user@example.com"}'
66
+ keystroke workflows run wf_onboard_user '{"email":"user@example.com"}'
67
+ keystroke workflows run wf_onboard_user --input-file payload.json
68
+ keystroke workflows run wf_onboard_user --workflow-globals '{"slackChannel":"#ops"}'
69
+ keystroke workflows run wf_onboard_user --project-id 00000000-0000-4000-8000-000000000001 --input '{}'
70
+ keystroke workflows run wf_onboard_user --input '{}' --wait
71
+ keystroke workflows run wf_onboard_user --input '{}' --follow
72
+ keystroke workflows run wf_onboard_user --input '{}' --json
73
+ ```
74
+
75
+ Project resolution:
76
+ - `--project-id <uuid>` wins when provided
77
+ - otherwise the CLI reads `projectId` from `keystroke.config.ts` discovered from `--path` or CWD
78
+ - auth selects API/org context, but does not imply a default project
79
+
80
+ Input and globals:
81
+ - workflow input can come from positional payload, `--input`, or `--input-file`; use only one
82
+ - workflow globals can come from `--workflow-globals` or `--workflow-globals-file`; use only one
83
+ - required workflow globals must be provided unless the deployed globals schema supplies defaults
84
+ - credential bindings are intentionally not exposed in the first CLI command surface; the server uses configured credential defaults
@@ -66,6 +66,22 @@ keystroke deploy --help
66
66
  keystroke deploy
67
67
  ```
68
68
 
69
+ ## Run deployed workflows manually
70
+
71
+ Use this when the workflow already exists in the project's current deployment and you want an on-demand run without a trigger:
72
+
73
+ ```bash
74
+ keystroke workflows run --help
75
+ keystroke workflows run wf_onboard_user --input '{"email":"user@example.com"}'
76
+ ```
77
+
78
+ Notes:
79
+ - `workflows run` executes the current deployed snapshot through `client.workflows.execute()` / `POST /api/v1/workflows/execute`
80
+ - it does not build or upload local source; use `workflows try-deploy` for temporary local artifact testing
81
+ - pass `--project-id <uuid>` outside a project checkout, otherwise the CLI resolves `projectId` from `keystroke.config.ts`
82
+ - pass `--workflow-globals` or `--workflow-globals-file` when the deployed manifest declares required workflow globals without defaults
83
+ - use `--wait` to poll to a terminal status and `--follow` to poll logs/events while waiting
84
+
69
85
  ## Deploy tasks
70
86
 
71
87
  ```bash
@@ -193,6 +193,17 @@ When an agent needs to write custom steps, operations, tools, or workflows, it m
193
193
 
194
194
  Every workflow can be executed on-demand via the API without requiring a trigger. Triggers are only required for automated entry (webhooks, schedules, provider events).
195
195
 
196
+ Prefer the CLI for deployed workflow manual runs when operating from a project checkout:
197
+
198
+ ```bash
199
+ keystroke workflows run <authoredWorkflowId> --input '{"accountId":"123"}'
200
+ keystroke workflows run <authoredWorkflowId> --workflow-globals '{"tenantId":"tenant_123"}'
201
+ keystroke workflows run <authoredWorkflowId> --input '{}' --wait
202
+ keystroke workflows run <authoredWorkflowId> --input '{}' --follow
203
+ ```
204
+
205
+ `workflows run` executes the current deployed snapshot. It is different from `workflows try-deploy`, which builds local code and runs a temporary artifact.
206
+
196
207
  To explicitly start a workflow via API:
197
208
  - **Endpoint**: `POST /api/v1/workflows/execute`
198
209
  - **Body**:
@@ -202,6 +213,13 @@ To explicitly start a workflow via API:
202
213
  - `workflowGlobals`: (Optional) Object matching the workflow's globals schema
203
214
  - `credentialBindings`: (Optional) Custom credential bindings for the execution
204
215
 
216
+ Manual invocation notes:
217
+ - the API path is generic (`/workflows/execute`); workflows do not get per-workflow invoke routes
218
+ - the CLI resolves `projectId` from `keystroke.config.ts` unless `--project-id` is passed
219
+ - if the workflow manifest declares required `workflowGlobals`, callers must supply them unless the globals schema has defaults
220
+ - schema defaults are applied during validation, so defaulted globals can be omitted by the caller
221
+ - credential bindings are only needed to override server-resolved credential defaults
222
+
205
223
  ## When to choose a workflow
206
224
 
207
225
  Choose a workflow when the automation needs:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/skills",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "publishConfig": {