oficina / slides Public

Clone
git clone https://amadan.net/oficina/slides

Plain git — no account needed to clone.

Download

Download this file

1# Oficina delegated connection
2
3The optional adapter exposes Slides through one Oficina browser grant. Configure `SLIDES_AGENT_ISSUER` (the separate connection service) and `SLIDES_AGENT_TEAM` together, with the existing valid `SLIDES_HOME_*` configuration. Both must be empty to disable it. The app verifies its exact audience `<SLIDES_ORIGIN>/api/v1` and exact Home identity issuer, then resolves an existing linked, currently admitted local account. An agent cannot create or silently link an account.
4
5The operation descriptors are exported with `go run ./cmd/slides-contract`. Use these in the connection service's trusted team/instance directory. They drive the same API, CLI and MCP contracts:
6
7| Tool | Scope | Input |
8|---|---|---|
9| slides_list_decks | slides:read | team, optional limit (1–100), cursor |
10| slides_get_deck | slides:read | team, sqid |
11| slides_create_deck | slides:write | team, client_id UUID, title, optional theme, slides |
12| slides_update_deck | slides:write | team, sqid, expected_revision, client_id UUID, ops |
13
14Each initial slide contains `heading`, `body_markdown`, and `notes_markdown`. Supply 1–50 slides and at most 128 KiB of combined text. Titles are at most 512 UTF-8 bytes. New decks start private and use the existing collaborative block tree, so browser editing and presentation work normally. Reads include speaker notes for the same current permissions as the existing drive API. Results and input are bounded at 1 MiB. Creation returns only sqid, URL and decimal-string revision.
15
16Reuse the same nonzero canonical UUID and identical normalized payload after an uncertain response. Metadata, core update, actor attribution and receipt commit together. Retrying never overwrites later edits or recreates a deleted deck. Changing Home DEK, Home issuer, connection issuer or team after receipts exist requires an explicit migration; restarting with a new retry namespace is refused.
17
18The CLI uses `oficina call slides_create_deck --input <JSON-file>` according to the installed CLI's help. Paseo can use the CLI's local MCP bridge and credential store. ChatGPT and Claude use the public remote connection service and their separately registered OAuth callbacks. App-adapter tests are not certification of those live hosts. No production deployment is claimed by this branch.
19
20The original `/api/v1/decks` drive API remains available for its existing tokens. Asset uploads, exports, presentation control and sharing remain follow-on delegated operation contracts.
21
22In roster team mode, creating decks requires current Home membership; the local
23allowlist grants no team standing. The agent team must match the provisioned
24roster team. Full lists return a retryable failure if roster authority cannot
25be verified; exact independently shared decks remain readable. This initial
26API requires an existing Home-linked local account.
27
28`slides_update_deck` applies 1–100 semantic operations atomically. Its exported
29schema describes each operation's fields and types: metadata, slides, blocks,
30text, notes, layout and ordering use the native editor engine. Read
31`slides_get_deck`, copy its decimal-string `revision` into `expected_revision`,
32and choose a new canonical nonzero UUID for the edit. The update returns
33`sqid`, `url`, `revision` and `ids` (server-minted IDs keyed by operation index).
34A stale revision returns `conflict` without changing the deck.
35
36Keep the same UUID, expected revision and ordered payload after an uncertain
37response. A matching retry returns the original **applied** revision and IDs,
38even after somebody edits the deck later; read again for current content.
39Current access is required on every attempt and before response delivery.
40Existing independent deck grants permit document editing under the app's
41native policy; creation continues to require current membership. New edits
42never automatically rebase and never accept raw Yjs or whole-deck replacement.
43