@botiverse/porthole 0.15.3 → 0.16.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/CHANGELOG.md +58 -0
- package/dist/bridge/bridge.d.ts +1 -8
- package/dist/bridge/bridge.js +0 -7
- package/dist/check/page-source.js +1 -1
- package/dist/check/page.js +1 -1
- package/dist/compile/policy.d.ts +0 -7
- package/dist/compile/policy.js +1 -10
- package/dist/config/capabilities.d.ts +8 -14
- package/dist/config/capabilities.js +4 -5
- package/dist/config/schema.d.ts +2 -13
- package/dist/config/validate.js +0 -24
- package/dist/conformance/behavior.js +26 -37
- package/dist/conformance/clipboard.js +47 -1
- package/dist/conformance/harness-source.js +1 -1
- package/dist/displays/displays.js +1 -3
- package/dist/guide/limits.js +1 -1
- package/dist/guide/runtime.js +1 -1
- package/dist/host/create-host.d.ts +1 -1
- package/dist/host/create-host.js +6 -51
- package/dist/host/door.d.ts +1 -1
- package/dist/host/locate.d.ts +1 -1
- package/dist/host/locate.js +2 -2
- package/dist/host/outcome.d.ts +5 -12
- package/dist/host/outcome.js +8 -16
- package/dist/host/types.d.ts +6 -22
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -4
- package/dist/isolation/served.d.ts +4 -14
- package/dist/isolation/served.js +7 -28
- package/dist/isolation/types.d.ts +2 -25
- package/dist/isolation/types.js +0 -23
- package/dist/platform/focus-field.d.ts +11 -0
- package/dist/platform/focus-field.js +18 -0
- package/dist/platform/types.d.ts +6 -22
- package/dist/platform/web.js +8 -106
- package/dist/presets/presets.d.ts +0 -2
- package/dist/presets/presets.js +0 -1
- package/dist/react/frame.d.ts +0 -8
- package/dist/react/frame.js +0 -4
- package/dist/runtime/contract.d.ts +2 -2
- package/dist/runtime/contract.js +2 -2
- package/dist/runtime/types.generated.js +6 -6
- package/dist/server/files.js +7 -23
- package/dist/server/host.d.ts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +4 -6
- package/dist/server/naming.js +1 -1
- package/dist/server/server.js +28 -166
- package/dist/server/types.d.ts +7 -7
- package/dist/shell/plan.d.ts +0 -5
- package/dist/shell/plan.js +2 -4
- package/dist/shell/runtime.js +1 -268
- package/docs/ADOPTING.md +42 -138
- package/docs/ARCHITECTURE.md +0 -33
- package/docs/DECISIONS.md +115 -10
- package/docs/DESIGN.md +27 -64
- package/docs/THREAT_MODEL.md +128 -255
- package/package.json +1 -1
- package/src/bridge/bridge.ts +1 -17
- package/src/check/page.ts +1 -1
- package/src/compile/policy.ts +1 -11
- package/src/config/capabilities.ts +8 -14
- package/src/config/schema.ts +2 -13
- package/src/config/validate.ts +0 -28
- package/src/conformance/behavior.ts +50 -52
- package/src/conformance/clipboard.ts +56 -1
- package/src/displays/displays.ts +1 -3
- package/src/guide/limits.ts +1 -1
- package/src/guide/runtime.ts +1 -1
- package/src/host/create-host.ts +6 -52
- package/src/host/door.ts +1 -1
- package/src/host/locate.ts +2 -2
- package/src/host/outcome.ts +8 -21
- package/src/host/types.ts +6 -20
- package/src/index.ts +2 -4
- package/src/isolation/served.ts +6 -34
- package/src/isolation/types.ts +2 -31
- package/src/platform/focus-field.ts +18 -0
- package/src/platform/types.ts +6 -21
- package/src/platform/web.ts +8 -129
- package/src/presets/presets.ts +0 -3
- package/src/react/frame.tsx +0 -10
- package/src/runtime/contract.ts +4 -4
- package/src/runtime/types.generated.ts +6 -6
- package/src/server/files.ts +4 -19
- package/src/server/host.ts +1 -1
- package/src/server/index.ts +4 -16
- package/src/server/naming.ts +1 -1
- package/src/server/server.ts +29 -189
- package/src/server/types.ts +7 -7
- package/src/shell/plan.ts +2 -9
- package/src/shell/runtime.ts +1 -268
- package/types/runtime/v1/artifact.d.ts +2 -3
- package/types/runtime/v1/assets.d.ts +1 -1
- package/types/runtime/v1/chat.d.ts +2 -2
- package/types/runtime/v1/comments.d.ts +1 -1
- package/types/runtime/v1/downloads.d.ts +2 -2
- package/types/runtime/v1/links.d.ts +2 -2
- package/dist/platform/focus-guard.d.ts +0 -288
- package/dist/platform/focus-guard.js +0 -838
- package/dist/server/nested.d.ts +0 -66
- package/dist/server/nested.js +0 -121
- package/dist/shell/frame.d.ts +0 -28
- package/dist/shell/frame.js +0 -407
- package/src/platform/focus-guard.ts +0 -1114
- package/src/server/nested.ts +0 -157
- package/src/shell/frame.ts +0 -444
package/docs/THREAT_MODEL.md
CHANGED
|
@@ -5,7 +5,7 @@ What Porthole protects, from whom, and where that protection ends. For each way
|
|
|
5
5
|
guaranteed. [ADOPTING.md](ADOPTING.md) says how to set each one up, and
|
|
6
6
|
[DESIGN.md](DESIGN.md) lists every defense with the test that proves it.
|
|
7
7
|
|
|
8
|
-
**Status.** This describes Porthole 0.
|
|
8
|
+
**Status.** This describes Porthole 0.16.0 (2026-11-11). A review on 2026-10-19 found gaps, and every decision it led to
|
|
9
9
|
has merged ([§8](#8-fixes-in-flight) lists them). P096 changed the negative-control runner and CI,
|
|
10
10
|
and the shipped conformance probes' messages and timing, not what they check. P104 (0.9.0's
|
|
11
11
|
annotation markers) had a review of its own, and P105, in 0.10.0, is what it led to. 0.11.0 was
|
|
@@ -86,6 +86,19 @@ Also in 0.15.3, after the audit of 0.15.1: the four helpers a content Worker of
|
|
|
86
86
|
with host origins (`statusPage`, `doorResponse`, `doorStatusResponse`, `nestedShellCsp`) check
|
|
87
87
|
each one and throw on a bad one, as P145 said they did; the origins are the host's own
|
|
88
88
|
configuration, never content's.
|
|
89
|
+
0.16.0: P149 takes out what guessed at the person's intent, and what was built to make the
|
|
90
|
+
guess better. Gone: nested pages (`nested: true`, P111 and all that followed it: the shell on a
|
|
91
|
+
label of its own, its word on the person's press, P114, P120 to P122, P136, P148); the focus
|
|
92
|
+
guard (P109: a display that takes the keyboard keeps it until the person clicks back, the
|
|
93
|
+
accepted risk of §5, now without a guard in front of it); the proof of a click asked of
|
|
94
|
+
`sendPrompt`, `openLink`, `downloadFile`, `comments.open`, `artifact.publish`, `assets.delete`
|
|
95
|
+
and a marker's `activated` (P105's second point). Kept: `copyText`'s click (the clipboard is the
|
|
96
|
+
person's, and nothing else stands between a page and it), every confirmation, every rate (the
|
|
97
|
+
three that had none get 30 a minute), the mute, and every isolation wall: no origin, sandbox,
|
|
98
|
+
CSP or message check changes. What a page gains is the power to ask at a moment it picks: a
|
|
99
|
+
confirmation the person didn't prompt, a composer or a comment view opening unasked. Each is a
|
|
100
|
+
nuisance a host bounds (it may refuse, back off, or name the `user-activation` gate again), and
|
|
101
|
+
none carries anything out or writes anything by itself (§5, §7).
|
|
89
102
|
|
|
90
103
|
## 1. Two layers
|
|
91
104
|
|
|
@@ -149,8 +162,8 @@ the agent, but it is not a wall.
|
|
|
149
162
|
them;
|
|
150
163
|
- the host's fallback for a frame that showed nothing ("open this in a new tab to sign in",
|
|
151
164
|
"you no longer have access", with a link) is drawn from Porthole's pages' word only, never
|
|
152
|
-
from what the content says (P124, P125; a url-mode app aside, S6). For a served display
|
|
153
|
-
|
|
165
|
+
from what the content says (P124, P125; a url-mode app aside, S6). For a served display —
|
|
166
|
+
where a same-scope sibling could otherwise speak for it ([§7](#the-display-layer)) —
|
|
154
167
|
that word comes from a **door**: a page of Porthole's on the display's origin, in a hidden
|
|
155
168
|
opaque frame of the host's that no content can reach, taken before the content is framed. The
|
|
156
169
|
content frame's own word is then never taken, and its silence is a timeout, never a fallback.
|
|
@@ -194,14 +207,22 @@ Porthole does not protect against these.
|
|
|
194
207
|
- **Deceptive content.** Content may draw anything in its frame, a fake sign-in form included.
|
|
195
208
|
Porthole limits where what is typed into it can go and keeps the host's approvals outside the
|
|
196
209
|
frame; it doesn't judge what content shows.
|
|
197
|
-
- **A display taking the keyboard** (accepted risk, P123). Content can move focus into its
|
|
198
|
-
(`focus()` and the like) while the person types in the host's page, and receive the keys
|
|
199
|
-
after it
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
210
|
+
- **A display taking the keyboard** (accepted risk, P123, P149). Content can move focus into its
|
|
211
|
+
frame (`focus()` and the like) while the person types in the host's page, and receive the keys
|
|
212
|
+
typed after it, until the person sees their text stop appearing and clicks back. Browsers give a
|
|
213
|
+
host no way to prevent it, nor to tell such a move from the person's own click into the frame
|
|
214
|
+
(the host's page sees no press inside a cross-site frame). From 0.13 to 0.15 a guard took such
|
|
215
|
+
moves back on its best guess; the guess refused people's own clicks, and 0.16.0 removed it
|
|
216
|
+
(§7 "The keyboard"). The walls that hold regardless: content can't read the host's page, its
|
|
217
|
+
storage or another display, and can't move focus into a field of the host's.
|
|
218
|
+
- **A page asking at a moment it picks** (accepted risk, P149). No proof of a click is asked of a
|
|
219
|
+
host function but `copyText`: a page can call `sendPrompt`, `openLink`, `downloadFile`,
|
|
220
|
+
`comments.open`, `artifact.publish` or `assets.delete` as it loads or on a timer. Each still
|
|
221
|
+
ends at the person (a confirmation with the whole effect, or a composer that posts nothing by
|
|
222
|
+
itself), within a rate, and declines mute the display; so the cost is an interruption, which
|
|
223
|
+
the host may refuse or space out. The click check it replaces proved little (any click on the
|
|
224
|
+
host's page in the last 5 s passed it) and refused real clicks where the engine didn't pass the
|
|
225
|
+
activation up.
|
|
205
226
|
- **Wrong results.** A chart can plot the wrong numbers, and a report can say false things.
|
|
206
227
|
- **Malicious prompts.** A gated `sendPrompt` hands the host's confirm function the whole text (the
|
|
207
228
|
default dialog shows all of it); whether that text is hostile is not Porthole's call. Nor is text
|
|
@@ -240,7 +261,7 @@ Whatever the use:
|
|
|
240
261
|
- Draw a frame's fallback (what `frameFallback` words, or your own) from its `outcome` alone, never
|
|
241
262
|
from a message of your own reading off the frame's window: a `blocked` outcome is the word of a
|
|
242
263
|
page of Porthole's server, a gateway or your own pages, never of an opaque frame or of content in
|
|
243
|
-
a frame that speaks (P124, P125). For a served display
|
|
264
|
+
a frame that speaks (P124, P125). For a served display, that word is its
|
|
244
265
|
**door**'s (a page of Porthole's on the display's origin, framed hidden and opaque before the
|
|
245
266
|
content, which a same-scope sibling can't reach, P125); its content frame's own word is never
|
|
246
267
|
taken, and its silence is a `timeout`. A `blocked` before any frame (`sign-in`, `denied`,
|
|
@@ -289,25 +310,19 @@ Whatever the use:
|
|
|
289
310
|
shortcuts that write (an `r` that resolves, Cmd+Enter that posts) need it too (P137). That's the
|
|
290
311
|
host's duty: Porthole doesn't guarantee it.
|
|
291
312
|
- Know that a display can take the keyboard: a page calls `focus()` on its own input whenever it
|
|
292
|
-
likes (on Chromium and WebKit with no gesture), and what the person goes on typing goes to it
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
(
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
a fighting frame holds focus); and with a platform of your own, implement its focus guard
|
|
299
|
-
(`focused`, `onFocusTaken`, `focus`) or accept that a display can read what is typed beside it.
|
|
313
|
+
likes (on Chromium and WebKit with no gesture), and what the person goes on typing goes to it
|
|
314
|
+
until they click back. Nothing gives it back for them (§5, §7 "The keyboard"). Where a field
|
|
315
|
+
must never lose a key to a page, show no untrusted display beside it. Move focus into a display
|
|
316
|
+
yourself with `display.focus()`, and into your composer with `focusField(field)`, not the
|
|
317
|
+
field's own `focus()` (Firefox ignores that while a frame that takes focus back on its blur
|
|
318
|
+
holds it).
|
|
300
319
|
- Call `annotations.focusMark(id)` only as the person's key closes your view of that mark, and know
|
|
301
320
|
it can be dropped (P135, P137): one that has to wait while the frame finds its marks, or that the
|
|
302
321
|
frame takes more than 100 ms after you sent it because its page is busy, lands only if the focus
|
|
303
322
|
is in the frame by then, and in the normal flow it is on your `<body>`. Nothing says so. If
|
|
304
323
|
the focus is still on your body a moment later, the person hasn't moved on: `display.focus()`,
|
|
305
|
-
then `focusMark(id)` again. Look first: that move is yours,
|
|
306
|
-
|
|
307
|
-
page, use `display.focus()`: it tells the page's shell to pass the focus on (P136), and the frame's
|
|
308
|
-
own `focus()` stops at the shell, so a word that waits is dropped even after it. On Firefox,
|
|
309
|
-
`display.focus()` inside a key's own handler moves nothing: call it from a task (measured on a
|
|
310
|
-
nested page). Nothing leaks either way: the keyboard stays out of the page.
|
|
324
|
+
then `focusMark(id)` again. Look first: that move is yours, and a move after the person went on
|
|
325
|
+
to a button of yours takes the keyboard from them. Nothing leaks either way.
|
|
311
326
|
- List every app origin in `appOrigins` (`hostOrigins` in `/server`): only those may frame content,
|
|
312
327
|
only those are a frame's host (heard and told), and only those are checked against the content
|
|
313
328
|
domain for a shared site.
|
|
@@ -315,7 +330,7 @@ Whatever the use:
|
|
|
315
330
|
may then be an ancestor of your frames, above your own page, and is never their host. Your page
|
|
316
331
|
must still be the frame's parent: an outer page that frames content directly (with an address it
|
|
317
332
|
got from somewhere) is let in by the browser, but the frame takes nothing from it (no handshake,
|
|
318
|
-
no host function), Porthole's own pages
|
|
333
|
+
no host function), Porthole's own pages tell it nothing, and what it
|
|
319
334
|
can hear is the content's own word to its parent (`*`), which it must treat as untrusted. Your
|
|
320
335
|
app page's own `frame-ancestors` is yours to set; Porthole never sends it. Name exact origins of
|
|
321
336
|
that one product, and drop them when it stops framing you.
|
|
@@ -351,9 +366,9 @@ Whatever the use:
|
|
|
351
366
|
|
|
352
367
|
| Host function | Default gates |
|
|
353
368
|
| --- | --- |
|
|
354
|
-
| `sendPrompt` |
|
|
355
|
-
| `openLink` | a
|
|
356
|
-
| `downloadFile` | a
|
|
369
|
+
| `sendPrompt` | the host's confirmation, given the whole text; 30 a minute |
|
|
370
|
+
| `openLink` | a confirmation; http(s) only, no credentials in the URL; 30 a minute |
|
|
371
|
+
| `downloadFile` | a confirmation; 30 a minute |
|
|
357
372
|
| `copyText` | a gesture, 30 a minute; the host writes the clipboard |
|
|
358
373
|
| `callTool` | a confirmation, 30 a minute |
|
|
359
374
|
| `setModelContext` | 30 a minute, then the host's `show`: the person sees the whole update first |
|
|
@@ -403,9 +418,11 @@ Whatever the use:
|
|
|
403
418
|
in it for what it is, and characters that draw as a blank (a no-break space, the wide spaces)
|
|
404
419
|
pass, a few bits each, bounded by the length limit (P100, accepted). A host that opts out of
|
|
405
420
|
`show` (`withoutShow: true`) lets content write into the model's turns text nobody saw (S5).
|
|
406
|
-
- The host's gesture check reads its own page's
|
|
407
|
-
it, the check passes). A gesture shows a
|
|
408
|
-
clicked the host a moment before.
|
|
421
|
+
- The host's gesture check (`copyText`'s, and any a host names) reads its own page's
|
|
422
|
+
`navigator.userActivation` (in an engine without it, the check passes). A gesture shows a
|
|
423
|
+
moment of intent, not consent: the person may have clicked the host a moment before.
|
|
424
|
+
- No proof of a click is asked of `sendPrompt`, `openLink` or `downloadFile` (P149): a widget can
|
|
425
|
+
ask for one as it loads. The confirmation is the wall, the rate and the mute its bounds (§5).
|
|
409
426
|
- Availability ([§5](#5-out-of-scope)).
|
|
410
427
|
|
|
411
428
|
### S2. Live widgets: content that reads the host's data
|
|
@@ -489,48 +506,9 @@ encrypted into the path, since WebKit keeps no cookie in a frame (P083).
|
|
|
489
506
|
with `srcdoc` loads and runs (a page of the set with its own shell), and every other frame
|
|
490
507
|
(another site, another path of the origin, a scheme, an empty one) and plugin is removed: the
|
|
491
508
|
page's `frame-src` opens its version's path alone, which also governs every navigation of its
|
|
492
|
-
frames.
|
|
509
|
+
frames.
|
|
493
510
|
- With a per-request check (`authorize`), the host decides again on every request; a deny is a
|
|
494
511
|
403 that says `denied`.
|
|
495
|
-
- A nested page (`nested: true`, P111): the framed address answers Porthole's shell alone, its
|
|
496
|
-
script the only one its CSP runs, framing and fetching only the origin's sealed files' prefix.
|
|
497
|
-
**The shell's origin hosts nothing but the shell, its opaque page, the sealed files and status
|
|
498
|
-
pages** (P114, porthole#56): the shell, the page and its files are served on a label of the
|
|
499
|
-
scope's own, `porthole-<24 base32>` (`nestedLabelOf`), never on the scope's label, where its
|
|
500
|
-
other displays (inline and live widgets, MCP apps, artifacts that aren't nested) run agent-made
|
|
501
|
-
content with `allow-same-origin`. `/server` holds it: that label answers no clean address,
|
|
502
|
-
entry, asset, library, app or other display, and takes no other instance's ticket, cookie or
|
|
503
|
-
sealed address; the scope's label answers no nested page (its clean address goes on to the
|
|
504
|
-
shell's label with a one-time ticket); no host's naming makes a `porthole-` label. So no
|
|
505
|
-
content, of any scope, can read the shell's realm (its word to the host, the page's sealed
|
|
506
|
-
address) or drive it (`leak/served/nested-siblings.spec.ts`, negative control `shell-label`).
|
|
507
|
-
Porthole holds the shell to that label outside `/server` too (P121), for a content Worker of a
|
|
508
|
-
host's own: the host's mount refuses a nested page located on any other label before a frame
|
|
509
|
-
is made (a host error, `locate`; negative control `nested-host-label`), the shell frames
|
|
510
|
-
nothing and says nothing on any other origin, and `nestedShellResponse` and `frameShellScript`
|
|
511
|
-
refuse one. What else such a Worker serves on that label is its own (below).
|
|
512
|
-
The page is the shell's child, `sandbox="allow-scripts"` (never `allow-same-origin`, held by a
|
|
513
|
-
static check over every sandbox Porthole writes) and the same sandbox in its own CSP, so it is an
|
|
514
|
-
opaque origin in its frame and on a tab; it is loaded, and loads its files, at its sealed address
|
|
515
|
-
without a cookie, and its files then carry `Cross-Origin-Resource-Policy: cross-origin` and
|
|
516
|
-
`Access-Control-Allow-Origin: *` (an opaque page's own loads are cross-origin: the address is
|
|
517
|
-
the access, never the request's origin). So whoever holds a page's sealed address can read its
|
|
518
|
-
files from any origin, a page of their own included, until the address ends (an hour on its own,
|
|
519
|
-
P083): it is a bearer credential, as safe as it is unleaked. Porthole keeps it out of what it
|
|
520
|
-
says: no referrer goes with any load (`Referrer-Policy: no-referrer`, the shell's frame
|
|
521
|
-
`referrerpolicy="no-referrer"`), the host's reports name it as `./` (P083), and the shell's own
|
|
522
|
-
answer is `no-store`. The page itself can read it (its address) and so pass it on by any channel
|
|
523
|
-
it has, as it can pass on its files' bytes. The page has none of the origin's storage, and nothing
|
|
524
|
-
of the shell's realm: messages between them go by `postMessage`, the page's trusted by
|
|
525
|
-
`event.source`, and the shell drops what the page says in the shell's own namespace. Only the
|
|
526
|
-
shell (same-origin) renews the page's address; a module the page loaded keeps one that ends
|
|
527
|
-
within the hour. Every answer below the sealed prefix carries a CSP sandbox, never
|
|
528
|
-
`allow-same-origin` (a page's `allow-scripts`, every other file's runs nothing): a file opened on
|
|
529
|
-
a tab of its own (an SVG or XML file with a script) is opaque, never the shell's origin (negative
|
|
530
|
-
control `file-sandbox`). The sandbox refuses no worker (measured on the four engines): a nested
|
|
531
|
-
page's workers come from Blob URLs (a worker from its set's own script is refused by its opaque
|
|
532
|
-
origin, sandbox or not), and those load the set's scripts. Assets and Porthole's libraries aren't
|
|
533
|
-
served to a nested page yet.
|
|
534
512
|
|
|
535
513
|
**The host must**
|
|
536
514
|
|
|
@@ -544,11 +522,6 @@ encrypted into the path, since WebKit keeps no cookie in a frame (P083).
|
|
|
544
522
|
uncached (the default; `authorizeTtlSeconds` in the host kit) or call `content.forget(…)` when
|
|
545
523
|
revoking, or a cached answer holds for up to that long.
|
|
546
524
|
- Send the page's `frame-src`.
|
|
547
|
-
- With nested pages, route the shell's label (`porthole-<…>.<domain>`) to the content server as
|
|
548
|
-
every content label is (a wildcard needs nothing; a pattern of the host's own, `a-*`, must add
|
|
549
|
-
it). A content Worker of the host's own serves nested pages on that label alone, and nothing
|
|
550
|
-
else there (P114): Porthole refuses the shell anywhere else (P121), but can't see what else a
|
|
551
|
-
Worker of the host's own answers on it. Its page's and files' CSPs come from `nestedFileCsp`.
|
|
552
525
|
|
|
553
526
|
**Not guaranteed**
|
|
554
527
|
|
|
@@ -596,7 +569,7 @@ the attacker (c), and its readers are strangers.
|
|
|
596
569
|
- `authorize` is the host's takedown switch.
|
|
597
570
|
- An embedded document (P143, `Grant.embed`, only where the host set `embeds`): its answers say
|
|
598
571
|
`frame-ancestors *` for that session alone, never a reader's; it is anonymous, with no level or
|
|
599
|
-
user, an artifact's page
|
|
572
|
+
user, an artifact's page; its plan names no host, so it hears no one, Porthole
|
|
600
573
|
tells no parent anything, no capability or runtime host function runs, and no door is minted. The
|
|
601
574
|
flag is signed into the session and the sealed address. Every other session's answers are, byte
|
|
602
575
|
for byte, what the same server without `embeds` answers, while an embed session of the same
|
|
@@ -684,8 +657,8 @@ the attacker (c), and its readers are strangers.
|
|
|
684
657
|
are ignored. Served, the proxy's CSP comes from what the session carries, signed, never from a
|
|
685
658
|
message.
|
|
686
659
|
- The default gates are stricter than the spec's "MAY": `callTool` needs a confirmation and has a
|
|
687
|
-
rate (30 a minute), `sendPrompt` and `openLink` a
|
|
688
|
-
gesture check is the host's (the shell doesn't speak for an MCP view).
|
|
660
|
+
rate (30 a minute), `sendPrompt` and `openLink` a confirmation and the same rate. For a view,
|
|
661
|
+
a gesture check a host names is the host's alone (the shell doesn't speak for an MCP view).
|
|
689
662
|
|
|
690
663
|
**The host must**
|
|
691
664
|
|
|
@@ -796,7 +769,7 @@ can be handed to the display with the widest network.
|
|
|
796
769
|
|
|
797
770
|
**What sharing a scope costs, which Porthole does not stop** (the premise is a scope its author
|
|
798
771
|
controls — one person's artifact and its versions, one session's widgets — not a scope shared across
|
|
799
|
-
people who distrust each other). A scope's displays
|
|
772
|
+
people who distrust each other). A scope's displays share one origin and run
|
|
800
773
|
content there with `allow-same-origin`, so one reaches another's document (`top[i]`) and its storage.
|
|
801
774
|
P125 stops a sibling speaking Porthole's word for another display (its door says how loading went,
|
|
802
775
|
unreachably), but a sibling of the scope can still, against another display of it:
|
|
@@ -811,8 +784,8 @@ unreachably), but a sibling of the scope can still, against another display of i
|
|
|
811
784
|
- read a sandbox-proxy view's HTML once the host has sent it into the view.
|
|
812
785
|
|
|
813
786
|
These are the costs of putting displays an author controls in one scope. To deny them, put displays
|
|
814
|
-
that distrust each other in **different scopes** (different origins)
|
|
815
|
-
|
|
787
|
+
that distrust each other in **different scopes** (different origins): there is no other way since
|
|
788
|
+
0.16.0 removed nested pages (P149). What a sibling cannot do is forge Porthole's own
|
|
816
789
|
fallback (a sign-in prompt with a link out): that is the door's wall (P125).
|
|
817
790
|
|
|
818
791
|
## 7. The display layer and the app runtime
|
|
@@ -839,7 +812,7 @@ tab to sign in", "You can't open this anymore") with a link out of the page: UI
|
|
|
839
812
|
for the host's and Porthole's, which content must not be able to summon. A `blocked` comes from a
|
|
840
813
|
frame status (`porthole/notifications/frame-status`), and nothing in that message says who sent
|
|
841
814
|
it: Porthole's status pages are documents of the frame's own window and origin, as content is. So
|
|
842
|
-
the host takes one only where content can't have said it. **A served display
|
|
815
|
+
the host takes one only where content can't have said it. **A served display** (a
|
|
843
816
|
served shell, a page, a view through the sandbox proxy) is framed on its scope's origin, where the
|
|
844
817
|
scope's others run content with `allow-same-origin`: one of them reaches a new document there before
|
|
845
818
|
its first script runs and could speak for it, so **no frame status from its own frame is ever
|
|
@@ -847,11 +820,9 @@ taken** (each run, the first is dropped with one `frame-status` host error), and
|
|
|
847
820
|
`timeout`, never a fallback. Its word comes from its **door** instead (P125): a page of Porthole's
|
|
848
821
|
on the same origin, in a hidden opaque frame of the host's own (`sandbox="allow-scripts"`, no name,
|
|
849
822
|
`inert`, 0×0) that no content shares an origin with and no sandboxed sibling can navigate, taken
|
|
850
|
-
before the content frame is made — `open`, or `blocked` and why.
|
|
851
|
-
label of its own, P114) keeps the ordering rule (its runtime's word opens every document that holds
|
|
852
|
-
content). An **opaque frame**'s every status is the content's; a **url-mode app**'s is taken (S6).
|
|
823
|
+
before the content frame is made — `open`, or `blocked` and why. An **opaque frame**'s every status is the content's; a **url-mode app**'s is taken (S6).
|
|
853
824
|
|
|
854
|
-
This closes the audit of 2026-10-30 (P124-1): before P125, a served display
|
|
825
|
+
This closes the audit of 2026-10-30 (P124-1): before P125, a served display could
|
|
855
826
|
be spoken for by a same-scope sibling — the sibling reached a new document of its scope (`top[i]`,
|
|
856
827
|
same origin before the shell ran), posted a frame status taken as the run's first word, or stopped
|
|
857
828
|
or rewrote it so its silence read as `framing`, or reloaded a running one into a new run it spoke
|
|
@@ -861,7 +832,7 @@ P124-2 is closed too: a file set's entry must be a page (`.html`/`.htm`; `checkF
|
|
|
861
832
|
`admitFiles`, `lintFiles` refuse another), and a set stored before that rule answers Porthole's
|
|
862
833
|
`not-found` status page — the door says `not-found`, never an inert file that says nothing.
|
|
863
834
|
|
|
864
|
-
The known costs that remain are the costs of sharing a scope (S7). A served
|
|
835
|
+
The known costs that remain are the costs of sharing a scope (S7). A served location
|
|
865
836
|
without a door (a server older than the host, a locator that drops it, a clean address framed as it
|
|
866
837
|
is) is refused before any frame: `blocked: locate` and a `door` host error (P125). A clean address
|
|
867
838
|
is for a tab: in a frame the content origin answers it with a page that has no script and goes
|
|
@@ -871,15 +842,14 @@ found) is the display's outcome with no frame built. P125 also records why no ti
|
|
|
871
842
|
in for that: a `load` event is not a committed document (DECISIONS P125).
|
|
872
843
|
|
|
873
844
|
**Annotations** (`annotate`, P053, P104, P107). The shell that draws marks and reports anchors shares
|
|
874
|
-
its realm with the content
|
|
875
|
-
own frame, below the shell, P111), so:
|
|
845
|
+
its realm with the content, so:
|
|
876
846
|
|
|
877
847
|
- *What content learns.* Everything the host sends in a `show` is posted into the frame's window,
|
|
878
848
|
where the content can listen: each mark's id, anchor and, where given, `count` (the number on
|
|
879
849
|
its marker). A host gives ids that say nothing (never a person's name or a comment's words), and
|
|
880
850
|
a count only where the page may know how many there are. Who commented and what they wrote stay
|
|
881
|
-
in the host's own UI, outside the frame, and so does what the person types there,
|
|
882
|
-
keyboard
|
|
851
|
+
in the host's own UI, outside the frame, and so does what the person types there, unless a
|
|
852
|
+
page takes the keyboard meanwhile ("The keyboard" below).
|
|
883
853
|
- *Drafts* (P107). A mark with `kind: "draft"` (a comment its author hasn't posted) is drawn apart,
|
|
884
854
|
a dashed line and a hollow marker with no number, so the page also learns which of its marks are
|
|
885
855
|
drafts: that the person viewing it is writing a comment there, before they post it. That is new
|
|
@@ -907,15 +877,12 @@ own frame, below the shell, P111), so:
|
|
|
907
877
|
P107), without a click on it and with any box. It can draw look-alike markers, or lay its own elements over Porthole's.
|
|
908
878
|
The host takes each report only for what it asked for and its own shown ids, rebuilt within
|
|
909
879
|
`ANNOTATION_LIMITS`, at 120 a minute; `activated` for a mark without a marker, or an id it
|
|
910
|
-
doesn't show, is dropped (negative control `annotation-activated`).
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
person's own press in the content lands under their pointer. The guard on the host's view (§6) is
|
|
917
|
-
the defence, not this. Where the platform can't tell (a custom one whose `userActivation()`
|
|
918
|
-
answers undefined), the report passes, as the gesture gate does.
|
|
880
|
+
doesn't show, is dropped (negative control `annotation-activated`). No proof of a gesture is
|
|
881
|
+
asked of it (0.16.0, P149; from 0.10 to 0.15, P105 took one only while the host's page had
|
|
882
|
+
transient user activation, which lasts 5 s after any gesture anywhere on the page, so a fake
|
|
883
|
+
posted on a timer or a scroll passed anyway): a page can open the host's view for one of its
|
|
884
|
+
shown marks at any moment, and one posted on the person's own press in the content lands under
|
|
885
|
+
their pointer. The guard on the host's view (§6) is the defence.
|
|
919
886
|
- *Labels.* An anchor's `label` is the page's text: the words selected, or an element's own words,
|
|
920
887
|
else its `alt`, `aria-label` or `title`, which the person never sees on the page. The host takes
|
|
921
888
|
out of every label everything a person can't see (every format character, bidi controls and
|
|
@@ -990,7 +957,7 @@ own frame, below the shell, P111), so:
|
|
|
990
957
|
its own tab stop, and tell that the person is on one (`document.activeElement` is the layer, its
|
|
991
958
|
own element's `focusout` names it). None of that gives it what it lacks: a marker's press has no
|
|
992
959
|
power but `activated`, which it can fake anyway within the host's checks, keys go to a marker only
|
|
993
|
-
while the frame has the focus, so nothing typed in the host passes through it
|
|
960
|
+
while the frame has the focus, so nothing typed in the host passes through it,
|
|
994
961
|
and a page's made-up key or `click()` is no trusted click. Assistive technology now reads the
|
|
995
962
|
marker's name, the page's own words after the shell's, in quotes that bound nothing (P134: a
|
|
996
963
|
text anchor's `label`, an element's quote, or what follows the tag in its `label`). A host can't
|
|
@@ -1000,8 +967,8 @@ own frame, below the shell, P111), so:
|
|
|
1000
967
|
the page's word. A host reads its own page instead, as the report arrives: is the frame element
|
|
1001
968
|
`document.activeElement`? The page can't fake that reading, and that is all it gets. It tells that
|
|
1002
969
|
the focus is in the frame, not that a key was pressed: a pointer's click after the person was
|
|
1003
|
-
in the frame reads the same, and the page can move the focus into its frame itself, from
|
|
1004
|
-
|
|
970
|
+
in the frame reads the same, and the page can move the focus into its frame itself, from
|
|
971
|
+
anywhere (nothing takes such a move back, P149). **The page can still forge
|
|
1005
972
|
`activated` while the person really is in the frame, and this signal doesn't stop that.** A host
|
|
1006
973
|
that moves the keyboard into its view on the signal takes §6's second exception, with its
|
|
1007
974
|
conditions: a page can put the person's next keys in that view, and keeping those keys from posting
|
|
@@ -1013,15 +980,12 @@ own frame, below the shell, P111), so:
|
|
|
1013
980
|
`marker-focus`: a page that replaced it is handed the marker otherwise); with no such marker it does
|
|
1014
981
|
nothing. The page reads the message, so it learns a card closed, and can take the focus back at once
|
|
1015
982
|
or forge the message and focus a marker itself, which gives it nothing a fake `activated` doesn't:
|
|
1016
|
-
a host can't rely on the focus landing.
|
|
1017
|
-
host's text field that still has focus it is undone and counted (P109), not passed as the host's:
|
|
1018
|
-
no window was opened in the guard for it.
|
|
983
|
+
a host can't rely on the focus landing.
|
|
1019
984
|
A word that has to wait while the frame finds its marks is up to a second old when it could land
|
|
1020
985
|
(P135). A word the shell doesn't park can be as old: the frame takes it when its thread is free, a
|
|
1021
986
|
busy page changes nothing the shell can see, and a frame out of process doesn't stop the host's
|
|
1022
987
|
page meanwhile (P137). A marker's `focus()` takes the keyboard with no gesture on Chromium and
|
|
1023
|
-
WebKit
|
|
1024
|
-
pulled back. So the shell drops a parked word unless the focus is in its document as it lands, and
|
|
988
|
+
WebKit: a person gone on to a host's button would be pulled back. So the shell drops a parked word unless the focus is in its document as it lands, and
|
|
1025
989
|
a word older than 100 ms unless the focus is there as it comes, by `hasFocus` as it was before
|
|
1026
990
|
content ran (control `marker-has-focus`: a page that replaced it to say yes gets the landing
|
|
1027
991
|
otherwise; `marker-late` takes the first test out, `marker-busy` the second). A word's age is the
|
|
@@ -1102,11 +1066,13 @@ read and rewrite). It shares its realm with the content, so:
|
|
|
1102
1066
|
the browser's find on Cmd+F (Apple) or Ctrl+F (elsewhere) in the frame and says `requested`; a
|
|
1103
1067
|
page that handles the key itself keeps it. The page can say `requested` without the key, or keep
|
|
1104
1068
|
the key from the shell. The host takes it only while the platform says the page's focus is in
|
|
1105
|
-
the frame (
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1069
|
+
the frame (control `find-requested-focus`): a page that hasn't the keyboard can't open the
|
|
1070
|
+
host's bar, which takes focus, while the person types in the host's composer, so their next
|
|
1071
|
+
keys aren't steered into the bar and from there into the frame as queries. That holds where a
|
|
1072
|
+
page can't take the keyboard by itself (Firefox, without the person's gesture); on Chromium and
|
|
1073
|
+
WebKit a page takes it first ("The keyboard" below), and then has the keys anyway. A real
|
|
1074
|
+
press of the shortcut is always in the frame, so the rule refuses none. Where a platform can't
|
|
1075
|
+
tell, it passes. Open the bar, nothing more.
|
|
1110
1076
|
- *What content can always do.* Hide, cover or move the layer, change its words so the count
|
|
1111
1077
|
changes, reach the layer through built-ins it patched (as annotations' layer, P105), or make the
|
|
1112
1078
|
search dear: linear in its text, at most 1,000 matches kept and 10,000 looked at, a query of 256
|
|
@@ -1114,124 +1080,34 @@ read and rewrite). It shares its realm with the content, so:
|
|
|
1114
1080
|
queries only the latest searched (the others answered superseded); in an opaque frame that
|
|
1115
1081
|
shares the host's process that time is the host's too ([§5](#5-out-of-scope)).
|
|
1116
1082
|
|
|
1117
|
-
**The keyboard** (P109). Any display, of any kind and any version, can move the keyboard
|
|
1118
|
-
frame: `element.focus()` runs in the content's realm, where nothing of Porthole can stop
|
|
1119
|
-
Chromium and WebKit it needs no gesture. What the person goes on typing then goes to the
|
|
1120
|
-
which can keep it (`db`) or send it out through any egress it has
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
person, and not just after a press on the host's page (the app runtime, below).
|
|
1146
|
-
- *What doesn't*: a page gets the keys typed before focus is back (on Firefox, the keys of an
|
|
1147
|
-
animation frame: one in a sentence, measured on a slowed machine too; a few more can be lost to
|
|
1148
|
-
nothing while a take-back is fought, and the composer then has focus again); on Firefox a host's plain
|
|
1149
|
-
`focus()` doesn't move focus from a frame that holds it with the person's gesture and takes it
|
|
1150
|
-
back on its blur (no focus event: the keys go to the frame), so a composer that opens focused
|
|
1151
|
-
must use `focusField`; on Firefox a page keeps the keyboard if the pointer came over its frame after
|
|
1152
|
-
the person last typed and after the field got focus (a person who typed, moved the pointer over
|
|
1153
|
-
the frame, and types on without clicking); moves between two frames, or from what isn't a text
|
|
1154
|
-
field, aren't judged (a frame beside another: S7); and a platform of the host's own has no guard
|
|
1155
|
-
unless it implements one. The guard can take a person's own move for the page's (a press on
|
|
1156
|
-
Firefox with the pointer resting over the frame since before the field got focus; an assistive
|
|
1157
|
-
technology's activation within 5 s of their key or press on the page): focus goes back, and
|
|
1158
|
-
their next press once the pointer has left the frame and come back, a Tab, or an activation 5 s
|
|
1159
|
-
later keeps it.
|
|
1160
|
-
- *Full Chromium* (P111, measured on Chromium 153, not the headless shell): a cross-site frame is
|
|
1161
|
-
out of process, and the host's page sees nothing of a press in it (no `:active`, no `:hover`, no
|
|
1162
|
-
pointer event past the frame's edge). For a served page that isn't nested, a person's real click
|
|
1163
|
-
into its field is taken back every time there (the display stopped at the third), and
|
|
1164
|
-
`comments.open` from a real click is refused within 5 s of any input on the host's page
|
|
1165
|
-
(porthole#53). Nest it.
|
|
1166
|
-
- *A nested page* (P111, P120, P122): the guard asks the page's shell, a realm the page can't
|
|
1167
|
-
reach above its frame, whose transient activation turns on only from a press or key in the page
|
|
1168
|
-
(activation goes up, never down). A move into the frame is the person's if the shell's
|
|
1169
|
-
activation turned on within the last second and the host's page had no trusted press or key
|
|
1170
|
-
since; or a Tab, the host's own move, or a press the engine shows on the frame element. Nothing
|
|
1171
|
-
else counts as a press: no pointer over the frame, no host-wide activation. A move the shell
|
|
1172
|
-
hasn't spoken of yet waits for its word at most 500 ms (the host asks it to look at once,
|
|
1173
|
-
`porthole/shell/look`), then is taken back. The shell passes a focus on to the page by the host's
|
|
1174
|
-
word (`porthole/shell/focus`, P136), which only `display.focus()` sends and no page can say. A key the person types into the page turns its
|
|
1175
|
-
activation on as a press does, so (P120, after the audit of P111's guard, NG-1): where the
|
|
1176
|
-
host's page sees the pointer over its frames (Firefox; Chromium and WebKit where the frame is in
|
|
1177
|
-
their process, once the pointer has been over one), an activation while the pointer isn't over
|
|
1178
|
-
the frame, within a second of the person typing on the host's page, is no press; and in a fight
|
|
1179
|
-
over a text field (a take-back, or the person leaving a frame that took focus itself), a frame
|
|
1180
|
-
that takes focus again is judged as any frame is, its shell not asked: taken back at once and
|
|
1181
|
-
counted, and an activation it reports then is no one's gesture until it lapses, for
|
|
1182
|
-
`comments.open` too. Measured on full Chromium, the headless shell, WebKit and Firefox
|
|
1183
|
-
(`leak/served/nested.spec.ts`): a real click into the page's field keeps the keyboard; the
|
|
1184
|
-
page's `focus()` as it loads, on a timer while the person types, right after a click on the
|
|
1185
|
-
host's own button, 1.2 to 4.5 s after the person paused typing, and 700 ms after they pressed it
|
|
1186
|
-
and went back to the composer is taken back; a page that holds the keyboard from its load, or
|
|
1187
|
-
takes it while the person types, and takes it back on its own blur gets at most two keys of a
|
|
1188
|
-
sentence on Firefox and is stopped (none on Chromium, where a page can't take focus back on its
|
|
1189
|
-
blur), and its `comments.open` on a key it got reaches no handler on Firefox and full Chromium
|
|
1190
|
-
(on Chromium with frames in process it can: below); what a page says in the shell's name, to its
|
|
1191
|
-
parent or to the host's window, moves nothing (negative controls `shell-namespace`,
|
|
1192
|
-
`shell-host-input`, `pointer-rule`, `nested-fight`). A press in the page within 5 s of the last
|
|
1193
|
-
gesture turns no activation on; the page's runtime tells the shell each real press instead
|
|
1194
|
-
(P148), over a port no content holds, and the host takes a press told as it takes an activation
|
|
1195
|
-
turning on: for a second, with no press or key on the host's page since, not in a fight, not
|
|
1196
|
-
within 250 ms of the person's key, not within 500 ms of a stall of the shell. A press is the
|
|
1197
|
-
browser's own event alone (a mouse down; a finger or pen up, so a scroll is none; Enter or Space,
|
|
1198
|
-
not held, on a native control that isn't editable, by its tag and never its `role`; a click on
|
|
1199
|
-
one, but none while a key is down, nor a form's own for Enter in a field); nothing a page
|
|
1200
|
-
dispatches is one, and
|
|
1201
|
-
nothing a page does gets it the port (`leak/served/nested-press.spec.ts`; negative controls
|
|
1202
|
-
`press-untrusted`, `press-role`, `press-editable`, `press-repeat`, `press-key-click`,
|
|
1203
|
-
`press-submit`,
|
|
1204
|
-
`press-touch-down`, `press-port-heard`, `press-port-forged`, `press-open-lock`,
|
|
1205
|
-
`press-still-here`, `press-host-input`). *What doesn't*: a key on a control that isn't native
|
|
1206
|
-
(a `div` with `role="button"`) tells nothing, so a move into the page by it within 5 s of the
|
|
1207
|
-
last gesture is still taken back, until they Tab in; so is any press where the runtime couldn't
|
|
1208
|
-
install its part; the page gets the keys typed while a move waits for the shell's word, or
|
|
1209
|
-
before focus is back. No press of the person's comes within 250 ms of a key they typed on the host's page (a
|
|
1210
|
-
hand goes from the keys to the pointer first): a move into the frame, or the shell's activation
|
|
1211
|
-
turning on, that soon is their next key landing in the page, and is taken back, on every engine
|
|
1212
|
-
(P122, after CI saw full Chromium let such a page keep the keyboard: its key outran the shell's
|
|
1213
|
-
answer; negative control `key-press`). So a page that takes the keyboard while the person types
|
|
1214
|
-
is taken back whatever the timing. *Still*: on full Chromium, where neither the host's page nor
|
|
1215
|
-
the shell sees the pointer over the page, a key typed more than 250 ms after the person's last
|
|
1216
|
-
one that reaches the page before the shell answers the host's ask (the time a message takes
|
|
1217
|
-
between processes) is taken for a press, and the page keeps the keyboard and its `comments.open`
|
|
1218
|
-
opens; and so, more often, where Chromium keeps the page's frames in the host's process (the
|
|
1219
|
-
headless shell; a person's Chrome without full site isolation, Chrome on Android) until the
|
|
1220
|
-
host's page has seen the pointer over one of the page's frames, since the page's input runs
|
|
1221
|
-
before the ask there (measured in P122's review on the headless shell: a person typing one key
|
|
1222
|
-
every 450 ms lost 34 of 36 keys to the page in 1 run of 8, and the page was not stopped). 0.13 took such a move back; a person typing slower than one key in 250 ms
|
|
1223
|
-
is the case left, and only a key that lands within that message's time of the page's move
|
|
1224
|
-
(P122); a press back into the page within 300 ms of a fight putting focus in the host's field is
|
|
1225
|
-
taken back on full Chromium; where the pointer is seen, an assistive technology's activation in
|
|
1226
|
-
the page within a second of typing on the host's page with the pointer elsewhere is taken back
|
|
1227
|
-
(a Tab, or one a second later, keeps it); a shell without `navigator.userActivation` leaves
|
|
1228
|
-
0.13's rule. A page that holds the thread it shares with its shell (WebKit; Firefox and Chromium
|
|
1229
|
-
where the frames share a process) from its own click handler would push the moment the shell
|
|
1230
|
-
sees its activation past the person's next keys on the host's page: so the shell looks and beats
|
|
1231
|
-
every 50 ms and says how long it went without a look, and an activation it reports after a stall
|
|
1232
|
-
of over 100 ms (its own, or no word heard) is no one's gesture until it lapses (P111, after its
|
|
1233
|
-
review; negative control `shell-stall`). The cost: in those engines a page that keeps its thread
|
|
1234
|
-
busy has the person's real click taken for uncertain until it is idle.
|
|
1083
|
+
**The keyboard** (P109, P149). Any display, of any kind and any version, can move the keyboard
|
|
1084
|
+
into its frame: `element.focus()` runs in the content's realm, where nothing of Porthole can stop
|
|
1085
|
+
it, and on Chromium and WebKit it needs no gesture. What the person goes on typing then goes to the
|
|
1086
|
+
page, which can keep it (`db`) or send it out through any egress it has, until the person sees
|
|
1087
|
+
their words stop appearing and clicks back. The page knows when it matters: its shell reports
|
|
1088
|
+
`selected` when the host opens a composer on it, and draft marks (P107) say where the person is
|
|
1089
|
+
writing. P107 and P108 didn't make this possible; they put the person's unposted words beside the
|
|
1090
|
+
frame and tell the page when.
|
|
1091
|
+
|
|
1092
|
+
- *Nothing takes it back* (0.16.0, P149). From 0.13 to 0.15 `createHost` guarded every display
|
|
1093
|
+
(P109): a move of the keyboard from one of the host's text fields into a frame was undone unless
|
|
1094
|
+
the guard judged it the person's own. It had to guess. The host's page sees no press inside a
|
|
1095
|
+
cross-site frame on full Chromium (the frame is out of process) nor on Firefox, so the guard
|
|
1096
|
+
read what it could (`:active`, the pointer's place, the time since the person's last key, and
|
|
1097
|
+
for a nested page its shell's word on its activation, then on its presses: P111, P120, P122,
|
|
1098
|
+
P148), and each rule refused some real clicks while a page could still pass for the person
|
|
1099
|
+
where the signals ran out (a key typed slower than 250 ms apart, P123). A wall that guesses is
|
|
1100
|
+
no wall, and its wrong guesses were the person's own clicks refused; it is gone, with the
|
|
1101
|
+
nested pages built to feed it.
|
|
1102
|
+
- *What holds without it.* Content can't read the host's page or its fields, can't move focus
|
|
1103
|
+
into a field of the host's, and gets no key typed while the focus is in the host's page. A page
|
|
1104
|
+
that takes the keyboard gets the keys typed after its move and before the person notices: what
|
|
1105
|
+
they meant for the host's composer, not what is already in it.
|
|
1106
|
+
- *What a host does.* Shows no untrusted display beside a field that must never lose a key (a
|
|
1107
|
+
password, a payment field); opens the views a display's report asks for without focus (§6);
|
|
1108
|
+
and moves focus itself with `display.focus()` and `focusField(field)`, which land on every
|
|
1109
|
+
engine (Firefox ignores a field's plain `focus()` while a frame that takes focus back on its
|
|
1110
|
+
blur holds it).
|
|
1235
1111
|
|
|
1236
1112
|
### The app runtime
|
|
1237
1113
|
|
|
@@ -1254,8 +1130,9 @@ section.
|
|
|
1254
1130
|
declarations allow (P093).
|
|
1255
1131
|
- `db`: another person's `data/users/<id>` is refused at every level; `me` is the host's id for
|
|
1256
1132
|
the viewer, and paths in answers say `data/users/me`, never that id.
|
|
1257
|
-
- What changes the artifact for everyone needs, by default, a
|
|
1258
|
-
`artifact.publish` and `assets.delete` (a host's `methodGates` for them replace
|
|
1133
|
+
- What changes the artifact for everyone needs, by default, a confirmation with its whole effect:
|
|
1134
|
+
`artifact.publish` and `assets.delete` (a host's `methodGates` for them replace this; no proof
|
|
1135
|
+
of a click is asked since 0.16.0, P149).
|
|
1259
1136
|
- A `db.batch` runs under the gates of each of its writes, and a `db.watch` under those of `get`
|
|
1260
1137
|
or `query`, as well as their own; a batch that needs a confirmation is confirmed once, whole
|
|
1261
1138
|
(P094).
|
|
@@ -1264,15 +1141,11 @@ section.
|
|
|
1264
1141
|
code-typed asset runs as code only when an admin uploaded it where uploaded code may run, and
|
|
1265
1142
|
only while the config still lets uploaded code run, asked at every load, in bearer mode too
|
|
1266
1143
|
(where every artifact config must; P103); anything else is a download.
|
|
1267
|
-
- `comments` is write-only: the page learns only whether the composer opened. It
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
click on the page's button a moment after typing in the host's composer opens it, on full
|
|
1273
|
-
Chromium too (porthole#53); with no click it is refused, whatever the page says in the shell's
|
|
1274
|
-
name, and so is one on a key of the person's that reached the page while it fought for the
|
|
1275
|
-
keyboard, or, where the host's page sees the pointer, while the pointer was elsewhere (P120). A
|
|
1144
|
+
- `comments` is write-only: the page learns only whether the composer opened. It reaches the
|
|
1145
|
+
host's handler whenever the page calls it, at most 30 times a minute; no proof of a click is
|
|
1146
|
+
asked (0.16.0, P149; from 0.13 to 0.15 it needed a gesture with the host page's focus in the
|
|
1147
|
+
calling frame, P109, which refused real clicks wherever the guess at that focus was wrong).
|
|
1148
|
+
Whether the composer opens is the host's handler's answer. A
|
|
1276
1149
|
draft it gives (P108) is at most 2,000 characters of text a person can
|
|
1277
1150
|
see (P109): nothing invisible (zero-width characters, bidi and tag characters, controls but a
|
|
1278
1151
|
new line and a tab; U+200C and U+200D only between two letters or marks, where Persian and the
|
|
@@ -1331,22 +1204,22 @@ section.
|
|
|
1331
1204
|
- In bearer mode, assets are served by id alone, without the host's check.
|
|
1332
1205
|
- A draft is the page's words in the person's composer: a person who posts it without reading
|
|
1333
1206
|
posts what the page chose, and an agent that reads the comment takes it as theirs. Porthole
|
|
1334
|
-
bounds what can hide in it (visible text, 2,000 characters) and
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
composer on the person's own press in its frame, at a moment it chooses (the second click of a
|
|
1338
|
-
double click, a field it asked them to type into): the composer's duties above are the bound.
|
|
1207
|
+
bounds what can hide in it (visible text, 2,000 characters) and how often it is asked (30 a
|
|
1208
|
+
minute); reading it is the person's. A page opens the composer at a moment it chooses, with a
|
|
1209
|
+
press of the person's or with none (P149): the composer's duties above are the bound.
|
|
1339
1210
|
|
|
1340
1211
|
## 8. Fixes in flight
|
|
1341
1212
|
|
|
1342
1213
|
The decisions below come from the 2026-10-19 review, and all of them have merged. Each row says
|
|
1343
1214
|
what was wrong, what holds now, and the limit its decision accepts, if any. Later reviews' decisions
|
|
1344
1215
|
are in the status line and in DECISIONS.md: P105 (after the review of P104), P109 (after the review
|
|
1345
|
-
of 0.12.0's drafts), P111 (a nested page
|
|
1346
|
-
its own, after porthole#56; in 0.14.1), P124 (a frame
|
|
1347
|
-
the audit raft-security-audit#16; in 0.14.5: §4,
|
|
1348
|
-
|
|
1349
|
-
found P124 held only for a
|
|
1216
|
+
of 0.12.0's drafts), P111 (a nested page; in 0.14.0, removed in 0.16.0), P114 (a nested page's
|
|
1217
|
+
shell on a label of its own, after porthole#56; in 0.14.1, removed in 0.16.0), P124 (a frame
|
|
1218
|
+
status is the word of Porthole's pages, after the audit raft-security-audit#16; in 0.14.5: §4,
|
|
1219
|
+
§6, §7, S6), P125 (a served display takes its word from a door no same-scope content can reach,
|
|
1220
|
+
after the audit of 2026-10-30 found P124 held only for a display alone in its scope; in 0.14.6:
|
|
1221
|
+
§4, §6, §7, S7), P149 (what guessed at the person's intent is taken out: nested pages, the focus
|
|
1222
|
+
guard, the proof of a click but `copyText`'s; in 0.16.0: the status line, §5, §6, §7).
|
|
1350
1223
|
|
|
1351
1224
|
| Decision | State | What it closes | Sections |
|
|
1352
1225
|
| --- | --- | --- | --- |
|