@kehto/paja 0.14.0 → 0.15.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
@@ -63,8 +63,23 @@ error details. Paja auto-connects a browser NIP-07 signer when `window.nostr` is
63
63
  available, can connect to a bunker/NIP-46 URI, and only uses the generated local
64
64
  development signer when the Dev signer button is selected. Sign, publish, DM
65
65
  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,
66
+ confirmation dialog. Deny has initial focus and Escape denies. A napplet-scoped
67
+ sign request defaults to one-time approval, with explicit options to remember
68
+ that event kind or trust every kind from the napplet identity and target. The trust
69
+ choice carries a visible warning. Remembered signing authority is keyed by the
70
+ active signer pubkey, host-owned napplet d-tag and aggregate hash, and the Paja
71
+ target boundary. Runtime pointers are isolated by verified artifact hash;
72
+ direct development targets are isolated by exact target URL, and their trust
73
+ survives code reloads at that URL. Changing the signer, identity, artifact, or
74
+ target asks again. Missing source identity or a nonnumeric kind remains
75
+ one-shot, denials are never remembered, and the signer controls can revoke
76
+ every remembered approval. If durable deletion fails, Paja keeps the approval
77
+ listed and logs the failure instead of claiming revocation. A full Paja host
78
+ reload creates a new ephemeral Dev signer and therefore asks again; a stable
79
+ NIP-07 or NIP-46 account can reuse its saved choice. Publish and other operation
80
+ confirmations continue to prompt independently. This is Paja runtime policy under draft
81
+ [NAP-RELAY PR #2 at `0be8abce18beb46ca37bd4ddd042f58d30b4eedc`](https://github.com/napplet/naps/pull/2), not
82
+ a Kehto kernel default. Upload consent identifies the requesting napplet, file, MIME type,
68
83
  size, selected server, and durable public effect before bytes leave the browser.
69
84
  A denial or a live publish with no accepting relay returns a canonical failure
70
85
  and is not added to Paja's in-memory relay view. Paja's scoped-relay hook
@@ -284,17 +299,21 @@ pubkey without `signEvent` is read-only. This implements the draft
284
299
 
285
300
  ## NAP-RESOURCE schemes
286
301
 
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
302
+ Paja's developer-runtime policy accepts arbitrary `http:` and `https:` resource
303
+ URLs so a normal remote image does not look broken merely because its origin was
304
+ not pre-granted. Paja resolves those URLs with browser `fetch`, omits credentials
305
+ and referrer data, caps responses at 10 MiB, and classifies MIME from returned
306
+ bytes. Browser network and CORS rules still apply: an unreadable response is the
307
+ canonical `network-error`, while any CORS-readable response is returned as NAP
308
+ bytes.
309
+
310
+ `data:` remains locally decoded. `blossom:` is a separate, content-addressed
311
+ boundary and is advertised only when at least one usable host-owned
312
+ runtime-pointer or upload server is configured. The only accepted identifier is
313
+ `blossom:sha256:<hex>`; Paja refuses redirects, verifies the requested SHA-256,
314
+ and permits plain-HTTP Blossom transport only for configured loopback
315
+ development servers. Resource-origin permissiveness does not alter Paja's
316
+ independent signer confirmations. This behavior targets draft
298
317
  [NAP-RESOURCE at `fa6bcc6`](https://github.com/napplet/naps/blob/fa6bcc6935aa19e7b70ab2a2c721dafca77c78e1/naps/NAP-RESOURCE.md).
299
318
 
300
319
  Full package docs: [`docs/packages/paja.md`](../../docs/packages/paja.md).