# E2E Spec: Channel CLI Commands

## Overview
Test `agentteam channel` CLI subcommands plus the AgentTeam machine connect flow on `agentteam daemon --connect agentteam`.

## Test Cases

### Channel List
- `agentteam channel list` returns empty when no channels exist
- `agentteam channel list -f json` returns valid JSON

### Channel Add
- `agentteam channel add --agentteam.server-url http://localhost:8080 --agentteam.api-key key123` creates a agentteam server connection without requiring a manual name
- AgentTeam channel IDs are auto-generated and multiple agentteam channels can coexist
- Missing agentteam credentials returns error

### Daemon Connect (AgentTeam connect / reconnect)
- `agentteam daemon --connect agentteam --agentteam.server-url http://localhost:8080 --agentteam.api-key key123` connects the machine and starts the daemon if needed
- If the same AgentTeam channel already exists, connect reuses it without disabling other enabled AgentTeam channels
- If the API key differs, connect creates a new AgentTeam channel even when `server_url` is the same, and keeps previous enabled AgentTeam channels enabled
- If multiple local AgentTeam channels already exist, connect preserves the existing enabled AgentTeam channels while saving the new machine connection

### Channel Get
- `agentteam channel get <id>` shows details
- `agentteam channel get nonexistent` returns error

### Channel Update
- `agentteam channel update <id> --agent new-agent-id` updates binding

### Channel Delete
- `agentteam channel delete <id>` removes channel
- `agentteam channel delete nonexistent` returns error

### Channel Enable/Disable
- `agentteam channel disable <id>` disables channel
- `agentteam channel enable <id>` enables channel
