Skip to content

docs(abi): register file handlers at runtime - #69

Open
replghost wants to merge 4 commits into
mainfrom
docs/runtime-file-handlers
Open

replghost wants to merge 4 commits into
mainfrom
docs/runtime-file-handlers

Conversation

@replghost

Copy link
Copy Markdown
Collaborator

Summary

  • ADR 0003: file input is a runtime service of ABI v1 built on mediated input, not an App manifest capability.
  • ABI v1 §File input: host_file_register registers a handler on the shared mediated-input handle space; host_file_info returns the selected file's base name, MIME type, and size.
  • Two deliveries: inline (up to 8 MiB, read through host_input_read, counted against the per-update Host-call budget) and relaunch (up to 128 MiB, the file replaces the asset at the handler's mountPath in a fresh execution).
  • The Host owns selection and consent: picker, menu, drop, share sheet, or open-with chooser. Multiple matches are resolved by the user, a relaunch that would stop an execution in use needs confirmation, and the most recent registrations survive a failed execution.
  • §File-type hint: an optional, advisory top-level fileTypes manifest list lets a Host suggest an App for a file before it runs. It grants nothing.
  • §Mediated input clarifies that its media_type is a kind-defined token, not a MIME type.

The manifest side is in paritytech/trinity-user-agents#507. Implementation follows in a stacked PR.

🤖 Generated with Claude Code

replghost and others added 4 commits September 29, 2026 14:51
Add ADR 0003 and the ABI v1 §File input contract. File input moves from the
App v2 capabilities.fileInput manifest block to a runtime host_file_register
call on the mediated-input lifecycle, with inline (8 MiB) and relaunch
(128 MiB) delivery and host_file_info for the selected file's name, MIME type
and size. The manifest keeps only an advisory top-level fileTypes hint.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@replghost
replghost force-pushed the docs/runtime-file-handlers branch from 6fa4b77 to c0b2825 Compare September 29, 2026 18:52
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