-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ask): add list endpoint for questions #871
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Context
Part of #869 (ask service epic).
The ask service has endpoints to trigger checks and answer questions, but no way to list or query existing questions. Users and agents cannot discover what questions are pending without already knowing the question UUID.
Problem
- No API endpoint to list questions (pending, answered, all)
- No CLI command to view pending questions
- Agents can't discover questions programmatically
- The
get_active_questions()method exists inAppStatebut is unused (#[allow(dead_code)])
Acceptance Criteria
API
- Add
GET /questionsendpoint that returns a list of questions - Support query parameters for filtering:
status(optional):pending,answered,expired, or omit for alllimit(optional, default 50): maximum number of resultsoffset(optional, default 0): pagination offset
- Add
GET /questions/:idendpoint to get a single question by UUID - Return questions sorted by
asked_atdescending (newest first)
Client
- Add
list_questions()method toAskClientincrates/ask/src/client.rs - Add
get_question()method toAskClient
CLI
- Add
agentd ask listsubcommand with--statusfilter flag - Add
agentd ask get <question-id>subcommand - Formatted table output for list, detailed output for get
- Support
--jsonflag for raw output
Skill
- Update
.claude/skills/agent-ask/SKILL.mdto document the new commands
Relevant Files
crates/ask/src/api.rs-- add new route handlerscrates/ask/src/state.rs--get_active_questions()already exists, addlist_all()crates/ask/src/client.rs-- add client methodscrates/ask/src/types.rs-- addListQuestionsRequest/ListQuestionsResponsetypescrates/cli/src/commands/ask.rs-- addListandGetCLI subcommands.claude/skills/agent-ask/SKILL.md-- update docs
Blocked By
- feat(ask): add SQLite persistence with SeaORM #870 (SQLite persistence) -- list endpoint should query the database, not just in-memory state
Stack Base
Branch off feature/autonomous-pipeline and PR back into it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request