feat: Switch cw ask from polling to SSE via onConversationAnswer subscription
- New onConversationAnswer subscription: listens for conversation:answered events matching a specific conversation ID, yields the answer text - cw ask now subscribes via SSE instead of polling getConversation - Removed --poll-interval and --timeout flags from cw ask - Updated prompt to reflect SSE-based cw ask (no polling options)
This commit is contained in:
@@ -60,14 +60,12 @@ Output: \`{ "conversationId": "...", "fromAgentId": "...", "question": "...", "p
|
||||
Exits with code 1 on connection error.
|
||||
|
||||
**\`cw ask "<question>" --from ${agentId} --agent-id <TARGET_AGENT_ID>\`**
|
||||
Ask another agent a question. Blocks until the answer arrives, then prints the answer text to stdout and exits with code 0.
|
||||
Ask another agent a question. Blocks via SSE until the answer arrives, then prints the answer text to stdout and exits with code 0.
|
||||
Target (exactly one required):
|
||||
- \`--agent-id <id>\`: Ask a specific agent directly by agent ID
|
||||
- \`--task-id <id>\`: Ask whichever agent is currently running that task
|
||||
- \`--phase-id <id>\`: Ask whichever agent is running a task in that phase
|
||||
Options:
|
||||
- \`--poll-interval <ms>\`: Answer polling frequency in ms. Default: 2000
|
||||
- \`--timeout <ms>\`: Max wait for answer in ms. Default: 0 (wait forever)
|
||||
Exits with code 1 on connection error.
|
||||
|
||||
**\`cw answer "<answer>" --conversation-id <CONVERSATION_ID>\`**
|
||||
Answer a pending question. The conversation ID comes from the \`cw listen\` output.
|
||||
|
||||
Reference in New Issue
Block a user