Skip to content

[codex] add WebDAV-backed TP-7 mount#2

Open
totocaster wants to merge 1 commit into
mainfrom
codex/webdav-mount
Open

[codex] add WebDAV-backed TP-7 mount#2
totocaster wants to merge 1 commit into
mainfrom
codex/webdav-mount

Conversation

@totocaster

Copy link
Copy Markdown
Owner

Summary

Adds a first Finder-visible tp7 mount implementation without requiring macFUSE, Fuse-T, kernel extensions, system extensions, or FieldKit.

The mount command now starts a loopback-only WebDAV bridge backed by a long-lived TP-7 MTP session, then asks macOS mount_webdav to expose it as a Finder volume. With no mountpoint argument, it chooses /Volumes/TP-7, then /Volumes/TP-7 2, etc. A new tp7 unmount command tears down one mount when a mountpoint is provided, or all TP-7 mounts recorded by the CLI when no argument is passed.

What Changed

  • Added tp7 mount [mountpoint] and tp7 unmount [mountpoint] command wiring.
  • Added a loopback WebDAV server that supports read-only Finder access through OPTIONS, PROPFIND, HEAD, and GET.
  • Backed file reads with MTP partial reads when available, with full-object stream fallback when the device rejects partial reads.
  • Added mount state files under the user application support directory so tp7 unmount can discover active CLI-owned mounts.
  • Added mount/unmount human and JSON output.
  • Updated README and protocol docs to describe the WebDAV mount model and the current read-only boundary.

Why

The goal is to expose the TP-7 filesystem as a folder/drive on macOS without shipping a filesystem extension. FieldKit can present a Finder-visible drive, but the CLI should stay independent of companion apps and avoid macFUSE/system-extension requirements. macOS' built-in WebDAV client gives us a native mount path that can be driven from a standalone Rust CLI.

Read-Write Boundary

This PR intentionally keeps the Finder mount read-only. MTP is object-based rather than block-based, so Finder/POSIX write behavior needs more than accepting PUT: safe support requires staged whole-file writes, upload-on-close semantics, safe-save rename handling, delete/move mapping, metadata policy for .DS_Store and AppleDouble files, and a decision for TP-7 folder creation behavior because firmware 1.1.9 rejected MTP folder creation in earlier hardware smokes.

The --read-write flag exists only to fail clearly for now.

Validation

Ran:

  • cargo fmt -- --check
  • cargo check
  • cargo clippy -- -D warnings
  • cargo test
  • cargo run -- --help
  • cargo run -- mount --help
  • cargo run -- mount --read-write
  • cargo run -- devices

Hardware mount validation was not run because cargo run -- devices reported no TP-7 devices found on this machine at PR creation time.

Expose the TP-7 through macOS Finder without FUSE or system extensions by running a loopback WebDAV bridge over the existing long-lived MTP session.\n\nThe mount is read-only for now because safe Finder write support needs staged whole-file upload semantics over MTP.
@totocaster totocaster marked this pull request as ready for review May 8, 2026 10:11
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.

1 participant