docs: what the host gives an app now includes the generic native features
Layout and "What the host gives an app": bridge, backup, sync, workspaces, devmode, alerts, media (+ clipboard), gfonts, fonts, updater, plugins::commands; apps enable the tauri and net features.
This commit is contained in:
parent
29782dcddd
commit
8c93fc470d
1 changed files with 32 additions and 2 deletions
34
README.md
34
README.md
|
|
@ -61,15 +61,29 @@ generate each kind into a temp folder and check it against the real contracts: p
|
||||||
## Layout
|
## Layout
|
||||||
|
|
||||||
```
|
```
|
||||||
crates/waybetter-host/ Rust: security policy, profiles, plugin store, hotfix, updates, tab payloads
|
crates/waybetter-host/ Rust: security policy, profiles, plugin store, hotfix, updates, tab payloads,
|
||||||
|
and the generic native features every app gets (below)
|
||||||
|
tab-bridge.js the tab bridge every tab gets (served by src/bridge.rs)
|
||||||
src/site.rs SiteSpec + AccountRules (the native half of the adapter)
|
src/site.rs SiteSpec + AccountRules (the native half of the adapter)
|
||||||
src/policy.rs webview labels, origin checks, tab rect clamp
|
src/policy.rs webview labels, origin checks, tab rect clamp
|
||||||
src/profiles.rs profiles, per-profile data dirs, native-owned accounts
|
src/profiles.rs profiles, per-profile data dirs, native-owned accounts
|
||||||
src/plugins.rs *.plugin.js store, custom CSS, bundled-plugin upgrades
|
src/plugins.rs *.plugin.js store, custom CSS, bundled-plugin upgrades
|
||||||
|
src/plugins/commands.rs palette commands site tabs report, and the script that runs one
|
||||||
src/hotfix.rs signed data-only hotfix channel (minisign)
|
src/hotfix.rs signed data-only hotfix channel (minisign)
|
||||||
src/update.rs silent-update scheduling and crash handshake
|
src/update.rs silent-update scheduling and crash handshake
|
||||||
src/tabs.rs TabLayout/TabState/OpenRequest, link modes, shortcut and drag validation,
|
src/tabs.rs TabLayout/TabState/OpenRequest, link modes, shortcut and drag validation,
|
||||||
deck ColumnConfig bounds and unread caps
|
deck ColumnConfig bounds and unread caps
|
||||||
|
src/bridge.rs the tab bridge script (reports; shortcut/link-drag forwarding opt-in)
|
||||||
|
src/backup.rs settings backup envelope, secret scrubbing, plugin/account sections
|
||||||
|
src/sync.rs encrypted folder sync (Argon2id + XChaCha20-Poly1305 snapshots)
|
||||||
|
src/workspaces.rs saved tab/pane/deck layouts, bounded and well-formed
|
||||||
|
src/devmode.rs developer mode: debounced file watcher, reload order, error positions
|
||||||
|
src/alerts.rs keyword alerts: keywords, snippets, rate limits; native notifications
|
||||||
|
src/media.rs gallery folders (path containment), clipboard history, PNG encoding
|
||||||
|
src/media/clipboard.rs (feature "tauri") opt-in clipboard polling, private copies skipped
|
||||||
|
src/gfonts.rs self-hosted Google Fonts: CSS parsing, URL/woff2 checks, cache format
|
||||||
|
src/fonts.rs (feature "net") font downloads and the font cache
|
||||||
|
src/updater.rs (features "tauri" + "net") signed native updates and the hotfix channel
|
||||||
src/store/ install links, download allow-list, signed multi-app store catalog, staging
|
src/store/ install links, download allow-list, signed multi-app store catalog, staging
|
||||||
and installs; downloads with feature "net" (docs/STORE.md)
|
and installs; downloads with feature "net" (docs/STORE.md)
|
||||||
src/host.rs (feature "tauri") webview helpers, shell events, system menu
|
src/host.rs (feature "tauri") webview helpers, shell events, system menu
|
||||||
|
|
@ -205,6 +219,22 @@ site, and a shell save can never change it (`ProfileSettings::keep_accounts_from
|
||||||
- `hotfix`: minisign-verified, schema-checked, monotonic, expiring data; delivered frozen as data.
|
- `hotfix`: minisign-verified, schema-checked, monotonic, expiring data; delivered frozen as data.
|
||||||
- `update`: check schedule with jitter, crash handshake (automatic apply off after two failed boots).
|
- `update`: check schedule with jitter, crash handshake (automatic apply off after two failed boots).
|
||||||
- `tabs`: shell payloads and validation; `deliver_script` hands JSON to a runtime member or parks it.
|
- `tabs`: shell payloads and validation; `deliver_script` hands JSON to a runtime member or parks it.
|
||||||
|
- `bridge`: the tab bridge (`SOURCE`, or `script(BridgeOptions)` to leave shortcut and link-drag
|
||||||
|
forwarding off when the shell does not handle them).
|
||||||
|
- `backup` + `sync`: the `.waybetter` settings backup (the app registers its sections and files;
|
||||||
|
secret-looking keys are scrubbed both ways) and encrypted snapshots in a folder the owner syncs.
|
||||||
|
- `workspaces`: validation of saved layouts (slug ids, known tab kinds, http(s) URLs, size caps).
|
||||||
|
- `devmode`: the live-reload watcher (plugins, `custom.css`, one theme file; the app turns the theme
|
||||||
|
document into its own state through a callback).
|
||||||
|
- `alerts`: keyword settings, snippets, `Throttle`, `AlertGate` over any `KeywordMatch`;
|
||||||
|
`alerts::notify` (feature `tauri`) shows a native notification.
|
||||||
|
- `media`: gallery folders and the opt-in clipboard history; `media::clipboard::watch` (feature
|
||||||
|
`tauri`) polls the OS clipboard and never reads a copy a password manager marked private.
|
||||||
|
- `gfonts` + `fonts` (feature `net`): Google Fonts downloaded natively from the two Google hosts
|
||||||
|
only, cached with a sha256 manifest and handed to site pages as bytes (`page_script(&SITE, ..)`).
|
||||||
|
- `updater` (features `tauri` + `net`): the update loop, the signed hotfix channel and
|
||||||
|
`status`/`apply`/`ready` for the app's commands, configured by an `UpdaterConfig`.
|
||||||
|
- `plugins::commands`: palette commands a site tab reports, and `run_script(&SITE, id)`.
|
||||||
- `store`: the wayBetter Store for any app from a `StoreConfig` (app id, link scheme, store URL,
|
- `store`: the wayBetter Store for any app from a `StoreConfig` (app id, link scheme, store URL,
|
||||||
public keys with rotation, download hosts): `waybetter://install` link parsing, the allow-list,
|
public keys with rotation, download hosts): `waybetter://install` link parsing, the allow-list,
|
||||||
size caps, catalog verification (Ed25519, strict schema, each app sees only its items), `Store`
|
size caps, catalog verification (Ed25519, strict schema, each app sees only its items), `Store`
|
||||||
|
|
@ -225,7 +255,7 @@ manifest and the capability files stay in the app.
|
||||||
wayBetter for X adds this repository as a git submodule at `waybetter/` and consumes it from source:
|
wayBetter for X adds this repository as a git submodule at `waybetter/` and consumes it from source:
|
||||||
|
|
||||||
- Rust: a path dependency, `waybetter-host = { path = "../../../waybetter/crates/waybetter-host" }`,
|
- Rust: a path dependency, `waybetter-host = { path = "../../../waybetter/crates/waybetter-host" }`,
|
||||||
with `features = ["tauri"]` enabled by the app's desktop feature.
|
with `features = ["tauri", "net"]` enabled by the app's desktop feature.
|
||||||
- TypeScript: relative imports of `waybetter/packages/*/src/*.ts` from a few adapter modules. The
|
- TypeScript: relative imports of `waybetter/packages/*/src/*.ts` from a few adapter modules. The
|
||||||
packages are not Bun workspace members of the app on purpose: the app's server CI clones without
|
packages are not Bun workspace members of the app on purpose: the app's server CI clones without
|
||||||
submodules and runs `bun i`, which fails when a declared workspace package is missing; and Node's
|
submodules and runs `bun i`, which fails when a declared workspace package is missing; and Node's
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue