feat(upload): file upload from Mac into agent session (#146) - #148
Merged
Conversation
Introduce the `upload` MCP tool and `/aiui:upload` slash-command — the first aiui data flow that runs Mac → agent-host instead of the reverse. Calling `upload` opens a native file picker on the Mac (Tauri dialog plugin); the chosen file streams back over the existing authenticated :7777 channel (the reverse direction of POST /media) and is written to `target_dir/<filename>` on the host the agent runs on. Replaces the "please scp me that file" round-trip. - Companion: new authenticated `POST /upload` endpoint (http.rs) that runs the picker and returns the file bytes + percent-encoded filename header, with 204 (cancel), 413 (>512 MB cap), and 500 (read error) paths. - Rust bridge (mcp.rs): `upload` tool + `do_upload` — resolves/validates target_dir, decodes the filename, sanitises to a base name, and does a no-clobber atomic write. Deterministic destination, never overwrites. - Python bridge (server.py): mirror implementation for remote SSH hosts via uvx, incl. a progress heartbeat so the held picker call keeps the client alive. - Prompt `upload` + INSTRUCTIONS trigger on both servers; docs/skill.md, python skill.md, and CHANGELOG updated. - Tests: filename percent-encode round-trip (Rust) and base-name / target-dir / no-clobber write (Python).
iret77
force-pushed
the
feat/issue-146-file-upload
branch
from
July 31, 2026 21:27
72d4354 to
1cd728c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Neues
upload-MCP-Tool +/aiui:upload-Slash-Command: zieht eine Datei vom Mac in die Agent-Session (nativer Picker → Bytes über den:7777-Kanal, Gegenrichtung zu/media→ deterministischer Write nachtarget_dir/<filename>). No-clobber, 512 MB-Cap, Rust- + Python-Bridge konsistent.Build: Rust 137✓, Python 42✓. Mac-E2E offen: Picker-Foreground (LSUIElement), echter Byte-Durchlauf lokal+remote, Slash-Command-Rendering.
Closes #146
Batch-Kontext: Teil eines 6-PR-Sets (#141, #146, #23, #24, #25, #17) aus parallelen Sub-Sessions, das zusammen einen Release ergibt.
mainrebased (Hotspots:mcp.rs,http.rs,skill.md,CHANGELOG.md,server.py).main; Merge via PR (AGENTS.md). CI baut/testet; interaktives Dialog-E2E nur am Mac verifizierbar.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.