@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.
- package/SKILL.md +15 -4
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +23 -1012
- package/dist/src/cancel-reason.d.ts +4 -0
- package/dist/src/cancel-reason.js +1 -0
- package/dist/src/card-state.d.ts +20 -0
- package/dist/src/card-state.js +1 -0
- package/dist/src/engine.d.ts +14 -3
- package/dist/src/engine.js +1 -348
- package/dist/src/failure.d.ts +41 -0
- package/dist/src/failure.js +1 -0
- package/dist/src/file-lock.d.ts +1 -1
- package/dist/src/file-lock.js +1 -97
- package/dist/src/list-view.d.ts +22 -0
- package/dist/src/list-view.js +3 -0
- package/dist/src/mermaid.d.ts +1 -1
- package/dist/src/mermaid.js +2 -133
- package/dist/src/parent-task-sync.d.ts +142 -0
- package/dist/src/parent-task-sync.js +1 -0
- package/dist/src/retry-policy.d.ts +38 -0
- package/dist/src/retry-policy.js +1 -0
- package/dist/src/run-anchor.d.ts +9 -0
- package/dist/src/run-anchor.js +1 -0
- package/dist/src/run-manager.d.ts +43 -3
- package/dist/src/run-manager.js +4 -1228
- package/dist/src/run-projection.d.ts +30 -0
- package/dist/src/run-projection.js +1 -0
- package/dist/src/types.d.ts +41 -4
- package/dist/src/types.js +1 -3
- package/dist/src/utils/output-format.d.ts +1 -1
- package/dist/src/utils/output-format.js +12 -157
- package/dist/src/utils/shell-security.d.ts +1 -1
- package/dist/src/utils/shell-security.js +1 -138
- package/dist/src/workflow-persistence.d.ts +48 -0
- package/dist/src/workflow-persistence.js +1 -0
- package/dist/workflow-schema.json +29 -4
- package/package.json +23 -4
- package/workflow-schema.json +29 -4
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/src/engine.d.ts.map +0 -1
- package/dist/src/engine.js.map +0 -1
- package/dist/src/file-lock.d.ts.map +0 -1
- package/dist/src/file-lock.js.map +0 -1
- package/dist/src/mermaid.d.ts.map +0 -1
- package/dist/src/mermaid.js.map +0 -1
- package/dist/src/run-manager.d.ts.map +0 -1
- package/dist/src/run-manager.js.map +0 -1
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils/output-format.d.ts.map +0 -1
- package/dist/src/utils/output-format.js.map +0 -1
- package/dist/src/utils/shell-security.d.ts.map +0 -1
- 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: `
|
|
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
|
|
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
|
|
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`) | `
|
|
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
|
-
|
|
13
|
+
|