@qontinui/ui-bridge-native 0.9.0 → 0.11.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 +50 -2
- package/dist/core/index.js +13 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +13 -3
- package/dist/core/index.mjs.map +1 -1
- package/dist/core/sha256.d.ts +29 -7
- package/dist/core/sha256.d.ts.map +1 -1
- package/dist/debug/index.js.map +1 -1
- package/dist/debug/index.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +988 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +978 -33
- package/dist/index.mjs.map +1 -1
- package/dist/react/UIBridgeNativeProvider.d.ts +25 -3
- package/dist/react/UIBridgeNativeProvider.d.ts.map +1 -1
- package/dist/react/index.js +959 -31
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +960 -32
- package/dist/react/index.mjs.map +1 -1
- package/dist/server/handlers.d.ts.map +1 -1
- package/dist/server/http-server.d.ts +120 -2
- package/dist/server/http-server.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +926 -15
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +908 -16
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/pairing.d.ts +295 -0
- package/dist/server/pairing.d.ts.map +1 -0
- package/dist/server/types.d.ts +20 -0
- package/dist/server/types.d.ts.map +1 -1
- package/dist/transport/DeviceAnnouncer.d.ts +0 -2
- package/dist/transport/DeviceAnnouncer.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Device pairing: who may drive the app over its network port.
|
|
3
|
+
*
|
|
4
|
+
* A caller on the machine itself needs nothing. That covers `adb forward`, whose
|
|
5
|
+
* peer was measured as `::ffff:127.0.0.1` on an Android 11 emulator on 2026-10-31;
|
|
6
|
+
* physical phones are unmeasured. Anyone else signs each request with a token the
|
|
7
|
+
* phone issued, so the token never crosses the network after pairing. A bearer
|
|
8
|
+
* would not do: the device id is public in the mDNS record, so a spoofer announcing
|
|
9
|
+
* it would be handed the bearer on the runner's next connect.
|
|
10
|
+
*
|
|
11
|
+
* This module holds the decisions and their state. `NativeUIBridgeServer`'s
|
|
12
|
+
* network entry (`./http-server.ts`) applies them to requests. Nothing here may
|
|
13
|
+
* log a token or a code, or the text of an error from a store that might carry
|
|
14
|
+
* one: `console` feeds the ring buffer behind `/control/console-errors`.
|
|
15
|
+
*/
|
|
16
|
+
import type { HTTPRequest } from './http-server';
|
|
17
|
+
/** The request header carrying `<ts>.<nonce>.<sig>`. */
|
|
18
|
+
export declare const UI_BRIDGE_AUTH_HEADER = "X-UI-Bridge-Auth";
|
|
19
|
+
/** How far a signature's timestamp may sit from the phone's clock, either way. */
|
|
20
|
+
export declare const SIGNATURE_WINDOW_MS = 300000;
|
|
21
|
+
/** How long a tap in Settings keeps a code live. */
|
|
22
|
+
export declare const PAIRING_CODE_TTL_MS = 120000;
|
|
23
|
+
/** Wrong codes allowed before the code is disarmed, globally and not per peer. */
|
|
24
|
+
export declare const PAIRING_CODE_MAX_ATTEMPTS = 5;
|
|
25
|
+
/**
|
|
26
|
+
* The longest raw body a signature is checked over, in UTF-16 code units. A LAN
|
|
27
|
+
* peer can force a hash of the body, the method and the target before proving
|
|
28
|
+
* anything, and the hash is pure JS on the phone's JS thread, so all three are
|
|
29
|
+
* capped. Routes taking free-form text, such as the `guide` of
|
|
30
|
+
* `design/style-guide/load`, have no measured size, so this number is a
|
|
31
|
+
* judgement, and a body over it gets `PAIRING_BODY_TOO_LARGE` rather than silence.
|
|
32
|
+
* No caller on the machine is held to this: it hashes nothing.
|
|
33
|
+
*/
|
|
34
|
+
export declare const SIGNED_BODY_MAX_CHARS: number;
|
|
35
|
+
/** The longest method a signature is checked over. */
|
|
36
|
+
export declare const SIGNED_METHOD_MAX_CHARS = 16;
|
|
37
|
+
/** The longest `path?query` a signature is checked over. */
|
|
38
|
+
export declare const SIGNED_TARGET_MAX_CHARS = 8192;
|
|
39
|
+
/**
|
|
40
|
+
* What the app implements: the token's persistence, and secure randomness,
|
|
41
|
+
* because the SDK's only generator is `Math.random`.
|
|
42
|
+
*/
|
|
43
|
+
export interface PairingStore {
|
|
44
|
+
/**
|
|
45
|
+
* The current token, or `null` when the store has loaded and holds none.
|
|
46
|
+
* THROW or reject while the store has not loaded: `null` then would mint a
|
|
47
|
+
* replacement over a token still on disk.
|
|
48
|
+
*/
|
|
49
|
+
get(): string | null | Promise<string | null>;
|
|
50
|
+
/** Persist `token`. Pairing answers only after this settles. */
|
|
51
|
+
set(token: string): void | Promise<void>;
|
|
52
|
+
/** Forget the token. */
|
|
53
|
+
clear(): void | Promise<void>;
|
|
54
|
+
/** `n` bytes from a cryptographically secure source. */
|
|
55
|
+
randomBytes(n: number): Uint8Array | Promise<Uint8Array>;
|
|
56
|
+
}
|
|
57
|
+
/** Why a pairing operation refused, by the code a caller sees. */
|
|
58
|
+
export type PairingErrorCode = 'PAIRING_UNCONFIGURED' | 'PAIRING_UNAVAILABLE';
|
|
59
|
+
/** Thrown by the app-facing operations. Its message never carries a token or a code. */
|
|
60
|
+
export declare class PairingError extends Error {
|
|
61
|
+
readonly code: PairingErrorCode;
|
|
62
|
+
constructor(code: PairingErrorCode, message: string);
|
|
63
|
+
}
|
|
64
|
+
/** Why the code is no longer live. */
|
|
65
|
+
export type PairingDisarmReason = 'consumed' | 'expired' | 'attempts_exhausted' | 'cancelled' | 'revoked';
|
|
66
|
+
/** What the app's Settings screen shows. Never carries the code or the token. */
|
|
67
|
+
export interface PairingState {
|
|
68
|
+
/** A store is configured. */
|
|
69
|
+
configured: boolean;
|
|
70
|
+
/** A code is live right now. */
|
|
71
|
+
armed: boolean;
|
|
72
|
+
/** When the live code stops working, epoch ms. */
|
|
73
|
+
expiresAt: number | null;
|
|
74
|
+
/** Wrong codes left on the live code. */
|
|
75
|
+
attemptsRemaining: number | null;
|
|
76
|
+
/** Peer address that consumed the last code, so a wrong pairer is visible. */
|
|
77
|
+
consumedBy: string | null;
|
|
78
|
+
/** When it did, epoch ms. */
|
|
79
|
+
consumedAt: number | null;
|
|
80
|
+
/** Why the last code stopped being live. Null while armed, or before any arm. */
|
|
81
|
+
disarmReason: PairingDisarmReason | null;
|
|
82
|
+
}
|
|
83
|
+
/** The code to show the user, returned only to the app that armed it. */
|
|
84
|
+
export interface ArmedPairingCode {
|
|
85
|
+
code: string;
|
|
86
|
+
expiresAt: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The string a signature covers, encoded as UTF-8 and keyed by the token
|
|
90
|
+
* string's own UTF-8 bytes (not its hex-decoded value):
|
|
91
|
+
*
|
|
92
|
+
* METHOD \n path?query \n ts \n nonce \n sha256(body)
|
|
93
|
+
*
|
|
94
|
+
* - `METHOD`: as on the request line, uppercase.
|
|
95
|
+
* - `path?query`: the request target exactly as sent, with its percent-encoding
|
|
96
|
+
* and parameter order untouched, and no `?` when there is no query.
|
|
97
|
+
* - `ts`: decimal integer milliseconds since the epoch on the PHONE's clock, the
|
|
98
|
+
* unit of `serverTime` on open health. A signer adds the offset it learned.
|
|
99
|
+
* - `nonce`: `[A-Za-z0-9_-]{16,64}`, fresh for each request.
|
|
100
|
+
* - `sha256(body)`: lowercase hex of the raw body bytes, which is the digest of
|
|
101
|
+
* zero bytes for a request with no body.
|
|
102
|
+
*
|
|
103
|
+
* The separators are single `\n` bytes with none at the end. The header is
|
|
104
|
+
* `X-UI-Bridge-Auth: <ts>.<nonce>.<sig>`, where `sig` is the HMAC-SHA256 tag in
|
|
105
|
+
* lowercase hex.
|
|
106
|
+
*
|
|
107
|
+
* The runner's Rust signer, still to be written, has to reproduce this byte for
|
|
108
|
+
* byte, and `pairing.test.ts` pins a vector against an independent HMAC. Changing
|
|
109
|
+
* it would break every paired runner.
|
|
110
|
+
*/
|
|
111
|
+
export declare function canonicalSignatureInput(parts: {
|
|
112
|
+
method: string;
|
|
113
|
+
pathAndQuery: string;
|
|
114
|
+
ts: string;
|
|
115
|
+
nonce: string;
|
|
116
|
+
bodySha256Hex: string;
|
|
117
|
+
}): string;
|
|
118
|
+
/**
|
|
119
|
+
* The `X-UI-Bridge-Auth` value for one request, for a JavaScript caller. A body
|
|
120
|
+
* here is the exact string sent, and empty for a request with none.
|
|
121
|
+
*/
|
|
122
|
+
export declare function signUIBridgeRequest(token: string, request: {
|
|
123
|
+
method: string;
|
|
124
|
+
pathAndQuery: string;
|
|
125
|
+
body?: string;
|
|
126
|
+
ts: number;
|
|
127
|
+
nonce: string;
|
|
128
|
+
}): string;
|
|
129
|
+
/**
|
|
130
|
+
* Every value of a header, under any casing. More than one means an adapter kept
|
|
131
|
+
* entries that differ only in case, so callers decide what a conflict means.
|
|
132
|
+
*/
|
|
133
|
+
export declare function headerValues(headers: Record<string, string> | undefined, name: string): string[];
|
|
134
|
+
/**
|
|
135
|
+
* True for `127.0.0.0/8`, `::1` in any spelling, and an IPv4-mapped `::ffff:127.x`.
|
|
136
|
+
* Parsed rather than prefix-matched, so `127.0.0.1.evil.example` is not loopback.
|
|
137
|
+
*/
|
|
138
|
+
export declare function isLoopbackAddress(address: string): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* True for a `Host` naming the machine itself, with or without a port, and with
|
|
141
|
+
* an IPv6 literal in brackets. This is what closes DNS rebinding: a page that
|
|
142
|
+
* rebinds its own name to 127.0.0.1 still sends that name here.
|
|
143
|
+
*/
|
|
144
|
+
export declare function isLoopbackHost(host: string): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* True for a `Host` no page from outside this network can have rebound: an IP
|
|
147
|
+
* literal, `localhost`, or an mDNS `.local` name. A page that rebinds its own
|
|
148
|
+
* name to the phone still sends that name here, with no `Origin` on a same-origin
|
|
149
|
+
* GET.
|
|
150
|
+
*/
|
|
151
|
+
export declare function isUnrebindableHost(host: string): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* True for a request a web page sent. A CORS fetch carries `Origin`, but a no-cors
|
|
154
|
+
* GET such as an `<img>` carries none, so that one shows as a `Sec-Fetch-Site`
|
|
155
|
+
* other than `none` (which is a person typing the URL) or a `Referer`.
|
|
156
|
+
*/
|
|
157
|
+
export declare function carriesWebContext(request: HTTPRequest): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The loopback exemption: a loopback peer, no web context, and a loopback `Host`.
|
|
160
|
+
*
|
|
161
|
+
* The server sends `Access-Control-Allow-Origin: *` on an admitted route, so
|
|
162
|
+
* without the web rule any page in the phone's browser could drive the app through
|
|
163
|
+
* 127.0.0.1. A missing address is never loopback.
|
|
164
|
+
*/
|
|
165
|
+
export declare function isTrustedLoopbackRequest(request: HTTPRequest): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* What `allowUnauthenticatedNetwork` still refuses. It trusts the network, and a
|
|
168
|
+
* page in a browser on that network is not the network.
|
|
169
|
+
*/
|
|
170
|
+
export declare function isWebReachableRequest(request: HTTPRequest): boolean;
|
|
171
|
+
/** The result of checking a signature. */
|
|
172
|
+
export type SignatureVerdict = 'valid' | 'refused'
|
|
173
|
+
/** Outside the window or below the floor, which re-syncing cures and re-pairing does not. */
|
|
174
|
+
| 'timestamp_refused' | 'body_too_large' | 'target_too_long' | 'store_unavailable';
|
|
175
|
+
/** The result of a pair call. */
|
|
176
|
+
export type PairOutcome = {
|
|
177
|
+
ok: true;
|
|
178
|
+
token: string;
|
|
179
|
+
} | {
|
|
180
|
+
ok: false;
|
|
181
|
+
code: 'PAIRING_NOT_ARMED' | 'PAIRING_CODE_REQUIRED' | 'PAIRING_CODE_INVALID' | 'PAIRING_UNAVAILABLE';
|
|
182
|
+
error: string;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* The state behind one server's pairing: the live code, the nonce cache and the
|
|
186
|
+
* lock over token writes. All of it is in memory, by design for the code.
|
|
187
|
+
*/
|
|
188
|
+
export declare class PairingAuthority {
|
|
189
|
+
private readonly store;
|
|
190
|
+
private armedCode;
|
|
191
|
+
/** A correct code waiting on the store step, restored if that step fails. */
|
|
192
|
+
private heldCode;
|
|
193
|
+
private disarmReason;
|
|
194
|
+
private consumedBy;
|
|
195
|
+
private consumedAt;
|
|
196
|
+
private lastWrite;
|
|
197
|
+
/** Nonce to its timestamp, oldest insertion first. */
|
|
198
|
+
private nonces;
|
|
199
|
+
/**
|
|
200
|
+
* The oldest timestamp still accepted. A nonce this process did not record
|
|
201
|
+
* cannot be checked for a replay, so a signature from before it existed is
|
|
202
|
+
* refused: otherwise an app restart, which empties the cache, would reopen
|
|
203
|
+
* the whole window to a captured request. Eviction raises it for the same
|
|
204
|
+
* reason. A clock step re-bases it to the new now, or a clock set back past it
|
|
205
|
+
* would refuse every signature until the app restarted. That leaves one gap with
|
|
206
|
+
* two arms: a request captured before a step back can replay once, if its
|
|
207
|
+
* timestamp is at or above the new now and this process does not remember its
|
|
208
|
+
* nonce, because it has forgotten it, or because the app restarted since and it
|
|
209
|
+
* never recorded it. Without `performance.now` no step is seen, and the floor
|
|
210
|
+
* holds until the clock passes it.
|
|
211
|
+
*/
|
|
212
|
+
private oldestAcceptedTs;
|
|
213
|
+
/**
|
|
214
|
+
* The wall clock minus the monotonic clock at the last re-base. It moves only
|
|
215
|
+
* then, so small steps add up until they cross the tolerance, and a clock step
|
|
216
|
+
* leaves the floor at most twice the tolerance ahead of the clock: the clock can
|
|
217
|
+
* swing from just over the baseline to just under it without crossing it.
|
|
218
|
+
*/
|
|
219
|
+
private clockOffset;
|
|
220
|
+
/** Moves when a revoke ends, so a read of the old token that spans one cannot admit. */
|
|
221
|
+
private tokenGeneration;
|
|
222
|
+
/** Revokes under way. The old token may already be dying, so nothing verifies. */
|
|
223
|
+
private revokesInFlight;
|
|
224
|
+
/** A revoke failed in a way that may have left the old token in the store. */
|
|
225
|
+
private storeSuspect;
|
|
226
|
+
constructor(store: PairingStore);
|
|
227
|
+
/**
|
|
228
|
+
* The stored token, `null` when there is none, or `TOKEN_NOT_LOADED`. Only
|
|
229
|
+
* `readStore` tells these apart: an empty or non-string value is never a
|
|
230
|
+
* token, because an empty key would verify anything signed with it.
|
|
231
|
+
*/
|
|
232
|
+
private readToken;
|
|
233
|
+
private readStore;
|
|
234
|
+
private randomBytes;
|
|
235
|
+
private mintAndStoreToken;
|
|
236
|
+
/** Run token writes one at a time, so two first pairs cannot mint two tokens. */
|
|
237
|
+
private exclusive;
|
|
238
|
+
/** Check a `<ts>.<nonce>.<sig>` value against this request and the stored token. */
|
|
239
|
+
verifySignature(request: HTTPRequest, header: string): Promise<SignatureVerdict>;
|
|
240
|
+
private readClockOffset;
|
|
241
|
+
/**
|
|
242
|
+
* Re-base the floor when the wall clock has stepped against the monotonic one.
|
|
243
|
+
* A nonce remembered from above the new now is clamped to just below the new
|
|
244
|
+
* floor. Left as it is, forgetting it later would raise the floor back to a time
|
|
245
|
+
* before the step, and the lockout would return when the cache overflowed.
|
|
246
|
+
*/
|
|
247
|
+
private noticeClockStep;
|
|
248
|
+
private rememberNonce;
|
|
249
|
+
/** Forgetting a nonce must not readmit it, so its timestamp stops being accepted. */
|
|
250
|
+
private forgetNonce;
|
|
251
|
+
/**
|
|
252
|
+
* The route's decision. A trusted loopback caller needs no code. Anyone else
|
|
253
|
+
* spends the armed code, and an unarmed one refuses without comparing.
|
|
254
|
+
*/
|
|
255
|
+
pair(input: {
|
|
256
|
+
trustedLoopback: boolean;
|
|
257
|
+
peer: string | undefined;
|
|
258
|
+
body: unknown;
|
|
259
|
+
}): Promise<PairOutcome>;
|
|
260
|
+
/**
|
|
261
|
+
* The store step has answered. A failure gives the code back, since the user
|
|
262
|
+
* typed the right one and the phone let them down, unless the app has since
|
|
263
|
+
* cancelled it or armed another.
|
|
264
|
+
*/
|
|
265
|
+
private settleSpentCode;
|
|
266
|
+
/** No await in here: the attempt count has to move with the comparison. */
|
|
267
|
+
private spendCode;
|
|
268
|
+
/** Either clock ends the code, so a clock set back cannot extend it. */
|
|
269
|
+
private expireCode;
|
|
270
|
+
/** Arm a fresh code, replacing any live one. */
|
|
271
|
+
arm(): Promise<ArmedPairingCode>;
|
|
272
|
+
/** A uniform 6-digit code, by rejection sampling so that no digit is favoured. */
|
|
273
|
+
private drawCode;
|
|
274
|
+
/** Cancel a live code. */
|
|
275
|
+
disarm(): void;
|
|
276
|
+
private dropCode;
|
|
277
|
+
/**
|
|
278
|
+
* Replace the token, so every signature made with the old one stops verifying.
|
|
279
|
+
* If it cannot be replaced it is cleared. If that fails too, signatures and
|
|
280
|
+
* pairing stay refused until a revoke succeeds: the user asked for the old
|
|
281
|
+
* token to die, and a store that would not say so cannot be trusted to have
|
|
282
|
+
* done it.
|
|
283
|
+
*
|
|
284
|
+
* Nothing verifies from the moment this starts until it ends. The generation
|
|
285
|
+
* moves when it ends, whichever way, so a check that read the old token before
|
|
286
|
+
* then cannot admit its request afterwards. A request a check has already
|
|
287
|
+
* admitted runs to its end.
|
|
288
|
+
*/
|
|
289
|
+
revoke(): Promise<void>;
|
|
290
|
+
/** What Settings shows. */
|
|
291
|
+
getState(): PairingState;
|
|
292
|
+
}
|
|
293
|
+
/** The state of a server with no store. */
|
|
294
|
+
export declare const UNCONFIGURED_PAIRING_STATE: PairingState;
|
|
295
|
+
//# sourceMappingURL=pairing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pairing.d.ts","sourceRoot":"","sources":["../../src/server/pairing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,wDAAwD;AACxD,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,SAAU,CAAC;AAE3C,oDAAoD;AACpD,eAAO,MAAM,mBAAmB,SAAU,CAAC;AAE3C,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;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F;IAC9E,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAoCtF,OAAO,CAAC,eAAe;IAKvB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,aAAa;IAcrB,qFAAqF;IACrF,OAAO,CAAC,WAAW;IAKnB;;;OAGG;IACG,IAAI,CAAC,KAAK,EAAE;QAChB,eAAe,EAAE,OAAO,CAAC;QACzB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;QACzB,IAAI,EAAE,OAAO,CAAC;KACf,GAAG,OAAO,CAAC,WAAW,CAAC;IAoBxB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAavB,2EAA2E;IAC3E,OAAO,CAAC,SAAS;IAgCjB,wEAAwE;IACxE,OAAO,CAAC,UAAU;IAYlB,gDAAgD;IAC1C,GAAG,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAqBtC,kFAAkF;YACpE,QAAQ;IAYtB,0BAA0B;IAC1B,MAAM,IAAI,IAAI;IAId,OAAO,CAAC,QAAQ;IAQhB;;;;;;;;;;;OAWG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IA6B7B,2BAA2B;IAC3B,QAAQ,IAAI,YAAY;CAczB;AAED,2CAA2C;AAC3C,eAAO,MAAM,0BAA0B,EAAE,YAQxC,CAAC"}
|
package/dist/server/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { NativeUIBridgeConfig, NativeActionResponse, NativeFindResponse, Na
|
|
|
7
7
|
import type { ComponentActionResponse, PageNavigationResponse } from '../control/types';
|
|
8
8
|
import type { ElementDesignData, StateStyles, ResponsiveSnapshot } from '../design/design-types';
|
|
9
9
|
import type { PageHealthObservation } from './page-health';
|
|
10
|
+
import type { PairingStore } from './pairing';
|
|
10
11
|
/**
|
|
11
12
|
* Navigation provider for React Native apps.
|
|
12
13
|
*
|
|
@@ -118,6 +119,24 @@ export interface NativeServerConfig extends NativeUIBridgeConfig {
|
|
|
118
119
|
width: number;
|
|
119
120
|
height: number;
|
|
120
121
|
};
|
|
122
|
+
/**
|
|
123
|
+
* Where the pairing token lives, and the app's secure random source. Without
|
|
124
|
+
* one, every non-loopback caller answers `401 PAIRING_UNCONFIGURED`. See
|
|
125
|
+
* `./pairing.ts`.
|
|
126
|
+
*/
|
|
127
|
+
pairingStore?: PairingStore;
|
|
128
|
+
/**
|
|
129
|
+
* Admit non-loopback HTTP callers with no signature. For samples and fixtures
|
|
130
|
+
* on a trusted network: anything that can reach the port can drive the app, but
|
|
131
|
+
* a web page cannot, and a WebSocket upgrade stays loopback-only regardless.
|
|
132
|
+
*/
|
|
133
|
+
allowUnauthenticatedNetwork?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* The device's stable id, the one mDNS publishes. Open health and the pair
|
|
136
|
+
* response return it, because the runner keys its tokens by it. Pairing
|
|
137
|
+
* answers `503 PAIRING_UNAVAILABLE` until one is known.
|
|
138
|
+
*/
|
|
139
|
+
deviceId?: string;
|
|
121
140
|
}
|
|
122
141
|
/**
|
|
123
142
|
* Route definition
|
|
@@ -494,5 +513,6 @@ export interface NativeServerHandlers {
|
|
|
494
513
|
durationMs: number | null;
|
|
495
514
|
}>;
|
|
496
515
|
health: HandlerFunction<Record<string, unknown>>;
|
|
516
|
+
pair: HandlerFunction<never>;
|
|
497
517
|
}
|
|
498
518
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,k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AG5E,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAIjD,IAAI,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;CAC9B"}
|
|
@@ -71,8 +71,6 @@ export declare class DeviceAnnouncer {
|
|
|
71
71
|
* will learn the registered name.
|
|
72
72
|
*/
|
|
73
73
|
private publishInFlight;
|
|
74
|
-
/** Rotated pairing token for mDNS TXT records */
|
|
75
|
-
private pairingToken;
|
|
76
74
|
constructor(config: AnnouncerConfig);
|
|
77
75
|
/**
|
|
78
76
|
* Start mDNS advertisement.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceAnnouncer.d.ts","sourceRoot":"","sources":["../../src/transport/DeviceAnnouncer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B,8FAA8F;IAC9F,cAAc,CACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IA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framework for React Native - Hooks and providers for UI observation and control in mobile apps",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|