@kehto/paja 0.14.0 → 0.15.1

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
@@ -59,12 +59,29 @@ warning, when the target would block the sandboxed frame.
59
59
 
60
60
  The console shows supported interfaces with per-domain injection toggles,
61
61
  runtime ACL controls, signer controls, and a filterable message log with visible
62
- error details. Paja auto-connects a browser NIP-07 signer when `window.nostr` is
62
+ error details. In runtime-pointer mode, ACL controls always display and mutate
63
+ the active tab's resolver-verified d-tag and aggregate hash; a grant or revoke
64
+ rerenders that same identity immediately. Paja auto-connects a browser NIP-07 signer when `window.nostr` is
63
65
  available, can connect to a bunker/NIP-46 URI, and only uses the generated local
64
66
  development signer when the Dev signer button is selected. Sign, publish, DM
65
67
  send, filesystem picker, Blossom upload, and external-link requests use one serialized in-page
66
- confirmation dialog. Deny has initial focus, Escape denies, and there is no
67
- bypass list. Upload consent identifies the requesting napplet, file, MIME type,
68
+ confirmation dialog. Deny has initial focus and Escape denies. A napplet-scoped
69
+ sign request defaults to one-time approval, with explicit options to remember
70
+ that event kind or trust every kind from the napplet identity and target. The trust
71
+ choice carries a visible warning. Remembered signing authority is keyed by the
72
+ active signer pubkey, host-owned napplet d-tag and aggregate hash, and the Paja
73
+ target boundary. Runtime pointers are isolated by verified artifact hash;
74
+ direct development targets are isolated by exact target URL, and their trust
75
+ survives code reloads at that URL. Changing the signer, identity, artifact, or
76
+ target asks again. Missing source identity or a nonnumeric kind remains
77
+ one-shot, denials are never remembered, and the signer controls can revoke
78
+ every remembered approval. If durable deletion fails, Paja keeps the approval
79
+ listed and logs the failure instead of claiming revocation. A full Paja host
80
+ reload creates a new ephemeral Dev signer and therefore asks again; a stable
81
+ NIP-07 or NIP-46 account can reuse its saved choice. Publish and other operation
82
+ confirmations continue to prompt independently. This is Paja runtime policy under draft
83
+ [NAP-RELAY PR #2 at `0be8abce18beb46ca37bd4ddd042f58d30b4eedc`](https://github.com/napplet/naps/pull/2), not
84
+ a Kehto kernel default. Upload consent identifies the requesting napplet, file, MIME type,
68
85
  size, selected server, and durable public effect before bytes leave the browser.
69
86
  A denial or a live publish with no accepting relay returns a canonical failure
70
87
  and is not added to Paja's in-memory relay view. Paja's scoped-relay hook
@@ -284,17 +301,21 @@ pubkey without `signEvent` is read-only. This implements the draft
284
301
 
285
302
  ## NAP-RESOURCE schemes
286
303
 
287
- Paja supports locally decoded `data:` URLs and canonical
288
- `blossom:sha256:<hex>` resources. Blossom hashes are resolved only through
289
- host-owned runtime-pointer or upload server settings; there is no public
290
- default. Servers use HTTPS, with plain HTTP allowed only for loopback
291
- development. Paja refuses redirects, caps responses at 10 MiB, verifies the
292
- requested SHA-256, and derives MIME from the returned bytes before delivery.
293
-
294
- Direct `http:` and `https:` resource URLs remain disabled. They are distinct
295
- from the HTTP(S) transport selected internally for a `blossom:` identifier and
296
- still require a general DNS/private-address-safe fetch proxy. This behavior
297
- targets draft
304
+ Paja's developer-runtime policy accepts arbitrary `http:` and `https:` resource
305
+ URLs so a normal remote image does not look broken merely because its origin was
306
+ not pre-granted. Paja resolves those URLs with browser `fetch`, omits credentials
307
+ and referrer data, caps responses at 10 MiB, and classifies MIME from returned
308
+ bytes. Browser network and CORS rules still apply: an unreadable response is the
309
+ canonical `network-error`, while any CORS-readable response is returned as NAP
310
+ bytes.
311
+
312
+ `data:` remains locally decoded. `blossom:` is a separate, content-addressed
313
+ boundary and is advertised only when at least one usable host-owned
314
+ runtime-pointer or upload server is configured. The only accepted identifier is
315
+ `blossom:sha256:<hex>`; Paja refuses redirects, verifies the requested SHA-256,
316
+ and permits plain-HTTP Blossom transport only for configured loopback
317
+ development servers. Resource-origin permissiveness does not alter Paja's
318
+ independent signer confirmations. This behavior targets draft
298
319
  [NAP-RESOURCE at `fa6bcc6`](https://github.com/napplet/naps/blob/fa6bcc6935aa19e7b70ab2a2c721dafca77c78e1/naps/NAP-RESOURCE.md).
299
320
 
300
321
  Full package docs: [`docs/packages/paja.md`](../../docs/packages/paja.md).