@botiverse/porthole 0.6.0 → 0.8.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 +25 -2
- package/THIRD_PARTY_NOTICES.md +421 -0
- package/dist/bridge/bounded-text.d.ts +34 -0
- package/dist/bridge/bounded-text.js +188 -0
- package/dist/bridge/bridge.d.ts +38 -5
- package/dist/bridge/bridge.js +469 -39
- package/dist/bridge/json-data.d.ts +28 -0
- package/dist/bridge/json-data.js +86 -0
- package/dist/bridge/navigation.d.ts +5 -0
- package/dist/bridge/navigation.js +7 -0
- package/dist/bridge/refusal.d.ts +5 -1
- package/dist/bridge/refusal.js +17 -0
- package/dist/bridge/types.d.ts +73 -5
- package/dist/check/check.d.ts +7 -0
- package/dist/check/check.js +1 -0
- package/dist/check/instrument.d.ts +3 -0
- package/dist/check/lint.js +4 -2
- package/dist/check/page-source.js +1 -1
- package/dist/check/page.js +16 -0
- package/dist/check/tools.js +2 -3
- package/dist/compile/compile.d.ts +6 -0
- package/dist/compile/compile.js +3 -1
- package/dist/compile/policy.d.ts +55 -0
- package/dist/compile/policy.js +157 -0
- package/dist/config/capabilities.d.ts +85 -7
- package/dist/config/capabilities.js +32 -2
- package/dist/config/schema.d.ts +35 -0
- package/dist/config/validate.d.ts +9 -3
- package/dist/config/validate.js +92 -8
- package/dist/config/warnings.d.ts +20 -0
- package/dist/config/warnings.js +25 -0
- package/dist/conformance/behavior.js +46 -1
- package/dist/conformance/cookies.d.ts +15 -0
- package/dist/conformance/cookies.js +80 -0
- package/dist/conformance/harness/page.d.ts +1 -0
- package/dist/conformance/harness/page.js +9 -2
- package/dist/conformance/harness-source.js +1 -1
- package/dist/conformance/host-kit.js +5 -1
- package/dist/conformance/index.d.ts +11 -0
- package/dist/conformance/index.js +2 -0
- package/dist/conformance/limits.js +38 -1
- package/dist/conformance/runtime.d.ts +58 -0
- package/dist/conformance/runtime.js +324 -0
- package/dist/conformance/served.d.ts +2 -0
- package/dist/conformance/served.js +737 -4
- package/dist/files/paths.js +4 -0
- package/dist/guide/gates.d.ts +9 -0
- package/dist/guide/gates.js +31 -0
- package/dist/guide/guide.d.ts +2 -0
- package/dist/guide/guide.js +35 -33
- package/dist/guide/limits.js +4 -4
- package/dist/guide/runtime.d.ts +13 -0
- package/dist/guide/runtime.js +210 -0
- package/dist/host/create-host.js +73 -37
- package/dist/host/locate.js +8 -0
- package/dist/host/locator.js +7 -0
- package/dist/host/pages-of-set.d.ts +43 -0
- package/dist/host/pages-of-set.js +196 -0
- package/dist/host/types.d.ts +26 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.js +11 -2
- package/dist/isolation/types.d.ts +8 -0
- package/dist/mcp/adapter.js +11 -15
- package/dist/node/index.d.ts +36 -4
- package/dist/node/index.js +402 -101
- package/dist/presets/presets.d.ts +22 -8
- package/dist/presets/presets.js +40 -8
- package/dist/protocol/live-data.d.ts +6 -2
- package/dist/protocol/live-data.js +20 -1
- package/dist/protocol/mcp-apps.d.ts +13 -2
- package/dist/protocol/mcp-apps.js +10 -2
- package/dist/protocol/message-text.d.ts +8 -0
- package/dist/protocol/message-text.js +29 -0
- package/dist/protocol/runtime-calls.d.ts +28 -0
- package/dist/protocol/runtime-calls.js +116 -0
- package/dist/protocol/shell-adapter.js +64 -25
- package/dist/react/context-notice.d.ts +32 -0
- package/dist/react/context-notice.js +28 -0
- package/dist/react/dialog.js +91 -16
- package/dist/react/frame.d.ts +25 -1
- package/dist/react/frame.js +85 -2
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.js +2 -1
- package/dist/runtime/contract.d.ts +201 -0
- package/dist/runtime/contract.js +245 -0
- package/dist/runtime/db.d.ts +188 -0
- package/dist/runtime/db.js +502 -0
- package/dist/runtime/declaration.d.ts +100 -0
- package/dist/runtime/declaration.js +363 -0
- package/dist/runtime/levels.d.ts +33 -0
- package/dist/runtime/levels.js +41 -0
- package/dist/runtime/requests.d.ts +125 -0
- package/dist/runtime/requests.js +215 -0
- package/dist/runtime/segments.d.ts +8 -0
- package/dist/runtime/segments.js +14 -0
- package/dist/runtime/types.generated.d.ts +1 -0
- package/dist/runtime/types.generated.js +19 -0
- package/dist/server/files.d.ts +19 -1
- package/dist/server/files.js +115 -6
- package/dist/server/host.d.ts +24 -2
- package/dist/server/host.js +137 -2
- package/dist/server/index.d.ts +3 -2
- package/dist/server/index.js +2 -1
- package/dist/server/peer.d.ts +4 -0
- package/dist/server/peer.js +19 -0
- package/dist/server/proxy.d.ts +6 -0
- package/dist/server/proxy.js +12 -3
- package/dist/server/pseudonym.d.ts +9 -0
- package/dist/server/pseudonym.js +20 -0
- package/dist/server/server.d.ts +0 -5
- package/dist/server/server.js +318 -52
- package/dist/server/types.d.ts +74 -2
- package/dist/shell/document.d.ts +16 -0
- package/dist/shell/document.js +19 -2
- package/dist/shell/legacy.d.ts +21 -0
- package/dist/shell/legacy.js +63 -0
- package/dist/shell/plan.d.ts +17 -1
- package/dist/shell/plan.js +13 -2
- package/dist/shell/runtime.js +390 -56
- package/dist/shell/use.d.ts +15 -0
- package/dist/shell/use.js +235 -0
- package/docs/ADOPTING.md +205 -15
- package/docs/ARCHITECTURE.md +34 -5
- package/docs/DECISIONS.md +1867 -11
- package/docs/DESIGN.md +137 -17
- package/docs/THREAT_MODEL.md +616 -0
- package/package.json +16 -3
- package/src/bridge/bounded-text.ts +240 -0
- package/src/bridge/bridge.ts +601 -51
- package/src/bridge/json-data.ts +95 -0
- package/src/bridge/navigation.ts +10 -0
- package/src/bridge/refusal.ts +17 -0
- package/src/bridge/types.ts +76 -5
- package/src/check/check.ts +8 -0
- package/src/check/instrument.ts +3 -0
- package/src/check/lint.ts +4 -2
- package/src/check/page.ts +16 -0
- package/src/check/tools.ts +2 -3
- package/src/compile/compile.ts +9 -1
- package/src/compile/policy.ts +177 -0
- package/src/config/capabilities.ts +71 -5
- package/src/config/schema.ts +35 -0
- package/src/config/validate.ts +141 -8
- package/src/config/warnings.ts +42 -0
- package/src/conformance/behavior.ts +54 -1
- package/src/conformance/cookies.ts +93 -0
- package/src/conformance/harness/page.ts +11 -2
- package/src/conformance/host-kit.ts +10 -1
- package/src/conformance/index.ts +17 -0
- package/src/conformance/limits.ts +39 -1
- package/src/conformance/runtime.ts +594 -0
- package/src/conformance/served.ts +888 -4
- package/src/files/paths.ts +4 -0
- package/src/guide/gates.ts +37 -0
- package/src/guide/guide.ts +61 -55
- package/src/guide/limits.ts +4 -4
- package/src/guide/runtime.ts +253 -0
- package/src/host/create-host.ts +88 -36
- package/src/host/locate.ts +10 -0
- package/src/host/locator.ts +11 -0
- package/src/host/pages-of-set.ts +226 -0
- package/src/host/types.ts +33 -1
- package/src/index.ts +94 -0
- package/src/isolation/types.ts +8 -0
- package/src/mcp/adapter.ts +16 -20
- package/src/node/index.ts +507 -116
- package/src/presets/presets.ts +67 -17
- package/src/protocol/live-data.ts +31 -3
- package/src/protocol/mcp-apps.ts +11 -2
- package/src/protocol/message-text.ts +36 -0
- package/src/protocol/runtime-calls.ts +141 -0
- package/src/protocol/shell-adapter.ts +79 -26
- package/src/react/context-notice.tsx +95 -0
- package/src/react/dialog.tsx +108 -15
- package/src/react/frame.tsx +120 -0
- package/src/react/index.ts +8 -1
- package/src/runtime/contract.ts +339 -0
- package/src/runtime/db.ts +650 -0
- package/src/runtime/declaration.ts +516 -0
- package/src/runtime/levels.ts +69 -0
- package/src/runtime/requests.ts +355 -0
- package/src/runtime/segments.ts +17 -0
- package/src/runtime/types.generated.ts +19 -0
- package/src/server/files.ts +138 -7
- package/src/server/host.ts +170 -3
- package/src/server/index.ts +4 -0
- package/src/server/peer.ts +21 -0
- package/src/server/proxy.ts +13 -3
- package/src/server/pseudonym.ts +21 -0
- package/src/server/server.ts +370 -57
- package/src/server/types.ts +73 -2
- package/src/shell/document.ts +29 -4
- package/src/shell/legacy.ts +64 -0
- package/src/shell/plan.ts +37 -3
- package/src/shell/runtime.ts +390 -56
- package/src/shell/use.ts +235 -0
- package/types/runtime/v1/artifact.d.ts +50 -0
- package/types/runtime/v1/assets.d.ts +43 -0
- package/types/runtime/v1/chat.d.ts +13 -0
- package/types/runtime/v1/clipboard.d.ts +14 -0
- package/types/runtime/v1/comments.d.ts +24 -0
- package/types/runtime/v1/context.d.ts +27 -0
- package/types/runtime/v1/data.d.ts +29 -0
- package/types/runtime/v1/db.d.ts +110 -0
- package/types/runtime/v1/downloads.d.ts +22 -0
- package/types/runtime/v1/links.d.ts +13 -0
- package/types/runtime/v1/porthole.d.ts +44 -0
- package/types/runtime/v1/user.d.ts +19 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { cutText } from "./navigation.js";
|
|
2
|
+
/** An error report's: read past what the bridge keeps (2,000 characters, after the scrub). */
|
|
3
|
+
export const REPORT_TEXT_LIMITS = { chars: 8_000, nodes: 1_000, depth: 16 };
|
|
4
|
+
/** A BigInt past this has more digits than a report shows; its decimal text is superlinear. */
|
|
5
|
+
const BIGGEST = 10n ** 2000n;
|
|
6
|
+
/** A boxed primitive's value, read by its own prototype's `valueOf` (which throws for a fake). */
|
|
7
|
+
function unboxed(kind, boxed) {
|
|
8
|
+
switch (kind) {
|
|
9
|
+
case "String":
|
|
10
|
+
return String.prototype.valueOf.call(boxed);
|
|
11
|
+
case "Number":
|
|
12
|
+
return Number.prototype.valueOf.call(boxed);
|
|
13
|
+
case "Boolean":
|
|
14
|
+
return Boolean.prototype.valueOf.call(boxed);
|
|
15
|
+
default:
|
|
16
|
+
return BigInt.prototype.valueOf.call(boxed);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** A field whose read threw (a getter, a proxy: what structured clone never delivers). */
|
|
20
|
+
const UNREADABLE = Symbol("unreadable");
|
|
21
|
+
/** `value` as bounded text (above); with `indent`, as `JSON.stringify(value, null, indent)` lays it out. */
|
|
22
|
+
export function boundedText(value, limits = REPORT_TEXT_LIMITS, indent = 0) {
|
|
23
|
+
return formatBounded(value, limits, indent).text;
|
|
24
|
+
}
|
|
25
|
+
export function formatBounded(value, limits, indent = 0) {
|
|
26
|
+
if (typeof value === "string") {
|
|
27
|
+
const text = cutText(value, limits.chars);
|
|
28
|
+
return { text, whole: text === value };
|
|
29
|
+
}
|
|
30
|
+
let out = "";
|
|
31
|
+
let nodes = limits.nodes;
|
|
32
|
+
let stopped = false;
|
|
33
|
+
let whole = true;
|
|
34
|
+
const written = new WeakSet();
|
|
35
|
+
const inside = new WeakSet();
|
|
36
|
+
const colon = indent > 0 ? ": " : ":";
|
|
37
|
+
const quoted = (text) => {
|
|
38
|
+
const room = Math.max(0, limits.chars - out.length);
|
|
39
|
+
if (text.length > room) {
|
|
40
|
+
whole = false;
|
|
41
|
+
}
|
|
42
|
+
return JSON.stringify(cutText(text, room));
|
|
43
|
+
};
|
|
44
|
+
/** Where a nested value starts, at `depth`: a new line, indented, when laid out. */
|
|
45
|
+
const line = (depth) => (indent > 0 ? `\n${" ".repeat(indent * depth)}` : "");
|
|
46
|
+
/** Whether there is room for another value; if not, `…` once (after `separator`), then none. */
|
|
47
|
+
const room = (separator) => {
|
|
48
|
+
nodes -= 1;
|
|
49
|
+
if (!stopped && (nodes < 0 || out.length >= limits.chars)) {
|
|
50
|
+
stopped = true;
|
|
51
|
+
whole = false;
|
|
52
|
+
out += `${separator}…`;
|
|
53
|
+
}
|
|
54
|
+
return !stopped;
|
|
55
|
+
};
|
|
56
|
+
/** What JSON leaves out of an object (and writes as null in an array). */
|
|
57
|
+
const unwritten = (each) => each === undefined || typeof each === "function" || typeof each === "symbol";
|
|
58
|
+
function write(each, depth) {
|
|
59
|
+
switch (typeof each) {
|
|
60
|
+
case "string":
|
|
61
|
+
out += quoted(each);
|
|
62
|
+
return;
|
|
63
|
+
case "number":
|
|
64
|
+
out += Number.isFinite(each) ? String(each) : "null";
|
|
65
|
+
return;
|
|
66
|
+
case "boolean":
|
|
67
|
+
out += each ? "true" : "false";
|
|
68
|
+
return;
|
|
69
|
+
case "bigint":
|
|
70
|
+
// No JSON for it: its digits, or past 2,000 of them its kind, and either way not whole.
|
|
71
|
+
whole = false;
|
|
72
|
+
out += each < BIGGEST && each > -BIGGEST ? `"${String(each)}n"` : '"[BigInt]"';
|
|
73
|
+
return;
|
|
74
|
+
case "object":
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
out += "null";
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (each === null) {
|
|
81
|
+
out += "null";
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (inside.has(each)) {
|
|
85
|
+
whole = false;
|
|
86
|
+
out += '"[Circular]"';
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (written.has(each)) {
|
|
90
|
+
whole = false;
|
|
91
|
+
out += '"[Repeated]"';
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
written.add(each);
|
|
95
|
+
if (Array.isArray(each)) {
|
|
96
|
+
if (depth >= limits.depth) {
|
|
97
|
+
whole = false;
|
|
98
|
+
out += '"[Array]"';
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const list = each;
|
|
102
|
+
inside.add(list);
|
|
103
|
+
out += "[";
|
|
104
|
+
const inner = line(depth + 1);
|
|
105
|
+
for (let index = 0; index < list.length && room(index === 0 ? inner : `,${inner}`); index += 1) {
|
|
106
|
+
out += index === 0 ? inner : `,${inner}`;
|
|
107
|
+
guarded(list[index], depth + 1);
|
|
108
|
+
}
|
|
109
|
+
out += list.length === 0 ? "]" : `${line(depth)}]`;
|
|
110
|
+
inside.delete(list);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const kind = Object.prototype.toString.call(each).slice(8, -1);
|
|
114
|
+
const proto = Object.getPrototypeOf(each);
|
|
115
|
+
// A boxed primitive is its value, as JSON writes it (`new String("x")` is "x").
|
|
116
|
+
if (kind === "String" || kind === "Number" || kind === "Boolean" || kind === "BigInt") {
|
|
117
|
+
write(unboxed(kind, each), depth);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (kind === "Date") {
|
|
121
|
+
const time = Date.prototype.getTime.call(each);
|
|
122
|
+
out += quoted(Number.isFinite(time) ? new Date(time).toISOString() : "Invalid Date");
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (kind === "Error") {
|
|
126
|
+
whole = false;
|
|
127
|
+
const { name, message } = each;
|
|
128
|
+
out += quoted(`${typeof name === "string" ? cutText(name, 100) : "Error"}: ${typeof message === "string" ? cutText(message, limits.chars) : ""}`);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (proto !== Object.prototype && proto !== null) {
|
|
132
|
+
// A Map, a typed array, a Blob: its kind only, so the text is no longer all of it.
|
|
133
|
+
whole = false;
|
|
134
|
+
out += quoted(`[${kind}]`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (depth >= limits.depth) {
|
|
138
|
+
whole = false;
|
|
139
|
+
out += '"[Object]"';
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
inside.add(each);
|
|
143
|
+
out += "{";
|
|
144
|
+
const inner = line(depth + 1);
|
|
145
|
+
let first = true;
|
|
146
|
+
for (const key of Object.keys(each)) {
|
|
147
|
+
if (!room(first ? inner : `,${inner}`)) {
|
|
148
|
+
first = false;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
let field;
|
|
152
|
+
try {
|
|
153
|
+
field = each[key];
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
field = UNREADABLE;
|
|
157
|
+
}
|
|
158
|
+
if (field !== UNREADABLE && unwritten(field)) {
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
out += `${first ? inner : `,${inner}`}${quoted(key)}${colon}`;
|
|
162
|
+
first = false;
|
|
163
|
+
guarded(field, depth + 1);
|
|
164
|
+
}
|
|
165
|
+
out += first ? "}" : `${line(depth)}}`;
|
|
166
|
+
inside.delete(each);
|
|
167
|
+
}
|
|
168
|
+
/** One value, or `"[unreadable]"` where reading it throws (a getter, a proxy: never cloned). */
|
|
169
|
+
function guarded(each, depth) {
|
|
170
|
+
if (each === UNREADABLE) {
|
|
171
|
+
out += '"[unreadable]"';
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const before = out.length;
|
|
175
|
+
try {
|
|
176
|
+
write(each, depth);
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
whole = false;
|
|
180
|
+
out = `${out.slice(0, before)}"[unreadable]"`;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
nodes -= 1;
|
|
184
|
+
guarded(value, 0);
|
|
185
|
+
// Cut past the length, it still ends in `…`.
|
|
186
|
+
const text = out.length <= limits.chars ? out : `${cutText(out, limits.chars - 1)}…`;
|
|
187
|
+
return { text, whole: whole && text === out };
|
|
188
|
+
}
|
package/dist/bridge/bridge.d.ts
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { type CapabilityName } from "../config/capabilities.ts";
|
|
2
2
|
import type { AnnotationReport } from "../annotate/types.ts";
|
|
3
3
|
import type { PortholeConfig } from "../config/schema.ts";
|
|
4
|
+
import { type PageDeclaration } from "../runtime/declaration.ts";
|
|
5
|
+
import { type ViewerInfo } from "../runtime/levels.ts";
|
|
4
6
|
import { type Refused } from "./refusal.ts";
|
|
5
|
-
import type { CapabilityHandlers, Confirm, ConfirmDisplay, Consent, DataCache, HostFunctionBridge, Refusal } from "./types.ts";
|
|
7
|
+
import type { CapabilityHandlers, Confirm, ConfirmDisplay, Consent, DataCache, HostFunctionBridge, Refusal, Show } from "./types.ts";
|
|
6
8
|
/**
|
|
7
9
|
* The host-function bridge: every capability call from a frame passes here, and nowhere else
|
|
8
|
-
* reaches a host handler. In order:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
10
|
+
* reaches a host handler. In order (`call`): the run not stopped (`close`) → declared by the
|
|
11
|
+
* config → declared by the page, where it has a declaration (P086) → before the arguments are
|
|
12
|
+
* read (`precheck`): for the runtime's own, a method by its `op` and the viewer's level, then for
|
|
13
|
+
* every capability its host function's own rate (P091, P095) → arguments well formed and within
|
|
14
|
+
* their limits → who may (P087: the level of each method the call runs for the viewer, a page's
|
|
15
|
+
* named data with or without a viewer, db's rules) → not muted, if confirm-gated → the own rate
|
|
16
|
+
* of each method it runs (P094: a batch's writes count each) → a user gesture, if gated so → the
|
|
17
|
+
* viewer's consent, if gated so → a person's confirmation, if gated so (at most 10 waiting) →
|
|
18
|
+
* shown to the person, if gated so (P100) → the handler (or, for a read, a result the host already
|
|
19
|
+
* gave for it, or for a stale-allowed one the host's cache).
|
|
11
20
|
*/
|
|
12
21
|
export type BridgeEvent = {
|
|
13
22
|
readonly type: "resize";
|
|
@@ -42,6 +51,11 @@ export interface BridgeOptions {
|
|
|
42
51
|
* such call with it, asking nothing (P080).
|
|
43
52
|
*/
|
|
44
53
|
readonly consent?: Consent | Refused;
|
|
54
|
+
/**
|
|
55
|
+
* Puts a `show`-gated call's whole effect in front of the person before its handler runs (P100).
|
|
56
|
+
* Absent: those calls are refused.
|
|
57
|
+
*/
|
|
58
|
+
readonly show?: Show;
|
|
45
59
|
/** The host's cache, for reads that may be answered stale (`CallOptions.stale`, P079). */
|
|
46
60
|
readonly cached?: DataCache;
|
|
47
61
|
/** Whether the embedding page has user activation now; undefined where it can't tell. */
|
|
@@ -49,6 +63,17 @@ export interface BridgeOptions {
|
|
|
49
63
|
readonly onEvent: (event: BridgeEvent) => void;
|
|
50
64
|
/** The clock, in milliseconds (tests pass their own). */
|
|
51
65
|
readonly now?: () => number;
|
|
66
|
+
/**
|
|
67
|
+
* Who is viewing (P087), as the host said: each runtime method's level is checked against it,
|
|
68
|
+
* and the runtime's own host functions need it. Absent: 0.6's functions run unchecked, as before.
|
|
69
|
+
*/
|
|
70
|
+
readonly viewer?: ViewerInfo;
|
|
71
|
+
/**
|
|
72
|
+
* What the display's page declared (P086), checked against the config (`checkDeclaration`).
|
|
73
|
+
* Absent: a page without one (0.6's): built-ins only through the runtime, and 0.6's globals and
|
|
74
|
+
* requests as before.
|
|
75
|
+
*/
|
|
76
|
+
readonly declaration?: PageDeclaration | null;
|
|
52
77
|
}
|
|
53
78
|
/** An http(s) URL without credentials in it (`https://bank.example@evil.example` reads as a lie). */
|
|
54
79
|
export declare function linkTarget(value: unknown): string | null;
|
|
@@ -59,4 +84,12 @@ export declare function linkTarget(value: unknown): string | null;
|
|
|
59
84
|
* no answer: thrown for that call, and the next asks again.
|
|
60
85
|
*/
|
|
61
86
|
export declare function onceConsent(consent: Consent): Consent;
|
|
62
|
-
|
|
87
|
+
/** A display's bridge: `close()` when its run stops (a restart, its end; P095, after the review). */
|
|
88
|
+
export interface DisplayBridge extends HostFunctionBridge {
|
|
89
|
+
/**
|
|
90
|
+
* The run is over: every call waiting for a confirmation is refused at once, a yes that comes
|
|
91
|
+
* later (or its `proceed`) runs nothing, and no new call is taken.
|
|
92
|
+
*/
|
|
93
|
+
close(): void;
|
|
94
|
+
}
|
|
95
|
+
export declare function createBridge(options: BridgeOptions): DisplayBridge;
|