@econ-v1/ports 6.7.0 → 6.10.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/dist/app-data.d.ts +39 -0
- package/dist/app-data.d.ts.map +1 -0
- package/dist/client-ui-preference.d.ts +23 -0
- package/dist/client-ui-preference.d.ts.map +1 -0
- package/dist/clipboard.d.ts +41 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/clock.d.ts +8 -8
- package/dist/clock.d.ts.map +1 -1
- package/dist/credential-handoff.d.ts +57 -0
- package/dist/credential-handoff.d.ts.map +1 -0
- package/dist/crypto.d.ts +4 -4
- package/dist/crypto.d.ts.map +1 -1
- package/dist/id.d.ts +2 -2
- package/dist/id.d.ts.map +1 -1
- package/dist/identity.d.ts +31 -25
- package/dist/identity.d.ts.map +1 -1
- package/dist/index.d.ts +226 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/install-environment.d.ts +22 -32
- package/dist/install-environment.d.ts.map +1 -1
- package/dist/lcd-tree-source.d.ts +54 -0
- package/dist/lcd-tree-source.d.ts.map +1 -0
- package/dist/legacy-credential.d.ts +30 -0
- package/dist/legacy-credential.d.ts.map +1 -0
- package/dist/media-preferences.d.ts +2 -44
- package/dist/media-preferences.d.ts.map +1 -1
- package/dist/network/certificate-trust.d.ts +31 -0
- package/dist/network/certificate-trust.d.ts.map +1 -0
- package/dist/network/client-node-origin.d.ts +3 -15
- package/dist/network/client-node-origin.d.ts.map +1 -1
- package/dist/network/home-node-candidate-store.d.ts +4 -32
- package/dist/network/home-node-candidate-store.d.ts.map +1 -1
- package/dist/network/home-node-candidate.d.ts +9 -7
- package/dist/network/home-node-candidate.d.ts.map +1 -1
- package/dist/network/l402-payment.d.ts +11 -28
- package/dist/network/l402-payment.d.ts.map +1 -1
- package/dist/network/node-discovery.d.ts +5 -16
- package/dist/network/node-discovery.d.ts.map +1 -1
- package/dist/network/webrtc-signaling.d.ts +36 -52
- package/dist/network/webrtc-signaling.d.ts.map +1 -1
- package/dist/network.d.ts +65 -40
- package/dist/network.d.ts.map +1 -1
- package/dist/offline-readiness.d.ts +122 -0
- package/dist/offline-readiness.d.ts.map +1 -0
- package/dist/onboarding-access-code.d.ts +30 -0
- package/dist/onboarding-access-code.d.ts.map +1 -0
- package/dist/onboarding-checkpoint.d.ts +26 -0
- package/dist/onboarding-checkpoint.d.ts.map +1 -0
- package/dist/onboarding-presence.d.ts +12 -0
- package/dist/onboarding-presence.d.ts.map +1 -0
- package/dist/owner-claim-session.d.ts +60 -0
- package/dist/owner-claim-session.d.ts.map +1 -0
- package/dist/owner-claim.d.ts +22 -0
- package/dist/owner-claim.d.ts.map +1 -0
- package/dist/repositories/conversation-repository.d.ts +21 -20
- package/dist/repositories/conversation-repository.d.ts.map +1 -1
- package/dist/repositories/durable-event.d.ts +8 -8
- package/dist/repositories/durable-event.d.ts.map +1 -1
- package/dist/repositories/node-app-memory-repository.d.ts +168 -0
- package/dist/repositories/node-app-memory-repository.d.ts.map +1 -0
- package/dist/repositories/outbox.d.ts +33 -20
- package/dist/repositories/outbox.d.ts.map +1 -1
- package/dist/repositories/repository-mutation.d.ts +3 -1
- package/dist/repositories/repository-mutation.d.ts.map +1 -1
- package/dist/repositories/revisioned-repository.d.ts +14 -12
- package/dist/repositories/revisioned-repository.d.ts.map +1 -1
- package/dist/repositories/settings.d.ts +10 -10
- package/dist/repositories/settings.d.ts.map +1 -1
- package/dist/repositories/sync-ledger.d.ts +11 -11
- package/dist/repositories/sync-ledger.d.ts.map +1 -1
- package/dist/repositories/wallet-mirror-repository.d.ts +22 -13
- package/dist/repositories/wallet-mirror-repository.d.ts.map +1 -1
- package/dist/repositories.d.ts +52 -17
- package/dist/repositories.d.ts.map +1 -1
- package/dist/scheduler.d.ts +4 -4
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/session-flag.d.ts +48 -0
- package/dist/session-flag.d.ts.map +1 -0
- package/dist/shell-cache-reset.d.ts +4 -0
- package/dist/shell-cache-reset.d.ts.map +1 -0
- package/dist/shell-version.d.ts +8 -0
- package/dist/shell-version.d.ts.map +1 -0
- package/dist/storage.d.ts +76 -34
- package/dist/storage.d.ts.map +1 -1
- package/dist/theme.d.ts +2 -24
- package/dist/theme.d.ts.map +1 -1
- package/package.json +14 -10
- package/src/app-data.js +42 -0
- package/src/client-ui-preference.js +23 -0
- package/src/clipboard.js +41 -0
- package/src/clock.js +13 -0
- package/src/credential-handoff.js +68 -0
- package/src/crypto.js +9 -0
- package/src/id.js +5 -0
- package/src/identity.js +33 -0
- package/src/index.js +250 -0
- package/src/install-environment.js +44 -0
- package/src/lcd-tree-source.js +56 -0
- package/src/legacy-credential.js +30 -0
- package/src/media-preferences.js +40 -0
- package/src/network/certificate-trust.js +25 -0
- package/src/network/client-node-origin.js +7 -0
- package/src/network/home-node-candidate-store.js +6 -0
- package/src/network/home-node-candidate.js +9 -0
- package/src/network/l402-payment.js +20 -0
- package/src/network/node-discovery.js +13 -0
- package/src/network/webrtc-signaling.js +40 -0
- package/src/network.js +33 -0
- package/src/offline-readiness.js +65 -0
- package/src/onboarding-access-code.js +21 -0
- package/src/onboarding-checkpoint.js +26 -0
- package/src/onboarding-presence.js +15 -0
- package/src/owner-claim-session.js +55 -0
- package/src/owner-claim.js +22 -0
- package/src/repositories/conversation-repository.js +20 -0
- package/src/repositories/durable-event.js +8 -0
- package/src/repositories/node-app-memory-repository.js +221 -0
- package/src/repositories/outbox.js +27 -0
- package/src/repositories/repository-mutation.js +8 -0
- package/src/repositories/revisioned-repository.js +17 -0
- package/src/repositories/settings.js +10 -0
- package/src/repositories/sync-ledger.js +11 -0
- package/src/repositories/wallet-mirror-repository.js +73 -0
- package/src/repositories.js +22 -0
- package/src/scheduler.js +6 -0
- package/src/session-flag.js +48 -0
- package/src/shell-cache-reset.js +3 -0
- package/src/shell-version.js +4 -0
- package/src/storage.js +60 -0
- package/src/theme.js +21 -0
- package/dist/clock.js +0 -2
- package/dist/clock.js.map +0 -1
- package/dist/crypto.js +0 -2
- package/dist/crypto.js.map +0 -1
- package/dist/id.js +0 -2
- package/dist/id.js.map +0 -1
- package/dist/identity.js +0 -2
- package/dist/identity.js.map +0 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
- package/dist/install-environment.js +0 -26
- package/dist/install-environment.js.map +0 -1
- package/dist/media-preferences.js +0 -2
- package/dist/media-preferences.js.map +0 -1
- package/dist/network/client-node-origin.js +0 -18
- package/dist/network/client-node-origin.js.map +0 -1
- package/dist/network/home-node-candidate-store.js +0 -2
- package/dist/network/home-node-candidate-store.js.map +0 -1
- package/dist/network/home-node-candidate.js +0 -2
- package/dist/network/home-node-candidate.js.map +0 -1
- package/dist/network/l402-payment.js +0 -2
- package/dist/network/l402-payment.js.map +0 -1
- package/dist/network/node-discovery.js +0 -13
- package/dist/network/node-discovery.js.map +0 -1
- package/dist/network/webrtc-signaling.js +0 -30
- package/dist/network/webrtc-signaling.js.map +0 -1
- package/dist/network.js +0 -2
- package/dist/network.js.map +0 -1
- package/dist/repositories/conversation-repository.js +0 -2
- package/dist/repositories/conversation-repository.js.map +0 -1
- package/dist/repositories/durable-event.js +0 -2
- package/dist/repositories/durable-event.js.map +0 -1
- package/dist/repositories/outbox.js +0 -9
- package/dist/repositories/outbox.js.map +0 -1
- package/dist/repositories/repository-mutation.js +0 -2
- package/dist/repositories/repository-mutation.js.map +0 -1
- package/dist/repositories/revisioned-repository.js +0 -2
- package/dist/repositories/revisioned-repository.js.map +0 -1
- package/dist/repositories/settings.js +0 -2
- package/dist/repositories/settings.js.map +0 -1
- package/dist/repositories/sync-ledger.js +0 -2
- package/dist/repositories/sync-ledger.js.map +0 -1
- package/dist/repositories/wallet-mirror-repository.js +0 -53
- package/dist/repositories/wallet-mirror-repository.js.map +0 -1
- package/dist/repositories.js +0 -2
- package/dist/repositories.js.map +0 -1
- package/dist/scheduler.js +0 -2
- package/dist/scheduler.js.map +0 -1
- package/dist/storage.js +0 -14
- package/dist/storage.js.map +0 -1
- package/dist/theme.js +0 -2
- package/dist/theme.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@econ-v1/ports",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"description": "Platform-neutral ports for Node client applications",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"author": "Node contributors",
|
|
@@ -19,28 +19,32 @@
|
|
|
19
19
|
"typescript"
|
|
20
20
|
],
|
|
21
21
|
"type": "module",
|
|
22
|
-
"main": "./
|
|
22
|
+
"main": "./src/index.js",
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "rm -rf dist && tsc -
|
|
25
|
+
"build": "rm -rf dist && tsc -p tsconfig.publish.json --pretty false",
|
|
26
|
+
"check": "tsc -p jsconfig.json --pretty false && node ../scripts/check-negative-type-contracts.mjs --config jsconfig.tests.json",
|
|
26
27
|
"lint": "eslint src",
|
|
27
|
-
"prepack": "npm run build",
|
|
28
|
+
"prepack": "npm run build && node ../scripts/check-public-package.mjs .",
|
|
28
29
|
"test": "vitest run --passWithNoTests",
|
|
29
|
-
"
|
|
30
|
+
"check:consumer": "node ../scripts/check-negative-type-contracts.mjs --config jsconfig.consumer.json",
|
|
31
|
+
"type-check": "yarn run check && yarn check:consumer"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"typescript": "~5.8.3"
|
|
30
35
|
},
|
|
31
36
|
"exports": {
|
|
32
37
|
".": {
|
|
33
38
|
"types": "./dist/index.d.ts",
|
|
34
|
-
"import": "./
|
|
35
|
-
"default": "./
|
|
39
|
+
"import": "./src/index.js",
|
|
40
|
+
"default": "./src/index.js"
|
|
36
41
|
}
|
|
37
42
|
},
|
|
38
43
|
"files": [
|
|
44
|
+
"src/**/*.js",
|
|
39
45
|
"dist/**/*.d.ts",
|
|
40
46
|
"dist/**/*.d.ts.map",
|
|
41
|
-
"
|
|
42
|
-
"dist/**/*.js.map",
|
|
43
|
-
"!dist/**/*.test.*"
|
|
47
|
+
"!src/**/*.test.js"
|
|
44
48
|
],
|
|
45
49
|
"sideEffects": false,
|
|
46
50
|
"engines": {
|
package/src/app-data.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/** @import { RepositoryJsonValue } from './repositories/repository-mutation.js' */
|
|
3
|
+
export {};
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {object} AppDataCacheRecord
|
|
6
|
+
* @property {string} cachedAt
|
|
7
|
+
* @property {string} [cursor]
|
|
8
|
+
* @property {"fresh" | "stale" | "offline" | "unavailable"} freshness
|
|
9
|
+
* @property {string} key
|
|
10
|
+
* @property {string} namespace
|
|
11
|
+
* @property {string} revision
|
|
12
|
+
* @property {"online" | "offline"} transport
|
|
13
|
+
* @property {RepositoryJsonValue} value
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* @typedef {object} AppDataCacheWrite
|
|
17
|
+
* @property {string} key
|
|
18
|
+
* @property {string} revision
|
|
19
|
+
* @property {RepositoryJsonValue} value
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {object} AppDataCacheCommit
|
|
23
|
+
* @property {string} cursor
|
|
24
|
+
* @property {string} cursorKey
|
|
25
|
+
* @property {string} revision
|
|
26
|
+
* @property {readonly AppDataCacheWrite[]} rows
|
|
27
|
+
*/
|
|
28
|
+
/** Typed post-commit result from the cache repository. It is intentionally
|
|
29
|
+
* repository-local; the kernel maps it to the public app-data event payload.
|
|
30
|
+
* @typedef {object} AppDataCacheCommitEvent
|
|
31
|
+
* @property {readonly string[]} changedKeys
|
|
32
|
+
* @property {string} cursor
|
|
33
|
+
* @property {string} cursorKey
|
|
34
|
+
* @property {string} namespace
|
|
35
|
+
* @property {string} revision
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* @typedef {object} AppDataCacheRepository
|
|
39
|
+
* @property {(namespace: string, key: string) => Promise<AppDataCacheRecord | undefined>} read
|
|
40
|
+
* @property {(namespace: string, key: string, value: RepositoryJsonValue, revision: string, cursor?: string) => Promise<void>} write
|
|
41
|
+
* @property {(namespace: string, commit: AppDataCacheCommit) => Promise<AppDataCacheCommitEvent | undefined>} writeBatch
|
|
42
|
+
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
export {};
|
|
3
|
+
/**
|
|
4
|
+
* Which UI this browser should land on at the node's root.
|
|
5
|
+
*
|
|
6
|
+
* The node backend serves both the Client Node PWA (at `/`) and the legacy `system/ui` SPA
|
|
7
|
+
* (at `/v1/`). `"pwa"` is the default and is represented by the ABSENCE of any stored value,
|
|
8
|
+
* so a browser that has never chosen carries no state at all.
|
|
9
|
+
* @typedef {"pwa" | "v1"} ClientUiChoice
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Read and change the per-browser UI choice.
|
|
13
|
+
*
|
|
14
|
+
* A port rather than direct storage access because `client/ui` may not touch browser globals
|
|
15
|
+
* (boundary rules B2/B3/N1) — same seam and same reason as `ThemeEnvironmentPort`. `select`
|
|
16
|
+
* both persists the choice and navigates, because the two are one user-visible action and
|
|
17
|
+
* splitting them would let a caller leave the preference and the current document
|
|
18
|
+
* disagreeing.
|
|
19
|
+
* @typedef {object} ClientUiPreferencePort
|
|
20
|
+
* @property {() => ClientUiChoice} read
|
|
21
|
+
* @property {(choice: ClientUiChoice) => void} select
|
|
22
|
+
* @property {(choice: ClientUiChoice) => void} visit
|
|
23
|
+
*/
|
package/src/clipboard.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
export {};
|
|
3
|
+
/**
|
|
4
|
+
* Boundary port for reading the OS text clipboard, backing the invitation screen's "Paste"
|
|
5
|
+
* button (`shell/onboarding/screens/identify-invitation.ts`'s `#pasteInto`).
|
|
6
|
+
*
|
|
7
|
+
* `client/ui` may never call `navigator.clipboard` directly (boundary rules B2/B3,
|
|
8
|
+
* `client/scripts/check-boundaries.mjs`) — this is the narrow surface
|
|
9
|
+
* `client/adapters-web`'s `createBrowserClipboard()` implements against the real global, and
|
|
10
|
+
* the composition root (`system/pwa/src/main.ts`) registers it (via `client/ui`'s
|
|
11
|
+
* `configureClipboard`) before the shell's first paint, mirroring `MediaPreferencesPort`'s
|
|
12
|
+
* registration exactly.
|
|
13
|
+
*
|
|
14
|
+
* Deliberately NOT mediated through `@econ-v1/rpc`/the kernel, for the same reason
|
|
15
|
+
* `MediaPreferencesPort` isn't: the clipboard is browser I/O, not kernel-owned domain
|
|
16
|
+
* state — there is nothing for the kernel to know about a value that never leaves this tab
|
|
17
|
+
* and is never persisted, and routing a paste through a `query`/`liveQuery` round trip
|
|
18
|
+
* would only add latency to a synchronous user gesture (the Paste button click) for no
|
|
19
|
+
* benefit. Also deliberately a separate port from `MediaPreferencesPort` rather than folded
|
|
20
|
+
* into it: that port models synchronous, side-effect-free one-shot reads taken during
|
|
21
|
+
* `connectedCallback`/`mount`; this one models a single asynchronous, fallible operation
|
|
22
|
+
* triggered by an explicit user action (a button click), with a completely different shape.
|
|
23
|
+
*
|
|
24
|
+
* `readText()` resolves to `undefined`, never a rejected promise, on ANY failure —
|
|
25
|
+
* permission denied, an environment without Clipboard API support, or the user dismissing
|
|
26
|
+
* the browser's own permission prompt all collapse into the same "nothing to paste"
|
|
27
|
+
* outcome. This is a deliberate sentinel, not an exception: the call site (`#pasteInto`)
|
|
28
|
+
* must fail silently by design (today's behavior, preserved exactly here) — a
|
|
29
|
+
* `Promise<string>` that can reject would force every caller to wrap the call in
|
|
30
|
+
* try/catch just to reproduce that silence, and a forgotten catch would surface a raw
|
|
31
|
+
* clipboard permission error as an unhandled rejection instead. The adapter is the only
|
|
32
|
+
* place that ever sees the real rejection reason; everything past it just sees "got text"
|
|
33
|
+
* or "didn't."
|
|
34
|
+
*
|
|
35
|
+
* The clipboard text itself must never be retained, cached, or logged by this port, its
|
|
36
|
+
* adapter, or any caller — it is a secret in the invitation-code call site (see
|
|
37
|
+
* `identify-invitation.ts`'s own security note) and must flow straight from the browser API
|
|
38
|
+
* into the caller's live `<input>.value`, nowhere else.
|
|
39
|
+
* @typedef {object} ClipboardPort
|
|
40
|
+
* @property {() => Promise<string | undefined>} readText
|
|
41
|
+
*/
|
package/src/clock.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/** @typedef {{ cancel(): void }} ClockWake */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {object} ClockPort
|
|
7
|
+
* @property {() => string} now
|
|
8
|
+
* @property {(dueAt: string, wake: () => void) => ClockWake} wakeAt
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** @typedef {{ wait(milliseconds: number): Promise<void> }} DelayPort */
|
|
12
|
+
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
export {};
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {| "cancelled"
|
|
5
|
+
* | "peer-closed"
|
|
6
|
+
* | "timed-out"} CredentialHandoffCancellationReason
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {| {
|
|
10
|
+
* readonly version: 1;
|
|
11
|
+
* readonly type: "classic-pending";
|
|
12
|
+
* readonly transactionId: string;
|
|
13
|
+
* readonly deviceId: string;
|
|
14
|
+
* readonly operationHash: string;
|
|
15
|
+
* }
|
|
16
|
+
* | {
|
|
17
|
+
* readonly version: 1;
|
|
18
|
+
* readonly type: "classic-ready";
|
|
19
|
+
* readonly transactionId: string;
|
|
20
|
+
* }
|
|
21
|
+
* | {
|
|
22
|
+
* readonly version: 1;
|
|
23
|
+
* readonly type: "pwa-owner-key";
|
|
24
|
+
* readonly transactionId: string;
|
|
25
|
+
* readonly ownerPublicKey: string;
|
|
26
|
+
* }
|
|
27
|
+
* | {
|
|
28
|
+
* readonly version: 1;
|
|
29
|
+
* readonly type: "pwa-migration-challenge";
|
|
30
|
+
* readonly transactionId: string;
|
|
31
|
+
* readonly challenge: string;
|
|
32
|
+
* }
|
|
33
|
+
* | {
|
|
34
|
+
* readonly version: 1;
|
|
35
|
+
* readonly type: "pwa-owner-signature";
|
|
36
|
+
* readonly transactionId: string;
|
|
37
|
+
* readonly signature: string;
|
|
38
|
+
* }
|
|
39
|
+
* | {
|
|
40
|
+
* readonly version: 1;
|
|
41
|
+
* readonly type: "handoff-cancelled";
|
|
42
|
+
* readonly transactionId: string;
|
|
43
|
+
* readonly reason: CredentialHandoffCancellationReason;
|
|
44
|
+
* }} CredentialHandoffMessage
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* @typedef {| { readonly status: "opened"; readonly connection: CredentialHandoffConnection }
|
|
48
|
+
* | { readonly status: "popup-blocked" }} CredentialHandoffOpenResult
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* @typedef {object} CredentialHandoffConnection
|
|
52
|
+
* @property {string} transactionId
|
|
53
|
+
* @property {() => void} close
|
|
54
|
+
* @property {() => void} focusPeer
|
|
55
|
+
* @property {(message: CredentialHandoffMessage) => void} send
|
|
56
|
+
* @property {(listener: (message: CredentialHandoffMessage) => void) => () => void} subscribe
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* @typedef {object} CredentialHandoffPort
|
|
60
|
+
* @property {() => CredentialHandoffOpenResult} openClassicPairing
|
|
61
|
+
* @property {(transactionId: string) => CredentialHandoffConnection | undefined} connectToClassicOpener
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* Owns the bounded pre-adapter browser message capture for one handoff transaction.
|
|
65
|
+
* @typedef {object} CredentialHandoffMessageCapturePort
|
|
66
|
+
* @property {() => void} close
|
|
67
|
+
* @property {() => void} replay
|
|
68
|
+
*/
|
package/src/crypto.js
ADDED
package/src/id.js
ADDED
package/src/identity.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/** @typedef {import("./offline-readiness.js").OfflineIdentityScope} OfflineIdentityScope */
|
|
4
|
+
|
|
5
|
+
/** @typedef {{ readonly id: string }} DeviceKeyHandle */
|
|
6
|
+
/** @typedef {"non-extractable" | "wrapped"} KeyCustodyMode */
|
|
7
|
+
/** @typedef {{ readonly custodyMode: KeyCustodyMode, readonly did: string, readonly nodeId: string, readonly publicKeyMultibase: string }} DevicePublicIdentity */
|
|
8
|
+
/** @typedef {{ readonly credential: string, readonly expiresAt: string, readonly issuedAt: string, readonly revocationId: string, readonly scopes: readonly string[] }} DeviceDelegation */
|
|
9
|
+
/** @typedef {{ readonly directAddresses: readonly string[], readonly homeNodeId?: string, readonly lastConnectedAt?: string, readonly relayUrl?: string, readonly wanOrigin?: string }} DeviceConnectionMetadata */
|
|
10
|
+
/** @typedef {DevicePublicIdentity & { readonly keyHandle: DeviceKeyHandle }} DeviceIdentity */
|
|
11
|
+
/** @typedef {{ readonly custodyMode?: KeyCustodyMode, readonly hasDelegation: boolean, readonly keyId?: string }} IdentityDiagnostics */
|
|
12
|
+
/** @typedef {"active" | "revoked"} IdentityLifecycle */
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {object} IdentityPort
|
|
16
|
+
* @property {() => Promise<DeviceIdentity>} generate
|
|
17
|
+
* @property {(keyHandle: DeviceKeyHandle, payload: Uint8Array) => Promise<Uint8Array>} sign
|
|
18
|
+
* @property {() => Promise<DevicePublicIdentity | undefined>} publicIdentity
|
|
19
|
+
* @property {() => Promise<OfflineIdentityScope | undefined>} readOfflineScope
|
|
20
|
+
* @property {() => Promise<DeviceDelegation | undefined>} loadDelegation
|
|
21
|
+
* @property {(delegation: DeviceDelegation) => Promise<void>} storeDelegation
|
|
22
|
+
* @property {() => Promise<DeviceConnectionMetadata | undefined>} loadConnectionMetadata
|
|
23
|
+
* @property {(metadata: DeviceConnectionMetadata) => Promise<void>} storeConnectionMetadata
|
|
24
|
+
* @property {() => Promise<void>} clearDelegation
|
|
25
|
+
* @property {() => Promise<void>} clear
|
|
26
|
+
* @property {() => Promise<DeviceIdentity>} recoverAfterRevocation
|
|
27
|
+
* @property {() => Promise<IdentityDiagnostics>} diagnostics
|
|
28
|
+
* @property {() => Promise<IdentityLifecycle | undefined>} [loadLifecycle]
|
|
29
|
+
* @property {() => Promise<string | undefined>} [loadPairingAttemptName]
|
|
30
|
+
* @property {(name: string) => Promise<void>} [storePairingAttemptName]
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export {};
|
package/src/index.js
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/** @typedef {import("./clock.js").ClockPort} ClockPort */
|
|
4
|
+
/** @typedef {import("./clock.js").ClockWake} ClockWake */
|
|
5
|
+
/** @typedef {import("./clock.js").DelayPort} DelayPort */
|
|
6
|
+
/** @typedef {import("./app-data.js").AppDataCacheCommit} AppDataCacheCommit */
|
|
7
|
+
/** @typedef {import("./app-data.js").AppDataCacheCommitEvent} AppDataCacheCommitEvent */
|
|
8
|
+
/** @typedef {import("./app-data.js").AppDataCacheRecord} AppDataCacheRecord */
|
|
9
|
+
/** @typedef {import("./app-data.js").AppDataCacheRepository} AppDataCacheRepository */
|
|
10
|
+
/** @typedef {import("./app-data.js").AppDataCacheWrite} AppDataCacheWrite */
|
|
11
|
+
/** @typedef {import("./client-ui-preference.js").ClientUiChoice} ClientUiChoice */
|
|
12
|
+
/** @typedef {import("./client-ui-preference.js").ClientUiPreferencePort} ClientUiPreferencePort */
|
|
13
|
+
/** @typedef {import("./clipboard.js").ClipboardPort} ClipboardPort */
|
|
14
|
+
/** @typedef {import("./credential-handoff.js").CredentialHandoffCancellationReason} CredentialHandoffCancellationReason */
|
|
15
|
+
/** @typedef {import("./credential-handoff.js").CredentialHandoffConnection} CredentialHandoffConnection */
|
|
16
|
+
/** @typedef {import("./credential-handoff.js").CredentialHandoffMessage} CredentialHandoffMessage */
|
|
17
|
+
/** @typedef {import("./credential-handoff.js").CredentialHandoffMessageCapturePort} CredentialHandoffMessageCapturePort */
|
|
18
|
+
/** @typedef {import("./credential-handoff.js").CredentialHandoffOpenResult} CredentialHandoffOpenResult */
|
|
19
|
+
/** @typedef {import("./credential-handoff.js").CredentialHandoffPort} CredentialHandoffPort */
|
|
20
|
+
/** @typedef {import("./crypto.js").CryptoPort} CryptoPort */
|
|
21
|
+
/** @typedef {import("./id.js").IdPort} IdPort */
|
|
22
|
+
/** @typedef {import("./identity.js").DeviceConnectionMetadata} DeviceConnectionMetadata */
|
|
23
|
+
/** @typedef {import("./identity.js").DeviceDelegation} DeviceDelegation */
|
|
24
|
+
/** @typedef {import("./identity.js").DeviceIdentity} DeviceIdentity */
|
|
25
|
+
/** @typedef {import("./identity.js").DeviceKeyHandle} DeviceKeyHandle */
|
|
26
|
+
/** @typedef {import("./identity.js").DevicePublicIdentity} DevicePublicIdentity */
|
|
27
|
+
/** @typedef {import("./identity.js").IdentityDiagnostics} IdentityDiagnostics */
|
|
28
|
+
/** @typedef {import("./identity.js").IdentityLifecycle} IdentityLifecycle */
|
|
29
|
+
/** @typedef {import("./identity.js").IdentityPort} IdentityPort */
|
|
30
|
+
/** @typedef {import("./identity.js").KeyCustodyMode} KeyCustodyMode */
|
|
31
|
+
/** @typedef {import("./install-environment.js").InstallEnvironmentPort} InstallEnvironmentPort */
|
|
32
|
+
/** @typedef {import("./install-environment.js").InstallInstructionMode} InstallInstructionMode */
|
|
33
|
+
/** @typedef {import("./network.js").DeltaRequest} DeltaRequest */
|
|
34
|
+
/** @typedef {import("./network.js").AppEventEnvelope} AppEventEnvelope */
|
|
35
|
+
/** @typedef {import("./network.js").AppEventSubscribeOptions} AppEventSubscribeOptions */
|
|
36
|
+
/** @typedef {import("./network.js").AppEventSubscription} AppEventSubscription */
|
|
37
|
+
/** @typedef {import("./network.js").CancellationSignal} CancellationSignal */
|
|
38
|
+
/** @typedef {import("./network.js").DirectHomeNodeCandidate} DirectHomeNodeCandidate */
|
|
39
|
+
/** @typedef {import("./network.js").DirectTransportPath} DirectTransportPath */
|
|
40
|
+
/** @typedef {import("./network.js").HomeNodeClient} HomeNodeClient */
|
|
41
|
+
/** @typedef {import("./network.js").HttpHomeNodeCandidate} HttpHomeNodeCandidate */
|
|
42
|
+
/** @typedef {import("./network.js").HttpTransportPath} HttpTransportPath */
|
|
43
|
+
/** @typedef {import("./network.js").HomeNodeRequest} HomeNodeRequest */
|
|
44
|
+
/** @typedef {import("./network.js").PeerTransportPort} PeerTransportPort */
|
|
45
|
+
/** @typedef {import("./network.js").TransportOfflineReason} TransportOfflineReason */
|
|
46
|
+
/** @typedef {import("./network.js").TransportPath} TransportPath */
|
|
47
|
+
/** @typedef {import("./network.js").TransportState} TransportState */
|
|
48
|
+
/** @typedef {import("./network.js").WebTransportCertificateHashes} WebTransportCertificateHashes */
|
|
49
|
+
/** @typedef {import("./network.js").WebTransportHomeNodeCandidate} WebTransportHomeNodeCandidate */
|
|
50
|
+
/** @typedef {import("./network/home-node-candidate.js").HomeNodeCandidate} HomeNodeCandidate */
|
|
51
|
+
/** @typedef {import("./network/home-node-candidate.js").HomeNodeDialer} HomeNodeDialer */
|
|
52
|
+
/** @typedef {import("./network/home-node-candidate-store.js").HomeNodeCandidateStorePort} HomeNodeCandidateStorePort */
|
|
53
|
+
/** @typedef {import("./network/home-node-candidate-store.js").StoredHomeNodeCandidate} StoredHomeNodeCandidate */
|
|
54
|
+
/** @typedef {import("./network/l402-payment.js").L402PaymentChallenge} L402PaymentChallenge */
|
|
55
|
+
/** @typedef {import("./network/l402-payment.js").L402PaymentHandler} L402PaymentHandler */
|
|
56
|
+
/** @typedef {import("./network/l402-payment.js").L402PaymentResult} L402PaymentResult */
|
|
57
|
+
/** @typedef {import("./network/node-discovery.js").NodeAddressDiscoverer} NodeAddressDiscoverer */
|
|
58
|
+
/** @typedef {import("./network/node-discovery.js").NodeDiscoveryCandidate} NodeDiscoveryCandidate */
|
|
59
|
+
/** @typedef {import("./network/node-discovery.js").NodeDiscoveryResult} NodeDiscoveryResult */
|
|
60
|
+
/** @typedef {import("./network/webrtc-signaling.js").WebRtcAnswer} WebRtcAnswer */
|
|
61
|
+
/** @typedef {import("./network/webrtc-signaling.js").WebRtcClose} WebRtcClose */
|
|
62
|
+
/** @typedef {import("./network/webrtc-signaling.js").WebRtcIceCandidate} WebRtcIceCandidate */
|
|
63
|
+
/** @typedef {import("./network/webrtc-signaling.js").WebRtcOffer} WebRtcOffer */
|
|
64
|
+
/** @typedef {import("./network/webrtc-signaling.js").WebRtcRestart} WebRtcRestart */
|
|
65
|
+
/** @typedef {import("./network/webrtc-signaling.js").WebRtcSignalMessage} WebRtcSignalMessage */
|
|
66
|
+
/** @typedef {import("./network/webrtc-signaling.js").WebRtcSignalSetup} WebRtcSignalSetup */
|
|
67
|
+
/** @typedef {import("./network/webrtc-signaling.js").WebRtcSignalingPort} WebRtcSignalingPort */
|
|
68
|
+
/** @typedef {import("./repositories.js").PreparedStageAsset} PreparedStageAsset */
|
|
69
|
+
/** @typedef {import("./repositories.js").AppDataManifest} AppDataManifest */
|
|
70
|
+
/** @typedef {import("./repositories.js").AppDataOfflinePolicy} AppDataOfflinePolicy */
|
|
71
|
+
/** @typedef {import("./repositories.js").AppDataQueryDeclaration} AppDataQueryDeclaration */
|
|
72
|
+
/** @typedef {import("./repositories.js").AppDataQueryKind} AppDataQueryKind */
|
|
73
|
+
/** @typedef {import("./repositories.js").AppDataStreamDeclaration} AppDataStreamDeclaration */
|
|
74
|
+
/** @typedef {import("./repositories.js").AppDataStreamKind} AppDataStreamKind */
|
|
75
|
+
/** @typedef {import("./repositories.js").AppDataSyncKind} AppDataSyncKind */
|
|
76
|
+
/** @typedef {import("./repositories.js").AppDataSyncPolicy} AppDataSyncPolicy */
|
|
77
|
+
/** @typedef {import("./repositories.js").StageAssetPort} StageAssetPort */
|
|
78
|
+
/** @typedef {import("./repositories.js").StageCatalogEntry} StageCatalogEntry */
|
|
79
|
+
/** @typedef {import("./repositories.js").StageManifest} StageManifest */
|
|
80
|
+
/** @typedef {import("./repositories.js").StageUiKind} StageUiKind */
|
|
81
|
+
/** @typedef {import("./repositories.js").StageUiMetadata} StageUiMetadata */
|
|
82
|
+
/** @typedef {import("./repositories.js").StageUiNav} StageUiNav */
|
|
83
|
+
/** @typedef {import("./repositories.js").StageUiRequirements} StageUiRequirements */
|
|
84
|
+
/** @typedef {import("./repositories.js").StageRegistryPort} StageRegistryPort */
|
|
85
|
+
/** @typedef {import("./repositories.js").StageRegistrySnapshot} StageRegistrySnapshot */
|
|
86
|
+
/** @typedef {import("./repositories/conversation-repository.js").Conversation} Conversation */
|
|
87
|
+
/** @typedef {import("./repositories/conversation-repository.js").ConversationListParams} ConversationListParams */
|
|
88
|
+
/** @typedef {import("./repositories/conversation-repository.js").ConversationLogDelta} ConversationLogDelta */
|
|
89
|
+
/** @typedef {import("./repositories/conversation-repository.js").ConversationMessage} ConversationMessage */
|
|
90
|
+
/** @typedef {import("./repositories/conversation-repository.js").ConversationMessageState} ConversationMessageState */
|
|
91
|
+
/** @typedef {import("./repositories/conversation-repository.js").ConversationRepository} ConversationRepository */
|
|
92
|
+
/** @typedef {import("./repositories/conversation-repository.js").ConversationRepositoryEvent} ConversationRepositoryEvent */
|
|
93
|
+
/** @typedef {import("./repositories/conversation-repository.js").MessageListParams} MessageListParams */
|
|
94
|
+
/** @typedef {import("./repositories/conversation-repository.js").Notification} Notification */
|
|
95
|
+
/** @typedef {import("./repositories/conversation-repository.js").NotificationListParams} NotificationListParams */
|
|
96
|
+
/** @typedef {import("./repositories/conversation-repository.js").NotificationRepository} NotificationRepository */
|
|
97
|
+
/** @typedef {import("./repositories/conversation-repository.js").NotificationRepositoryEvent} NotificationRepositoryEvent */
|
|
98
|
+
/** @typedef {import("./repositories/conversation-repository.js").RepositoryEvent} RepositoryEvent */
|
|
99
|
+
/** @typedef {import("./repositories/durable-event.js").DurableEvent} DurableEvent */
|
|
100
|
+
/** @template {DurableEvent} [TEvent=DurableEvent] @typedef {import("./repositories/durable-event.js").DurableRepositoryEvent<TEvent>} DurableRepositoryEvent */
|
|
101
|
+
/** @template {DurableEvent} [TEvent=DurableEvent] @typedef {import("./repositories/durable-event.js").DurableRepositoryEventStore<TEvent>} DurableRepositoryEventStore */
|
|
102
|
+
/** @template {DurableEvent} [TEvent=DurableEvent] @typedef {import("./repositories/durable-event.js").RepositoryWriteResult<TEvent>} RepositoryWriteResult */
|
|
103
|
+
/** @typedef {import("./repositories/outbox.js").OutboxDeletedEvent} OutboxDeletedEvent */
|
|
104
|
+
/** @typedef {import("./repositories/outbox.js").OutboxRecord} OutboxRecord */
|
|
105
|
+
/** @typedef {import("./repositories/outbox.js").OutboxRecordState} OutboxRecordState */
|
|
106
|
+
/** @typedef {import("./repositories/outbox.js").OutboxReplayClaim} OutboxReplayClaim */
|
|
107
|
+
/** @typedef {import("./repositories/outbox.js").OutboxReplayStatus} OutboxReplayStatus */
|
|
108
|
+
/** @typedef {import("./repositories/outbox.js").OutboxRepository} OutboxRepository */
|
|
109
|
+
/** @typedef {import("./repositories/outbox.js").OutboxRepositoryEvent} OutboxRepositoryEvent */
|
|
110
|
+
/** @typedef {import("./repositories/outbox.js").OutboxRepositoryFilter} OutboxRepositoryFilter */
|
|
111
|
+
/** @typedef {import("./repositories/outbox.js").OutboxSettleInput} OutboxSettleInput */
|
|
112
|
+
/** @typedef {import("./repositories/outbox.js").OutboxStateChangedEvent} OutboxStateChangedEvent */
|
|
113
|
+
/** @typedef {import("./repositories/repository-mutation.js").RepositoryJsonPrimitive} RepositoryJsonPrimitive */
|
|
114
|
+
/** @typedef {import("./repositories/repository-mutation.js").RepositoryJsonValue} RepositoryJsonValue */
|
|
115
|
+
/** @typedef {import("./repositories/settings.js").SettingInput} SettingInput */
|
|
116
|
+
/** @typedef {import("./repositories/settings.js").SettingRecord} SettingRecord */
|
|
117
|
+
/** @typedef {import("./repositories/settings.js").SettingsRepository} SettingsRepository */
|
|
118
|
+
/** @typedef {import("./repositories/settings.js").SettingsRepositoryEvent} SettingsRepositoryEvent */
|
|
119
|
+
/** @typedef {import("./repositories/sync-ledger.js").SyncLedgerInput} SyncLedgerInput */
|
|
120
|
+
/** @typedef {import("./repositories/sync-ledger.js").SyncLedgerRecord} SyncLedgerRecord */
|
|
121
|
+
/** @typedef {import("./repositories/sync-ledger.js").SyncLedgerRepository} SyncLedgerRepository */
|
|
122
|
+
/** @typedef {import("./repositories/sync-ledger.js").SyncLedgerRepositoryEvent} SyncLedgerRepositoryEvent */
|
|
123
|
+
/** @typedef {import("./repositories/sync-ledger.js").SyncCursorDeletedEvent} SyncCursorDeletedEvent */
|
|
124
|
+
/** @typedef {import("./repositories/sync-ledger.js").SyncDeltaAppliedEvent} SyncDeltaAppliedEvent */
|
|
125
|
+
/** @typedef {import("./repositories/revisioned-repository.js").AgentRepository} AgentRepository */
|
|
126
|
+
/** @typedef {import("./repositories/revisioned-repository.js").GraphRepository} GraphRepository */
|
|
127
|
+
/** @template {RepositoryJsonValue} [TValue=RepositoryJsonValue] @typedef {import("./repositories/revisioned-repository.js").RevisionCommand<TValue>} RevisionCommand */
|
|
128
|
+
/** @template {RepositoryJsonValue} [TValue=RepositoryJsonValue] @typedef {import("./repositories/revisioned-repository.js").RevisionCommandResult<TValue>} RevisionCommandResult */
|
|
129
|
+
/** @template {RepositoryJsonValue} [TValue=RepositoryJsonValue] @typedef {import("./repositories/revisioned-repository.js").RevisionedEntity<TValue>} RevisionedEntity */
|
|
130
|
+
/** @template {RepositoryJsonValue} [TValue=RepositoryJsonValue] @typedef {import("./repositories/revisioned-repository.js").RevisionedRepository<TValue>} RevisionedRepository */
|
|
131
|
+
/** @typedef {import("./repositories/revisioned-repository.js").RevisionedRepositoryDomain} RevisionedRepositoryDomain */
|
|
132
|
+
/** @typedef {import("./repositories/revisioned-repository.js").RevisionedRepositoryEvent} RevisionedRepositoryEvent */
|
|
133
|
+
/** @typedef {import("./repositories/revisioned-repository.js").RevisionedSettingsRepository} RevisionedSettingsRepository */
|
|
134
|
+
/** @typedef {import("./repositories/wallet-mirror-repository.js").WalletAuthoritativeSnapshot} WalletAuthoritativeSnapshot */
|
|
135
|
+
/** @typedef {import("./repositories/wallet-mirror-repository.js").WalletCommandResult} WalletCommandResult */
|
|
136
|
+
/** @typedef {import("./repositories/wallet-mirror-repository.js").WalletL402Receipt} WalletL402Receipt */
|
|
137
|
+
/** @typedef {import("./repositories/wallet-mirror-repository.js").WalletMirrorRepository} WalletMirrorRepository */
|
|
138
|
+
/** @typedef {import("./repositories/wallet-mirror-repository.js").WalletPaymentRecord} WalletPaymentRecord */
|
|
139
|
+
/** @typedef {import("./repositories/wallet-mirror-repository.js").WalletSnapshotValue} WalletSnapshotValue */
|
|
140
|
+
/** @typedef {import("./media-preferences.js").MediaPreferencesPort} MediaPreferencesPort */
|
|
141
|
+
/** @typedef {import("./scheduler.js").ScheduledJob} ScheduledJob */
|
|
142
|
+
/** @typedef {import("./scheduler.js").SchedulerPort} SchedulerPort */
|
|
143
|
+
/** @typedef {import("./theme.js").ThemeEnvironmentPort} ThemeEnvironmentPort */
|
|
144
|
+
/** @typedef {import("./theme.js").ThemePreference} ThemePreference */
|
|
145
|
+
/** @typedef {import("./storage.js").EncryptedStorageDiagnostic} EncryptedStorageDiagnostic */
|
|
146
|
+
/** @typedef {import("./storage.js").IdentityScopedStorageRepositoryPort} IdentityScopedStorageRepositoryPort */
|
|
147
|
+
/** @typedef {import("./storage.js").StorageDatabasePort} StorageDatabasePort */
|
|
148
|
+
/** @typedef {import("./storage.js").StoragePort} StoragePort */
|
|
149
|
+
/** @typedef {import("./storage.js").StorageReadyState} StorageReadyState */
|
|
150
|
+
/** @typedef {import("./storage.js").StorageRecoveryCode} StorageRecoveryCode */
|
|
151
|
+
/** @typedef {import("./storage.js").StorageRecoveryRequiredState} StorageRecoveryRequiredState */
|
|
152
|
+
/** @typedef {import("./storage.js").StorageRecoveryState} StorageRecoveryState */
|
|
153
|
+
/** @typedef {import("./storage.js").StorageRepositoryEvent} StorageRepositoryEvent */
|
|
154
|
+
/** @typedef {import("./storage.js").StorageRepositoryPort} StorageRepositoryPort */
|
|
155
|
+
/** @typedef {import("./storage.js").StorageStartingState} StorageStartingState */
|
|
156
|
+
export { StorageOperationError } from "./storage.js";
|
|
157
|
+
/** @typedef {import("./offline-readiness.js").OfflineIdentityScope} OfflineIdentityScope */
|
|
158
|
+
/** @typedef {import("./offline-readiness.js").OfflineProjectionRepository} OfflineProjectionRepository */
|
|
159
|
+
/** @typedef {import("./offline-readiness.js").OfflineReadinessFailureCode} OfflineReadinessFailureCode */
|
|
160
|
+
/** @typedef {import("./offline-readiness.js").OfflineStageReadiness} OfflineStageReadiness */
|
|
161
|
+
/** @typedef {import("./offline-readiness.js").OfflineStageRepository} OfflineStageRepository */
|
|
162
|
+
/** @typedef {import("./offline-readiness.js").OfflineStageState} OfflineStageState */
|
|
163
|
+
/** @typedef {import("./offline-readiness.js").OfflineStorageEstimatePort} OfflineStorageEstimatePort */
|
|
164
|
+
/** @typedef {import("./offline-readiness.js").StageAssetCandidate} StageAssetCandidate */
|
|
165
|
+
/** @typedef {import("./offline-readiness.js").VerifiedStageAssetPort} VerifiedStageAssetPort */
|
|
166
|
+
/** @typedef {import("./lcd-tree-source.js").LcdScreenStatePatch} LcdScreenStatePatch */
|
|
167
|
+
/** @typedef {import("./lcd-tree-source.js").LcdTreeNode} LcdTreeNode */
|
|
168
|
+
/** @typedef {import("./lcd-tree-source.js").LcdTreeOutcome} LcdTreeOutcome */
|
|
169
|
+
/** @typedef {import("./lcd-tree-source.js").LcdTreeSourcePort} LcdTreeSourcePort */
|
|
170
|
+
/** @typedef {import("./legacy-credential.js").LegacyCredentialProbePort} LegacyCredentialProbePort */
|
|
171
|
+
/** @typedef {import("./legacy-credential.js").LegacyCredentialStatus} LegacyCredentialStatus */
|
|
172
|
+
/** @typedef {import("./network/certificate-trust.js").CertificateTrustPlatform} CertificateTrustPlatform */
|
|
173
|
+
/** @typedef {import("./network/certificate-trust.js").CertificateTrustProbePort} CertificateTrustProbePort */
|
|
174
|
+
/** @typedef {import("./network/certificate-trust.js").CertificateTrustProbeResult} CertificateTrustProbeResult */
|
|
175
|
+
/** @typedef {import("./network/certificate-trust.js").PlatformTrustPort} PlatformTrustPort */
|
|
176
|
+
/** @typedef {import("./onboarding-access-code.js").OnboardingAccessCodeStore} OnboardingAccessCodeStore */
|
|
177
|
+
/** @typedef {import("./onboarding-checkpoint.js").OnboardingCheckpointStoragePort} OnboardingCheckpointStoragePort */
|
|
178
|
+
/** @typedef {import("./onboarding-presence.js").OnboardingPresencePhase} OnboardingPresencePhase */
|
|
179
|
+
/** @typedef {import("./onboarding-presence.js").OnboardingPresencePort} OnboardingPresencePort */
|
|
180
|
+
/** @typedef {import("./owner-claim-session.js").OwnerClaimGenesisDevice} OwnerClaimGenesisDevice */
|
|
181
|
+
/** @typedef {import("./owner-claim-session.js").OwnerClaimSessionPort} OwnerClaimSessionPort */
|
|
182
|
+
/** @typedef {import("./owner-claim-session.js").OwnerClaimSessionTokens} OwnerClaimSessionTokens */
|
|
183
|
+
/** @typedef {import("./owner-claim.js").OwnerClaimCryptoPort} OwnerClaimCryptoPort */
|
|
184
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppInstallSource} NodeAppInstallSource */
|
|
185
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppBudgetState} NodeAppBudgetState */
|
|
186
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppBudgetVerdict} NodeAppBudgetVerdict */
|
|
187
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppDeviceMemory} NodeAppDeviceMemory */
|
|
188
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppGovernorRow} NodeAppGovernorRow */
|
|
189
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppHeapObjectTypeCount} NodeAppHeapObjectTypeCount */
|
|
190
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppHeapSnapshot} NodeAppHeapSnapshot */
|
|
191
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppHeapSnapshotState} NodeAppHeapSnapshotState */
|
|
192
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppHeapSnapshotSummary} NodeAppHeapSnapshotSummary */
|
|
193
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppLaneKind} NodeAppLaneKind */
|
|
194
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppLifecycleMemoryObservation} NodeAppLifecycleMemoryObservation */
|
|
195
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryActivityRollup} NodeAppMemoryActivityRollup */
|
|
196
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryApp} NodeAppMemoryApp */
|
|
197
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryAttribution} NodeAppMemoryAttribution */
|
|
198
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryAvailability} NodeAppMemoryAvailability */
|
|
199
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryBudgetBasis} NodeAppMemoryBudgetBasis */
|
|
200
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryCapabilityCallCount} NodeAppMemoryCapabilityCallCount */
|
|
201
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryDownload} NodeAppMemoryDownload */
|
|
202
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryOverview} NodeAppMemoryOverview */
|
|
203
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryOverviewApp} NodeAppMemoryOverviewApp */
|
|
204
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryReading} NodeAppMemoryReading */
|
|
205
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryRepository} NodeAppMemoryRepository */
|
|
206
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemorySnapshot} NodeAppMemorySnapshot */
|
|
207
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemorySource} NodeAppMemorySource */
|
|
208
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryTrend} NodeAppMemoryTrend */
|
|
209
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryTrendVerdict} NodeAppMemoryTrendVerdict */
|
|
210
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppMemoryUnavailableReason} NodeAppMemoryUnavailableReason */
|
|
211
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppPressureState} NodeAppPressureState */
|
|
212
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppRuntimeMode} NodeAppRuntimeMode */
|
|
213
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppStatus} NodeAppStatus */
|
|
214
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppTerminationReason} NodeAppTerminationReason */
|
|
215
|
+
/** @typedef {import("./repositories/node-app-memory-repository.js").NodeAppType} NodeAppType */
|
|
216
|
+
/** @typedef {import("./session-flag.js").SessionFlagPort} SessionFlagPort */
|
|
217
|
+
/** @typedef {import("./shell-cache-reset.js").ShellCacheResetPort} ShellCacheResetPort */
|
|
218
|
+
/** @typedef {import("./shell-version.js").ShellVersionPort} ShellVersionPort */
|
|
219
|
+
/** @typedef {import("./shell-version.js").ShellVersionReport} ShellVersionReport */
|
|
220
|
+
|
|
221
|
+
export { CONVERSATION_MESSAGE_STATES } from "./repositories/conversation-repository.js";
|
|
222
|
+
export { createNullInstallEnvironment } from "./install-environment.js";
|
|
223
|
+
export { createNullLcdTreeSource } from "./lcd-tree-source.js";
|
|
224
|
+
export { createNullOnboardingPresence } from "./onboarding-presence.js";
|
|
225
|
+
export { createNullOwnerClaimSession } from "./owner-claim-session.js";
|
|
226
|
+
export { CAPABILITY_INVOKE_OPERATION } from "./network.js";
|
|
227
|
+
export { DEFAULT_CLIENT_NODE_ORIGIN } from "./network/client-node-origin.js";
|
|
228
|
+
export { OutboxIdempotencyConflictError } from "./repositories/outbox.js";
|
|
229
|
+
export { REVISIONED_REPOSITORY_DOMAINS } from "./repositories/revisioned-repository.js";
|
|
230
|
+
export {
|
|
231
|
+
MAX_CLOSE_REASON_BYTES,
|
|
232
|
+
MAX_DTLS_FINGERPRINT_BYTES,
|
|
233
|
+
MAX_ICE_CANDIDATE_BYTES,
|
|
234
|
+
MAX_ICE_CANDIDATES_PER_OFFER,
|
|
235
|
+
MAX_OFFER_NONCE_BYTES,
|
|
236
|
+
MAX_SDP_BYTES,
|
|
237
|
+
MAX_SDP_MID_BYTES,
|
|
238
|
+
MAX_WEBRTC_SIGNAL_MESSAGE_BYTES,
|
|
239
|
+
MIN_OFFER_NONCE_BYTES,
|
|
240
|
+
WEBRTC_SIGNAL_VERSION,
|
|
241
|
+
} from "./network/webrtc-signaling.js";
|
|
242
|
+
export {
|
|
243
|
+
isWalletAuthoritativeSnapshot,
|
|
244
|
+
isWalletCommandResult,
|
|
245
|
+
isWalletSnapshotValue,
|
|
246
|
+
} from "./repositories/wallet-mirror-repository.js";
|
|
247
|
+
export {
|
|
248
|
+
RESET_LOCAL_STORAGE_CONFIRMATION,
|
|
249
|
+
STORAGE_RECOVERY_MESSAGES,
|
|
250
|
+
} from "./storage.js";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/** @typedef {"installable" | "ios" | "safari-desktop" | "unsupported"} InstallInstructionMode */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Boundary port for PWA install detection.
|
|
7
|
+
*
|
|
8
|
+
* @typedef {{
|
|
9
|
+
* isStandalone(): boolean,
|
|
10
|
+
* instructionMode(): InstallInstructionMode,
|
|
11
|
+
* onInstallAvailable(listener: () => void): () => void,
|
|
12
|
+
* promptInstall(): Promise<"accepted" | "dismissed" | "unavailable">,
|
|
13
|
+
* onAppInstalled(listener: () => void): () => void,
|
|
14
|
+
* checkAlreadyInstalled(): Promise<boolean>
|
|
15
|
+
* }} InstallEnvironmentPort
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A no-op install environment for SSR, tests, and platforms without browser install support.
|
|
20
|
+
*
|
|
21
|
+
* @returns {InstallEnvironmentPort}
|
|
22
|
+
*/
|
|
23
|
+
export function createNullInstallEnvironment() {
|
|
24
|
+
return {
|
|
25
|
+
isStandalone() {
|
|
26
|
+
return false;
|
|
27
|
+
},
|
|
28
|
+
instructionMode() {
|
|
29
|
+
return "unsupported";
|
|
30
|
+
},
|
|
31
|
+
onInstallAvailable() {
|
|
32
|
+
return () => undefined;
|
|
33
|
+
},
|
|
34
|
+
async promptInstall() {
|
|
35
|
+
return "unavailable";
|
|
36
|
+
},
|
|
37
|
+
onAppInstalled() {
|
|
38
|
+
return () => undefined;
|
|
39
|
+
},
|
|
40
|
+
async checkAlreadyInstalled() {
|
|
41
|
+
return false;
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|