#compdef codewhale codew

autoload -U is-at-least

_codewhale() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'--config=[]:CONFIG:_files' \
'--profile=[]:PROFILE:_default' \
'--provider=[Provider selector; exec/fleet also accept configured custom provider identifiers]:PROVIDER:_default' \
'--model=[]:MODEL:_default' \
'--output-mode=[]:OUTPUT_MODE:_default' \
'--verbosity=[Controls transcript and output verbosity (normal, concise)]:LEVEL:_default' \
'--log-level=[]:LOG_LEVEL:_default' \
'--telemetry=[Control aggregate usage counting (default on; Codewhale + PostHog; durable off\: config set telemetry false; CODEWHALE_TELEMETRY=0 always wins)]:BOOL:(true false)' \
'--approval-policy=[]:APPROVAL_POLICY:_default' \
'--sandbox-mode=[]:SANDBOX_MODE:_default' \
'--api-key=[]:API_KEY:_default' \
'--base-url=[]:BASE_URL:_default' \
'-C+[Workspace directory for Codewhale file tools]:DIR:_files' \
'--workspace=[Workspace directory for Codewhale file tools]:DIR:_files' \
'(-c --continue --session-id)-r+[Resume a saved interactive session by id or unique id prefix]:SESSION_ID:_default' \
'(-c --continue --session-id)--resume=[Resume a saved interactive session by id or unique id prefix]:SESSION_ID:_default' \
'(-c --continue -r --resume)--session-id=[Alias of \`--resume\` matching \`codewhale exec --session-id\`]:SESSION_ID:_default' \
'-p+[]:PROMPT:_default' \
'--prompt=[]:PROMPT:_default' \
'*--set=[Per-run config override (\`KEY=VALUE\`), repeatable. Applied in memory after load and never saved — \`config set\` persists instead. Long-only\: short \`-c\` is already \`--continue\`]:KEY=VALUE:_default' \
'(--no-mouse-capture)--mouse-capture[]' \
'(--mouse-capture)--no-mouse-capture[]' \
'--skip-onboarding[]' \
'--fresh[Start a fresh session without automatic resume or crash recovery]' \
'--no-project-config[Skip loading project-level config, including the workspace-specific \`\[workspace\]\`/\`\[projects\]\` overlay from user config. Must appear before the subcommand; it is applied before subcommand dispatch]' \
'--yolo[Legacy compatibility alias for Act + Full Access]' \
'-c[Continue the most recent interactive session for this workspace]' \
'--continue[Continue the most recent interactive session for this workspace]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::prompt:_default' \
":: :_codewhale_commands" \
"*::: :->codewhale" \
&& ret=0
    case $state in
    (codewhale)
        words=($line[2] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-command-$line[2]:"
        case $line[2] in
            (run)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(models)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(speech)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(tts)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(sessions)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(rc)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(fork)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(setup)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(remote-setup)
_arguments "${_arguments_options[@]}" : \
'--cloud=[Cloud target slug (lighthouse, azure, digitalocean). Skips the prompt]:CLOUD:_default' \
'--bridge=[Chat bridge slug (feishu, telegram). Skips the prompt]:BRIDGE:_default' \
'--provider=[Provider slug; validated against the provider registry. Skips the prompt]:PROVIDER:_default' \
'--out=[Bundle output directory (default \`./codewhale-deploy/<cloud>-<bridge>\`)]:DIR:_files' \
'--generate-only[Emit the bundle, do not provision (default)]' \
'(--generate-only)--apply[Run the cloud CLI to auto-provision (not yet implemented)]' \
'--yes[Skip the final confirmation gate (CI / non-interactive)]' \
'--non-interactive[Fail instead of prompting if any required value is missing]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(exec)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(fleet)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(workflow-tool)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(lane-log-proxy)
_arguments "${_arguments_options[@]}" : \
'--log-path=[]:PATH:_files' \
'--receipt-path=[]:PATH:_files' \
'--receipt-tmp-path=[]:PATH:_files' \
'--environment-path=[]:PATH:_files' \
'--lane-id=[]:LANE_ID:_default' \
'-h[Print help]' \
'--help[Print help]' \
'*::command:_default' \
&& ret=0
;;
(workflow)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__workflow_commands" \
"*::: :->workflow" \
&& ret=0

    case $state in
    (workflow)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-workflow-command-$line[1]:"
        case $line[1] in
            (run)
_arguments "${_arguments_options[@]}" : \
'--fleet=[Named Fleet roster (e.g. stopship). The flag keeps its compatibility spelling. Without one, roles resolve against the built-in roster and the session route]:FLEET:_default' \
'--issue=[Issue id binding recorded on the Lane and passed into workflow args]:ISSUE:_default' \
'--goal=[Free-form goal text recorded on the Lane and passed into workflow args]:GOAL:_default' \
'--runtime=[Runtime backend\: tmux, inline, vm, or ci]:RUNTIME:_default' \
'--source-path=[Explicit Workflow source path, overriding name-based resolution]:PATH:_files' \
'--token-budget=[Optional shared Workflow token budget]:TOKEN_BUDGET:_default' \
'--worktree-repo=[Create an isolated worktree under this repo root]:DIR:_files' \
'--branch=[Branch name for the worktree (requires \`--worktree-repo\`)]:BRANCH:_default' \
'--worktree-path=[Worktree path (defaults to \`<repo>/.codewhale/lanes/<lane-id>\`)]:DIR:_files' \
'--worktree-ttl-secs=[Worktree cleanup TTL seconds after stop (0 = immediate on stop)]:WORKTREE_TTL_SECS:_default' \
'--verify[Run verifier gates after a successful Workflow completion]' \
'-h[Print help]' \
'--help[Print help]' \
':workflow -- Workflow name or path. `stopship` maps to workflows/stopship.workflow.js:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__workflow__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-workflow-help-command-$line[1]:"
        case $line[1] in
            (run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(lane)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__lane_commands" \
"*::: :->lane" \
&& ret=0

    case $state in
    (lane)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-lane-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'--json[Emit JSON]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
'--json[]' \
'-h[Print help]' \
'--help[Print help]' \
':lane_id -- Lane id (e.g. `lane-a1b2c3d4`):_default' \
&& ret=0
;;
(attach)
_arguments "${_arguments_options[@]}" : \
'--print[Only print the attach command; do not exec]' \
'-h[Print help]' \
'--help[Print help]' \
':lane_id:_default' \
&& ret=0
;;
(logs)
_arguments "${_arguments_options[@]}" : \
'--tail=[Number of trailing lines when not following (default 50)]:TAIL:_default' \
'-f[Follow the log file (like \`tail -f\`)]' \
'--follow[Follow the log file (like \`tail -f\`)]' \
'-h[Print help]' \
'--help[Print help]' \
':lane_id:_default' \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':lane_id:_default' \
&& ret=0
;;
(interrupt)
_arguments "${_arguments_options[@]}" : \
'--json[]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':lane_id:_default' \
&& ret=0
;;
(restart)
_arguments "${_arguments_options[@]}" : \
'--json[]' \
'-h[Print help]' \
'--help[Print help]' \
':lane_id:_default' \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
'--json[]' \
'-h[Print help]' \
'--help[Print help]' \
':lane_id:_default' \
&& ret=0
;;
(start)
_arguments "${_arguments_options[@]}" : \
'--workflow=[Workflow name (e.g. \`stopship\`)]:WORKFLOW:_default' \
'--fleet=[Fleet roster name (e.g. \`stopship\`); the flag keeps its compatibility spelling]:FLEET:_default' \
'--issue=[Issue id binding]:ISSUE:_default' \
'--goal=[Free-form goal text]:GOAL:_default' \
'--runtime=[Runtime backend\: tmux, inline, vm, or ci]:RUNTIME:_default' \
'--worktree-repo=[Create an isolated worktree under this repo root]:DIR:_files' \
'--branch=[Branch name for the worktree (requires \`--worktree-repo\`)]:BRANCH:_default' \
'--worktree-path=[Worktree path (defaults to \`<repo>/.codewhale/lanes/<lane-id>\`)]:DIR:_files' \
'--worktree-ttl-secs=[Worktree cleanup TTL seconds after stop (0 = immediate on stop)]:WORKTREE_TTL_SECS:_default' \
'-h[Print help]' \
'--help[Print help]' \
'*::command -- Command to run in the runtime (after `--`):_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__lane__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-lane-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(attach)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logs)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(interrupt)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(restart)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(start)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(review)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(apply)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(eval)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(mcp)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(features)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(integrations)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(serve)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::args:_default' \
&& ret=0
;;
(web)
_arguments "${_arguments_options[@]}" : \
'--port=[Loopback port for the local Runtime API and embedded client]:PORT:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(login)
_arguments "${_arguments_options[@]}" : \
'--timeout-seconds=[Maximum time to wait for browser authorization]:TIMEOUT_SECONDS:_default' \
'--api-key=[Legacy provider-key flag\: rejected with a redirect to \`auth set\`]:API_KEY:_default' \
'--provider=[Legacy provider flag\: rejected with a redirect to \`auth set\`]:PROVIDER:_default' \
'--no-open[Print the verification URL without trying to open a browser]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(auth)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__auth_commands" \
"*::: :->auth" \
&& ret=0

    case $state in
    (auth)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-auth-command-$line[1]:"
        case $line[1] in
            (xai-device)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(chatgpt)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(chatgpt-revoke)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(external-consent)
_arguments "${_arguments_options[@]}" : \
'--provider=[]:PROVIDER:_default' \
'--mode=[]:MODE:(read-only managed)' \
'--path=[Exact credential file path. Defaults to the selected CLI'\''s resolved path without probing whether the file exists]:PATH:_files' \
'--yes[Confirm the disclosed exact read-only grant without an interactive prompt. Required when stdin is not a terminal]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(external-revoke)
_arguments "${_arguments_options[@]}" : \
'--provider=[]:PROVIDER:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
'--provider=[Show status for a specific provider only]:PROVIDER:_default' \
'--diagnostic[Report resolved home/config/settings/backend paths and structural credential-source presence without printing credential values or probing provider credential stores]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
'--provider=[]:PROVIDER:_default' \
'--api-key=[Inline value (discouraged — appears in shell history)]:API_KEY:_default' \
'--api-key-stdin[Read the key from stdin instead of prompting]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" : \
'--provider=[]:PROVIDER:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(print-api-key)
_arguments "${_arguments_options[@]}" : \
'--provider=[]:PROVIDER:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(clear)
_arguments "${_arguments_options[@]}" : \
'--provider=[]:PROVIDER:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(migrate)
_arguments "${_arguments_options[@]}" : \
'--dry-run[Don'\''t actually write anything; print what would change]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__auth__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-auth-help-command-$line[1]:"
        case $line[1] in
            (xai-device)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(chatgpt)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(chatgpt-revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(external-consent)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(external-revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(print-api-key)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clear)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(migrate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(account)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__account_commands" \
"*::: :->account" \
&& ret=0

    case $state in
    (account)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
'--timeout-seconds=[Maximum time to wait for browser authorization]:TIMEOUT_SECONDS:_default' \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'--no-open[Print the verification URL without trying to open a browser]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(keys)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_codewhale__subcmd__account__subcmd__keys_commands" \
"*::: :->keys" \
&& ret=0

    case $state in
    (keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-keys-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
'--label=[Non-secret label shown beside the stored credential]:LABEL:_default' \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'(--from-local)--api-key-stdin[Read the key from stdin. Useful for pipes and secret-manager commands]' \
'(--api-key-stdin)--from-local[Upload the locally resolved key (config, secret store, then environment)]' \
'-h[Print help]' \
'--help[Print help]' \
':provider:(deepseek anthropic openai openrouter zai moonshot xai xiaomi)' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':provider:(deepseek anthropic openai openrouter zai moonshot xai xiaomi)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__keys__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-keys-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(api-keys)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__account__subcmd__api-keys_commands" \
"*::: :->api-keys" \
&& ret=0

    case $state in
    (api-keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-api-keys-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
'--name=[Human label shown in listings and audit events]:NAME:_default' \
'--expires-in-days=[Optional lifetime in days. Omit for a key that never expires]:EXPIRES_IN_DAYS:_default' \
'*--scope=[Repeatable. Omit for both \`account\:read\` and \`agent\:run\`]:SCOPE:_default' \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(revoke)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':id -- The 24-hex key id, which is also the tail of the display prefix:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__api-keys__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-api-keys-help-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(whoami)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(agent)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'--dry-run[Inspect the account document without writing local files]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'--dry-run[Show what would be pushed without writing the remote document]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-help-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(keys)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__help__subcmd__keys_commands" \
"*::: :->keys" \
&& ret=0

    case $state in
    (keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-help-keys-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(api-keys)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__help__subcmd__api-keys_commands" \
"*::: :->api-keys" \
&& ret=0

    case $state in
    (api-keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-help-api-keys-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(whoami)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(agent)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(cloud)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__account_commands" \
"*::: :->account" \
&& ret=0

    case $state in
    (account)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
'--timeout-seconds=[Maximum time to wait for browser authorization]:TIMEOUT_SECONDS:_default' \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'--no-open[Print the verification URL without trying to open a browser]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(keys)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
":: :_codewhale__subcmd__account__subcmd__keys_commands" \
"*::: :->keys" \
&& ret=0

    case $state in
    (keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-keys-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
'--label=[Non-secret label shown beside the stored credential]:LABEL:_default' \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'(--from-local)--api-key-stdin[Read the key from stdin. Useful for pipes and secret-manager commands]' \
'(--api-key-stdin)--from-local[Upload the locally resolved key (config, secret store, then environment)]' \
'-h[Print help]' \
'--help[Print help]' \
':provider:(deepseek anthropic openai openrouter zai moonshot xai xiaomi)' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':provider:(deepseek anthropic openai openrouter zai moonshot xai xiaomi)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__keys__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-keys-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(api-keys)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__account__subcmd__api-keys_commands" \
"*::: :->api-keys" \
&& ret=0

    case $state in
    (api-keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-api-keys-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
'--name=[Human label shown in listings and audit events]:NAME:_default' \
'--expires-in-days=[Optional lifetime in days. Omit for a key that never expires]:EXPIRES_IN_DAYS:_default' \
'*--scope=[Repeatable. Omit for both \`account\:read\` and \`agent\:run\`]:SCOPE:_default' \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(revoke)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
':id -- The 24-hex key id, which is also the tail of the display prefix:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__api-keys__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-api-keys-help-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(whoami)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(agent)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'--dry-run[Inspect the account document without writing local files]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
'--api-base=[Codewhale account API origin. HTTPS is required except for loopback HTTP]:URL:_default' \
'--dry-run[Show what would be pushed without writing the remote document]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-help-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(keys)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__help__subcmd__keys_commands" \
"*::: :->keys" \
&& ret=0

    case $state in
    (keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-help-keys-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(api-keys)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__account__subcmd__help__subcmd__api-keys_commands" \
"*::: :->api-keys" \
&& ret=0

    case $state in
    (api-keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-account-help-api-keys-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(whoami)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(agent)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(dispatch)
_arguments "${_arguments_options[@]}" : \
'--remote=[Forge that should receive the branch and PR\: github, cnb, or gitee]:REMOTE:(github cnb gitee)' \
'--branch=[Branch the remote agent will raise (default\: codewhale/cloud-<unix>)]:BRANCH:_default' \
'--show=[Inspect one cloud job]:ID:_default' \
'--cancel=[Cancel one cloud job]:ID:_default' \
'--cwd=[Workspace whose git remotes are classified (default\: current directory)]:CWD:_files' \
'--confirm[Required to create Codewhale cloud-agent spend or push. Without this, only a proposal is written]' \
'--status[Show remotes and whether Codewhale cloud-agent credentials are present (never prints secrets)]' \
'--list[List first-class cloud jobs (same kind shown by \`/jobs\`)]' \
'-h[Print help]' \
'--help[Print help]' \
'*::prompt -- Task for the remote agent. Required unless listing or inspecting a job:_default' \
&& ret=0
;;
(cloud-agent)
_arguments "${_arguments_options[@]}" : \
'--remote=[Forge that should receive the branch and PR\: github, cnb, or gitee]:REMOTE:(github cnb gitee)' \
'--branch=[Branch the remote agent will raise (default\: codewhale/cloud-<unix>)]:BRANCH:_default' \
'--show=[Inspect one cloud job]:ID:_default' \
'--cancel=[Cancel one cloud job]:ID:_default' \
'--cwd=[Workspace whose git remotes are classified (default\: current directory)]:CWD:_files' \
'--confirm[Required to create Codewhale cloud-agent spend or push. Without this, only a proposal is written]' \
'--status[Show remotes and whether Codewhale cloud-agent credentials are present (never prints secrets)]' \
'--list[List first-class cloud jobs (same kind shown by \`/jobs\`)]' \
'-h[Print help]' \
'--help[Print help]' \
'*::prompt -- Task for the remote agent. Required unless listing or inspecting a job:_default' \
&& ret=0
;;
(mcp-server)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__config_commands" \
"*::: :->config" \
&& ret=0

    case $state in
    (config)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-config-command-$line[1]:"
        case $line[1] in
            (get)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':key:_default' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':key:_default' \
':value:_default' \
&& ret=0
;;
(unset)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':key:_default' \
&& ret=0
;;
(telemetry)
_arguments "${_arguments_options[@]}" : \
'--accept-notice=[Optional compatibility form\: enable future sessions under this policy version]:VERSION:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(dump)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
'--dry-run[Print the deterministic import plan without writing anything]' \
'--yes[Skip the interactive consent prompt (required for headless use)]' \
'--project[Target the project config instead of the user-global document]' \
'-h[Print help]' \
'--help[Print help]' \
':source -- Bundle source\: a file path, an HTTPS URL, or `-` for stdin:_default' \
&& ret=0
;;
(export)
_arguments "${_arguments_options[@]}" : \
'--out=[Write to this path instead of stdout]:FILE:_files' \
'--portable[Emit a portable, secret-free bundle (required flag; plain \`export\` is reserved so a future non-portable format cannot silently change what the command writes)]' \
'--project[Export the project config instead of the user-global document]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__config__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-config-help-command-$line[1]:"
        case $line[1] in
            (get)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(unset)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(telemetry)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(dump)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(export)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(model)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__model_commands" \
"*::: :->model" \
&& ret=0

    case $state in
    (model)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-model-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'--provider=[]:PROVIDER:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(resolve)
_arguments "${_arguments_options[@]}" : \
'--provider=[]:PROVIDER:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::model:_default' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':model:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__model__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-model-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resolve)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(thread)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__thread_commands" \
"*::: :->thread" \
&& ret=0

    case $state in
    (thread)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-thread-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'--limit=[]:LIMIT:_default' \
'--all[]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(read)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':thread_id:_default' \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':thread_id:_default' \
&& ret=0
;;
(fork)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':thread_id:_default' \
&& ret=0
;;
(archive)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':thread_id:_default' \
&& ret=0
;;
(unarchive)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':thread_id:_default' \
&& ret=0
;;
(set-name)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':thread_id:_default' \
':name:_default' \
&& ret=0
;;
(clear-name)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':thread_id:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__thread__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-thread-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(read)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fork)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(archive)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(unarchive)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-name)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clear-name)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(sandbox)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__sandbox_commands" \
"*::: :->sandbox" \
&& ret=0

    case $state in
    (sandbox)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-sandbox-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
'--ask=[]:ASK:(unless-trusted on-failure on-request never)' \
'-h[Print help]' \
'--help[Print help]' \
':command:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__sandbox__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-sandbox-help-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(app-server)
_arguments "${_arguments_options[@]}" : \
'--socket-path=[Socket path override for --socket. Defaults to \`\$CODEWHALE_HOME/run/daemon.sock\`, else \`\$XDG_RUNTIME_DIR/codewhale/daemon.sock\`, else \`~/Library/Application Support/codewhale/daemon.sock\` (macOS) or \`~/.codewhale/run/daemon.sock\`]:SOCKET_PATH:_files' \
'--host=[Bind host. Defaults to 127.0.0.1; with --mobile and no host, binds 0.0.0.0 so LAN devices can reach the mobile page]:HOST:_default' \
'--port=[Bind port. Defaults to 7878 for --http/--mobile (the runtime API) and 8787 for the legacy in-process app-server HTTP transport]:PORT:_default' \
'--workers=[Background task worker count (1-8). Only used with --http/--mobile]:WORKERS:_default' \
'--config=[]:CONFIG:_files' \
'--auth-token=[]:AUTH_TOKEN:_default' \
'*--cors-origin=[]:CORS_ORIGIN:_default' \
'(--stdio --mobile)--http[Serve the full HTTP/SSE runtime API (\`/v1/*\`\: sessions, threads, turns, approvals, events, usage, fleet, tasks). This is the canonical runtime API surface; it delegates to the same server as \`codewhale serve --http\`]' \
'(--stdio)--mobile[Serve the runtime API plus the phone-friendly mobile control page. Equivalent to the legacy \`codewhale serve --mobile\`]' \
'--stdio[Run the app-server JSON-RPC control transport over stdio (no listener). Used by local SDKs and JSON-RPC integrations]' \
'(--stdio --http --mobile)--socket[Run as the desktop daemon\: the same JSON-RPC control transport as \`--stdio\`, served on a user-private unix domain socket under the Codewhale runtime directory. Clients must \`daemon/attach\` first. Not yet supported on Windows (fails with a typed error)]' \
'--qr[Show a QR code for the mobile URL in the terminal (requires --mobile)]' \
'--insecure-no-auth[]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(completion)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(metrics)
_arguments "${_arguments_options[@]}" : \
'--since=[Restrict to events newer than this duration (e.g. 7d, 24h, 30m, now-2h)]:DURATION:_default' \
'--json[Emit machine-readable JSON]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'--proxy=[Proxy URL to use for update HTTP requests]:URL:_default' \
'--beta[Update to the latest beta release instead of the latest stable release]' \
'--check[Only check the latest release; do not download or replace binaries]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(providers)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_codewhale__subcmd__providers_commands" \
"*::: :->providers" \
&& ret=0

    case $state in
    (providers)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-providers-command-$line[1]:"
        case $line[1] in
            (export)
_arguments "${_arguments_options[@]}" : \
'--json[Required. The export is the generated cwc catalog source of truth]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__providers__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-providers-help-command-$line[1]:"
        case $line[1] in
            (export)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-command-$line[1]:"
        case $line[1] in
            (run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(models)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(speech)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(sessions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rc)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fork)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(setup)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remote-setup)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(exec)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fleet)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(workflow-tool)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(lane-log-proxy)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(workflow)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__workflow_commands" \
"*::: :->workflow" \
&& ret=0

    case $state in
    (workflow)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-workflow-command-$line[1]:"
        case $line[1] in
            (run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(lane)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__lane_commands" \
"*::: :->lane" \
&& ret=0

    case $state in
    (lane)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-lane-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(attach)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logs)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stop)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(interrupt)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(restart)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(start)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(review)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(apply)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(eval)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(mcp)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(features)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(integrations)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(serve)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(web)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(login)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(auth)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__auth_commands" \
"*::: :->auth" \
&& ret=0

    case $state in
    (auth)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-auth-command-$line[1]:"
        case $line[1] in
            (xai-device)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(chatgpt)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(chatgpt-revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(external-consent)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(external-revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(print-api-key)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clear)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(migrate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(account)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__account_commands" \
"*::: :->account" \
&& ret=0

    case $state in
    (account)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-account-command-$line[1]:"
        case $line[1] in
            (login)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(logout)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(keys)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__account__subcmd__keys_commands" \
"*::: :->keys" \
&& ret=0

    case $state in
    (keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-account-keys-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(api-keys)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__account__subcmd__api-keys_commands" \
"*::: :->api-keys" \
&& ret=0

    case $state in
    (api-keys)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-account-api-keys-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(revoke)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(whoami)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(agent)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(dispatch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(mcp-server)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__config_commands" \
"*::: :->config" \
&& ret=0

    case $state in
    (config)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-config-command-$line[1]:"
        case $line[1] in
            (get)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(unset)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(telemetry)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(dump)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(export)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(model)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__model_commands" \
"*::: :->model" \
&& ret=0

    case $state in
    (model)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-model-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resolve)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(thread)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__thread_commands" \
"*::: :->thread" \
&& ret=0

    case $state in
    (thread)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-thread-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(read)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resume)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fork)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(archive)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(unarchive)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-name)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clear-name)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(sandbox)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__sandbox_commands" \
"*::: :->sandbox" \
&& ret=0

    case $state in
    (sandbox)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-sandbox-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(app-server)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(completion)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(metrics)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(providers)
_arguments "${_arguments_options[@]}" : \
":: :_codewhale__subcmd__help__subcmd__providers_commands" \
"*::: :->providers" \
&& ret=0

    case $state in
    (providers)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:codewhale-help-providers-command-$line[1]:"
        case $line[1] in
            (export)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_codewhale_commands] )) ||
_codewhale_commands() {
    local commands; commands=(
'run:Run an interactive or non-interactive task' \
'doctor:Run Codewhale diagnostics' \
'models:List cached models; use --update to refresh configured provider catalogs' \
'speech:Generate speech audio with Xiaomi MiMo TTS models' \
'tts:Generate speech audio with Xiaomi MiMo TTS models' \
'sessions:List saved sessions' \
'resume:Resume a saved session' \
'rc:Launch an interactive session and hand it to the Codewhale web app' \
'fork:Fork a saved session' \
'init:Create a default AGENTS.md in the current directory' \
'setup:Bootstrap MCP config and/or skills directories' \
'remote-setup:Generate a remote Codewhale agent deploy bundle (cloud + chat bridge)' \
'exec:Run a non-interactive prompt' \
'fleet:Manage durable Agent fleet runs' \
'workflow-tool:Internal model-free Workflow tool dispatcher used by Lane Runtime' \
'lane-log-proxy:Internal detached-runtime output/receipt supervisor' \
'workflow:Run checked-in Workflows through a Lane Runtime backend' \
'lane:Manage running workflow instances (Lanes) and Runtime backends (#4176)' \
'review:Run a Codewhale-powered code review over a git diff' \
'apply:Apply a patch file or stdin to the working tree' \
'eval:Run the offline evaluation harness' \
'mcp:Manage MCP servers' \
'features:Inspect feature flags' \
'integrations:Connect third-party harnesses through Codewhale (e.g. \`integrations dsh status\`)' \
'serve:Run a local Codewhale server' \
'web:Open the first-class local browser client over the canonical Runtime API' \
'login:Sign in to your Codewhale account (browser device flow)' \
'logout:Remove saved authentication state' \
'auth:Manage authentication credentials and provider mode' \
'account:Sign in to your Codewhale account and manage account-scoped provider keys' \
'cloud:Sign in to your Codewhale account and manage account-scoped provider keys' \
'dispatch:Offload a coding agent to the Codewhale cloud. Never spends or pushes without --confirm' \
'cloud-agent:Offload a coding agent to the Codewhale cloud. Never spends or pushes without --confirm' \
'mcp-server:Run MCP server mode over stdio' \
'config:Read/write/list config values' \
'model:Resolve or list available models across providers' \
'thread:Manage thread/session metadata and resume/fork flows' \
'sandbox:Evaluate sandbox/approval policy decisions' \
'app-server:Run the canonical runtime API / control plane (HTTP/SSE, mobile, stdio)' \
'completion:Generate shell completions' \
'completions:Generate shell completions' \
'metrics:Print a usage rollup from the audit log and session store' \
'update:Update this release binary from GitHub (package-managed installs get migration instructions)' \
'providers:Export the route catalog (\`providers export --json\`)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account_commands] )) ||
_codewhale__subcmd__account_commands() {
    local commands; commands=(
'login:Sign this CLI profile in through the browser device flow' \
'status:Show the signed-in account for this CLI profile' \
'logout:Remove this profile'\''s local account session and revoke it when reachable' \
'keys:Manage provider API keys stored in the signed-in Codewhale account' \
'api-keys:Manage Codewhale account API keys\: machine tokens for CI' \
'whoami:Show the account this CLI authenticates as, preferring a machine key' \
'agent:Check the account'\''s agent-model precondition for machine work' \
'pull:Inspect the account document; local settings import is not available yet' \
'push:Push local settings to the account document (never automatic, --dry-run required)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale account commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__agent_commands] )) ||
_codewhale__subcmd__account__subcmd__agent_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account agent commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys_commands() {
    local commands; commands=(
'create:Mint a machine token. The secret is printed once and never again' \
'list:List this account'\''s machine tokens. Metadata only; never the secret' \
'revoke:Revoke a machine token by its 24-hex id' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale account api-keys commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys__subcmd__create_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys__subcmd__create_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account api-keys create commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys__subcmd__help_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys__subcmd__help_commands() {
    local commands; commands=(
'create:Mint a machine token. The secret is printed once and never again' \
'list:List this account'\''s machine tokens. Metadata only; never the secret' \
'revoke:Revoke a machine token by its 24-hex id' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale account api-keys help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys__subcmd__help__subcmd__create_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys__subcmd__help__subcmd__create_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account api-keys help create commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account api-keys help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys__subcmd__help__subcmd__list_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account api-keys help list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys__subcmd__help__subcmd__revoke_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys__subcmd__help__subcmd__revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account api-keys help revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys__subcmd__list_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account api-keys list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__api-keys__subcmd__revoke_commands] )) ||
_codewhale__subcmd__account__subcmd__api-keys__subcmd__revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account api-keys revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help_commands] )) ||
_codewhale__subcmd__account__subcmd__help_commands() {
    local commands; commands=(
'login:Sign this CLI profile in through the browser device flow' \
'status:Show the signed-in account for this CLI profile' \
'logout:Remove this profile'\''s local account session and revoke it when reachable' \
'keys:Manage provider API keys stored in the signed-in Codewhale account' \
'api-keys:Manage Codewhale account API keys\: machine tokens for CI' \
'whoami:Show the account this CLI authenticates as, preferring a machine key' \
'agent:Check the account'\''s agent-model precondition for machine work' \
'pull:Inspect the account document; local settings import is not available yet' \
'push:Push local settings to the account document (never automatic, --dry-run required)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale account help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__agent_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__agent_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help agent commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__api-keys_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__api-keys_commands() {
    local commands; commands=(
'create:Mint a machine token. The secret is printed once and never again' \
'list:List this account'\''s machine tokens. Metadata only; never the secret' \
'revoke:Revoke a machine token by its 24-hex id' \
    )
    _describe -t commands 'codewhale account help api-keys commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__api-keys__subcmd__create_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__api-keys__subcmd__create_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help api-keys create commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__api-keys__subcmd__list_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__api-keys__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help api-keys list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__api-keys__subcmd__revoke_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__api-keys__subcmd__revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help api-keys revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__keys_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__keys_commands() {
    local commands; commands=(
'list:List configured providers without revealing key values' \
'set:Save a provider key to the signed-in Codewhale account' \
'remove:Remove a provider key from the signed-in Codewhale account' \
    )
    _describe -t commands 'codewhale account help keys commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__keys__subcmd__list_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__keys__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help keys list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__keys__subcmd__remove_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__keys__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help keys remove commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__keys__subcmd__set_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__keys__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help keys set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__login_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__login_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help login commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__logout_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__logout_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help logout commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__pull_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__pull_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help pull commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__push_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__push_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help push commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__status_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__help__subcmd__whoami_commands] )) ||
_codewhale__subcmd__account__subcmd__help__subcmd__whoami_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account help whoami commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys_commands] )) ||
_codewhale__subcmd__account__subcmd__keys_commands() {
    local commands; commands=(
'list:List configured providers without revealing key values' \
'set:Save a provider key to the signed-in Codewhale account' \
'remove:Remove a provider key from the signed-in Codewhale account' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale account keys commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys__subcmd__help_commands] )) ||
_codewhale__subcmd__account__subcmd__keys__subcmd__help_commands() {
    local commands; commands=(
'list:List configured providers without revealing key values' \
'set:Save a provider key to the signed-in Codewhale account' \
'remove:Remove a provider key from the signed-in Codewhale account' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale account keys help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__account__subcmd__keys__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account keys help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys__subcmd__help__subcmd__list_commands] )) ||
_codewhale__subcmd__account__subcmd__keys__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account keys help list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys__subcmd__help__subcmd__remove_commands] )) ||
_codewhale__subcmd__account__subcmd__keys__subcmd__help__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account keys help remove commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys__subcmd__help__subcmd__set_commands] )) ||
_codewhale__subcmd__account__subcmd__keys__subcmd__help__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account keys help set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys__subcmd__list_commands] )) ||
_codewhale__subcmd__account__subcmd__keys__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account keys list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys__subcmd__remove_commands] )) ||
_codewhale__subcmd__account__subcmd__keys__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account keys remove commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__keys__subcmd__set_commands] )) ||
_codewhale__subcmd__account__subcmd__keys__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account keys set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__login_commands] )) ||
_codewhale__subcmd__account__subcmd__login_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account login commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__logout_commands] )) ||
_codewhale__subcmd__account__subcmd__logout_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account logout commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__pull_commands] )) ||
_codewhale__subcmd__account__subcmd__pull_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account pull commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__push_commands] )) ||
_codewhale__subcmd__account__subcmd__push_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account push commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__status_commands] )) ||
_codewhale__subcmd__account__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__account__subcmd__whoami_commands] )) ||
_codewhale__subcmd__account__subcmd__whoami_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale account whoami commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__app-server_commands] )) ||
_codewhale__subcmd__app-server_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale app-server commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__apply_commands] )) ||
_codewhale__subcmd__apply_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale apply commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth_commands] )) ||
_codewhale__subcmd__auth_commands() {
    local commands; commands=(
'xai-device:Sign in to xAI/Grok with an SSH-friendly device code' \
'chatgpt:Sign in with ChatGPT for Codex subscription access (PKCE loopback)' \
'chatgpt-revoke:Revoke Codewhale-owned ChatGPT tokens. Codex CLI consent is unchanged' \
'external-consent:Explicitly allow read-only access to one credential file owned by another CLI. Managed mutation is currently unsupported and fails closed' \
'external-revoke:Revoke access to another CLI'\''s credential file for one provider' \
'status:Show current provider and runtime-effective credential route state. Without \`--provider\`, shows all known providers. With \`--provider\`, shows detailed status for that provider' \
'set:Save an API key to the shared user config file. Reads from \`--api-key\`, \`--api-key-stdin\`, or prompts on stdin when neither is given. Does not echo the key' \
'get:Report the effective credential route for a provider. Never prints a credential; reports the source layer or structural OAuth/repair state' \
'print-api-key:Pipe the runtime-effective API key to a local client; refuses terminals' \
'clear:Delete a provider'\''s key from config and secret-store storage' \
'list:List all known providers with their runtime-effective auth state, without revealing credentials' \
'migrate:Advanced\: migrate config-file keys into a platform credential store' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale auth commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__chatgpt_commands] )) ||
_codewhale__subcmd__auth__subcmd__chatgpt_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth chatgpt commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__chatgpt-revoke_commands] )) ||
_codewhale__subcmd__auth__subcmd__chatgpt-revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth chatgpt-revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__clear_commands] )) ||
_codewhale__subcmd__auth__subcmd__clear_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth clear commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__external-consent_commands] )) ||
_codewhale__subcmd__auth__subcmd__external-consent_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth external-consent commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__external-revoke_commands] )) ||
_codewhale__subcmd__auth__subcmd__external-revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth external-revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__get_commands] )) ||
_codewhale__subcmd__auth__subcmd__get_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth get commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help_commands] )) ||
_codewhale__subcmd__auth__subcmd__help_commands() {
    local commands; commands=(
'xai-device:Sign in to xAI/Grok with an SSH-friendly device code' \
'chatgpt:Sign in with ChatGPT for Codex subscription access (PKCE loopback)' \
'chatgpt-revoke:Revoke Codewhale-owned ChatGPT tokens. Codex CLI consent is unchanged' \
'external-consent:Explicitly allow read-only access to one credential file owned by another CLI. Managed mutation is currently unsupported and fails closed' \
'external-revoke:Revoke access to another CLI'\''s credential file for one provider' \
'status:Show current provider and runtime-effective credential route state. Without \`--provider\`, shows all known providers. With \`--provider\`, shows detailed status for that provider' \
'set:Save an API key to the shared user config file. Reads from \`--api-key\`, \`--api-key-stdin\`, or prompts on stdin when neither is given. Does not echo the key' \
'get:Report the effective credential route for a provider. Never prints a credential; reports the source layer or structural OAuth/repair state' \
'print-api-key:Pipe the runtime-effective API key to a local client; refuses terminals' \
'clear:Delete a provider'\''s key from config and secret-store storage' \
'list:List all known providers with their runtime-effective auth state, without revealing credentials' \
'migrate:Advanced\: migrate config-file keys into a platform credential store' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale auth help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__chatgpt_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__chatgpt_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help chatgpt commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__chatgpt-revoke_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__chatgpt-revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help chatgpt-revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__clear_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__clear_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help clear commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__external-consent_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__external-consent_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help external-consent commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__external-revoke_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__external-revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help external-revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__get_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__get_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help get commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__list_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__migrate_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__migrate_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help migrate commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__print-api-key_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__print-api-key_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help print-api-key commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__set_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__status_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__help__subcmd__xai-device_commands] )) ||
_codewhale__subcmd__auth__subcmd__help__subcmd__xai-device_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth help xai-device commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__list_commands] )) ||
_codewhale__subcmd__auth__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__migrate_commands] )) ||
_codewhale__subcmd__auth__subcmd__migrate_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth migrate commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__print-api-key_commands] )) ||
_codewhale__subcmd__auth__subcmd__print-api-key_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth print-api-key commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__set_commands] )) ||
_codewhale__subcmd__auth__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__status_commands] )) ||
_codewhale__subcmd__auth__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__auth__subcmd__xai-device_commands] )) ||
_codewhale__subcmd__auth__subcmd__xai-device_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale auth xai-device commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__completion_commands] )) ||
_codewhale__subcmd__completion_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale completion commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config_commands] )) ||
_codewhale__subcmd__config_commands() {
    local commands; commands=(
'get:' \
'set:' \
'unset:' \
'telemetry:Review aggregate usage counting by Codewhale and PostHog (default on)' \
'list:' \
'path:' \
'edit:Open the config file in \`\$VISUAL\`/\`\$EDITOR\` (else \`vi\`)' \
'doctor:Check the loaded config\: unknown keys, empty secrets, malformed URLs. Read-only; prints warnings, fails on errors, never prints a credential' \
'dump:Print the effective config (including \`--set\` overlays) as TOML with secrets redacted by key name' \
'import:Import a portable config bundle from a file, HTTPS URL, or stdin (-)' \
'export:Export a portable, secret-free config bundle' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale config commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__doctor_commands] )) ||
_codewhale__subcmd__config__subcmd__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config doctor commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__dump_commands] )) ||
_codewhale__subcmd__config__subcmd__dump_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config dump commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__edit_commands] )) ||
_codewhale__subcmd__config__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config edit commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__export_commands] )) ||
_codewhale__subcmd__config__subcmd__export_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config export commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__get_commands] )) ||
_codewhale__subcmd__config__subcmd__get_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config get commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help_commands] )) ||
_codewhale__subcmd__config__subcmd__help_commands() {
    local commands; commands=(
'get:' \
'set:' \
'unset:' \
'telemetry:Review aggregate usage counting by Codewhale and PostHog (default on)' \
'list:' \
'path:' \
'edit:Open the config file in \`\$VISUAL\`/\`\$EDITOR\` (else \`vi\`)' \
'doctor:Check the loaded config\: unknown keys, empty secrets, malformed URLs. Read-only; prints warnings, fails on errors, never prints a credential' \
'dump:Print the effective config (including \`--set\` overlays) as TOML with secrets redacted by key name' \
'import:Import a portable config bundle from a file, HTTPS URL, or stdin (-)' \
'export:Export a portable, secret-free config bundle' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale config help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__doctor_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help doctor commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__dump_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__dump_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help dump commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__edit_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help edit commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__export_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__export_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help export commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__get_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__get_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help get commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__import_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__import_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help import commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__list_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__path_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__path_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help path commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__set_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__telemetry_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__telemetry_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help telemetry commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__help__subcmd__unset_commands] )) ||
_codewhale__subcmd__config__subcmd__help__subcmd__unset_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config help unset commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__import_commands] )) ||
_codewhale__subcmd__config__subcmd__import_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config import commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__list_commands] )) ||
_codewhale__subcmd__config__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__path_commands] )) ||
_codewhale__subcmd__config__subcmd__path_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config path commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__set_commands] )) ||
_codewhale__subcmd__config__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__telemetry_commands] )) ||
_codewhale__subcmd__config__subcmd__telemetry_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config telemetry commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__config__subcmd__unset_commands] )) ||
_codewhale__subcmd__config__subcmd__unset_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale config unset commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__dispatch_commands] )) ||
_codewhale__subcmd__dispatch_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale dispatch commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__doctor_commands] )) ||
_codewhale__subcmd__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale doctor commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__eval_commands] )) ||
_codewhale__subcmd__eval_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale eval commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__exec_commands] )) ||
_codewhale__subcmd__exec_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale exec commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__features_commands] )) ||
_codewhale__subcmd__features_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale features commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__fleet_commands] )) ||
_codewhale__subcmd__fleet_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale fleet commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__fork_commands] )) ||
_codewhale__subcmd__fork_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale fork commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help_commands] )) ||
_codewhale__subcmd__help_commands() {
    local commands; commands=(
'run:Run an interactive or non-interactive task' \
'doctor:Run Codewhale diagnostics' \
'models:List cached models; use --update to refresh configured provider catalogs' \
'speech:Generate speech audio with Xiaomi MiMo TTS models' \
'sessions:List saved sessions' \
'resume:Resume a saved session' \
'rc:Launch an interactive session and hand it to the Codewhale web app' \
'fork:Fork a saved session' \
'init:Create a default AGENTS.md in the current directory' \
'setup:Bootstrap MCP config and/or skills directories' \
'remote-setup:Generate a remote Codewhale agent deploy bundle (cloud + chat bridge)' \
'exec:Run a non-interactive prompt' \
'fleet:Manage durable Agent fleet runs' \
'workflow-tool:Internal model-free Workflow tool dispatcher used by Lane Runtime' \
'lane-log-proxy:Internal detached-runtime output/receipt supervisor' \
'workflow:Run checked-in Workflows through a Lane Runtime backend' \
'lane:Manage running workflow instances (Lanes) and Runtime backends (#4176)' \
'review:Run a Codewhale-powered code review over a git diff' \
'apply:Apply a patch file or stdin to the working tree' \
'eval:Run the offline evaluation harness' \
'mcp:Manage MCP servers' \
'features:Inspect feature flags' \
'integrations:Connect third-party harnesses through Codewhale (e.g. \`integrations dsh status\`)' \
'serve:Run a local Codewhale server' \
'web:Open the first-class local browser client over the canonical Runtime API' \
'login:Sign in to your Codewhale account (browser device flow)' \
'logout:Remove saved authentication state' \
'auth:Manage authentication credentials and provider mode' \
'account:Sign in to your Codewhale account and manage account-scoped provider keys' \
'dispatch:Offload a coding agent to the Codewhale cloud. Never spends or pushes without --confirm' \
'mcp-server:Run MCP server mode over stdio' \
'config:Read/write/list config values' \
'model:Resolve or list available models across providers' \
'thread:Manage thread/session metadata and resume/fork flows' \
'sandbox:Evaluate sandbox/approval policy decisions' \
'app-server:Run the canonical runtime API / control plane (HTTP/SSE, mobile, stdio)' \
'completion:Generate shell completions' \
'metrics:Print a usage rollup from the audit log and session store' \
'update:Update this release binary from GitHub (package-managed installs get migration instructions)' \
'providers:Export the route catalog (\`providers export --json\`)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account_commands] )) ||
_codewhale__subcmd__help__subcmd__account_commands() {
    local commands; commands=(
'login:Sign this CLI profile in through the browser device flow' \
'status:Show the signed-in account for this CLI profile' \
'logout:Remove this profile'\''s local account session and revoke it when reachable' \
'keys:Manage provider API keys stored in the signed-in Codewhale account' \
'api-keys:Manage Codewhale account API keys\: machine tokens for CI' \
'whoami:Show the account this CLI authenticates as, preferring a machine key' \
'agent:Check the account'\''s agent-model precondition for machine work' \
'pull:Inspect the account document; local settings import is not available yet' \
'push:Push local settings to the account document (never automatic, --dry-run required)' \
    )
    _describe -t commands 'codewhale help account commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__agent_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__agent_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account agent commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__api-keys_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__api-keys_commands() {
    local commands; commands=(
'create:Mint a machine token. The secret is printed once and never again' \
'list:List this account'\''s machine tokens. Metadata only; never the secret' \
'revoke:Revoke a machine token by its 24-hex id' \
    )
    _describe -t commands 'codewhale help account api-keys commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__api-keys__subcmd__create_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__api-keys__subcmd__create_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account api-keys create commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__api-keys__subcmd__list_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__api-keys__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account api-keys list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__api-keys__subcmd__revoke_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__api-keys__subcmd__revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account api-keys revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__keys_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__keys_commands() {
    local commands; commands=(
'list:List configured providers without revealing key values' \
'set:Save a provider key to the signed-in Codewhale account' \
'remove:Remove a provider key from the signed-in Codewhale account' \
    )
    _describe -t commands 'codewhale help account keys commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__keys__subcmd__list_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__keys__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account keys list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__keys__subcmd__remove_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__keys__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account keys remove commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__keys__subcmd__set_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__keys__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account keys set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__login_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__login_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account login commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__logout_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__logout_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account logout commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__pull_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__pull_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account pull commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__push_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__push_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account push commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__status_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__account__subcmd__whoami_commands] )) ||
_codewhale__subcmd__help__subcmd__account__subcmd__whoami_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help account whoami commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__app-server_commands] )) ||
_codewhale__subcmd__help__subcmd__app-server_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help app-server commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__apply_commands] )) ||
_codewhale__subcmd__help__subcmd__apply_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help apply commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth_commands] )) ||
_codewhale__subcmd__help__subcmd__auth_commands() {
    local commands; commands=(
'xai-device:Sign in to xAI/Grok with an SSH-friendly device code' \
'chatgpt:Sign in with ChatGPT for Codex subscription access (PKCE loopback)' \
'chatgpt-revoke:Revoke Codewhale-owned ChatGPT tokens. Codex CLI consent is unchanged' \
'external-consent:Explicitly allow read-only access to one credential file owned by another CLI. Managed mutation is currently unsupported and fails closed' \
'external-revoke:Revoke access to another CLI'\''s credential file for one provider' \
'status:Show current provider and runtime-effective credential route state. Without \`--provider\`, shows all known providers. With \`--provider\`, shows detailed status for that provider' \
'set:Save an API key to the shared user config file. Reads from \`--api-key\`, \`--api-key-stdin\`, or prompts on stdin when neither is given. Does not echo the key' \
'get:Report the effective credential route for a provider. Never prints a credential; reports the source layer or structural OAuth/repair state' \
'print-api-key:Pipe the runtime-effective API key to a local client; refuses terminals' \
'clear:Delete a provider'\''s key from config and secret-store storage' \
'list:List all known providers with their runtime-effective auth state, without revealing credentials' \
'migrate:Advanced\: migrate config-file keys into a platform credential store' \
    )
    _describe -t commands 'codewhale help auth commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__chatgpt_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__chatgpt_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth chatgpt commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__chatgpt-revoke_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__chatgpt-revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth chatgpt-revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__clear_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__clear_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth clear commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__external-consent_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__external-consent_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth external-consent commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__external-revoke_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__external-revoke_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth external-revoke commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__get_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__get_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth get commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__list_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__migrate_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__migrate_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth migrate commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__print-api-key_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__print-api-key_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth print-api-key commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__set_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__status_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__auth__subcmd__xai-device_commands] )) ||
_codewhale__subcmd__help__subcmd__auth__subcmd__xai-device_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help auth xai-device commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__completion_commands] )) ||
_codewhale__subcmd__help__subcmd__completion_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help completion commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config_commands] )) ||
_codewhale__subcmd__help__subcmd__config_commands() {
    local commands; commands=(
'get:' \
'set:' \
'unset:' \
'telemetry:Review aggregate usage counting by Codewhale and PostHog (default on)' \
'list:' \
'path:' \
'edit:Open the config file in \`\$VISUAL\`/\`\$EDITOR\` (else \`vi\`)' \
'doctor:Check the loaded config\: unknown keys, empty secrets, malformed URLs. Read-only; prints warnings, fails on errors, never prints a credential' \
'dump:Print the effective config (including \`--set\` overlays) as TOML with secrets redacted by key name' \
'import:Import a portable config bundle from a file, HTTPS URL, or stdin (-)' \
'export:Export a portable, secret-free config bundle' \
    )
    _describe -t commands 'codewhale help config commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__doctor_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config doctor commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__dump_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__dump_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config dump commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__edit_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config edit commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__export_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__export_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config export commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__get_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__get_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config get commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__import_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__import_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config import commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__list_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__path_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__path_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config path commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__set_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__telemetry_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__telemetry_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config telemetry commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__config__subcmd__unset_commands] )) ||
_codewhale__subcmd__help__subcmd__config__subcmd__unset_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help config unset commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__dispatch_commands] )) ||
_codewhale__subcmd__help__subcmd__dispatch_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help dispatch commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__doctor_commands] )) ||
_codewhale__subcmd__help__subcmd__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help doctor commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__eval_commands] )) ||
_codewhale__subcmd__help__subcmd__eval_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help eval commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__exec_commands] )) ||
_codewhale__subcmd__help__subcmd__exec_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help exec commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__features_commands] )) ||
_codewhale__subcmd__help__subcmd__features_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help features commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__fleet_commands] )) ||
_codewhale__subcmd__help__subcmd__fleet_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help fleet commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__fork_commands] )) ||
_codewhale__subcmd__help__subcmd__fork_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help fork commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__init_commands] )) ||
_codewhale__subcmd__help__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help init commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__integrations_commands] )) ||
_codewhale__subcmd__help__subcmd__integrations_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help integrations commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane_commands] )) ||
_codewhale__subcmd__help__subcmd__lane_commands() {
    local commands; commands=(
'list:List known lanes (newest first)' \
'status:Show one lane'\''s status and attach metadata' \
'attach:Attach to a tmux-backed lane (prints attach command; execs when possible)' \
'logs:Tail the lane stream-json / NDJSON journal' \
'stop:Stop a running lane and run worktree TTL cleanup' \
'interrupt:Interrupt a running lane (durable \`lane.interrupt\`)' \
'restart:Restart a lane in place (declared, no backend — reports why)' \
'resume:Resume a stopped lane (declared, no backend — reports why)' \
'start:Start a lane under a Runtime backend (tmux|inline|vm|ci)' \
    )
    _describe -t commands 'codewhale help lane commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__attach_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__attach_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane attach commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__interrupt_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__interrupt_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane interrupt commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__list_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__logs_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__logs_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane logs commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__restart_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__restart_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane restart commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__resume_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__resume_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane resume commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__start_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__start_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane start commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__status_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane__subcmd__stop_commands] )) ||
_codewhale__subcmd__help__subcmd__lane__subcmd__stop_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane stop commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__lane-log-proxy_commands] )) ||
_codewhale__subcmd__help__subcmd__lane-log-proxy_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help lane-log-proxy commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__login_commands] )) ||
_codewhale__subcmd__help__subcmd__login_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help login commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__logout_commands] )) ||
_codewhale__subcmd__help__subcmd__logout_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help logout commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__mcp_commands] )) ||
_codewhale__subcmd__help__subcmd__mcp_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help mcp commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__mcp-server_commands] )) ||
_codewhale__subcmd__help__subcmd__mcp-server_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help mcp-server commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__metrics_commands] )) ||
_codewhale__subcmd__help__subcmd__metrics_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help metrics commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__model_commands] )) ||
_codewhale__subcmd__help__subcmd__model_commands() {
    local commands; commands=(
'list:' \
'resolve:' \
'set:Set the default model (e.g. "pro", "flash", "deepseek-v4-pro")' \
    )
    _describe -t commands 'codewhale help model commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__model__subcmd__list_commands] )) ||
_codewhale__subcmd__help__subcmd__model__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help model list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__model__subcmd__resolve_commands] )) ||
_codewhale__subcmd__help__subcmd__model__subcmd__resolve_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help model resolve commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__model__subcmd__set_commands] )) ||
_codewhale__subcmd__help__subcmd__model__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help model set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__models_commands] )) ||
_codewhale__subcmd__help__subcmd__models_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help models commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__providers_commands] )) ||
_codewhale__subcmd__help__subcmd__providers_commands() {
    local commands; commands=(
'export:Write the owned route catalog as JSON (cwc contract)' \
    )
    _describe -t commands 'codewhale help providers commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__providers__subcmd__export_commands] )) ||
_codewhale__subcmd__help__subcmd__providers__subcmd__export_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help providers export commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__rc_commands] )) ||
_codewhale__subcmd__help__subcmd__rc_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help rc commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__remote-setup_commands] )) ||
_codewhale__subcmd__help__subcmd__remote-setup_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help remote-setup commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__resume_commands] )) ||
_codewhale__subcmd__help__subcmd__resume_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help resume commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__review_commands] )) ||
_codewhale__subcmd__help__subcmd__review_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help review commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__run_commands] )) ||
_codewhale__subcmd__help__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help run commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__sandbox_commands] )) ||
_codewhale__subcmd__help__subcmd__sandbox_commands() {
    local commands; commands=(
'check:' \
    )
    _describe -t commands 'codewhale help sandbox commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__sandbox__subcmd__check_commands] )) ||
_codewhale__subcmd__help__subcmd__sandbox__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help sandbox check commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__serve_commands] )) ||
_codewhale__subcmd__help__subcmd__serve_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help serve commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__sessions_commands] )) ||
_codewhale__subcmd__help__subcmd__sessions_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help sessions commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__setup_commands] )) ||
_codewhale__subcmd__help__subcmd__setup_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help setup commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__speech_commands] )) ||
_codewhale__subcmd__help__subcmd__speech_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help speech commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread_commands] )) ||
_codewhale__subcmd__help__subcmd__thread_commands() {
    local commands; commands=(
'list:' \
'read:' \
'resume:' \
'fork:' \
'archive:' \
'unarchive:' \
'set-name:' \
'clear-name:Remove the custom name from a thread, restoring the default \`(unnamed)\` rendering in \`thread list\`' \
    )
    _describe -t commands 'codewhale help thread commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread__subcmd__archive_commands] )) ||
_codewhale__subcmd__help__subcmd__thread__subcmd__archive_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help thread archive commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread__subcmd__clear-name_commands] )) ||
_codewhale__subcmd__help__subcmd__thread__subcmd__clear-name_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help thread clear-name commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread__subcmd__fork_commands] )) ||
_codewhale__subcmd__help__subcmd__thread__subcmd__fork_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help thread fork commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread__subcmd__list_commands] )) ||
_codewhale__subcmd__help__subcmd__thread__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help thread list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread__subcmd__read_commands] )) ||
_codewhale__subcmd__help__subcmd__thread__subcmd__read_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help thread read commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread__subcmd__resume_commands] )) ||
_codewhale__subcmd__help__subcmd__thread__subcmd__resume_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help thread resume commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread__subcmd__set-name_commands] )) ||
_codewhale__subcmd__help__subcmd__thread__subcmd__set-name_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help thread set-name commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__thread__subcmd__unarchive_commands] )) ||
_codewhale__subcmd__help__subcmd__thread__subcmd__unarchive_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help thread unarchive commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__update_commands] )) ||
_codewhale__subcmd__help__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help update commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__web_commands] )) ||
_codewhale__subcmd__help__subcmd__web_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help web commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__workflow_commands] )) ||
_codewhale__subcmd__help__subcmd__workflow_commands() {
    local commands; commands=(
'run:Run a checked-in Workflow through a Runtime-backed Lane' \
    )
    _describe -t commands 'codewhale help workflow commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__workflow__subcmd__run_commands] )) ||
_codewhale__subcmd__help__subcmd__workflow__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help workflow run commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__help__subcmd__workflow-tool_commands] )) ||
_codewhale__subcmd__help__subcmd__workflow-tool_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale help workflow-tool commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__init_commands] )) ||
_codewhale__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale init commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__integrations_commands] )) ||
_codewhale__subcmd__integrations_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale integrations commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane_commands] )) ||
_codewhale__subcmd__lane_commands() {
    local commands; commands=(
'list:List known lanes (newest first)' \
'status:Show one lane'\''s status and attach metadata' \
'attach:Attach to a tmux-backed lane (prints attach command; execs when possible)' \
'logs:Tail the lane stream-json / NDJSON journal' \
'stop:Stop a running lane and run worktree TTL cleanup' \
'interrupt:Interrupt a running lane (durable \`lane.interrupt\`)' \
'restart:Restart a lane in place (declared, no backend — reports why)' \
'resume:Resume a stopped lane (declared, no backend — reports why)' \
'start:Start a lane under a Runtime backend (tmux|inline|vm|ci)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale lane commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__attach_commands] )) ||
_codewhale__subcmd__lane__subcmd__attach_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane attach commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help_commands] )) ||
_codewhale__subcmd__lane__subcmd__help_commands() {
    local commands; commands=(
'list:List known lanes (newest first)' \
'status:Show one lane'\''s status and attach metadata' \
'attach:Attach to a tmux-backed lane (prints attach command; execs when possible)' \
'logs:Tail the lane stream-json / NDJSON journal' \
'stop:Stop a running lane and run worktree TTL cleanup' \
'interrupt:Interrupt a running lane (durable \`lane.interrupt\`)' \
'restart:Restart a lane in place (declared, no backend — reports why)' \
'resume:Resume a stopped lane (declared, no backend — reports why)' \
'start:Start a lane under a Runtime backend (tmux|inline|vm|ci)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale lane help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__attach_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__attach_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help attach commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__interrupt_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__interrupt_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help interrupt commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__list_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__logs_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__logs_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help logs commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__restart_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__restart_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help restart commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__resume_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__resume_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help resume commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__start_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__start_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help start commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__status_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__help__subcmd__stop_commands] )) ||
_codewhale__subcmd__lane__subcmd__help__subcmd__stop_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane help stop commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__interrupt_commands] )) ||
_codewhale__subcmd__lane__subcmd__interrupt_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane interrupt commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__list_commands] )) ||
_codewhale__subcmd__lane__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__logs_commands] )) ||
_codewhale__subcmd__lane__subcmd__logs_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane logs commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__restart_commands] )) ||
_codewhale__subcmd__lane__subcmd__restart_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane restart commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__resume_commands] )) ||
_codewhale__subcmd__lane__subcmd__resume_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane resume commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__start_commands] )) ||
_codewhale__subcmd__lane__subcmd__start_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane start commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__status_commands] )) ||
_codewhale__subcmd__lane__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane status commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane__subcmd__stop_commands] )) ||
_codewhale__subcmd__lane__subcmd__stop_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane stop commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__lane-log-proxy_commands] )) ||
_codewhale__subcmd__lane-log-proxy_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale lane-log-proxy commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__login_commands] )) ||
_codewhale__subcmd__login_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale login commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__logout_commands] )) ||
_codewhale__subcmd__logout_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale logout commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__mcp_commands] )) ||
_codewhale__subcmd__mcp_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale mcp commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__mcp-server_commands] )) ||
_codewhale__subcmd__mcp-server_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale mcp-server commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__metrics_commands] )) ||
_codewhale__subcmd__metrics_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale metrics commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model_commands] )) ||
_codewhale__subcmd__model_commands() {
    local commands; commands=(
'list:' \
'resolve:' \
'set:Set the default model (e.g. "pro", "flash", "deepseek-v4-pro")' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale model commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model__subcmd__help_commands] )) ||
_codewhale__subcmd__model__subcmd__help_commands() {
    local commands; commands=(
'list:' \
'resolve:' \
'set:Set the default model (e.g. "pro", "flash", "deepseek-v4-pro")' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale model help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__model__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale model help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model__subcmd__help__subcmd__list_commands] )) ||
_codewhale__subcmd__model__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale model help list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model__subcmd__help__subcmd__resolve_commands] )) ||
_codewhale__subcmd__model__subcmd__help__subcmd__resolve_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale model help resolve commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model__subcmd__help__subcmd__set_commands] )) ||
_codewhale__subcmd__model__subcmd__help__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale model help set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model__subcmd__list_commands] )) ||
_codewhale__subcmd__model__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale model list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model__subcmd__resolve_commands] )) ||
_codewhale__subcmd__model__subcmd__resolve_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale model resolve commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__model__subcmd__set_commands] )) ||
_codewhale__subcmd__model__subcmd__set_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale model set commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__models_commands] )) ||
_codewhale__subcmd__models_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale models commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__providers_commands] )) ||
_codewhale__subcmd__providers_commands() {
    local commands; commands=(
'export:Write the owned route catalog as JSON (cwc contract)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale providers commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__providers__subcmd__export_commands] )) ||
_codewhale__subcmd__providers__subcmd__export_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale providers export commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__providers__subcmd__help_commands] )) ||
_codewhale__subcmd__providers__subcmd__help_commands() {
    local commands; commands=(
'export:Write the owned route catalog as JSON (cwc contract)' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale providers help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__providers__subcmd__help__subcmd__export_commands] )) ||
_codewhale__subcmd__providers__subcmd__help__subcmd__export_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale providers help export commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__providers__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__providers__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale providers help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__rc_commands] )) ||
_codewhale__subcmd__rc_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale rc commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__remote-setup_commands] )) ||
_codewhale__subcmd__remote-setup_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale remote-setup commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__resume_commands] )) ||
_codewhale__subcmd__resume_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale resume commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__review_commands] )) ||
_codewhale__subcmd__review_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale review commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__run_commands] )) ||
_codewhale__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale run commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__sandbox_commands] )) ||
_codewhale__subcmd__sandbox_commands() {
    local commands; commands=(
'check:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale sandbox commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__sandbox__subcmd__check_commands] )) ||
_codewhale__subcmd__sandbox__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale sandbox check commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__sandbox__subcmd__help_commands] )) ||
_codewhale__subcmd__sandbox__subcmd__help_commands() {
    local commands; commands=(
'check:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale sandbox help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__sandbox__subcmd__help__subcmd__check_commands] )) ||
_codewhale__subcmd__sandbox__subcmd__help__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale sandbox help check commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__sandbox__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__sandbox__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale sandbox help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__serve_commands] )) ||
_codewhale__subcmd__serve_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale serve commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__sessions_commands] )) ||
_codewhale__subcmd__sessions_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale sessions commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__setup_commands] )) ||
_codewhale__subcmd__setup_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale setup commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__speech_commands] )) ||
_codewhale__subcmd__speech_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale speech commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread_commands] )) ||
_codewhale__subcmd__thread_commands() {
    local commands; commands=(
'list:' \
'read:' \
'resume:' \
'fork:' \
'archive:' \
'unarchive:' \
'set-name:' \
'clear-name:Remove the custom name from a thread, restoring the default \`(unnamed)\` rendering in \`thread list\`' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale thread commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__archive_commands] )) ||
_codewhale__subcmd__thread__subcmd__archive_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread archive commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__clear-name_commands] )) ||
_codewhale__subcmd__thread__subcmd__clear-name_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread clear-name commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__fork_commands] )) ||
_codewhale__subcmd__thread__subcmd__fork_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread fork commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help_commands] )) ||
_codewhale__subcmd__thread__subcmd__help_commands() {
    local commands; commands=(
'list:' \
'read:' \
'resume:' \
'fork:' \
'archive:' \
'unarchive:' \
'set-name:' \
'clear-name:Remove the custom name from a thread, restoring the default \`(unnamed)\` rendering in \`thread list\`' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale thread help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__archive_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__archive_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help archive commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__clear-name_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__clear-name_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help clear-name commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__fork_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__fork_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help fork commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__list_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__read_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__read_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help read commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__resume_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__resume_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help resume commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__set-name_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__set-name_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help set-name commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__help__subcmd__unarchive_commands] )) ||
_codewhale__subcmd__thread__subcmd__help__subcmd__unarchive_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread help unarchive commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__list_commands] )) ||
_codewhale__subcmd__thread__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread list commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__read_commands] )) ||
_codewhale__subcmd__thread__subcmd__read_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread read commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__resume_commands] )) ||
_codewhale__subcmd__thread__subcmd__resume_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread resume commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__set-name_commands] )) ||
_codewhale__subcmd__thread__subcmd__set-name_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread set-name commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__thread__subcmd__unarchive_commands] )) ||
_codewhale__subcmd__thread__subcmd__unarchive_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale thread unarchive commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__update_commands] )) ||
_codewhale__subcmd__update_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale update commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__web_commands] )) ||
_codewhale__subcmd__web_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale web commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__workflow_commands] )) ||
_codewhale__subcmd__workflow_commands() {
    local commands; commands=(
'run:Run a checked-in Workflow through a Runtime-backed Lane' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale workflow commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__workflow__subcmd__help_commands] )) ||
_codewhale__subcmd__workflow__subcmd__help_commands() {
    local commands; commands=(
'run:Run a checked-in Workflow through a Runtime-backed Lane' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'codewhale workflow help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__workflow__subcmd__help__subcmd__help_commands] )) ||
_codewhale__subcmd__workflow__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale workflow help help commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__workflow__subcmd__help__subcmd__run_commands] )) ||
_codewhale__subcmd__workflow__subcmd__help__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale workflow help run commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__workflow__subcmd__run_commands] )) ||
_codewhale__subcmd__workflow__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale workflow run commands' commands "$@"
}
(( $+functions[_codewhale__subcmd__workflow-tool_commands] )) ||
_codewhale__subcmd__workflow-tool_commands() {
    local commands; commands=()
    _describe -t commands 'codewhale workflow-tool commands' commands "$@"
}

if [ "$funcstack[1]" = "_codewhale" ]; then
    _codewhale "$@"
else
    compdef _codewhale codewhale
fi

if [ "$funcstack[1]" != "_codewhale" ]; then
    compdef _codewhale codew
fi
