@output.ai/cli 0.5.0 → 0.5.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.
Files changed (28) hide show
  1. package/dist/services/env_configurator.d.ts +6 -2
  2. package/dist/services/env_configurator.js +11 -4
  3. package/dist/services/env_configurator.spec.js +89 -16
  4. package/dist/services/messages.js +4 -4
  5. package/dist/services/workflow_generator.spec.js +0 -1
  6. package/dist/templates/agent_instructions/AGENTS.md.template +7 -7
  7. package/dist/templates/agent_instructions/agents/workflow_debugger.md.template +11 -11
  8. package/dist/templates/agent_instructions/commands/debug_workflow.md.template +13 -13
  9. package/dist/templates/agent_instructions/commands/plan_workflow.md.template +1 -1
  10. package/dist/templates/agent_instructions/skills/output-error-direct-io/SKILL.md.template +2 -2
  11. package/dist/templates/agent_instructions/skills/output-error-http-client/SKILL.md.template +2 -2
  12. package/dist/templates/agent_instructions/skills/output-error-missing-schemas/SKILL.md.template +2 -2
  13. package/dist/templates/agent_instructions/skills/output-error-nondeterminism/SKILL.md.template +3 -3
  14. package/dist/templates/agent_instructions/skills/output-error-try-catch/SKILL.md.template +2 -2
  15. package/dist/templates/agent_instructions/skills/output-error-zod-import/SKILL.md.template +2 -2
  16. package/dist/templates/agent_instructions/skills/output-services-check/SKILL.md.template +3 -3
  17. package/dist/templates/agent_instructions/skills/output-workflow-list/SKILL.md.template +9 -9
  18. package/dist/templates/agent_instructions/skills/output-workflow-result/SKILL.md.template +33 -33
  19. package/dist/templates/agent_instructions/skills/output-workflow-run/SKILL.md.template +25 -25
  20. package/dist/templates/agent_instructions/skills/output-workflow-runs-list/SKILL.md.template +15 -15
  21. package/dist/templates/agent_instructions/skills/output-workflow-start/SKILL.md.template +35 -35
  22. package/dist/templates/agent_instructions/skills/output-workflow-status/SKILL.md.template +26 -26
  23. package/dist/templates/agent_instructions/skills/output-workflow-stop/SKILL.md.template +19 -19
  24. package/dist/templates/agent_instructions/skills/output-workflow-trace/SKILL.md.template +7 -7
  25. package/dist/templates/project/README.md.template +1 -1
  26. package/package.json +2 -2
  27. package/dist/templates/workflow/.env.template +0 -7
  28. /package/dist/templates/project/{.env.template → .env.example.template} +0 -0
@@ -20,27 +20,27 @@ This skill checks the current execution status of a workflow. Use it to monitor
20
20
 
21
21
  ## When to Use Other Commands
22
22
 
23
- - **Getting results**: Use `output workflow result` after confirming COMPLETED status
24
- - **Debugging failures**: Use `output workflow debug` for FAILED workflows
25
- - **Execution history**: Use `output workflow runs list` for multiple runs
23
+ - **Getting results**: Use `npx output workflow result` after confirming COMPLETED status
24
+ - **Debugging failures**: Use `npx output workflow debug` for FAILED workflows
25
+ - **Execution history**: Use `npx output workflow runs list` for multiple runs
26
26
 
27
27
  ## Instructions
28
28
 
29
29
  ### Check Status
30
30
 
31
31
  ```bash
32
- output workflow status <workflowId>
32
+ npx output workflow status <workflowId>
33
33
  ```
34
34
 
35
- Replace `<workflowId>` with the ID from `output workflow start` or `output workflow runs list`.
35
+ Replace `<workflowId>` with the ID from `npx output workflow start` or `npx output workflow runs list`.
36
36
 
37
37
  ## Understanding Status Values
38
38
 
39
39
  | Status | Meaning | Next Action |
40
40
  |--------|---------|-------------|
41
41
  | RUNNING | Workflow is currently executing | Wait and check again |
42
- | COMPLETED | Workflow finished successfully | Get result with `output workflow result` |
43
- | FAILED | Workflow encountered an error | Debug with `output workflow debug` |
42
+ | COMPLETED | Workflow finished successfully | Get result with `npx output workflow result` |
43
+ | FAILED | Workflow encountered an error | Debug with `npx output workflow debug` |
44
44
  | TERMINATED | Workflow was manually stopped | Review if expected, restart if needed |
45
45
  | TIMED_OUT | Workflow exceeded time limit | Check for long operations, adjust timeout |
46
46
 
@@ -50,16 +50,16 @@ Replace `<workflowId>` with the ID from `output workflow start` or `output workf
50
50
 
51
51
  ```bash
52
52
  # Start a workflow
53
- output workflow start data-sync '{"source": "external"}'
53
+ npx output workflow start data-sync '{"source": "external"}'
54
54
  # Output: Workflow ID: sync-abc123
55
55
 
56
56
  # Check status
57
- output workflow status sync-abc123
57
+ npx output workflow status sync-abc123
58
58
  # Output: Status: RUNNING
59
59
 
60
60
  # Wait and check again
61
61
  sleep 30
62
- output workflow status sync-abc123
62
+ npx output workflow status sync-abc123
63
63
  # Output: Status: COMPLETED
64
64
  ```
65
65
 
@@ -69,16 +69,16 @@ output workflow status sync-abc123
69
69
  WORKFLOW_ID="abc123xyz"
70
70
 
71
71
  while true; do
72
- STATUS=$(output workflow status $WORKFLOW_ID)
72
+ STATUS=$(npx output workflow status $WORKFLOW_ID)
73
73
  echo "Current status: $STATUS"
74
74
 
75
75
  if [[ "$STATUS" == *"COMPLETED"* ]]; then
76
76
  echo "Workflow completed!"
77
- output workflow result $WORKFLOW_ID
77
+ npx output workflow result $WORKFLOW_ID
78
78
  break
79
79
  elif [[ "$STATUS" == *"FAILED"* ]]; then
80
80
  echo "Workflow failed!"
81
- output workflow debug $WORKFLOW_ID --format json
81
+ npx output workflow debug $WORKFLOW_ID --format json
82
82
  break
83
83
  fi
84
84
 
@@ -90,13 +90,13 @@ done
90
90
 
91
91
  ```bash
92
92
  # Verify status first
93
- output workflow status my-workflow-123
93
+ npx output workflow status my-workflow-123
94
94
 
95
95
  # If COMPLETED, get result
96
- output workflow result my-workflow-123
96
+ npx output workflow result my-workflow-123
97
97
 
98
98
  # If FAILED, debug instead
99
- output workflow debug my-workflow-123 --format json
99
+ npx output workflow debug my-workflow-123 --format json
100
100
  ```
101
101
 
102
102
  **Scenario**: Batch status check
@@ -104,7 +104,7 @@ output workflow debug my-workflow-123 --format json
104
104
  ```bash
105
105
  # Check multiple workflows
106
106
  for id in abc123 def456 ghi789; do
107
- echo "Workflow $id: $(output workflow status $id)"
107
+ echo "Workflow $id: $(npx output workflow status $id)"
108
108
  done
109
109
  ```
110
110
 
@@ -131,21 +131,21 @@ The status command returns information including:
131
131
  ### "Workflow not found"
132
132
  - The workflow ID may be incorrect
133
133
  - The workflow may have been deleted from history
134
- - Check `output workflow runs list` to find the correct ID
134
+ - Check `npx output workflow runs list` to find the correct ID
135
135
 
136
136
  ### Status stays RUNNING too long
137
- 1. Check if the workflow is stuck: `output workflow debug <id>`
137
+ 1. Check if the workflow is stuck: `npx output workflow debug <id>`
138
138
  2. Look for infinite loops or waiting operations
139
- 3. Consider stopping: `output workflow stop <id>`
139
+ 3. Consider stopping: `npx output workflow stop <id>`
140
140
 
141
141
  ### Unexpected TERMINATED status
142
142
  - Someone may have manually stopped the workflow
143
- - Check with `output workflow debug` for context
144
- - Restart if needed: `output workflow start`
143
+ - Check with `npx output workflow debug` for context
144
+ - Restart if needed: `npx output workflow start`
145
145
 
146
146
  ## Related Commands
147
147
 
148
- - `output workflow result <id>` - Get execution result (after COMPLETED)
149
- - `output workflow debug <id>` - Debug execution (after FAILED)
150
- - `output workflow stop <id>` - Stop a running workflow
151
- - `output workflow runs list` - View execution history
148
+ - `npx output workflow result <id>` - Get execution result (after COMPLETED)
149
+ - `npx output workflow debug <id>` - Debug execution (after FAILED)
150
+ - `npx output workflow stop <id>` - Stop a running workflow
151
+ - `npx output workflow runs list` - View execution history
@@ -22,7 +22,7 @@ This skill stops a running workflow execution. The workflow will be marked as TE
22
22
 
23
23
  - If the workflow is about to complete (let it finish)
24
24
  - If you're unsure whether stopping is safe
25
- - For debugging (use `output workflow debug` instead)
25
+ - For debugging (use `npx output workflow debug` instead)
26
26
  - If the workflow has side effects that may leave data in an inconsistent state
27
27
 
28
28
  ## Instructions
@@ -30,7 +30,7 @@ This skill stops a running workflow execution. The workflow will be marked as TE
30
30
  ### Stop a Workflow
31
31
 
32
32
  ```bash
33
- output workflow stop <workflowId>
33
+ npx output workflow stop <workflowId>
34
34
  ```
35
35
 
36
36
  ### Safety Considerations
@@ -48,15 +48,15 @@ Before stopping, consider:
48
48
 
49
49
  ```bash
50
50
  # Check status - workflow has been running too long
51
- output workflow status abc123xyz
51
+ npx output workflow status abc123xyz
52
52
  # Status: RUNNING (for 2 hours)
53
53
 
54
54
  # Decide to stop it
55
- output workflow stop abc123xyz
55
+ npx output workflow stop abc123xyz
56
56
  # Workflow abc123xyz has been stopped
57
57
 
58
58
  # Verify it's terminated
59
- output workflow status abc123xyz
59
+ npx output workflow status abc123xyz
60
60
  # Status: TERMINATED
61
61
  ```
62
62
 
@@ -64,26 +64,26 @@ output workflow status abc123xyz
64
64
 
65
65
  ```bash
66
66
  # Realized input was wrong immediately after starting
67
- output workflow start expensive-job '{"wrong": "input"}'
67
+ npx output workflow start expensive-job '{"wrong": "input"}'
68
68
  # Workflow ID: job-abc123
69
69
 
70
70
  # Stop before it processes too much
71
- output workflow stop job-abc123
71
+ npx output workflow stop job-abc123
72
72
 
73
73
  # Start again with correct input
74
- output workflow start expensive-job '{"correct": "input"}'
74
+ npx output workflow start expensive-job '{"correct": "input"}'
75
75
  ```
76
76
 
77
77
  **Scenario**: Stop multiple workflows
78
78
 
79
79
  ```bash
80
80
  # Get list of running workflows
81
- output workflow runs list --format json | jq '.[] | select(.status == "RUNNING") | .workflowId'
81
+ npx output workflow runs list --format json | jq '.[] | select(.status == "RUNNING") | .workflowId'
82
82
 
83
83
  # Stop each one (carefully review first!)
84
84
  for id in abc123 def456; do
85
85
  echo "Stopping $id"
86
- output workflow stop $id
86
+ npx output workflow stop $id
87
87
  done
88
88
  ```
89
89
 
@@ -92,14 +92,14 @@ done
92
92
  ### Check the State
93
93
 
94
94
  ```bash
95
- output workflow status <workflowId>
95
+ npx output workflow status <workflowId>
96
96
  # Status: TERMINATED
97
97
  ```
98
98
 
99
99
  ### Review What Happened
100
100
 
101
101
  ```bash
102
- output workflow debug <workflowId> --format json
102
+ npx output workflow debug <workflowId> --format json
103
103
  ```
104
104
 
105
105
  This shows:
@@ -118,7 +118,7 @@ If the workflow made partial changes:
118
118
 
119
119
  ```bash
120
120
  # Start a fresh execution
121
- output workflow start <workflowName> '<input>'
121
+ npx output workflow start <workflowName> '<input>'
122
122
  ```
123
123
 
124
124
  ## What Happens When You Stop
@@ -133,7 +133,7 @@ output workflow start <workflowName> '<input>'
133
133
 
134
134
  ### "Workflow not found"
135
135
  - Check the workflow ID is correct
136
- - Use `output workflow runs list` to find valid IDs
136
+ - Use `npx output workflow runs list` to find valid IDs
137
137
 
138
138
  ### "Workflow already completed"
139
139
  - The workflow finished before the stop command
@@ -151,14 +151,14 @@ output workflow start <workflowName> '<input>'
151
151
  ## Best Practices
152
152
 
153
153
  1. **Always check status first**: Confirm the workflow is actually RUNNING
154
- 2. **Review before stopping**: Use `output workflow debug` to understand state
154
+ 2. **Review before stopping**: Use `npx output workflow debug` to understand state
155
155
  3. **Document why**: Note why you stopped the workflow for future reference
156
156
  4. **Plan for cleanup**: Know what side effects may need manual handling
157
157
  5. **Consider alternatives**: Sometimes waiting is better than stopping
158
158
 
159
159
  ## Related Commands
160
160
 
161
- - `output workflow status <id>` - Check current status
162
- - `output workflow debug <id>` - Review execution details
163
- - `output workflow start <name>` - Start a new execution
164
- - `output workflow runs list` - View execution history
161
+ - `npx output workflow status <id>` - Check current status
162
+ - `npx output workflow debug <id>` - Review execution details
163
+ - `npx output workflow start <name>` - Start a new execution
164
+ - `npx output workflow runs list` - View execution history
@@ -25,12 +25,12 @@ This skill provides guidance on retrieving and analyzing workflow execution trac
25
25
 
26
26
  **Basic trace (text format, may be truncated):**
27
27
  ```bash
28
- output workflow debug <workflowId>
28
+ npx output workflow debug <workflowId>
29
29
  ```
30
30
 
31
31
  **Full trace (JSON format, recommended for detailed analysis):**
32
32
  ```bash
33
- output workflow debug <workflowId> --format json
33
+ npx output workflow debug <workflowId> --format json
34
34
  ```
35
35
 
36
36
  **Tip**: Always use `--format json` when you need complete trace data. The text format truncates long values which can hide important debugging information.
@@ -96,10 +96,10 @@ When examining JSON traces, focus on these fields:
96
96
 
97
97
  ```bash
98
98
  # Get the workflow ID from runs list
99
- output workflow runs list --limit 5 --format json
99
+ npx output workflow runs list --limit 5 --format json
100
100
 
101
101
  # Get detailed trace
102
- output workflow debug abc123xyz --format json
102
+ npx output workflow debug abc123xyz --format json
103
103
 
104
104
  # Look for the failing step in the output
105
105
  # Example output structure:
@@ -116,13 +116,13 @@ output workflow debug abc123xyz --format json
116
116
  **Scenario**: Investigate retry behavior
117
117
 
118
118
  ```bash
119
- output workflow debug abc123xyz --format json | jq '.steps[] | select(.attempts > 1)'
119
+ npx output workflow debug abc123xyz --format json | jq '.steps[] | select(.attempts > 1)'
120
120
  ```
121
121
 
122
122
  **Scenario**: Check inputs to a specific step
123
123
 
124
124
  ```bash
125
- output workflow debug abc123xyz --format json | jq '.steps[] | select(.name == "processData") | .input'
125
+ npx output workflow debug abc123xyz --format json | jq '.steps[] | select(.name == "processData") | .input'
126
126
  ```
127
127
 
128
128
  ## Next Steps After Analysis
@@ -130,5 +130,5 @@ output workflow debug abc123xyz --format json | jq '.steps[] | select(.name == "
130
130
  1. Match the error to common patterns (see error skills)
131
131
  2. Consult the `workflow-quality` subagent for best practices
132
132
  3. Make code fixes based on identified issues
133
- 4. Re-run the workflow: `output workflow run <workflowName> <input>`
133
+ 4. Re-run the workflow: `npx output workflow run <workflowName> <input>`
134
134
  5. Verify the fix with a new trace
@@ -49,7 +49,7 @@ npx output workflow run simple --input '{"question": "who really is ada lovelace
49
49
 
50
50
  ### 5. Stop Services
51
51
 
52
- Press `Ctrl+C` in the terminal running `output dev` to stop all services gracefully.
52
+ Press `Ctrl+C` in the terminal running `npm run dev` to stop all services gracefully.
53
53
 
54
54
  ### 6. View Logs
55
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@output.ai/cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "CLI for Output.ai workflow generation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "handlebars": "4.7.8",
36
36
  "json-schema-library": "10.3.0",
37
37
  "ky": "1.12.0",
38
- "validator": "13.15.20"
38
+ "validator": "13.15.22"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/cli-progress": "3.11.6",
@@ -1,7 +0,0 @@
1
- # API Keys for LLM providers
2
- OPENAI_API_KEY=your_openai_api_key_here
3
- ANTHROPIC_API_KEY=your_anthropic_api_key_here
4
-
5
- # Optional: Additional configuration
6
- # NODE_ENV=development
7
- # LOG_LEVEL=info