@keystrokehq/cli 0.0.101 → 0.0.103

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,21 +1,36 @@
1
1
  # Workflow authoring
2
2
 
3
- ## Keep steps in actions
3
+ ## Keep steps in actions (when they are not agent prompts)
4
4
 
5
- Workflow `run` should orchestrate — call actions (yours or integration actions), pass data forward:
5
+ Workflow `run` orchestrates — call actions for deterministic logic and integrations, call agents directly for LLM steps:
6
6
 
7
7
  ```ts
8
8
  async run(input) {
9
9
  const { brief } = await researchSignup.run(input);
10
+ const summary = await support.prompt({
11
+ message: `Summarize signup research:\n${brief}`,
12
+ });
10
13
  return postMessage.run({ channel: "#pipeline", text: signupBriefMessage({ ...input, brief }) });
11
14
  }
12
15
  ```
13
16
 
14
- Actions are leaf units: an action never calls another action — compose them here in the workflow. Need formatting or shared logic between steps? Put it in `src/lib/`, not in a wrapper action.
17
+ Actions are leaf units: an action never calls another action — compose them in the workflow. Need formatting or shared logic between steps? Put it in `src/lib/`, not in a wrapper action.
18
+
19
+ ## Agents as workflow steps
20
+
21
+ Import the agent and call `.prompt()` directly in the workflow `run`. Each call is a durable step keyed as `step:<agentKey>#<occurrence>` (same scheme as actions). No wrapper action required when the step is just "prompt this agent."
22
+
23
+ ```ts
24
+ const result = await support.prompt({
25
+ message: `From: ${input.sender}\nSubject: ${input.latestSubject}`,
26
+ });
27
+ ```
28
+
29
+ Use a wrapper action only when the agent call should also be an agent tool, or when the step bundles non-prompt logic.
15
30
 
16
31
  ## Agents inside actions
17
32
 
18
- Import the agent default export and call `.prompt()` inside an action's `run`. The workflow run owns tracing; inspect with `keystroke workflow runs get --include steps,trace`.
33
+ When an action must call an agent (e.g. the action is reused as an agent tool), call `.prompt()` inside the action's `run`. That prompt is not a separate workflow step the action is.
19
34
 
20
35
  ## Credentials
21
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/cli",
3
- "version": "0.0.101",
3
+ "version": "0.0.103",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dallinbentley/keystroke.git",