Skip to main content

Module deeplink_os

Module deeplink_os 

Source
Expand description

A deep link another program hands to AgentMux (docs/specs/SPEC_DEEP_LINKS_ONE_FRAMEWORK_2026_11_20.md R18, G4e, G9; build 4): a link clicked in a web page, a mail or a chat reaches the running app as POST /api/v1/host/deeplink_open, sent by the host. Its caller is unknown and a web page can start it, so it navigates and nothing more:

  • Only the host calls the route, proven by its own token (from_host): every agent holds the instance key, so the key does not open it. An agent opens with Pane open, recorded as itself.
  • A destination shown by path (the Editor, the Media view, Files) is refused: a page could have the browser download a file and then send the person to it in our own preview.
  • A view whose sensitivity is not public (the Vault, Memory, the Audit) opens with no place in it: the pane only, with no entry or row selected.
  • Five opens a minute, refused over it.
  • It lands in the window the person used last (or the one the host names), replaces nothing, takes no fieldโ€™s focus, waits for the app to finish starting (sagas::deeplink_open), and its answer says which window it used, for the host to raise.
  • Every open is recorded in the Audit with its source, refused ones too.

Structsยง

OsOpenRequest ๐Ÿ”’
The body of POST /api/v1/host/deeplink_open.

Constantsยง

OS_RATE_LIMIT ๐Ÿ”’
Opens the operating system may ask for in a minute (G4e).

Functionsยง

handle_os_open_link ๐Ÿ”’
POST /api/v1/host/deeplink_open: the host hands over a link another program opened. Answers the outcome of R3 (200) for every open it decided, refused ones included, each recorded, with the window_id it opened in when it chose one; 403 for any caller but the host.
limiter ๐Ÿ”’
os_guard ๐Ÿ”’
What the operating systemโ€™s open of text may show, by the rules above, or why it is refused. allow is the rate limit, so a test can give its own.
record ๐Ÿ”’
G9: the open, recorded with its source.