Open an aindrive drive as a read-only folder in Memona #1

Merged
RaymondCho merged 2 commits from read-only-folder into main 2026-10-13 21:52:31 +00:00
Owner

A new provider opens an aindrive drive through the drive's own MCP endpoint, with the Server URL and an access token from its MCP panel. Folders list, files read up to aindrive's 8 MiB, and a file that changes between the stat and the read is a conflict, never a mix of two versions. Reads decode base64 in place, so any 1 MiB slice fits Memona's per-call fuel.

Verified: 27 unit tests, clippy, rustfmt and the wasm32-wasip2 build pass, and the component ran in an isolated Memona 2.0.0-alpha.49 against a live drive; downloaded files matched their SHA-256.

Connection form, dark Connection form, light
02-form-empty-dark 02-form-empty-light
Filled, token masked Connected
03-form-filled-dark 04-connected-dark
Root picker Drive root
05-root-picker-dark 06-drive-root-dark
Folder from the drive Its PAGE.md
07-folder-dark 08-page-dark
PAGE.md, light Images folder
08-page-light 09-tree-images-dark
Korean file name Wrong token
10-korean-note-dark 11-wrong-token-dark

🤖 Generated with Claude Code

A new provider opens an aindrive drive through the drive's own MCP endpoint, with the Server URL and an access token from its MCP panel. Folders list, files read up to aindrive's 8 MiB, and a file that changes between the stat and the read is a conflict, never a mix of two versions. Reads decode base64 in place, so any 1 MiB slice fits Memona's per-call fuel. Verified: 27 unit tests, clippy, rustfmt and the wasm32-wasip2 build pass, and the component ran in an isolated Memona 2.0.0-alpha.49 against a live drive; downloaded files matched their SHA-256. | Connection form, dark | Connection form, light | | --- | --- | | ![02-form-empty-dark](https://git.capsulizers.com/attachments/a15d7f2b-a97d-4e89-8039-228875d5eba1) | ![02-form-empty-light](https://git.capsulizers.com/attachments/fc67397b-3523-4a39-b517-643dd72953e1) | | Filled, token masked | Connected | | ![03-form-filled-dark](https://git.capsulizers.com/attachments/b304f24b-7c22-4b98-a7f8-54422581131d) | ![04-connected-dark](https://git.capsulizers.com/attachments/de4a9cfa-3fca-4a5b-90cf-9d8a1f36265a) | | Root picker | Drive root | | ![05-root-picker-dark](https://git.capsulizers.com/attachments/51e084e8-fc2b-4793-81fd-2528aacdb287) | ![06-drive-root-dark](https://git.capsulizers.com/attachments/77b1e90d-fdbd-40ed-9bc4-778f91436a03) | | Folder from the drive | Its PAGE.md | | ![07-folder-dark](https://git.capsulizers.com/attachments/bcbcb8ec-980e-4fee-a33c-8a8414e99bb8) | ![08-page-dark](https://git.capsulizers.com/attachments/20cb96be-67d9-43d3-a27b-806406ad3b3c) | | PAGE.md, light | Images folder | | ![08-page-light](https://git.capsulizers.com/attachments/a1d80ace-377f-42be-8d5d-f20d70bfa6b1) | ![09-tree-images-dark](https://git.capsulizers.com/attachments/20ee2e9a-b965-49de-a54b-bd816cecf36c) | | Korean file name | Wrong token | | ![10-korean-note-dark](https://git.capsulizers.com/attachments/f37dc5a7-cfe4-4253-ac82-71fe49a4826e) | ![11-wrong-token-dark](https://git.capsulizers.com/attachments/f0f3e244-e799-4b5c-afa4-201375fea73d) | 🤖 Generated with [Claude Code](https://claude.com/claude-code)
RaymondCho added 1 commit 2026-10-12 14:22:37 +00:00
Open an aindrive drive as a read-only folder in Memona
Agents / bot (pull_request) Has been skipped
CI / checks (pull_request) Failing after 1m21s
3c2cd123b7
The plugin reaches a drive through aindrive's remote MCP endpoint with
the drive's access token. Opening a connection asks which tools the
token may call, so it works while the drive's machine sleeps. Listing,
stat and reading map to list_files, stat and read_file; a read is
statted first, and a file whose length changed in between is refused as
a conflict. Reads decode only the window asked for, straight from the
reply pieces, so any 1 MiB slice of a file up to aindrive's 8 MiB limit
fits Memona's per-call fuel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

@bot please review the head of this pull request: the aindrive MCP client, the base64 path that keeps reads within Memona's per-call fuel, and the error mapping to the filesystem contract.

@bot please review the head of this pull request: the aindrive MCP client, the base64 path that keeps reads within Memona's per-call fuel, and the error mapping to the filesystem contract.
RaymondCho added 1 commit 2026-10-12 14:26:28 +00:00
Decode base64 through fixed-size chunks, as clippy 1.99 asks
CI / checks (pull_request) Successful in 1m26s
Agents / bot (pull_request) Successful in 7m28s
0221f89c00
CI builds with the newest stable toolchain, whose clippy rejects
chunks_exact with a constant size in favour of as_chunks. The fixed-size
arrays also drop the let-else that could never fail, and a 1 MiB read
now measures 13.3M fuel instead of 13.5M.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RaymondCho requested review from bot 2026-10-12 14:26:32 +00:00
bot approved these changes 2026-10-12 14:33:43 +00:00
bot left a comment
Owner

✅ Approved
Read-only aindrive provider is ready to merge.

Strengths
  • MCP transport, bounded base64 reads, and filesystem error mapping match the stated contract.
  • Unit coverage exercises paging, offsets, split payloads, revisions, and remote failures.
Checks
  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked --lib — 27 passed
  • cargo build --locked --release --target wasm32-wasip2
  • Required CI / checks (pull_request) — passed
Declined to judge
  • Live aindrive availability and credentials: external service behavior is outside this code review; the submitted live QA evidence covers it.

Profile: codex · gpt-5.6-terra

✅ Approved Read-only aindrive provider is ready to merge. <details> <summary>Strengths</summary> - MCP transport, bounded base64 reads, and filesystem error mapping match the stated contract. - Unit coverage exercises paging, offsets, split payloads, revisions, and remote failures. </details> <details> <summary>Checks</summary> - `cargo fmt --check` - `cargo clippy --locked --all-targets -- -D warnings` - `cargo test --locked --lib` — 27 passed - `cargo build --locked --release --target wasm32-wasip2` - Required `CI / checks (pull_request)` — passed </details> <details> <summary>Declined to judge</summary> - Live aindrive availability and credentials: external service behavior is outside this code review; the submitted live QA evidence covers it. </details> > Profile: `codex` · `gpt-5.6-terra`
RaymondCho merged commit 7de6ea810c into main 2026-10-13 21:52:31 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: commons/memona-plugin-aindrive#1