@kehto/paja 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -219,7 +219,7 @@ The file opens in a new runtime tab named after the file.
219
219
  - **Same loading path as verified pointers.** Paja registers the identity before
220
220
  the frame runs. It injects the Class-1 CSP (with `connect-src 'none'`, since a
221
221
  local file has no relay or Blossom hints) and then the runtime-owned
222
- `window.napplet` prelude, including mandatory `shell`. The bytes go in through
222
+ `window.napplet` prelude, including enabled optional domains. The bytes go in through
223
223
  `srcdoc` under the same `allow-scripts` sandbox.
224
224
  - **Development only and unverified.** A local file has no signed manifest. It
225
225
  never enters the installed napplet catalog, never becomes an intent delivery
@@ -254,12 +254,7 @@ Paja activates delivered handler tabs because its stage shows one tab at a time.
254
254
  `behavior.focus` is advisory; `reuse: false` creates a new surface. Existing caller
255
255
  tabs remain open. Installed contracts and domains appear in pointer diagnostics.
256
256
 
257
- `@napplet/shim@0.30.0` supplies no generic shell API. Kehto deliberately keeps
258
- its host-owned mandatory `window.napplet.shell` prelude: it installs the live
259
- receiver before the one bare `shell.ready`, caches the first `shell.init`, and
260
- provides local `ready()`, `supports()`, read-only `services`, and one-shot
261
- `onReady()`. This is the documented upstream-package-drift exception, not a
262
- shim capability.
257
+ Kehto provides the optional `window.napplet.shell` interface for environment information. Other domains route through trusted iframe creation identity independently of readiness. `supports(domain)` queries namespace presence locally. See the living [NAP-SHELL](https://github.com/napplet/naps/blob/master/naps/NAP-SHELL.md).
263
258
 
264
259
  Before Paja assigns a verified runtime-pointer document to `srcdoc`, it calls
265
260
  `@kehto/shell`'s `prepareNappletSrcdoc`. The shell inserts validated CSP first,
@@ -482,7 +477,7 @@ Parameters start omitted; selecting Include with an empty field sends an explici
482
477
  empty string. Names stay in advertised order and extra named fields are allowed.
483
478
  No parameter type or requiredness is inferred. An empty advertised list still
484
479
  permits a payload. Opening or editing the builder never invokes an intent.
485
- Use **Copy link** or explicitly **Test intent** to open the review view.
480
+ Use **Copy link** to share it, or **Test intent** to open the shared content.
486
481
 
487
482
  The outer URL carries a complete percent-encoded convention URI in `intent`.
488
483
  For example, `?intent=napplet%3Aprofile%2Fopen%3Fpubkey%3Dabc%252B123`
@@ -493,17 +488,27 @@ cannot accompany an inner query. URLs are limited to 16 KiB UTF-8. Duplicate
493
488
  keys, malformed encoding, and conflicting target instructions are rejected.
494
489
  Ordinary pointer-only app links retain their existing behavior.
495
490
 
496
- Choose recipient default routing, a named-35129 `#naddr` recommendation, or an
497
- exact outer `pointer`. Explicit pointers must verify and advertise the exact
498
- contract; failure never silently falls back. Otherwise an applicable user default
499
- wins before a recommendation, then ordinary compatible selection applies.
500
- Recommendation relay hints remain untrusted discovery inputs. Installing a
501
- recommendation requires confirmation after signed metadata and bytes verify.
502
-
503
- Incoming links show **Review intent** before execution. Edit, choose another
504
- handler, explicitly save or clear a default, launch, retry, or cancel. Defaults
505
- never change implicitly. Cancellation before Launch sends nothing; accepted
506
- work is retained while completion or failure remains visible in the host.
491
+ New links recommend the app using a named-35129 `#naddr` when available;
492
+ snapshot or unnamed apps use an exact outer `pointer`. The builder also offers
493
+ recipient-default routing. Explicit pointers must verify and advertise the exact
494
+ contract; failure never silently falls back. Recommendation relay hints remain
495
+ untrusted discovery inputs. Invalid, incompatible, or disallowed recommendations
496
+ do not override an applicable saved default.
497
+
498
+ Opening a shared link opens its verified app and delivers the content directly,
499
+ following Paja's ordinary pointer navigation and capability policy. No URI or
500
+ payload review is shown. If an applicable saved default conflicts with the
501
+ link's app, Paja names both apps and asks which to use. A one-time choice leaves
502
+ the default unchanged; **Always use this app** explicitly saves the chosen app.
503
+ Without a usable hint or default, ordinary installed-handler selection applies.
504
+ Installed app pointers are saved separately from open tabs and reverified when
505
+ loaded; cached pointers never authorize execution or supply trusted metadata.
506
+
507
+ Progress and failures use a small notice. Successful delivery dismisses it.
508
+ Closing the notice or cancelling an app choice before dispatch sends nothing.
509
+ After acceptance, the incoming intent is removed from the current URL so reload
510
+ restores the app without delivering the shared content again. Accepted work is
511
+ retained until the verified target is ready.
507
512
 
508
513
  Paja invokes through a separate signed launcher napplet with a verified artifact
509
514
  and authenticated iframe endpoint. Its source supplies the opaque sender; the
@@ -511,3 +516,7 @@ URL cannot supply one. The hidden launcher is removed after acceptance and is
511
516
  never persisted or restored. Verification precedes `srcdoc`, and host bootstrap
512
517
  injection stays outside signed bytes. Native external-origin sender semantics
513
518
  remain a documented upstream spec gap; no host sender identity is invented.
519
+
520
+ ## GAMEPAD integration
521
+
522
+ This non-normative guidance defers to the living [NAP-GAMEPAD](https://github.com/napplet/naps/pull/108). Services export `createGamepadService` and `browserGamepadOptions`; shell exports `denyNappletControllerAccess`. Paja and the playground register one host reader and deny native gamepad/HID/USB paths before frame execution. Source-bound subscriptions receive immediate full snapshots; only the visible host's input owner gets live controls. Focus loss supplies neutral controls and timestamp zero; unsubscribe, window destruction, and service removal release polling. Non-browser or denied native readers report the proposal's unavailable reasons. See [Controller input](https://github.com/kehto/web/blob/main/docs/gamepad.md).