craig-cli 0.13.1 → 0.13.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 (3) hide show
  1. package/README.md +27 -1
  2. package/dist/cli.js +202 -70
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -162,6 +162,9 @@ craig task wait [<task-id>] --state <states> [--tab <tab-id>] [--timeout <durati
162
162
  craig events list [--task <task-id>] [--type <glob>] [--after <cursor>] --json
163
163
  craig events watch [--task <task-id>] [--type <glob>] [--after <cursor>] [--format jsonl]
164
164
 
165
+ craig swarm validate <file> --json
166
+ craig swarm plan <file> [--input key=value] --json
167
+
165
168
  craig command show <command-id> --json
166
169
  craig command list [--task <task-id>] --json
167
170
  craig command cancel <command-id> --json
@@ -198,7 +201,30 @@ Optional workspace-local config at `.craig/config.json`:
198
201
 
199
202
  Feature previews are experimental, workspace-local, and off by default. They can also be toggled from Options > Feature Previews in the TUI.
200
203
 
201
- Event commands, new prompt dispatch creation, and child-task creation require the `agentOrchestration` preview. Preview-enabled agent PTYs receive an opaque workspace-local capability token scoped to their own task, the delegation command families, an expiry, and bounded child/depth/concurrency/prompt limits; only a non-authorizing reference is stored on the task. `task children` and idempotent `task cancel-tree` remain available when the preview is disabled so existing lineage can be inspected and safely stopped. Craig may still maintain durable semantic events internally for stable daemon services such as pull request synchronization. Disabling the preview stops new dispatch and child creation but leaves command inspection, waiting, cancellation, and safe reconciliation available for existing durable work. Prompt delivery defaults to `when-ready`; `immediate` explicitly interrupts a busy target.
204
+ Event commands, new prompt dispatch creation, child-task creation, and swarm validation/planning require the `agentOrchestration` preview. Preview-enabled agent PTYs receive an opaque workspace-local capability token scoped to their own task, the delegation command families, an expiry, and bounded child/depth/concurrency/prompt limits; only a non-authorizing reference is stored on the task. `task children` and idempotent `task cancel-tree` remain available when the preview is disabled so existing lineage can be inspected and safely stopped. Craig may still maintain durable semantic events internally for stable daemon services such as pull request synchronization. Disabling the preview stops new dispatch and child creation but leaves command inspection, waiting, cancellation, and safe reconciliation available for existing durable work. Prompt delivery defaults to `when-ready`; `immediate` explicitly interrupts a busy target.
205
+
206
+ Swarm definitions are strict, versioned YAML DAGs. `swarm validate` checks the schema, limits, templates, references, dependencies, output schemas, and human-review checkpoints. `swarm plan` resolves declared inputs and returns deterministic execution waves without creating tasks, commands, capabilities, events, definitions, or run state. Runtime execution remains unavailable until the next preview phase.
207
+
208
+ ```yaml
209
+ version: 1
210
+ name: inspect-and-review
211
+ limits: { max_concurrency: 2, max_tasks: 4, timeout: 2h }
212
+ inputs:
213
+ task_id: { type: string, required: true }
214
+ steps:
215
+ inspect:
216
+ task: "${{ inputs.task_id }}"
217
+ prompt: Inspect the task and submit structured findings.
218
+ output:
219
+ schema: { type: object, required: [findings] }
220
+ review:
221
+ needs: [inspect]
222
+ human_review:
223
+ title: Review findings
224
+ summary: Review the submitted findings before execution continues.
225
+ feedback_target: { task: "${{ steps.inspect.task_id }}" }
226
+ timeout: 1h
227
+ ```
202
228
 
203
229
  The TUI sidebar groups descendants beneath their root task while enforcing a single visual child level. Grandchildren and deeper descendants use the same indentation as direct children, and every task row continues to show only that task's agent-tab activity roll-up.
204
230