@botiverse/porthole 0.14.5 → 0.14.6
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 +53 -0
- package/dist/check/page-source.js +1 -1
- package/dist/check/page.js +5 -1
- package/dist/compile/policy.d.ts +6 -0
- package/dist/compile/policy.js +6 -0
- package/dist/conformance/entry.d.ts +25 -6
- package/dist/conformance/entry.js +69 -18
- package/dist/conformance/harness/page.d.ts +12 -0
- package/dist/conformance/harness/page.js +95 -51
- package/dist/conformance/harness-source.js +1 -1
- package/dist/conformance/host-kit.js +39 -13
- package/dist/conformance/served.js +140 -0
- package/dist/files/paths.d.ts +2 -2
- package/dist/files/paths.js +12 -2
- package/dist/host/client.d.ts +8 -0
- package/dist/host/client.js +47 -17
- package/dist/host/create-host.d.ts +10 -0
- package/dist/host/create-host.js +124 -10
- package/dist/host/door.d.ts +41 -0
- package/dist/host/door.js +55 -0
- package/dist/host/locate.js +2 -0
- package/dist/host/locator.d.ts +55 -3
- package/dist/host/locator.js +152 -42
- package/dist/host/outcome.d.ts +54 -1
- package/dist/host/outcome.js +33 -8
- package/dist/host/types.d.ts +10 -2
- package/dist/isolation/served.d.ts +1 -1
- package/dist/isolation/served.js +35 -0
- package/dist/isolation/types.d.ts +20 -2
- package/dist/isolation/types.js +2 -0
- package/dist/platform/types.d.ts +22 -0
- package/dist/platform/web.js +55 -12
- package/dist/react/view.d.ts +13 -0
- package/dist/react/view.js +101 -2
- package/dist/server/files.d.ts +11 -0
- package/dist/server/files.js +26 -4
- package/dist/server/host.js +106 -28
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +6 -1
- package/dist/server/pages.d.ts +32 -0
- package/dist/server/pages.js +82 -6
- package/dist/server/server.js +140 -11
- package/dist/server/types.d.ts +15 -1
- package/dist/transport/post-message.d.ts +1 -9
- package/dist/transport/post-message.js +2 -8
- package/docs/ADOPTING.md +57 -4
- package/docs/DECISIONS.md +198 -0
- package/docs/DESIGN.md +24 -18
- package/docs/THREAT_MODEL.md +79 -13
- package/package.json +1 -1
- package/src/check/page.ts +6 -1
- package/src/compile/policy.ts +7 -0
- package/src/conformance/entry.ts +129 -24
- package/src/conformance/harness/page.ts +112 -49
- package/src/conformance/host-kit.ts +53 -16
- package/src/conformance/served.ts +175 -0
- package/src/files/paths.ts +11 -2
- package/src/host/client.ts +59 -22
- package/src/host/create-host.ts +144 -18
- package/src/host/door.ts +97 -0
- package/src/host/locate.ts +2 -0
- package/src/host/locator.ts +208 -57
- package/src/host/outcome.ts +41 -9
- package/src/host/types.ts +10 -2
- package/src/isolation/served.ts +40 -1
- package/src/isolation/types.ts +19 -2
- package/src/platform/types.ts +21 -0
- package/src/platform/web.ts +55 -20
- package/src/react/view.tsx +149 -2
- package/src/server/files.ts +37 -5
- package/src/server/host.ts +131 -46
- package/src/server/index.ts +6 -1
- package/src/server/pages.ts +101 -6
- package/src/server/server.ts +186 -19
- package/src/server/types.ts +16 -1
- package/src/transport/post-message.ts +1 -9
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,59 @@
|
|
|
4
4
|
section); the reasons for every change are in [docs/DECISIONS.md](docs/DECISIONS.md), by the
|
|
5
5
|
P-numbers below.
|
|
6
6
|
|
|
7
|
+
## 0.14.6
|
|
8
|
+
|
|
9
|
+
- **Every display ends with an outcome (P125):** a frame started again until its restarts ran out
|
|
10
|
+
is `blocked: error` (it had no outcome at all: an empty box), and restarts no longer start its
|
|
11
|
+
load timeout again — `loadTimeoutMs` covers a loading episode, from its first run until an
|
|
12
|
+
outcome (an outcome or `reload()` begins the next).
|
|
13
|
+
- **Security (P125, after the audit of 2026-10-30):** a served display that isn't nested (a served
|
|
14
|
+
shell, a page, a view through the sandbox proxy) now takes how loading went from a **door** — a
|
|
15
|
+
page of Porthole's on the display's origin, framed hidden and opaque by the host before the
|
|
16
|
+
content, that no same-scope content can reach — not from its own frame. This closes the audit's
|
|
17
|
+
P124-1: a scope's displays share one origin, so a same-scope sibling could reach another
|
|
18
|
+
display's first document before its shell ran and speak Porthole's word for it (a forged sign-in
|
|
19
|
+
with a link out), or silence it into `framing`, or reload it into a run it spoke first in. The
|
|
20
|
+
door decides (`open`, or `blocked` and why); the content frame's own frame status is never taken
|
|
21
|
+
(one `frame-status` host error a run), and its silence is a `timeout`, never a fallback. Nested
|
|
22
|
+
pages, url mode and opaque frames are unchanged.
|
|
23
|
+
- **Server/host contract:** `issue` returns `FrameLocation.door` and `/server` serves
|
|
24
|
+
`/__porthole/door/<key>` for those kinds (`doorResponse`, `doorStatusResponse`, `DOOR_PATH`
|
|
25
|
+
exported for a host's own content Worker). Additive: an old host ignores `door`. A **new** host
|
|
26
|
+
given a served non-nested location **without** a door is strict (no frame status taken, a block
|
|
27
|
+
shows as a timeout) and raises a `hostError` of a new kind `"door"`. **Deploy the server/Worker
|
|
28
|
+
before the host**, and a custom locator must pass `door` through.
|
|
29
|
+
- **A file set's entry must be a page** (P124-2): `checkFileSet`, `admitFiles` and `lintFiles`
|
|
30
|
+
refuse an entry that isn't `.html`/`.htm` (code `entry`); a set stored before this answers
|
|
31
|
+
Porthole's `not-found` status page, and the door says `not-found`.
|
|
32
|
+
- **Before any frame, the host asks `issue`** (P125): blocked or allowed is said by the door or by
|
|
33
|
+
the host's own issue endpoint, never by a frame. A refusal from the frame route is now the
|
|
34
|
+
display's outcome with no frame built: 401 `blocked: sign-in`, 403 `blocked: denied` (with the
|
|
35
|
+
host's code from an optional, additive `error.reason`), 404 `blocked: not-found`, with no
|
|
36
|
+
`locate` host error; any other failure stays `blocked: locate`; a backend that never answers is
|
|
37
|
+
a `timeout`. This holds for every locate.
|
|
38
|
+
- **Migration (no grace release): a clean address is for a top-level tab.** `createHost` refuses
|
|
39
|
+
a served non-nested location without a door before any frame (`blocked: locate`, `door` host
|
|
40
|
+
error), which replaces 0.14.5-P125's "frame it strict and time out" and covers both an old
|
|
41
|
+
server and a clean address framed as it is. To frame what a clean address names, resolve it:
|
|
42
|
+
`client.resolve(address)` or `<PortholeView address>` (the issue endpoint takes `{ address }`
|
|
43
|
+
and answers `{ ...location, instance }`). In a frame the content origin answers a clean address
|
|
44
|
+
(and the app's authorize route answers itself) with a page that has no script and goes nowhere:
|
|
45
|
+
P068's in-frame sign-in page and the transport's host-origin channel (`also`) are removed. A
|
|
46
|
+
locator must issue anew for every run: a reused location's door says `blocked: session`, and
|
|
47
|
+
`createHost` raises a `locate` host error naming the fix.
|
|
48
|
+
- A `PlatformHost` of a host's own must give `createDoor` (delegate to `webPlatform.createDoor`):
|
|
49
|
+
without doors no served non-nested display is framed (`/check`'s own platform now does).
|
|
50
|
+
A refusal maps to an outcome only in the issue endpoint's own shape (`{ error: { code } }`, code
|
|
51
|
+
`unauthenticated`, `forbidden` or `not-found`): a bare 401, 403 or 404 from a proxy stays
|
|
52
|
+
`blocked: locate`. `<PortholeView address>` offers the address as its fallback's tab link only
|
|
53
|
+
on the served content domain, and binds its resolved location to its own first frame.
|
|
54
|
+
- Leak suite: the `door-opaque` control (the door made non-opaque and heard from the content
|
|
55
|
+
origin: a sibling rewrites the live door into Porthole's own status page) and Ferryman's
|
|
56
|
+
`[sibling-reload]` probe (held by `door-status` and `content-status`).
|
|
57
|
+
- Planned, not in this release: a host-only parallel-mount variant (the door and content opened
|
|
58
|
+
together), to be measured against the sequential default.
|
|
59
|
+
|
|
7
60
|
## 0.14.5
|
|
8
61
|
|
|
9
62
|
- **Security (P124, after the audit raft-security-audit#16):** any frame could say
|