diff --git a/action.yml b/action.yml index 8697fb9..72480ba 100644 --- a/action.yml +++ b/action.yml @@ -9,8 +9,9 @@ inputs: command: description: | CueAPI CLI command to run. Cue management: - create, list, get, update, delete, pause, resume, whoami, usage, - fire + create, list, get, update, delete, bulk-delete (max 100 IDs; + always passes --yes since CI has no interactive confirm), + pause, resume, whoami, usage, fire Worker-execution lifecycle (introduced in cueapi 0.2.0): executions-list, executions-list-claimable, executions-get, executions-claim, executions-claim-next, executions-heartbeat, @@ -63,6 +64,15 @@ inputs: cue-id: description: 'Target cue ID (for get/update/delete/pause/resume/fire/executions-list)' required: false + cue-ids: + description: | + Multiple cue IDs for `bulk-delete` (whitespace or newline separated; + max 100 per call). Per-ID atomic, NOT batch atomic — IDs that don't + exist OR aren't owned by the caller land in the response's `skipped` + array (silent skip on miss; no info leak about other tenants' cues). + Action always passes --yes (no interactive confirm in CI); CLI sends + the X-Confirm-Destructive: true header server-side. + required: false status: description: 'Filter by status (active/paused for list; execution status for executions-list)' required: false @@ -230,6 +240,7 @@ runs: DESCRIPTION: ${{ inputs.description }} WORKER: ${{ inputs.worker }} CUE_ID: ${{ inputs.cue-id }} + CUE_IDS: ${{ inputs.cue-ids }} STATUS: ${{ inputs.status }} LIMIT: ${{ inputs.limit }} OFFSET: ${{ inputs.offset }} @@ -290,6 +301,23 @@ runs: get|delete|pause|resume) [ -n "$CUE_ID" ] && cmd+=("$CUE_ID") ;; + bulk-delete) + # Whitespace/newline-separated list of cue IDs. Splits via + # `read -ra`. Caps at 100 to match server + cli #46. Always + # passes --yes (no interactive confirm in CI); CLI sends + # X-Confirm-Destructive: true server-side. + if [ -z "$CUE_IDS" ]; then + echo "::error::bulk-delete requires cue-ids input (whitespace-separated cue IDs)." + exit 1 + fi + read -ra _IDS <<< "$CUE_IDS" + if [ ${#_IDS[@]} -gt 100 ]; then + echo "::error::bulk-delete max 100 IDs per call; got ${#_IDS[@]}. Split into batches." + exit 1 + fi + cmd+=("${_IDS[@]}") + cmd+=(--yes) + ;; list) [ -n "$STATUS" ] && cmd+=(--status "$STATUS") [ -n "$LIMIT" ] && cmd+=(--limit "$LIMIT") @@ -464,7 +492,7 @@ runs: [ -n "$SUMMARY" ] && cmd+=(--reason "$SUMMARY") ;; *) - echo "::error::Unsupported command '$COMMAND'. Supported: create, list, get, update, delete, pause, resume, whoami, usage, fire, executions-list, executions-list-claimable, executions-get, executions-claim, executions-claim-next, executions-heartbeat, executions-report-outcome, agents-create, agents-list, agents-get, agents-describe, agents-update, agents-delete, agents-webhook-secret-get, agents-webhook-secret-regenerate, messages-send, messages-get, messages-read, messages-ack, workers-list, workers-delete, executions-replay, executions-verification-pending, executions-verify." + echo "::error::Unsupported command '$COMMAND'. Supported: create, list, get, update, delete, bulk-delete, pause, resume, whoami, usage, fire, executions-list, executions-list-claimable, executions-get, executions-claim, executions-claim-next, executions-heartbeat, executions-report-outcome, agents-create, agents-list, agents-get, agents-describe, agents-update, agents-delete, agents-webhook-secret-get, agents-webhook-secret-regenerate, messages-send, messages-get, messages-read, messages-ack, workers-list, workers-delete, executions-replay, executions-verification-pending, executions-verify." exit 1 ;; esac diff --git a/parity-manifest.json b/parity-manifest.json index 7fdb68d..5adc89d 100644 --- a/parity-manifest.json +++ b/parity-manifest.json @@ -21,6 +21,7 @@ "get": "cueapi get ", "update": "cueapi update — covers --name, --cron, --url, --payload, --description. Missing: --status (use pause/resume), --headers, --transport", "delete": "cueapi delete ", + "bulk-delete":"cueapi bulk-delete ... --yes — POST /v1/cues/bulk-delete (cueapi #650, cli #46). Per-ID atomic, max 100. Action takes whitespace-separated `cue-ids` input and always passes --yes (CI has no interactive confirm). CLI sends X-Confirm-Destructive: true. Ported from Backlog row cmousydyn (originally mistitled 'messages'; corrected 2026-05-09).", "pause": "cueapi pause ", "resume": "cueapi resume ", "whoami": "cueapi whoami", @@ -62,7 +63,6 @@ "messages read": "POST /v1/messages/{id}/read — NEEDS-PORT. In-flight as PR #6.", "messages ack": "POST /v1/messages/{id}/ack — NEEDS-PORT. In-flight as PR #6.", "messages delete": "DELETE /v1/messages/{id} — bounded by cueapi-cli upstream (no per-id delete in cueapi-cli yet).", - "messages bulk-delete": "DELETE /v1/messages (bulk, cueapi #650) — bounded by cueapi-cli upstream port. Tracked on Backlog (Drift-audit deferred 2026-05-07).", "message-to": "Top-level message-to ergonomic alias (cueapi-cli #40) — NEEDS-PORT, deferred to dedicated PR. Tracked on Backlog (Drift-audit deferred 2026-05-07)." }, @@ -84,7 +84,7 @@ "#623 — POST /v1/messages send_at (per-message scheduling)", "#630 — GET /v1/agents/roster (Agent Directory v0)", "#632 — POST /v1/cues/{id}/fire exit_criteria", - "#650 — DELETE /v1/messages bulk delete", + "#650 — POST /v1/cues/bulk-delete (cueapi-action exposes via `bulk-delete` command; was originally mis-noted as 'messages bulk delete' on this list; corrected 2026-05-09)", "#662 — GET /v1/agents/{ref}/presence (cheap-poll variant)", "#664 — POST /v1/executions/{id}/live-claim (Live-claim attestation, cmotigtnx)", "#683 — POST /v1/cues/{id}/fire idempotency-key (Phase 2 substrate hardening)"