@econ-v1/ports 6.7.0 → 6.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/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
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export type RepositoryWriteResult<TEvent extends import("./durable-event.js").DurableEvent = import("./durable-event.js").DurableEvent> = import("./durable-event.js").RepositoryWriteResult<TEvent>;
|
|
2
|
+
export type SyncLedgerInput = {
|
|
3
3
|
readonly cursor: string;
|
|
4
4
|
readonly domain: string;
|
|
5
|
-
}
|
|
6
|
-
export
|
|
5
|
+
};
|
|
6
|
+
export type SyncLedgerRecord = SyncLedgerInput & {
|
|
7
7
|
readonly updatedAt: string;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
8
|
+
};
|
|
9
|
+
export type SyncDeltaAppliedEvent = {
|
|
10
10
|
readonly occurredAt: string;
|
|
11
11
|
readonly payload: SyncLedgerInput;
|
|
12
12
|
readonly type: "sync.delta-applied";
|
|
13
|
-
}
|
|
14
|
-
export
|
|
13
|
+
};
|
|
14
|
+
export type SyncCursorDeletedEvent = {
|
|
15
15
|
readonly occurredAt: string;
|
|
16
16
|
readonly payload: {
|
|
17
17
|
readonly action: "deleted";
|
|
@@ -19,12 +19,12 @@ export interface SyncCursorDeletedEvent {
|
|
|
19
19
|
readonly entityType: "sync-cursor";
|
|
20
20
|
};
|
|
21
21
|
readonly type: "domain.entity-changed";
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
export type SyncLedgerRepositoryEvent = SyncCursorDeletedEvent | SyncDeltaAppliedEvent;
|
|
24
|
-
export
|
|
24
|
+
export type SyncLedgerRepository = {
|
|
25
25
|
delete(domain: string): Promise<RepositoryWriteResult<SyncLedgerRepositoryEvent>>;
|
|
26
26
|
list(): Promise<readonly SyncLedgerRecord[]>;
|
|
27
27
|
read(domain: string): Promise<SyncLedgerRecord | undefined>;
|
|
28
28
|
setCursor(input: SyncLedgerInput): Promise<RepositoryWriteResult<SyncLedgerRepositoryEvent>>;
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
30
|
//# sourceMappingURL=sync-ledger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-ledger.d.ts","sourceRoot":"","sources":["../../src/repositories/sync-ledger.
|
|
1
|
+
{"version":3,"file":"sync-ledger.d.ts","sourceRoot":"","sources":["../../src/repositories/sync-ledger.js"],"names":[],"mappings":"kCAE2D,MAAM,SAAnD,OAAQ,oBAAoB,EAAE,YAAa,gDAA8D,OAAO,oBAAoB,EAAE,qBAAqB,CAAC,MAAM,CAAC;8BACnK;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE;+BACpD,eAAe,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE;oCAChD;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAA;CAAE;qCACvG;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAA;KAAE,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAA;CAAE;wCACxL,sBAAsB,GAAG,qBAAqB;mCAC9C;IAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAAC,IAAI,IAAI,OAAO,CAAC,SAAS,gBAAgB,EAAE,CAAC,CAAC;IAAC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;IAAC,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC,yBAAyB,CAAC,CAAC,CAAA;CAAE"}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/** @typedef {{ readonly amountMsat: number, readonly createdAt: string, readonly direction: "incoming" | "outgoing", readonly failureCode?: string, readonly id: string, readonly paymentHash?: string, readonly status: "pending" | "succeeded" | "failed" | "expired", readonly updatedAt: string }} WalletPaymentRecord */
|
|
2
|
+
/** @typedef {{ readonly amountMsat: number, readonly paidAt: string, readonly paymentHash?: string, readonly receiptId: string, readonly resource: string }} WalletL402Receipt */
|
|
3
|
+
/** @typedef {{ readonly balanceMsat: number, readonly l402: readonly WalletL402Receipt[], readonly payments: readonly WalletPaymentRecord[], readonly spendableMsat: number }} WalletSnapshotValue */
|
|
4
|
+
/** @typedef {{ readonly observedAt: string, readonly staleAt: string, readonly value: WalletSnapshotValue }} WalletAuthoritativeSnapshot */
|
|
5
|
+
/** @typedef {{ readonly amountMsat: number, readonly invoiceId: string, readonly kind: "invoice-created", readonly paymentHash?: string, readonly paymentRequest: string, readonly status: "created" } | { readonly amountMsat: number, readonly kind: "payment-submitted", readonly paymentHash?: string, readonly paymentId: string, readonly status: "pending" | "succeeded" | "failed" }} WalletCommandResult */
|
|
6
|
+
/** @typedef {{ readCommandResult(idempotencyKey: string): Promise<WalletCommandResult | undefined>, readSnapshot(): Promise<WalletAuthoritativeSnapshot | undefined>, writeCommandResult(idempotencyKey: string, result: WalletCommandResult): Promise<void>, writeSnapshot(snapshot: WalletAuthoritativeSnapshot): Promise<void> }} WalletMirrorRepository */
|
|
7
|
+
/** @param {unknown} value @returns {value is WalletSnapshotValue} */
|
|
8
|
+
export function isWalletSnapshotValue(value: unknown): value is WalletSnapshotValue;
|
|
9
|
+
/** @param {unknown} value @returns {value is WalletAuthoritativeSnapshot} */
|
|
10
|
+
export function isWalletAuthoritativeSnapshot(value: unknown): value is WalletAuthoritativeSnapshot;
|
|
11
|
+
/** @param {unknown} value @returns {value is WalletCommandResult} */
|
|
12
|
+
export function isWalletCommandResult(value: unknown): value is WalletCommandResult;
|
|
13
|
+
export type WalletPaymentRecord = {
|
|
2
14
|
readonly amountMsat: number;
|
|
3
15
|
readonly createdAt: string;
|
|
4
16
|
readonly direction: "incoming" | "outgoing";
|
|
@@ -7,25 +19,25 @@ export interface WalletPaymentRecord {
|
|
|
7
19
|
readonly paymentHash?: string;
|
|
8
20
|
readonly status: "pending" | "succeeded" | "failed" | "expired";
|
|
9
21
|
readonly updatedAt: string;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
22
|
+
};
|
|
23
|
+
export type WalletL402Receipt = {
|
|
12
24
|
readonly amountMsat: number;
|
|
13
25
|
readonly paidAt: string;
|
|
14
26
|
readonly paymentHash?: string;
|
|
15
27
|
readonly receiptId: string;
|
|
16
28
|
readonly resource: string;
|
|
17
|
-
}
|
|
18
|
-
export
|
|
29
|
+
};
|
|
30
|
+
export type WalletSnapshotValue = {
|
|
19
31
|
readonly balanceMsat: number;
|
|
20
32
|
readonly l402: readonly WalletL402Receipt[];
|
|
21
33
|
readonly payments: readonly WalletPaymentRecord[];
|
|
22
34
|
readonly spendableMsat: number;
|
|
23
|
-
}
|
|
24
|
-
export
|
|
35
|
+
};
|
|
36
|
+
export type WalletAuthoritativeSnapshot = {
|
|
25
37
|
readonly observedAt: string;
|
|
26
38
|
readonly staleAt: string;
|
|
27
39
|
readonly value: WalletSnapshotValue;
|
|
28
|
-
}
|
|
40
|
+
};
|
|
29
41
|
export type WalletCommandResult = {
|
|
30
42
|
readonly amountMsat: number;
|
|
31
43
|
readonly invoiceId: string;
|
|
@@ -40,13 +52,10 @@ export type WalletCommandResult = {
|
|
|
40
52
|
readonly paymentId: string;
|
|
41
53
|
readonly status: "pending" | "succeeded" | "failed";
|
|
42
54
|
};
|
|
43
|
-
export
|
|
55
|
+
export type WalletMirrorRepository = {
|
|
44
56
|
readCommandResult(idempotencyKey: string): Promise<WalletCommandResult | undefined>;
|
|
45
57
|
readSnapshot(): Promise<WalletAuthoritativeSnapshot | undefined>;
|
|
46
58
|
writeCommandResult(idempotencyKey: string, result: WalletCommandResult): Promise<void>;
|
|
47
59
|
writeSnapshot(snapshot: WalletAuthoritativeSnapshot): Promise<void>;
|
|
48
|
-
}
|
|
49
|
-
export declare function isWalletSnapshotValue(value: unknown): value is WalletSnapshotValue;
|
|
50
|
-
export declare function isWalletAuthoritativeSnapshot(value: unknown): value is WalletAuthoritativeSnapshot;
|
|
51
|
-
export declare function isWalletCommandResult(value: unknown): value is WalletCommandResult;
|
|
60
|
+
};
|
|
52
61
|
//# sourceMappingURL=wallet-mirror-repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet-mirror-repository.d.ts","sourceRoot":"","sources":["../../src/repositories/wallet-mirror-repository.
|
|
1
|
+
{"version":3,"file":"wallet-mirror-repository.d.ts","sourceRoot":"","sources":["../../src/repositories/wallet-mirror-repository.js"],"names":[],"mappings":"AAEA,8TAA8T;AAC9T,kLAAkL;AAClL,sMAAsM;AACtM,4IAA4I;AAC5I,qZAAqZ;AACrZ,+VAA+V;AAE/V,qEAAqE;AACrE,6CADY,OAAO,GAAkB,KAAK,IAAI,mBAAmB,CAMhE;AAED,6EAA6E;AAC7E,qDADY,OAAO,GAAkB,KAAK,IAAI,2BAA2B,CAKxE;AAED,qEAAqE;AACrE,6CADY,OAAO,GAAkB,KAAK,IAAI,mBAAmB,CAahE;kCAnCa;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG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;qCAC/W;IAAE,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAAC;IAAC,YAAY,IAAI,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAAC;IAAC,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,aAAa,CAAC,QAAQ,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE"}
|
package/dist/repositories.d.ts
CHANGED
|
@@ -1,44 +1,79 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type StageManifest = {
|
|
2
2
|
readonly entry: string;
|
|
3
3
|
readonly integrity: Readonly<Record<string, string>>;
|
|
4
4
|
readonly requires: readonly string[];
|
|
5
5
|
readonly version: string;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export type AppDataOfflinePolicy = "last-known" | "online-only";
|
|
8
|
+
export type AppDataQueryKind = "collection" | "detail" | "snapshot";
|
|
9
|
+
export type AppDataStreamKind = "changes" | "events";
|
|
10
|
+
export type AppDataSyncKind = "cursor" | "snapshot";
|
|
11
|
+
export type AppDataSyncPolicy = {
|
|
12
|
+
readonly cursorTtlSecs?: number;
|
|
13
|
+
readonly fullRefreshIntervalSecs?: number;
|
|
14
|
+
readonly kind: AppDataSyncKind;
|
|
15
|
+
readonly retentionSecs?: number;
|
|
16
|
+
};
|
|
17
|
+
export type AppDataQueryDeclaration = {
|
|
18
|
+
readonly capability: string;
|
|
19
|
+
readonly kind: AppDataQueryKind;
|
|
20
|
+
readonly name: string;
|
|
21
|
+
};
|
|
22
|
+
export type AppDataStreamDeclaration = {
|
|
23
|
+
readonly kind: AppDataStreamKind;
|
|
24
|
+
readonly name: string;
|
|
25
|
+
};
|
|
26
|
+
export type AppDataManifest = {
|
|
27
|
+
readonly namespace: string;
|
|
28
|
+
readonly offline: AppDataOfflinePolicy;
|
|
29
|
+
readonly queries: readonly AppDataQueryDeclaration[];
|
|
30
|
+
readonly streams: readonly AppDataStreamDeclaration[];
|
|
31
|
+
readonly sync: AppDataSyncPolicy;
|
|
32
|
+
};
|
|
7
33
|
export type StageUiKind = "stage" | "widget";
|
|
8
|
-
export
|
|
34
|
+
export type StageUiNav = {
|
|
9
35
|
readonly order: number;
|
|
10
36
|
readonly section: string;
|
|
11
|
-
}
|
|
12
|
-
export
|
|
37
|
+
};
|
|
38
|
+
export type StageUiRequirements = {
|
|
39
|
+
readonly capabilities: readonly string[];
|
|
40
|
+
readonly queries: readonly string[];
|
|
41
|
+
readonly streams: readonly string[];
|
|
42
|
+
};
|
|
43
|
+
export type StageUiMetadata = {
|
|
13
44
|
readonly composes: readonly string[];
|
|
14
45
|
readonly icon?: string;
|
|
15
46
|
readonly kind: StageUiKind;
|
|
16
47
|
readonly nav?: StageUiNav;
|
|
48
|
+
readonly requires?: StageUiRequirements;
|
|
17
49
|
readonly title: string;
|
|
18
|
-
readonly uiApi: 1;
|
|
19
|
-
}
|
|
20
|
-
export
|
|
50
|
+
readonly uiApi: 1 | 2;
|
|
51
|
+
};
|
|
52
|
+
export type StageCatalogEntry = {
|
|
21
53
|
readonly appName: string;
|
|
22
54
|
readonly assetBase: string;
|
|
55
|
+
readonly data?: AppDataManifest;
|
|
56
|
+
readonly description?: string;
|
|
57
|
+
readonly keywords?: readonly string[];
|
|
23
58
|
readonly manifest: StageManifest;
|
|
24
59
|
readonly manifestSha256: string;
|
|
25
60
|
readonly ui: StageUiMetadata;
|
|
26
|
-
}
|
|
27
|
-
export
|
|
61
|
+
};
|
|
62
|
+
export type StageRegistrySnapshot = {
|
|
28
63
|
readonly entries: readonly StageCatalogEntry[];
|
|
29
64
|
readonly revision: string;
|
|
30
|
-
}
|
|
31
|
-
export
|
|
65
|
+
};
|
|
66
|
+
export type StageRegistryPort = {
|
|
32
67
|
read(): Promise<StageRegistrySnapshot | undefined>;
|
|
33
68
|
write(snapshot: StageRegistrySnapshot): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
export
|
|
69
|
+
};
|
|
70
|
+
export type PreparedStageAsset = {
|
|
36
71
|
readonly appName: string;
|
|
37
72
|
readonly entryUrl: string;
|
|
38
73
|
readonly manifestSha256: string;
|
|
39
74
|
readonly version: string;
|
|
40
|
-
}
|
|
41
|
-
export
|
|
75
|
+
};
|
|
76
|
+
export type StageAssetPort = {
|
|
42
77
|
prepare(appName: string, manifest: StageManifest): Promise<PreparedStageAsset>;
|
|
43
|
-
}
|
|
78
|
+
};
|
|
44
79
|
//# sourceMappingURL=repositories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../src/repositories.
|
|
1
|
+
{"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../src/repositories.js"],"names":[],"mappings":"4BAEc;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE;mCAChJ,YAAY,GAAG,aAAa;+BAC5B,YAAY,GAAG,QAAQ,GAAG,UAAU;gCACpC,SAAS,GAAG,QAAQ;8BACpB,QAAQ,GAAG,UAAU;gCACrB;IAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE;sCAC/I;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CA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,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,eAAe,CAAA;CAAE;oCAChQ;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;gCAC7E;IAAE,IAAI,IAAI,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAAC;IAAC,KAAK,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE;iCAC7G;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE;6BAClH;IAAE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAAE"}
|
package/dist/scheduler.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ScheduledJob = {
|
|
2
2
|
readonly cadenceMs?: number;
|
|
3
3
|
readonly dueAt: string;
|
|
4
4
|
readonly name: string;
|
|
5
5
|
run(): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
6
|
+
};
|
|
7
|
+
export type SchedulerPort = {
|
|
8
8
|
cancel(name: string): void;
|
|
9
9
|
register(job: ScheduledJob): void;
|
|
10
10
|
shutdown(): Promise<void>;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
//# sourceMappingURL=scheduler.d.ts.map
|
package/dist/scheduler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../src/scheduler.
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../src/scheduler.js"],"names":[],"mappings":"2BAEc;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE;4BACpG;IAAE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CAAC;IAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boundary port for the one boolean flag `system/pwa/src/main.ts` needs out of
|
|
3
|
+
* `sessionStorage` before the shell exists: the "Continue in browser" escape hatch
|
|
4
|
+
* (`CONTINUE_IN_BROWSER_KEY`, `system/pwa/src/boot-gate.ts`) that the install landing's
|
|
5
|
+
* "Continue in browser" button sets, and that the top-level boot-gate computation reads back
|
|
6
|
+
* on the next navigation this session.
|
|
7
|
+
*
|
|
8
|
+
* The composition root (`system/pwa/src/main.ts`) may not name `sessionStorage` directly
|
|
9
|
+
* (boundary rules B3/B4, `client/scripts/check-boundaries.mjs`) — this is the narrow surface
|
|
10
|
+
* `client/adapters-web`'s `createBrowserSessionFlag()` implements against the real global,
|
|
11
|
+
* constructed and called directly from `main.ts`, mirroring `ClipboardPort`'s and
|
|
12
|
+
* `MediaPreferencesPort`'s seams.
|
|
13
|
+
*
|
|
14
|
+
* Deliberately NOT routed through one of `client/ui`'s `configureX`/`currentX()` module-level
|
|
15
|
+
* slots the way `ClipboardPort`/`MediaPreferencesPort` are: those ports back calls made FROM
|
|
16
|
+
* `client/ui` (an onboarding screen's paste button, the shell's hover/motion checks), so
|
|
17
|
+
* `client/ui` needs somewhere to read an injected implementation from. Both call sites for
|
|
18
|
+
* this flag — `renderInstallLanding()`'s `onContinue` handler and the top-level
|
|
19
|
+
* `bootShellNow` computation — live in `main.ts` itself, before `<node-app-shell>` or
|
|
20
|
+
* `<node-install-landing>` ever mounts, so there is no `client/ui` consumer to inject into;
|
|
21
|
+
* the composition root simply constructs the adapter and calls it directly, the same way it
|
|
22
|
+
* already does for `InstallEnvironmentPort`'s `installEnv.isStandalone()`.
|
|
23
|
+
*
|
|
24
|
+
* Deliberately synchronous: the read backs `bootShellNow`, a top-level, synchronous
|
|
25
|
+
* computation in `main.ts` made before the kernel/RPC bridge exists (see `boot-gate.ts`'s own
|
|
26
|
+
* doc comment on `BootGateInputs`) — turning it async would restructure the whole boot path
|
|
27
|
+
* for a nicer port shape, which is not this port's job. `MediaPreferencesPort`'s two methods
|
|
28
|
+
* are synchronous for the identical reason: both are read before any RPC bridge exists.
|
|
29
|
+
*
|
|
30
|
+
* Both methods degrade to the SAME safe default the pre-extraction inline `try`/`catch`
|
|
31
|
+
* blocks in `main.ts` documented — reading or writing `sessionStorage` can throw under
|
|
32
|
+
* strict privacy modes (Safari private browsing, some content blockers), AND merely
|
|
33
|
+
* accessing the `sessionStorage` property itself can throw a `SecurityError` in other
|
|
34
|
+
* locked-down embedders (Firefox/Chrome "block all cookies", an `<iframe sandbox>` without
|
|
35
|
+
* `allow-same-origin`) — the adapter constructor guards the latter the same way its
|
|
36
|
+
* `getItem`/`setItem` calls guard the former, so losing the flag must never block booting
|
|
37
|
+
* the shell, nor may it ever throw and abort evaluation of the composition root:
|
|
38
|
+
* - `read()` returns `false` both when the flag was never set AND when the read itself
|
|
39
|
+
* failed — the "the flag never stuck" outcome, which simply shows the install landing
|
|
40
|
+
* again next time, exactly the pre-existing behavior.
|
|
41
|
+
* - `set()` swallows a failed write silently; the visitor already asked to continue in the
|
|
42
|
+
* browser and a storage failure must not stand in the way of that.
|
|
43
|
+
*/
|
|
44
|
+
export type SessionFlagPort = {
|
|
45
|
+
read: (key: string) => boolean;
|
|
46
|
+
set: (key: string) => void;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=session-flag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-flag.d.ts","sourceRoot":"","sources":["../src/session-flag.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6Cc,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO;SACxB,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-cache-reset.d.ts","sourceRoot":"","sources":["../src/shell-cache-reset.js"],"names":[],"mappings":"kCACc;IAAE,KAAK,IAAI,IAAI,CAAA;CAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-version.d.ts","sourceRoot":"","sources":["../src/shell-version.js"],"names":[],"mappings":"iCACc;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE;+BAChF;IAAE,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAAE"}
|
package/dist/storage.d.ts
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/** @typedef {import("./repositories.js").StageRegistryPort} StageRegistryPort */
|
|
2
|
+
/** @typedef {import("./repositories/conversation-repository.js").ConversationRepository} ConversationRepository */
|
|
3
|
+
/** @typedef {import("./repositories/conversation-repository.js").NotificationRepository} NotificationRepository */
|
|
4
|
+
/** @typedef {import("./repositories/conversation-repository.js").RepositoryEvent} RepositoryEvent */
|
|
5
|
+
/** @typedef {import("./repositories/outbox.js").OutboxRepository} OutboxRepository */
|
|
6
|
+
/** @typedef {import("./repositories/outbox.js").OutboxRepositoryEvent} OutboxRepositoryEvent */
|
|
7
|
+
/** @typedef {import("./repositories/settings.js").SettingsRepository} SettingsRepository */
|
|
8
|
+
/** @typedef {import("./repositories/settings.js").SettingsRepositoryEvent} SettingsRepositoryEvent */
|
|
9
|
+
/** @typedef {import("./repositories/sync-ledger.js").SyncLedgerRepository} SyncLedgerRepository */
|
|
10
|
+
/** @typedef {import("./repositories/sync-ledger.js").SyncLedgerRepositoryEvent} SyncLedgerRepositoryEvent */
|
|
11
|
+
/** @typedef {import("./repositories/revisioned-repository.js").AgentRepository} AgentRepository */
|
|
12
|
+
/** @typedef {import("./repositories/revisioned-repository.js").GraphRepository} GraphRepository */
|
|
13
|
+
/** @typedef {import("./repositories/revisioned-repository.js").RevisionedRepositoryEvent} RevisionedRepositoryEvent */
|
|
14
|
+
/** @typedef {import("./repositories/revisioned-repository.js").RevisionedSettingsRepository} RevisionedSettingsRepository */
|
|
15
|
+
/** @typedef {import("./repositories/wallet-mirror-repository.js").WalletMirrorRepository} WalletMirrorRepository */
|
|
16
|
+
/** @typedef {import("./offline-readiness.js").OfflineProjectionRepository} OfflineProjectionRepository */
|
|
17
|
+
/** @typedef {import("./offline-readiness.js").OfflineIdentityScope} OfflineIdentityScope */
|
|
18
|
+
/** @typedef {import("./offline-readiness.js").OfflineStageRepository} OfflineStageRepository */
|
|
19
|
+
export const RESET_LOCAL_STORAGE_CONFIRMATION: "RESET LOCAL CLIENT DATA";
|
|
20
|
+
/** @typedef {"checksum-drift" | "corrupt" | "diagnostic-failed" | "identity-source-unavailable" | "migration-failed" | "opfs-unavailable" | "quota-exceeded" | "worker-operation-timeout" | "worker-preparation-timeout" | "writer-conflict"} StorageRecoveryCode */
|
|
21
|
+
/** @satisfies {Readonly<Record<StorageRecoveryCode, string>>} */
|
|
22
|
+
export const STORAGE_RECOVERY_MESSAGES: {
|
|
12
23
|
readonly "checksum-drift": "Local schema history does not match this client build";
|
|
13
24
|
readonly corrupt: "Local SQLite data failed its integrity check";
|
|
14
25
|
readonly "diagnostic-failed": "Encrypted storage diagnostic creation failed";
|
|
@@ -20,18 +31,44 @@ export declare const STORAGE_RECOVERY_MESSAGES: {
|
|
|
20
31
|
readonly "worker-preparation-timeout": "Protected storage request preparation timed out";
|
|
21
32
|
readonly "writer-conflict": "Another client-node storage writer is active";
|
|
22
33
|
};
|
|
23
|
-
export
|
|
34
|
+
export class StorageOperationError extends Error {
|
|
35
|
+
/**
|
|
36
|
+
* @param {StorageRecoveryCode} code
|
|
37
|
+
*/
|
|
38
|
+
constructor(code: StorageRecoveryCode);
|
|
39
|
+
/** @readonly */
|
|
40
|
+
readonly code: StorageRecoveryCode;
|
|
41
|
+
}
|
|
42
|
+
export type StageRegistryPort = import("./repositories.js").StageRegistryPort;
|
|
43
|
+
export type ConversationRepository = import("./repositories/conversation-repository.js").ConversationRepository;
|
|
44
|
+
export type NotificationRepository = import("./repositories/conversation-repository.js").NotificationRepository;
|
|
45
|
+
export type RepositoryEvent = import("./repositories/conversation-repository.js").RepositoryEvent;
|
|
46
|
+
export type OutboxRepository = import("./repositories/outbox.js").OutboxRepository;
|
|
47
|
+
export type OutboxRepositoryEvent = import("./repositories/outbox.js").OutboxRepositoryEvent;
|
|
48
|
+
export type SettingsRepository = import("./repositories/settings.js").SettingsRepository;
|
|
49
|
+
export type SettingsRepositoryEvent = import("./repositories/settings.js").SettingsRepositoryEvent;
|
|
50
|
+
export type SyncLedgerRepository = import("./repositories/sync-ledger.js").SyncLedgerRepository;
|
|
51
|
+
export type SyncLedgerRepositoryEvent = import("./repositories/sync-ledger.js").SyncLedgerRepositoryEvent;
|
|
52
|
+
export type AgentRepository = import("./repositories/revisioned-repository.js").AgentRepository;
|
|
53
|
+
export type GraphRepository = import("./repositories/revisioned-repository.js").GraphRepository;
|
|
54
|
+
export type RevisionedRepositoryEvent = import("./repositories/revisioned-repository.js").RevisionedRepositoryEvent;
|
|
55
|
+
export type RevisionedSettingsRepository = import("./repositories/revisioned-repository.js").RevisionedSettingsRepository;
|
|
56
|
+
export type WalletMirrorRepository = import("./repositories/wallet-mirror-repository.js").WalletMirrorRepository;
|
|
57
|
+
export type OfflineProjectionRepository = import("./offline-readiness.js").OfflineProjectionRepository;
|
|
58
|
+
export type OfflineIdentityScope = import("./offline-readiness.js").OfflineIdentityScope;
|
|
59
|
+
export type OfflineStageRepository = import("./offline-readiness.js").OfflineStageRepository;
|
|
60
|
+
export type StorageRecoveryCode = "checksum-drift" | "corrupt" | "diagnostic-failed" | "identity-source-unavailable" | "migration-failed" | "opfs-unavailable" | "quota-exceeded" | "worker-operation-timeout" | "worker-preparation-timeout" | "writer-conflict";
|
|
61
|
+
export type StorageReadyState = {
|
|
24
62
|
readonly schemaVersion: number;
|
|
25
|
-
/** Changes only after a destructive local-storage replacement. */
|
|
26
63
|
readonly storageGeneration?: number;
|
|
27
64
|
readonly status: "ready";
|
|
28
|
-
}
|
|
29
|
-
export
|
|
65
|
+
};
|
|
66
|
+
export type StorageStartingState = {
|
|
30
67
|
readonly schemaVersion: number;
|
|
31
68
|
readonly storageGeneration?: number;
|
|
32
69
|
readonly status: "starting";
|
|
33
|
-
}
|
|
34
|
-
export
|
|
70
|
+
};
|
|
71
|
+
export type StorageRecoveryRequiredState = {
|
|
35
72
|
readonly actions: {
|
|
36
73
|
readonly exportDiagnostic: boolean;
|
|
37
74
|
readonly reset: true;
|
|
@@ -42,9 +79,9 @@ export interface StorageRecoveryRequiredState {
|
|
|
42
79
|
readonly schemaVersion: number;
|
|
43
80
|
readonly storageGeneration?: number;
|
|
44
81
|
readonly status: "recovery-required";
|
|
45
|
-
}
|
|
82
|
+
};
|
|
46
83
|
export type StorageRecoveryState = StorageReadyState | StorageRecoveryRequiredState | StorageStartingState;
|
|
47
|
-
export
|
|
84
|
+
export type EncryptedStorageDiagnostic = {
|
|
48
85
|
readonly algorithm: "AES-GCM";
|
|
49
86
|
readonly ciphertextBase64: string;
|
|
50
87
|
readonly createdAt: string;
|
|
@@ -52,46 +89,51 @@ export interface EncryptedStorageDiagnostic {
|
|
|
52
89
|
readonly ivBase64: string;
|
|
53
90
|
readonly kdf: {
|
|
54
91
|
readonly hash: "SHA-256";
|
|
55
|
-
readonly iterations:
|
|
92
|
+
readonly iterations: 310000;
|
|
56
93
|
readonly name: "PBKDF2";
|
|
57
94
|
readonly saltBase64: string;
|
|
58
95
|
};
|
|
59
|
-
}
|
|
60
|
-
export
|
|
96
|
+
};
|
|
97
|
+
export type IdentityScopedStorageRepositoryPort = {
|
|
98
|
+
readonly offlineProjections: OfflineProjectionRepository;
|
|
99
|
+
readonly offlineStages: OfflineStageRepository;
|
|
100
|
+
readonly outbox: OutboxRepository;
|
|
101
|
+
readonly syncLedger: SyncLedgerRepository;
|
|
102
|
+
};
|
|
103
|
+
export type StorageDatabasePort = {
|
|
61
104
|
readonly repositories: StorageRepositoryPort;
|
|
105
|
+
clearActiveIdentityProjections(): Promise<void>;
|
|
106
|
+
clearScope(scope: OfflineIdentityScope): Promise<void>;
|
|
62
107
|
close(): Promise<void>;
|
|
63
108
|
exportEncryptedDiagnostic(options: {
|
|
64
109
|
readonly passphrase: string;
|
|
65
110
|
}): Promise<EncryptedStorageDiagnostic>;
|
|
66
111
|
initialize(): Promise<StorageRecoveryState>;
|
|
112
|
+
reactivateEmptyScope(scope: OfflineIdentityScope): Promise<boolean>;
|
|
113
|
+
referencedAssetRevisions(): Promise<readonly string[]>;
|
|
67
114
|
refreshIdentityMetadata(): Promise<void>;
|
|
68
115
|
recoveryState(): Promise<StorageRecoveryState>;
|
|
69
116
|
reset(options: {
|
|
70
117
|
readonly confirmation: string;
|
|
71
118
|
}): Promise<StorageRecoveryState>;
|
|
72
119
|
retry(): Promise<StorageRecoveryState>;
|
|
120
|
+
scopedRepositories(scope: OfflineIdentityScope): IdentityScopedStorageRepositoryPort;
|
|
73
121
|
subscribeRecoveryState(listener: (state: StorageRecoveryState) => void): () => void;
|
|
74
|
-
}
|
|
122
|
+
};
|
|
75
123
|
export type StorageRepositoryEvent = OutboxRepositoryEvent | RepositoryEvent | RevisionedRepositoryEvent | SettingsRepositoryEvent | SyncLedgerRepositoryEvent;
|
|
76
|
-
export
|
|
77
|
-
/** Optional for compatibility with storage implementations predating P4 domain repositories. */
|
|
124
|
+
export type StorageRepositoryPort = {
|
|
78
125
|
readonly conversations?: ConversationRepository;
|
|
79
|
-
readonly events: DurableRepositoryEventStore<StorageRepositoryEvent>;
|
|
80
|
-
/** Optional for compatibility with storage implementations predating P4 domain repositories. */
|
|
126
|
+
readonly events: import("./repositories/durable-event.js").DurableRepositoryEventStore<StorageRepositoryEvent>;
|
|
81
127
|
readonly notifications?: NotificationRepository;
|
|
82
|
-
/** Optional for compatibility with storage implementations predating Task 26 repositories. */
|
|
83
128
|
readonly agents?: AgentRepository;
|
|
84
|
-
/** Optional for compatibility with storage implementations predating Task 26 repositories. */
|
|
85
129
|
readonly graphs?: GraphRepository;
|
|
86
130
|
readonly outbox: OutboxRepository;
|
|
87
|
-
/** Optional for compatibility with storage implementations predating Task 26 repositories. */
|
|
88
131
|
readonly revisionedSettings?: RevisionedSettingsRepository;
|
|
89
|
-
/** Optional for compatibility with storage implementations predating Task 27 repositories. */
|
|
90
132
|
readonly wallet?: WalletMirrorRepository;
|
|
91
133
|
readonly settings: SettingsRepository;
|
|
92
134
|
readonly syncLedger: SyncLedgerRepository;
|
|
93
|
-
}
|
|
94
|
-
export
|
|
135
|
+
};
|
|
136
|
+
export type StoragePort = StorageDatabasePort & {
|
|
95
137
|
readonly stages: StageRegistryPort;
|
|
96
|
-
}
|
|
138
|
+
};
|
|
97
139
|
//# sourceMappingURL=storage.d.ts.map
|
package/dist/storage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d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AI,GAAG,MAAM,IAAI,CAAA;CAAE;qCACp0B,qBAAqB,GAAG,eAAe,GAAG,yBAAyB,GAAG,uBAAuB,GAAG,yBAAyB;oCACzH;IAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,sBAAsB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,iCAAiC,EAAE,2BAA2B,CAAC,sBAAsB,CAAC,CAAC;IAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,sBAAsB,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,4BAA4B,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAA;CAAE;0BACrf,mBAAmB,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE"}
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
export type ThemePreference = "light" | "dark";
|
|
2
|
-
|
|
3
|
-
* Boundary port for the shell's dark-mode plumbing (`client/ui/src/shell/theme-init.ts`).
|
|
4
|
-
*
|
|
5
|
-
* `client/ui` may never call `localStorage` or `matchMedia` directly (boundary rules
|
|
6
|
-
* B2/B3, `client/scripts/check-boundaries.mjs`) — this is the narrow surface
|
|
7
|
-
* `client/adapters-web`'s `createBrowserThemeEnvironment()` implements against the real
|
|
8
|
-
* globals, and the composition root (`system/pwa/src/main.ts`) registers it (via
|
|
9
|
-
* `client/ui`'s `configureThemeEnvironment`) before the shell's first paint. Every method is
|
|
10
|
-
* synchronous and side-effect-free beyond the read/write it names — `theme-init.ts`'s
|
|
11
|
-
* anti-FOUC contract requires resolving the initial theme before the shadow tree's first
|
|
12
|
-
* paint, which is before the kernel connection (`KernelRpcClient`, itself an async
|
|
13
|
-
* `SharedWorker`/leader-tab bridge) even exists, so this can never be mediated through
|
|
14
|
-
* `@econ-v1/rpc` the way ordinary UI reads/writes are (rule S4).
|
|
15
|
-
*/
|
|
16
|
-
export interface ThemeEnvironmentPort {
|
|
17
|
-
/** Reads the persisted preference, or `undefined` if unset or storage is unavailable
|
|
18
|
-
* (private browsing, quota). */
|
|
2
|
+
export type ThemeEnvironmentPort = {
|
|
19
3
|
getStoredTheme(): ThemePreference | undefined;
|
|
20
|
-
/** Persists a preference. Implementations MUST swallow storage failures (private
|
|
21
|
-
* browsing, quota) rather than throwing. */
|
|
22
4
|
setStoredTheme(preference: ThemePreference): void;
|
|
23
|
-
/** Current `(prefers-color-scheme: dark)` match; `false` if the environment doesn't
|
|
24
|
-
* support media queries. */
|
|
25
5
|
prefersDarkColorScheme(): boolean;
|
|
26
|
-
/** Subscribes to live `(prefers-color-scheme: dark)` changes. Returns an unsubscribe
|
|
27
|
-
* function, or `undefined` if the environment doesn't support live media queries. */
|
|
28
6
|
watchDarkColorScheme(onChange: (matches: boolean) => void): (() => void) | undefined;
|
|
29
|
-
}
|
|
7
|
+
};
|
|
30
8
|
//# sourceMappingURL=theme.d.ts.map
|
package/dist/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.js"],"names":[],"mappings":"8BAEc,OAAO,GAAG,MAAM;mCAgBhB;IAAE,cAAc,IAAI,eAAe,GAAG,SAAS,CAAC;IAAC,cAAc,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IAAC,sBAAsB,IAAI,OAAO,CAAC;IAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAA;CAAE"}
|