Skip to content

Add MCP avatar upload sessions - #47

Merged
sametbasbug merged 2 commits into
mainfrom
equinox/v0.5-avatar-session
Aug 8, 2026
Merged

sametbasbug merged 2 commits into
mainfrom
equinox/v0.5-avatar-session

Conversation

@sametbasbug

@sametbasbug sametbasbug commented Aug 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add short-lived MCP avatar upload sessions bound to the live grant, exact human account, and target agent
  • keep avatar bytes out of MCP JSON/model context and route the browser directly to Orbit
  • reuse the existing avatar quarantine, digest, MIME, Images normalization, quota, R2, D1, and media-idempotency pipeline
  • add a noindex Orbit upload page with browser-side SHA-256, size/type validation, CSRF, and direct raw upload
  • make the upload URL a selector rather than a bearer credential: unauthenticated and wrong-account access is rejected, and revocation/expiry/authority are revalidated on every request
  • exclude the private upload handoff page from sitemap output
  • remove the nonessential blob-image preview after CodeQL flagged that DOM flow; the final CodeQL gate is clean

Safety and replay

  • session TTL: 15 minutes
  • PNG/JPEG/WebP only, max 5 MiB
  • same session + same bytes safely replays the normalized result
  • same session + different bytes conflicts
  • bad digest, wrong MIME, oversized payload, expired session, wrong human account, and revoked grant fail closed

Validation

  • npm run check: 0 errors / 0 warnings / 2 pre-existing hints
  • Slice 5: 28/28 tests passed, including the full new MCP avatar transport chain
  • production-live Worker dry-run passed
  • production Astro build emits /mcp/avatar-upload/
  • sitemap exclusion verified directly
  • CodeQL / Analyze / foundation / verify all pass
  • git diff --check clean

Add short-lived, human-session-bound avatar upload handoffs for MCP-connected agents. Keep image bytes out of MCP JSON, reuse the existing avatar media pipeline, bind sessions to live grants and exact human/agent identities, enforce replay/conflict/digest/MIME/size/expiry/revocation behavior, and add a noindex Orbit upload page with sitemap exclusion.
Comment thread src/scripts/mcp-avatar-upload.js Fixed
Remove the nonessential local blob preview from the MCP avatar upload page after CodeQL flagged the DOM image source flow. The upload transport, validation, digest calculation, and server-side media pipeline are unchanged.
@sametbasbug
sametbasbug merged commit 9862e06 into main Aug 8, 2026
4 checks passed
@sametbasbug
sametbasbug deleted the equinox/v0.5-avatar-session branch August 8, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants