openbyname is part of ontoref Gov.
openbyname
v0.1.0 · a native handler for openbyname:// and obn:// links

A link on a web page that acts on a file on your own machine, safely.

The link carries a name. Your machine decides the rest.

It opens the file in a desktop application, fetches it from a server, sends it back, commits it to a repository, or runs a task the project declared. It does this without a webview, a browser extension or a file picker. The operating system hands the link to openbyname, a small native handler, which looks the names up in declarations that live on your machine and acts only as they allow.

Why

A web page cannot start a desktop application

Web tools for editing documents keep running into the same wall. The document has to be edited in a desktop application, such as LibreOffice, Draw or a PDF viewer. The usual workarounds are three:

  • Download the file and let the person find it in the Downloads folder.
  • Wrap the web app in a desktop shell, which means shipping and maintaining a webview.
  • Write a native helper for each project.

openbyname is the helper, written once and shared by every project. It knows about projects, places, files, tasks and tickets, and nothing more. What a subject or a resource means stays with the project that uses it.

How it stays safe

Any web page can hand the link to the operating system

The design starts from that fact.

The URL carries names, never paths

No path, no application and no destination is read from a link. Everything resolves through the declarations of your own machine.

Your declarations decide where

The directory a place serves, the extensions it accepts, the server a file comes from or goes to, the repository it is committed to and the command a task runs are fixed on your machine. A link cannot point anywhere else.

Outward acts need proof of consent

Opening needs none. get, upload and run carry a single-use ticket that the server which issued it redeems. git needs your confirmation in a native dialog, or a ticket signed with a key your declaration pins.

The issuer verifies the ticket

The ticket is opaque to the handler. It sends it in a header, never in a query, and follows no redirect. Existence, expiry, scope and single use are checked where the ticket was issued.

Nothing the URL names is executed

A task is an argv array the project declared, run without a shell, and only after its issuer redeems the ticket for exactly that project, task and action (ADR-002). With the issuer unreachable, nothing runs.

Resolution is strict

A file must sit directly inside its declared directory once every symlink is followed. A fetched file is written only after the server answered 2xx and the whole body arrived.

A repository is not trusted by being cloned

A project's own declaration takes effect only when you register it, and its tasks only when you approve the declaration's digest (ADR-003, proposed).

The handler's own name is reserved

openbyname://openbyname/settings opens the settings form, only after you confirm in a system dialog. Every other link under that name is refused at parse, and no project may take it (ADR-007).

From declaration to click

A project declares; you register; a link names

  1. Declare

    A project keeps .openbyname/project.ncl and backend.ncl at its root. openbyname project init writes them from the templates, without any task. project.ncl names its places relative to named roots, the servers it talks to by name, and optional tasks.

  2. Register

    On each machine, openbyname project register gives the roots and servers their local values. It refuses a place whose path is absolute or leaves its root, and a declaration with tasks unless --approve names its sha256. The handler reads the registered JSON, never the folder; a later change does nothing until it is registered again, and doctor reports the drift.

  3. Click

    A page links to obn://myproject/docs/report.odt. The operating system launches the handler: open-URL events on macOS, argv elsewhere. It parses the link, resolves the names to a file inside its declared place, acts, logs and notifies.

  4. Answer

    Called from a terminal or a script, the handler exits with 0 only when every URL succeeded, and prints each refusal on stderr. Every action and refusal is written to the log, with tickets removed.

The server side

One crate issues and redeems tickets

openbyname-ticket is what a server uses to issue tickets and links and to redeem them. Its links are built with the handler's own grammar.

redb

A ticket is 32 random bytes. The store keeps only their sha256, with an opaque scope and an expiry, and redeems atomically and once.

axum

An extractor, a redeem route and issue_router. POST /issue mints only for a subject the consumer's Issuer authenticates and allows; openbyname decides neither who a subject is nor which claims it may hold (ADR-005).

sign

Signs git tickets with Ed25519. The handler verifies them offline against the key the place pins.

Handoff

A server that needs a task to act with arguments keeps them itself. When its redemption answers a handoff value, the handler passes it as OPENBYNAME_HANDOFF, only to a task that declares handoff = true. The link still names only the task (ADR-006).

Configuration

Written in Nickel, read as JSON

Closed contracts

Your settings, a registered project, a project's own declaration and a backend's settings are Nickel contracts. A field a contract lacks stops the build, and nothing is written.

No evaluator on a click

config build exports to the JSON the handler reads. Rust revalidates it at load, and parity tests keep each contract and its serde type one shape.

One settings form, two ways

openbyname settings edit asks it in the terminal; openbyname-ui serves it in the browser for one sitting, on loopback. Both write it the same way, only when it exports.

Cargo alone

No crate in the handler's workspace compiles C. The ticket store is redb and HTTPS is rustls with a pure-Rust provider, so every declared target checks with cargo check alone (ADR-004).

Status

What is built, and what has been witnessed

  • macOS: built and tested. OpenByName.app is signed ad hoc and registers both schemes with Launch Services. Clicking a link has been witnessed here.
  • Linux: a binary in ~/.local/bin and a desktop entry set as the default for both schemes. Packs run on Linux machines; a click from a browser in a desktop session has not been witnessed.
  • Windows: the binary and the per-user registry keys are built. They have never run.
  • Every target in code/config/targets.ncl, macOS, Linux and Windows on x86_64 and aarch64, compiles.
  • openbyname-ticket is a path dependency; it is not published as a crate.

just doctor says whether the handler is installed, which application holds each scheme (another application can capture obn://), whether your configuration builds, whether Nickel is present, and which registered projects changed since you registered them. just demo serves a page with one link per action, backed by a local server, a git repository and a working folder.

ontoref Gov

ontoref

One domain in three layers: how a project governed by ontoref governs itself.

What it is

Gov is ontoref's own domain. It holds the arrangement — what a project's boundary declares, its members, which artefacts a consumer inherits — and the exercise — what work is committed and how an act is delivered. Its name is the root of governance, governability and government, and elects none of them.

Why

A decision, a boundary or a delivery that lives only in someone's memory binds no one. In Gov each one is a declaration a project can be held to, and what holds it is a mechanism, not a good intention.

What for

A project reaches Gov by bond, never by imposition, and takes only the parts it needs. In signature governance each project carries one: the contract, the operations of work, the signature, the dossier, the agreement and the signing on an agent's behalf. Beside them, the capabilities any state of governance uses: the host boundary, deployment, the observed session and the opening by name.

How governance is layered

Protocol · base

ontoref's base: bonds and planes, content bound by digest, the unsigned work order, the check form, and mandatum's types. Every project is written in it; a project can bond without adopting any governance.

Management and governability · gov

The gov domain, in ontoref: how the constellation is organised, its management modes, and decisions held by validators.

Signature governance · foedus

The foedus domain, provided by the foedus project and operated by warden: the agreement, each party's annex and the tests that prove it. A project is here because it is a party to the agreement.

Isolation, provisioning, wuwei and openbyname are capabilities any state of governance uses — the agent's boundary, deployment, sessions, and running tasks locally — not governance: governance needs them, they do not need governance.

Each project chooses its governance mode

Governability (coherence) · ontoref alone

Coherence only: ontoref checks that the declarations hold together. No signature.

Auditable governance · signature

The person signs. It detects a departure; it does not prevent it.

Applied governance · signature + isolation

Signature and isolation together. It prevents.

Part of the same system

signature governance

capabilities

The link names. The machine decides.

A project, a place and a file name are all a link can contain. Where the file lives, which application opens it and which server it goes to are written down on your machine, and an outward act waits for proof of consent.