Repository navigation
feat: add messages and raw query verbs across CLI, API, and MCP surfaces (#555) - #555
Conversation
Add paginated message listing and raw record inspection verbs, wired through all three surfaces: CLI subcommands (messages, raw), Python API (PolylogueArchiveMixin), and MCP tools (get_messages, raw_records). Also adds --message-type filter, --offset pagination, and --since-session to the conversation query chain. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (35)
📝 WalkthroughWalkthroughThe PR extends the CLI with new query filters ( Changes
Sequence DiagramsequenceDiagram
participant User as CLI/MCP User
participant CLI as CLI/MCP Handler
participant API as API Facade<br/>(archive.py)
participant QueryLayer as Query Layer<br/>(runtime_filters.py)
participant Storage as Storage Backend<br/>(async_sqlite_*)
participant DB as SQLite DB
User->>CLI: messages/raw query<br/>(with filters & pagination)
CLI->>API: get_messages_paginated<br/>or<br/>get_raw_records_for_conversation
activate API
API->>QueryLayer: apply_full_filters<br/>(since_session_id, message_type)
activate QueryLayer
QueryLayer->>Storage: Filtered conversation lookup
Storage->>DB: Query conversations<br/>by timestamp/session boundary
DB-->>Storage: Matching conversation IDs
Storage-->>QueryLayer: Filtered result set
deactivate QueryLayer
API->>Storage: get_messages_paginated<br/>or get_raw_records_for_conversation<br/>(limit, offset)
activate Storage
Storage->>DB: Paginated message/raw query<br/>(with role/type filters)
DB-->>Storage: Page + total count
Storage-->>API: (items: list, total: int)
deactivate Storage
API->>API: Hydrate Message/RawRecord<br/>objects + content blocks
API-->>CLI: Paginated results
deactivate API
CLI->>CLI: Format output<br/>(JSON/YAML/plaintext)
CLI-->>User: Displayed results
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfec8c6a35
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
…ces (#555) ## Summary Add `messages` and `raw` query verbs with full-stack wiring: CLI subcommands, Python API methods, and MCP tools. ## Problem No way to paginate through individual messages of a conversation or inspect raw provider records through any surface. The query chain also lacked message-type filtering and offset-based pagination. ## Solution - **CLI**: New `messages` and `raw` subcommands with role/type filters, content projection (no-code-blocks, no-tool-calls, prose-only), and format options - **API**: `PolylogueArchiveMixin.get_messages_paginated()` and `get_raw_records_for_conversation()` - **MCP**: `get_messages` and `raw_records` tools with matching payloads - **Query chain**: `--message-type` filter, `--offset` pagination, `--since-session` for session-recall queries - **Generated docs**: CLI reference, topology, verification catalog updated ## Verification - Pre-commit hooks pass (format + lint) - Full CI suite pending 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 <[email protected]>
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Add
messagesandrawquery verbs with full-stack wiring: CLI subcommands, Python API methods, and MCP tools.Problem
No way to paginate through individual messages of a conversation or inspect raw provider records through any surface. The query chain also lacked message-type filtering and offset-based pagination.
Solution
messagesandrawsubcommands with role/type filters, content projection (no-code-blocks, no-tool-calls, prose-only), and format optionsPolylogueArchiveMixin.get_messages_paginated()andget_raw_records_for_conversation()get_messagesandraw_recordstools with matching payloads--message-typefilter,--offsetpagination,--since-sessionfor session-recall queriesVerification
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
--message-typefilter to constrain results by message content categories (summary, tool_use, tool_result, thinking)--since-sessionoption to scope results based on a prior conversation ID within the same working directory--offsetparameter for pagination controlmessagessubcommand to view conversation messages with filtering, pagination, and output format optionsrawsubcommand to retrieve unprocessed provider records for conversations