Repository navigation
Conversation
`chat messages list --json` now includes each message's attachments (name, contentName, contentType, source, and the attachmentDataRef or driveDataRef). thumbnailUri and downloadUri are left out. New `chat attachments download <message|attachment>` fetches uploaded attachments with spaces.messages.get + media.download (GET only, so it works under --readonly). It writes to --out (a file or directory), refuses to overwrite without --overwrite, and reports path, bytes and sha256. Drive attachments are not fetched; the output points to `gog drive download <id>`. Both safety profiles allow the new command, like the other downloads.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesExpose received Chat attachment metadata and add a read-only command to download uploaded attachments. Example: A message at spaces/aaa/messages/m1 contains Screenshot.png.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep open: this PR adds a distinct capability missing from main, but filename collisions and untrusted-output handling need correction before merge. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherChat commands use the account-scoped Google Chat SDK to read messages and media, then emit JSON or TSV and write downloaded bytes through shared output-file helpers. flowchart LR
A[CLI arguments and account] --> B[Chat command]
B --> C[Google Chat SDK]
C --> D[Message and attachment metadata]
D --> E[JSON or TSV output]
D --> F[Media download]
F --> G[Shared output file helper]
Technical reviewBest possible solution: Retain the focused Chat SDK implementation, prevent duplicate download destinations, and use the existing untrusted-content key helper for filenames. Do we have a high-confidence way to reproduce the issue? Source establishes the missing main capability and both introduced defects; no target code or tests were run under the read-only review constraint. Is this the best way to solve the issue? The additive projection and existing SDK/file helpers are a focused approach, provided download destinations remain distinct and fetched filenames retain the established untrusted-content boundary. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e8428c36dd31. Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Sender-controlled attachment filenames bypass the requested untrusted-content wrapping. EvidenceSecurity concerns:
What I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 8, 2026, 2:22 PM ET / 19:22 UTC. |
Summary
gog chatcan send attachments (#694) but can't see or fetch the ones it receives.chat messages list --jsondrops the attachment array, and there's no command to download one, so an agent reading a space never learns a screenshot was posted.chat messages list --json: each message now includesattachments: [{name, contentName, contentType, source, attachmentDataRef | driveDataRef}]. The field is omitted when a message has none.thumbnailUrianddownloadUriare left out.chat attachments download <name>: takes a message name (all its attachments) or one attachment name. It usesspaces.messages.get+media.download, so it's GET-only and works under--readonly. Writes to--out(a file, or a directory with a trailing slash; default.), refuses to overwrite without--overwrite, and reportspath,bytesandsha256(JSON or TSV). It supports--dry-run.source: DRIVE_FILE) are not fetched. The row reportsdriveFileIdand points togog drive download <id>.chat.attachments.download: trueinreadonlyandagent-safe, the same as Drive download and the Gmail/Keep attachment commands.The download follows the existing Keep
Media.Downloadpath and the sharedopenUserOutputFile/sanitizeAttachmentFilenamehelpers. No new dependencies or scopes.Testing
make cipasses (fmt-check, lint, deadcode, tests, docs-check, agent-skills-check). Regenerated command docs and thegog-chatskill are included.internal/cmd/chat_attachments_test.go): attachment projection inmessages list, download to a directory with byte and sha256 checks, overwrite refusal and--overwrite, a Drive attachment that is not fetched, and name parsing.chat messages list --jsonshowed an uploaded PNG on a DM, andchat attachments downloadsaved it intact under--readonly. The Go code in this PR is the same patch rebased onto main; only the test fixtures changed.