Skip to content

docs: reframe bento/vault around the AI broker - #155

Merged
nyblnet merged 1 commit into
mainfrom
vault-vision
Jul 31, 2026
Merged

docs: reframe bento/vault around the AI broker#155
nyblnet merged 1 commit into
mainfrom
vault-vision

Conversation

@nyblnet

@nyblnet nyblnet commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Supersedes the 2026-07-25 vault entry. Two files: a DECISIONS.md entry and a rewrite of docs/vault-design.md.

Why the reframe

Subtraction. Of the five promises in the old entry, four were met or taken while it sat unbuilt — mobile reach by tray plus any existing File Provider, sharing by the collab relay, per-device version history by autosave.ts, and plain file sync was never ours.

What makes vault necessary is the AI broker. A travelling document can never carry a model credential, and under tray localStorage is per-document — the origin is SHA256(path) truncated (EditorViewController.swift:55-58). The only place a credential can live once and serve a library is a server the user runs. The doc is explicit that the argument rests on credentials alone, and that pointing an editor at a local model is commodity work.

Search: measured end to end, and it came out smaller

The original draft claimed Bento documents are invisible to OS search, and flagged a <noscript> avenue as untested. Both are now resolved by measurement rather than reasoning — and the answer narrows the pillar.

The preview left <noscript> for ordinary markup (see the thumbnails entry of 2026-07-27, landed in #161). Ordinary markup indexes. Measured with mdimport -d2 -t on a deck saved from the current shell:

probe result
real deck, kMDItemTextContent 330 characters — the whole title slide
token on slide one indexed
token on slide two not indexed
plain markup / markup+remover / <noscript>, isolated all three indexed

So a deck is findable by its title slide today, for free, with no vault. What remains unserved is full-text search — the deck that mentions Q3 churn on slide fourteen. That is narrower than the original claim and it is the need an index actually serves. Sequencing step 2 is marked done accordingly: the indexer's job is slides 2..n, not the library.

Corrections to the draft's own research

  • Ollama does not blanket-refuse file://. Its default allow-list includes file://* (envconfig/config.go:100-106). The real issue is that browsers send Origin: null and gin-contrib/cors matches by exact string or regex (config.go:128-140), so null won't match. Marked reasoned, not measured — there was no running Ollama to test against.
  • LiteLLM's virtual keys, budgets and spend attribution are stock behaviour, not an add-on.

What I cut

The rewrite drops the old doc's availability/dead-drop sections, client list, data-model sketch and threat model, because they describe an architecture now deferred. The relay material is unaffected and still lives in relay-design.md. The dropped threat model was written for the personal-server shape and will need rewriting for whatever ships — git history holds it.

Rebased onto current main; the DECISIONS.md conflict was two same-day entries both claiming the top of an append-only log, resolved by keeping both.

Docs only. No code.

@nyblnet nyblnet changed the title docs: reframe bento/vault around the AI broker, and price it honestly docs: reframe bento/vault around the AI broker Jul 27, 2026
Supersedes the 2026-07-25 vault entry. Two files: a DECISIONS.md entry and
a rewrite of docs/vault-design.md.

The reframe came from subtraction. Of the five promises in the old entry,
four were met or taken while it sat unbuilt — mobile reach by tray plus any
existing File Provider, sharing by the collab relay, per-device version
history by autosave.ts, and plain file sync was never ours.

Search alone survived, and it is measured rather than assumed. Control test
in an indexed folder: a plain HTML file with a phrase in <body> is found by
Spotlight; the same phrase inside a <script> is not; a real deck is not
found, though grep finds it instantly. Bento libraries are invisible to OS
search. Before any indexer is built, the cheap avenue gets tested: text in
<noscript> IS indexed, and every save already writes a page-one render
there.

What makes vault necessary is the AI broker. A travelling document can never
carry a model credential, and under tray localStorage is per-DOCUMENT — the
origin is SHA256(path) truncated, verified at EditorViewController.swift:55-58.
The only place a credential can live once and serve a library is a server the
user runs.

Two claims that reached the draft were wrong and are corrected in the doc
rather than repeated. Ollama does not blanket-refuse file:// — its default
allow-list includes file://* (envconfig/config.go:100-106); the real issue is
that browsers send Origin: null and gin-contrib/cors matches by exact string
or regex (config.go:128-140), so null won't match file://*. That one is marked
reasoned, not measured. And LiteLLM's virtual keys, budgets and spend
attribution are stock behaviour, not an add-on.

Cut as deferred architecture: backup and version history (autosave.ts already
covers it, and the audience runs restic and git), SSO beyond key distribution
and forward revocation, and — with the org profile as destination rather than
first build — NAT traversal, hole-punching, the dead-drop and the portable
relay twin, all of which existed to serve a laptop asleep behind a home NAT.

New invariant: AI is additive, never load-bearing. Every app stays fully
functional with no vault and no model, or PLATFORM.md §1 is gone.
@nyblnet
nyblnet merged commit 8774784 into main Jul 31, 2026
1 check passed
@nyblnet
nyblnet deleted the vault-vision branch July 31, 2026 22:35
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