oficina / agent-access Public
API conventions and editing contract
Status: November 1 specification by GPT-6 Astra; independently approved by GPT-6 Astra (reviewdocsaccess). Applies to the shared delegated operation interface, not a replacement for editor/native wire protocols. Existing operation contracts remain compatible.
Resource identity and revisions
Resource IDs are opaque and app-scoped. Never parse one app's ID as another's, infer team membership from a URL, or use a returned URL as a routing argument. Existing id, sqid, sheet_id and tab_id fields retain their types. Exact JSON integers must survive all transports without a float conversion.
New cross-app references use {team,app,id,url} with an opaque string ID and a canonical member-facing URL. A reference grants no access; each destination checks the current person. It is never a guest invitation or bearer URL. The configured directory and app routes remain the routing authority.
An edit supplies a canonical nonzero UUID client_id and expected_revision. The precondition has the type and exact value returned by that app's read: Docs body_revision, Sheets/Slides revision (decimal strings), Memoria revision and Calendar sequence (integers). Revisions are equality tokens, not a suite-wide clock. A new stale edit is conflict with no effects.
The domain write, revision check and immutable retry receipt share one writer transaction. Receipts bind authority/subject/client/team/operation/UUID and the full request, including the target and precondition. Exact completed retries recheck current access and the live target, return the original applied revision, and never apply the edit again or overwrite later edits. Reusing a UUID with different arguments is conflict. Removed resources are not recreated. New edit acknowledgements report their original applied revision; read again for current content. Existing create acknowledgement behavior is unchanged.
Browser, native and delegated edits use the same canonical domain mutations. Editable content retains the original app's collaboration, sealing, attribution, indexing and reminder semantics. An unsupported edit is explicitly refused.
Errors, pagination and compatibility
HTTP failures use {error:{code,message}}. Stable codes map to 401 unauthenticated, 403 forbidden, 404 not_found, 409 conflict, 413 too_large, 415 unsupported_media_type, 422 invalid, 429 rate_limited, 503 unavailable, and 500 internal. Gateways and clients retain the code without forwarding arbitrary remote error prose, HTML or credentials. Neither a timeout nor unavailable proves a write failed: retry with the original UUID and exact request. Authorization refusals are not automatic retry loops.
Existing pagination remains as exported: Calls uses after/next_after/has_more; Docs, Sheets and Slides use cursor/next_cursor. New paginated operations use opaque cursor, bounded limit, and next_cursor, empty at the end. Do not silently rename fields in old operations. Document limits and partial results.
Exported operation schemas are the machine contract for HTTP, CLI and MCP. Removing/renaming a field, tightening accepted inputs or changing meaning needs a new operation/version and a migration path. New operations are additive; existing scopes do not expand to sharing, deletion or invitation delivery. App exports and connection routes must agree exactly. Compatibility tests use real exported contracts and behavior, not a parallel handwritten schema.
Authorized next slice
docs_update, sheets_set_range, slides_update_deck, notes_get, notes_update, and calendar_update_event complete the bounded editing loop. Per-app amendments define supported content and the tests behind each boundary. The scheduling amendment adds resumable composition of already authorized creates. Search/export/sharing/history gaps remain listed as gaps; this slice does not claim every browser action is automated.