feat(skill): cover full API — projects, delete, health, all WorkCreate fields
All checks were successful
ci / build-test-push (push) Successful in 1m26s

This commit is contained in:
Marcus A.
2026-04-11 16:11:13 -05:00
parent c14cc296d7
commit 33d65c35e9
15 changed files with 407 additions and 244 deletions

View File

@@ -1,25 +1,35 @@
#!/bin/bash
# wq_list — list work items with optional filters
# Usage: wq list [options]
# Options:
# --status <status> Filter by status: queued, dispatched, in_progress, blocked, completed, failed, cancelled
# --agent <agent> Filter by assigned agent
# --project-id <id> Filter by project
# --since <ISO8601> Only items created after this timestamp
# --type <type> Filter by work type
wq_list() {
local status agent project_id since qs="?"
API_URL="${WORK_QUEUE_API_URL:-}"
[[ -z "$API_URL" ]] && API_URL=$(cat ~/.config/work_queue_api_url 2>/dev/null || echo "")
[[ -z "$API_URL" ]] && { echo "Error: WORK_QUEUE_API_URL not set" >&2; exit 1; }
while [[ $# -gt 0 ]]; do
case "$1" in
--status) status="$2"; shift 2;;
--agent) agent="$2"; shift 2;;
--project-id) project_id="$2"; shift 2;;
--since) since="$2"; shift 2;;
--) shift; break;;
-*) echo "Unknown option: $1" >&2; exit 1;;
*) echo "Unknown arg: $1" >&2; exit 1;;
esac
done
status="" agent="" project_id="" since="" type="" qs="?"
[[ -n "$status" ]] && qs="${qs}status=$status&"
[[ -n "$agent" ]] && qs="${qs}agent=$agent&"
[[ -n "$project_id" ]] && qs="${qs}project_id=$project_id&"
[[ -n "$since" ]] && qs="${qs}since=$since&"
while [[ $# -gt 0 ]]; do
case "$1" in
--status) status="$2"; shift 2;;
--agent) agent="$2"; shift 2;;
--project-id) project_id="$2"; shift 2;;
--since) since="$2"; shift 2;;
--type) type="$2"; shift 2;;
--) shift; break;;
*) shift;;
esac
done
curl -sf "$API_URL/work${qs}" | jq .
}
[[ -n "$status" ]] && qs="${qs}status=$status&"
[[ -n "$agent" ]] && qs="${qs}agent=$agent&"
[[ -n "$project_id" ]] && qs="${qs}project_id=$project_id&"
[[ -n "$since" ]] && qs="${qs}since=$since&"
[[ -n "$type" ]] && qs="${qs}type=$type&"
curl -sf "${API_URL}/work${qs}" | jq .