@kehto/paja 0.13.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 +46 -13
- package/dist/browser-host.js +431 -79
- package/dist/browser-host.js.map +1 -1
- package/dist/{chunk-3KMCJVEA.js → chunk-DTRRHXYY.js} +28 -2
- package/dist/{chunk-3KMCJVEA.js.map → chunk-DTRRHXYY.js.map} +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{server-BUL6CdbZ.d.ts → server-Ia5n1Bqv.d.ts} +1 -0
- package/package.json +6 -6
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
|
|
67
|
-
|
|
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
|
|
@@ -155,6 +170,20 @@ runtime tabs in local storage so returning to `/web/paja/` restores the previous
|
|
|
155
170
|
pointer set. An explicit pointer in the URL still takes precedence over restored
|
|
156
171
|
tabs.
|
|
157
172
|
|
|
173
|
+
The static artifact defaults to Paja's standard live relays and memory uploads.
|
|
174
|
+
To point it at specific live relays or Blossom upload servers, pass
|
|
175
|
+
comma-separated host lists when generating the artifact:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
PAJA_RELAY_URLS="wss://relay.example,wss://relay.example.net" \
|
|
179
|
+
PAJA_UPLOAD_SERVERS="https://blossom.example" \
|
|
180
|
+
node scripts/build-paja-pages.mjs
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
When `PAJA_UPLOAD_SERVERS` is set, the runtime enables the Blossom upload rail
|
|
184
|
+
with server discovery and uses those servers for Blossom NAP-RESOURCE
|
|
185
|
+
resolution too.
|
|
186
|
+
|
|
158
187
|
## Installed intent handlers and delivery
|
|
159
188
|
|
|
160
189
|
Paja keeps resolver-verified pointer and manifest facts in an installed catalog,
|
|
@@ -270,17 +299,21 @@ pubkey without `signEvent` is read-only. This implements the draft
|
|
|
270
299
|
|
|
271
300
|
## NAP-RESOURCE schemes
|
|
272
301
|
|
|
273
|
-
Paja
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
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
|
|
284
317
|
[NAP-RESOURCE at `fa6bcc6`](https://github.com/napplet/naps/blob/fa6bcc6935aa19e7b70ab2a2c721dafca77c78e1/naps/NAP-RESOURCE.md).
|
|
285
318
|
|
|
286
319
|
Full package docs: [`docs/packages/paja.md`](../../docs/packages/paja.md).
|