@crewx/workflow 0.3.22-rc.22 → 0.3.22-rc.221

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 (54) hide show
  1. package/SKILL.md +15 -4
  2. package/dist/cli.d.ts +1 -1
  3. package/dist/cli.js +23 -1012
  4. package/dist/src/cancel-reason.d.ts +4 -0
  5. package/dist/src/cancel-reason.js +1 -0
  6. package/dist/src/card-state.d.ts +20 -0
  7. package/dist/src/card-state.js +1 -0
  8. package/dist/src/engine.d.ts +14 -3
  9. package/dist/src/engine.js +1 -348
  10. package/dist/src/failure.d.ts +41 -0
  11. package/dist/src/failure.js +1 -0
  12. package/dist/src/file-lock.d.ts +1 -1
  13. package/dist/src/file-lock.js +1 -97
  14. package/dist/src/list-view.d.ts +22 -0
  15. package/dist/src/list-view.js +3 -0
  16. package/dist/src/mermaid.d.ts +1 -1
  17. package/dist/src/mermaid.js +2 -133
  18. package/dist/src/parent-task-sync.d.ts +142 -0
  19. package/dist/src/parent-task-sync.js +1 -0
  20. package/dist/src/retry-policy.d.ts +38 -0
  21. package/dist/src/retry-policy.js +1 -0
  22. package/dist/src/run-anchor.d.ts +9 -0
  23. package/dist/src/run-anchor.js +1 -0
  24. package/dist/src/run-manager.d.ts +43 -3
  25. package/dist/src/run-manager.js +4 -1228
  26. package/dist/src/run-projection.d.ts +30 -0
  27. package/dist/src/run-projection.js +1 -0
  28. package/dist/src/types.d.ts +41 -4
  29. package/dist/src/types.js +1 -3
  30. package/dist/src/utils/output-format.d.ts +1 -1
  31. package/dist/src/utils/output-format.js +12 -157
  32. package/dist/src/utils/shell-security.d.ts +1 -1
  33. package/dist/src/utils/shell-security.js +1 -138
  34. package/dist/src/workflow-persistence.d.ts +48 -0
  35. package/dist/src/workflow-persistence.js +1 -0
  36. package/dist/workflow-schema.json +29 -4
  37. package/package.json +23 -4
  38. package/workflow-schema.json +29 -4
  39. package/dist/cli.d.ts.map +0 -1
  40. package/dist/cli.js.map +0 -1
  41. package/dist/src/engine.d.ts.map +0 -1
  42. package/dist/src/engine.js.map +0 -1
  43. package/dist/src/file-lock.d.ts.map +0 -1
  44. package/dist/src/file-lock.js.map +0 -1
  45. package/dist/src/mermaid.d.ts.map +0 -1
  46. package/dist/src/mermaid.js.map +0 -1
  47. package/dist/src/run-manager.d.ts.map +0 -1
  48. package/dist/src/run-manager.js.map +0 -1
  49. package/dist/src/types.d.ts.map +0 -1
  50. package/dist/src/types.js.map +0 -1
  51. package/dist/src/utils/output-format.d.ts.map +0 -1
  52. package/dist/src/utils/output-format.js.map +0 -1
  53. package/dist/src/utils/shell-security.d.ts.map +0 -1
  54. package/dist/src/utils/shell-security.js.map +0 -1
package/SKILL.md CHANGED
@@ -149,6 +149,17 @@ Auto mode pauses instead of crossing these boundaries:
149
149
 
150
150
  `max_iterations` limits auto-run steps and prevents infinite loops.
151
151
 
152
+ ### `workflow run approve <exec-id>` / `workflow run reject <exec-id>`
153
+
154
+ Records the human decision for the approval node the run is paused at, appends it to the run's `audit[]`, and moves the run to the node's `on_approve` / `on_reject` target. Continue with `workflow run auto`.
155
+
156
+ ```bash
157
+ crewx workflow run approve wfr_abc12345
158
+ crewx workflow run reject wfr_abc12345 --reason="rollback plan missing"
159
+ ```
160
+
161
+ Agent processes cannot approve or reject: the command refuses when `CREWX_AGENT_ID` is set. Only a person runs it from a shell.
162
+
152
163
  ### `workflow run reset <exec-id>`
153
164
 
154
165
  Restores execution state to `initial_state`.
@@ -334,7 +345,7 @@ extract_attachments:
334
345
  | `output_schema` | object | No | Standard JSON Schema 2020-12 for parsed output. |
335
346
  | `output_retry` | integer | No | Retry attempts if JSON parse or schema validation fails. |
336
347
 
337
- `skill_task` uses `CREWX_CLI` (default: `npx crewx`) and executes the equivalent of:
348
+ `skill_task` uses `CREWX_CLI` (default: `crewx`) and executes the equivalent of:
338
349
 
339
350
  ```bash
340
351
  crewx skill <skill> ...args
@@ -597,7 +608,7 @@ Examples:
597
608
  | Input | Run behavior |
598
609
  |-------|--------------|
599
610
  | `/wf rc-publish` | Starts `rc-publish` in auto mode |
600
- | `/wf rc-publish 미리승인한다` | Starts `rc-publish` with `state.input = "미리승인한다"` |
611
+ | `/wf rc-publish pre-approved` | Starts `rc-publish` with `state.input = "pre-approved"` |
601
612
  | `/wf rc-publish --manual dry run` | Creates the run in manual mode with `state.input = "dry run"` |
602
613
  | `/wf rc-publish --auto prepare RC notes` | Explicit auto mode; same as default |
603
614
 
@@ -625,7 +636,7 @@ Branches and templates may also read `state.input`:
625
636
  condition: state.input.includes("dry run")
626
637
  ```
627
638
 
628
- Important security rule: `state.input` is **not authority**. It may influence prompts, branches, and templates, but it must never bypass an `approval` node. For example, `/wf rc-publish 미리승인한다` stores the text in `state.input`; it does not approve publishing. Approval still requires the signed ChatCard action button.
639
+ Important security rule: `state.input` is **not authority**. It may influence prompts, branches, and templates, but it must never bypass an `approval` node. For example, `/wf rc-publish pre-approved` stores the text in `state.input`; it does not approve publishing. Approval still requires the signed ChatCard action button.
629
640
 
630
641
  ### Stored ChatCard
631
642
 
@@ -681,7 +692,7 @@ Rules:
681
692
  | Variable | Description | Default |
682
693
  |----------|-------------|---------|
683
694
  | `CREWX_WORKSPACE` | Workspace directory (where `workflows/` lives) | `.` |
684
- | `CREWX_CLI` | CrewX CLI path (for `agent_task` and `skill_task`) | `npx crewx` |
695
+ | `CREWX_CLI` | CrewX CLI path (for `agent_task` and `skill_task`) | `crewx` |
685
696
  | `CREWX_WORKFLOW_TIMEOUT` | `agent_task` execution timeout (ms) | `1800000` (30 min) |
686
697
  | `CREWX_WORKFLOW_SHELL` | First safety gate for `shell_task`; must be `1` | unset |
687
698
  | `CREWX_CONFIG` | Custom config file path | `crewx.yaml` |
package/dist/cli.d.ts CHANGED
@@ -10,4 +10,4 @@ export declare function resolveWorkflow(nameOrPath: string, paths: string[], eng
10
10
  export declare function findNextNodeForCAL(currentNode: string, executedNodeId: string, nodes: Record<string, WorkflowNode>): string | null;
11
11
  export declare function getFlowChain(nodes: Record<string, WorkflowNode>): string[];
12
12
  export declare function main(inputArgs?: string[]): Promise<void>;
13
- //# sourceMappingURL=cli.d.ts.map
13
+