feat(chat): bind uploaded attachments through structured Ask references #150

Merged
admin merged 27 commits from feat/structured-chat-attachments into dev 2026-10-09 15:44:10 +00:00
Owner

Refs #117, #82. Stacked on #149; updated desktop and daemon must ship together.

Add additive AskRequest.attachment_cids and regenerate with pinned protoc/plugins. Renderer sends uploaded CIDs separately from the model-facing text envelope. Go assistant binds them to the new/existing chat before model/tool execution; all references persist atomically or none do. Later turns retain existing ownership. Legacy Ask without attachments remains compatible; configured assistant implementations without ownership support reject explicit attachments. API caps attachments at 128 per turn.

Extend real-daemon private-chat integration: structured first-turn CID survives the follow-up, encrypted private jobs/results still work, RemoveFile returns FAILED_PRECONDITION while the chat exists, DeleteChat releases ownership, then explicit removal succeeds. Test passed three consecutive runs. Database regression verifies invalid batches leave no partial ownership. grpc-js test verifies attachmentCids reach the server via proto-loader. Full nodedb/API suites, 48 frontend tests, typecheck, production build and diff checks passed; known build warnings remain.

Still NOT automatic cleanup: uploads retain existing permanent user pins; chat deletion releases references but does not automatically unpin/GC, and partial upload/draft cleanup remains pending. Old daemons silently ignore additive protobuf fields; no capability handshake introduced yet, so deploy both sides together. Model-facing text remains for privacy/history compatibility, never for ownership. No live Electron attachment flow or full daemon-suite claim. Build-agents guidance kept node-owned lifecycle in the existing Go stack. No issues closed.

Refs #117, #82. Stacked on #149; updated desktop and daemon must ship together. Add additive AskRequest.attachment_cids and regenerate with pinned protoc/plugins. Renderer sends uploaded CIDs separately from the model-facing text envelope. Go assistant binds them to the new/existing chat before model/tool execution; all references persist atomically or none do. Later turns retain existing ownership. Legacy Ask without attachments remains compatible; configured assistant implementations without ownership support reject explicit attachments. API caps attachments at 128 per turn. Extend real-daemon private-chat integration: structured first-turn CID survives the follow-up, encrypted private jobs/results still work, RemoveFile returns FAILED_PRECONDITION while the chat exists, DeleteChat releases ownership, then explicit removal succeeds. Test passed three consecutive runs. Database regression verifies invalid batches leave no partial ownership. grpc-js test verifies attachmentCids reach the server via proto-loader. Full nodedb/API suites, 48 frontend tests, typecheck, production build and diff checks passed; known build warnings remain. Still NOT automatic cleanup: uploads retain existing permanent user pins; chat deletion releases references but does not automatically unpin/GC, and partial upload/draft cleanup remains pending. Old daemons silently ignore additive protobuf fields; no capability handshake introduced yet, so deploy both sides together. Model-facing text remains for privacy/history compatibility, never for ownership. No live Electron attachment flow or full daemon-suite claim. Build-agents guidance kept node-owned lifecycle in the existing Go stack. No issues closed.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Sisyphus/Sisyphus#150