@econ-v1/rpc 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/client-device-pending-contract.d.ts +14 -0
- package/dist/client-device-pending-contract.d.ts.map +1 -0
- package/dist/client.d.ts +15 -13
- package/dist/client.d.ts.map +1 -1
- package/dist/device-boot-contract.d.ts +7 -0
- package/dist/device-boot-contract.d.ts.map +1 -0
- package/dist/device-cleanup-contract.d.ts +17 -0
- package/dist/device-cleanup-contract.d.ts.map +1 -0
- package/dist/dialog-contract.d.ts +26 -0
- package/dist/dialog-contract.d.ts.map +1 -0
- package/dist/errors.d.ts +33 -6
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.d.ts +144 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/message-port-client.d.ts +134 -16
- package/dist/message-port-client.d.ts.map +1 -1
- package/dist/node-app-memory-contract.d.ts +10 -0
- package/dist/node-app-memory-contract.d.ts.map +1 -0
- package/dist/onboarding/discovery-contract.d.ts +61 -34
- package/dist/onboarding/discovery-contract.d.ts.map +1 -1
- package/dist/onboarding/onboarding-contract.d.ts +119 -27
- package/dist/onboarding/onboarding-contract.d.ts.map +1 -1
- package/dist/onboarding/owner-claim-contract.d.ts +50 -0
- package/dist/onboarding/owner-claim-contract.d.ts.map +1 -0
- package/dist/pairing-status-contract.d.ts +40 -0
- package/dist/pairing-status-contract.d.ts.map +1 -0
- package/dist/protocol.d.ts +50 -12
- package/dist/protocol.d.ts.map +1 -1
- package/dist/stage-context.d.ts +31 -16
- package/dist/stage-context.d.ts.map +1 -1
- package/dist/sync-cursors-contract.d.ts +6 -0
- package/dist/sync-cursors-contract.d.ts.map +1 -0
- package/dist/system-notice-contract.d.ts +70 -0
- package/dist/system-notice-contract.d.ts.map +1 -0
- package/dist/transport-contract.d.ts +11 -0
- package/dist/transport-contract.d.ts.map +1 -0
- package/dist/transport.d.ts +2 -2
- package/dist/transport.d.ts.map +1 -1
- package/dist/trust-contract.d.ts +23 -0
- package/dist/trust-contract.d.ts.map +1 -0
- package/package.json +16 -12
- package/src/client-device-pending-contract.js +6 -0
- package/src/client.js +26 -0
- package/src/device-boot-contract.js +4 -0
- package/src/device-cleanup-contract.js +9 -0
- package/src/dialog-contract.js +6 -0
- package/src/errors.js +111 -0
- package/src/index.js +194 -0
- package/src/message-port-client.js +628 -0
- package/src/node-app-memory-contract.js +10 -0
- package/src/onboarding/discovery-contract.js +83 -0
- package/src/onboarding/onboarding-contract.js +106 -0
- package/src/onboarding/owner-claim-contract.js +59 -0
- package/src/pairing-status-contract.js +36 -0
- package/src/protocol.js +758 -0
- package/src/stage-context.js +27 -0
- package/src/sync-cursors-contract.js +3 -0
- package/src/system-notice-contract.js +64 -0
- package/src/transport-contract.js +11 -0
- package/src/transport.js +6 -0
- package/src/trust-contract.js +36 -0
- package/dist/client.js +0 -2
- package/dist/client.js.map +0 -1
- package/dist/errors.js +0 -57
- package/dist/errors.js.map +0 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/message-port-client.js +0 -365
- package/dist/message-port-client.js.map +0 -1
- package/dist/onboarding/discovery-contract.js +0 -42
- package/dist/onboarding/discovery-contract.js.map +0 -1
- package/dist/onboarding/onboarding-contract.js +0 -37
- package/dist/onboarding/onboarding-contract.js.map +0 -1
- package/dist/protocol.js +0 -295
- package/dist/protocol.js.map +0 -1
- package/dist/stage-context.js +0 -2
- package/dist/stage-context.js.map +0 -1
- package/dist/transport.js +0 -2
- package/dist/transport.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const CLIENT_DEVICE_PENDING_QUERY: "client-device.pending.v2";
|
|
2
|
+
/**
|
|
3
|
+
* One row per live pending pairing request, keyed by operationHash.
|
|
4
|
+
*/
|
|
5
|
+
export type ClientDevicePendingRow = {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly operationHash: string;
|
|
8
|
+
readonly action: string;
|
|
9
|
+
readonly deviceName: string;
|
|
10
|
+
readonly requestedAt: string;
|
|
11
|
+
readonly remainingSeconds: number;
|
|
12
|
+
readonly targetDevice: string;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=client-device-pending-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-device-pending-contract.d.ts","sourceRoot":"","sources":["../src/client-device-pending-contract.js"],"names":[],"mappings":"AACA,0CAA2C,0BAA0B,CAAC;;;;qCAGzD;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
export type DomainEvent = import("@econ-v1/domain").DomainEvent;
|
|
2
|
+
export type KernelEventType = import("@econ-v1/domain").KernelEventType;
|
|
3
|
+
export type QueryName = import("@econ-v1/domain").QueryName;
|
|
2
4
|
export type Unsubscribe = () => void;
|
|
3
|
-
export
|
|
5
|
+
export type PreparedStage = {
|
|
4
6
|
readonly appName: string;
|
|
5
7
|
readonly entryUrl: string;
|
|
6
8
|
readonly manifestSha256: string;
|
|
7
9
|
readonly version: string;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
10
|
+
};
|
|
11
|
+
export type KernelRpcClient = {
|
|
10
12
|
command<T>(name: string, payload: unknown): Promise<T>;
|
|
11
|
-
liveQuery<T>(name: QueryName, params: unknown, listener: (diff: QueryDiff<T>) => void): Unsubscribe;
|
|
13
|
+
liveQuery<T>(name: QueryName, params: unknown, listener: (diff: import("@econ-v1/domain").QueryDiff<T>) => void): Unsubscribe;
|
|
12
14
|
openStageSession(appName: string, manifestSha256: string): Promise<StageRpcSession>;
|
|
13
15
|
prepareStage(appName: string): Promise<PreparedStage>;
|
|
16
|
+
publish<T extends KernelEventType>(type: T, payload: import("@econ-v1/domain").KernelEventPayload<T>): Promise<void>;
|
|
14
17
|
query<T>(name: QueryName, params: unknown): Promise<T>;
|
|
15
|
-
subscribe<T extends KernelEventType>(type: T, listener: (event: KernelEventByType<T>) => void): Unsubscribe;
|
|
16
|
-
}
|
|
17
|
-
export
|
|
18
|
+
subscribe<T extends KernelEventType>(type: T, listener: (event: import("@econ-v1/domain").KernelEventByType<T>) => void): Unsubscribe;
|
|
19
|
+
};
|
|
20
|
+
export type StageRpcSession = {
|
|
18
21
|
close(): void;
|
|
19
22
|
invokeCapability<T>(capability: string, payload: unknown): Promise<T>;
|
|
20
|
-
liveQuery<T>(name: QueryName, params: unknown, listener: (diff: QueryDiff<T>) => void): Unsubscribe;
|
|
21
|
-
publish<T extends KernelEventType>(type: T, payload: KernelEventPayload<T>): Promise<void>;
|
|
23
|
+
liveQuery<T>(name: QueryName, params: unknown, listener: (diff: import("@econ-v1/domain").QueryDiff<T>) => void): Unsubscribe;
|
|
24
|
+
publish<T extends KernelEventType>(type: T, payload: import("@econ-v1/domain").KernelEventPayload<T>): Promise<void>;
|
|
22
25
|
query<T>(name: QueryName, params: unknown): Promise<T>;
|
|
23
|
-
subscribe<T extends KernelEventType>(type: T, listener: (event: KernelEventByType<T>) => void): Unsubscribe;
|
|
24
|
-
}
|
|
25
|
-
export type { DomainEvent };
|
|
26
|
+
subscribe<T extends KernelEventType>(type: T, listener: (event: import("@econ-v1/domain").KernelEventByType<T>) => void): Unsubscribe;
|
|
27
|
+
};
|
|
26
28
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.
|
|
1
|
+
{"version":3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CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,CAAA;CACtI;8BACU;IACT,KAAK,IAAI,IAAI,CAAC;IACd,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACtE,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,CAAC;IAC9H,OAAO,CAAC,CAAC,SAAS,eAAe,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrH,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACvD,SAAS,CAAC,CAAC,SAAS,eAAe,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,CAAA;CACtI"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const DEVICE_BOOT_STATE_QUERY: "device.boot-state.v1";
|
|
2
|
+
export type DeviceBootStateRow = {
|
|
3
|
+
readonly id: "boot-state";
|
|
4
|
+
readonly kind: "unpaired" | "paired" | "paired-expired" | "revoked";
|
|
5
|
+
readonly delegationExpiresAt?: string;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=device-boot-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-boot-contract.d.ts","sourceRoot":"","sources":["../src/device-boot-contract.js"],"names":[],"mappings":"AAGA,sCAA6D,sBAAsB,CAAE;iCAFtE;IAAE,QAAQ,CAAC,EAAE,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,gBAAgB,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAAE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const DEVICE_CLEANUP_REQUEST_COMMAND: "client-device.cleanup-request.v1";
|
|
2
|
+
export const DEVICE_CLEANUP_STATUS_COMMAND: "client-device.cleanup-status.v1";
|
|
3
|
+
export const DEVICE_CLEANUP_CANCEL_COMMAND: "client-device.cleanup-cancel.v1";
|
|
4
|
+
export const DEVICE_CLEANUP_QUERY: "client-device.cleanup.v1";
|
|
5
|
+
export type CleanupState = "pending" | "approved" | "declined" | "expired" | "no_candidate" | "not_needed" | "failed";
|
|
6
|
+
export type DeviceCleanupRequestResult = {
|
|
7
|
+
readonly sessionId: string;
|
|
8
|
+
readonly state: CleanupState;
|
|
9
|
+
};
|
|
10
|
+
export type DeviceCleanupStatusResult = {
|
|
11
|
+
readonly state: CleanupState;
|
|
12
|
+
};
|
|
13
|
+
export type DeviceCleanupRow = {
|
|
14
|
+
readonly id: "device-cleanup";
|
|
15
|
+
readonly state: CleanupState;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=device-cleanup-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-cleanup-contract.d.ts","sourceRoot":"","sources":["../src/device-cleanup-contract.js"],"names":[],"mappings":"AACA,6CAA8C,kCAAkC,CAAC;AACjF,4CAA6C,iCAAiC,CAAC;AAC/E,4CAA6C,iCAAiC,CAAC;AAC/E,mCAAoC,0BAA0B,CAAC;2BACjD,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,cAAc,GAAG,YAAY,GAAG,QAAQ;yCAC1F;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAAE;wCAC5D;IAAE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAAE;+BAChC;IAAE,QAAQ,CAAC,EAAE,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAAE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type DialogAction = {
|
|
2
|
+
readonly cancel?: boolean;
|
|
3
|
+
readonly href?: string;
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly onSelect?: (handle: DialogHandle) => void | Promise<void>;
|
|
7
|
+
readonly variant?: "neutral" | "primary";
|
|
8
|
+
};
|
|
9
|
+
export type DialogRequest = {
|
|
10
|
+
readonly body: readonly string[];
|
|
11
|
+
readonly emphasis?: string;
|
|
12
|
+
readonly initialFocus?: string;
|
|
13
|
+
readonly actions: readonly DialogAction[];
|
|
14
|
+
readonly title: string;
|
|
15
|
+
};
|
|
16
|
+
export type DialogHandle = {
|
|
17
|
+
readonly closed: Promise<string | undefined>;
|
|
18
|
+
close(): void;
|
|
19
|
+
setActionBusy(id: string, busy: boolean): void;
|
|
20
|
+
setError(message: string | undefined): void;
|
|
21
|
+
update(patch: Partial<DialogRequest>): void;
|
|
22
|
+
};
|
|
23
|
+
export type DialogCenter = {
|
|
24
|
+
open(request: DialogRequest): DialogHandle;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=dialog-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-contract.d.ts","sourceRoot":"","sources":["../src/dialog-contract.js"],"names":[],"mappings":"2BACc;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE;4BAChN;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE;2BACnK;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAAC,KAAK,IAAI,IAAI,CAAC;IAAC,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAAA;CAAE;2BACzM;IAAE,IAAI,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAA;CAAE"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/** @typedef {import("@econ-v1/domain").ClientError} ClientError */
|
|
2
|
+
/** @typedef {import("@econ-v1/domain").JsonObject} JsonObject */
|
|
3
|
+
/** @typedef {import("@econ-v1/domain").JsonValue} JsonValue */
|
|
4
|
+
/** @typedef {import("@econ-v1/domain").SerializableClientError} SerializableClientError */
|
|
5
|
+
/**
|
|
6
|
+
* @param {ClientError} error
|
|
7
|
+
* @returns {SerializableClientError}
|
|
8
|
+
*/
|
|
9
|
+
export function serializeClientError(error: ClientError): SerializableClientError;
|
|
10
|
+
/**
|
|
11
|
+
* @param {unknown} value
|
|
12
|
+
* @returns {ClientError}
|
|
13
|
+
*/
|
|
14
|
+
export function deserializeClientError(value: unknown): ClientError;
|
|
15
|
+
/**
|
|
16
|
+
* @param {unknown} value
|
|
17
|
+
* @returns {value is SerializableClientError}
|
|
18
|
+
*/
|
|
19
|
+
export function isSerializableClientError(value: unknown): value is SerializableClientError;
|
|
20
|
+
/**
|
|
21
|
+
* @param {unknown} value
|
|
22
|
+
* @returns {value is JsonValue}
|
|
23
|
+
*/
|
|
24
|
+
export function isJsonValue(value: unknown): value is JsonValue;
|
|
25
|
+
/**
|
|
26
|
+
* @param {unknown} value
|
|
27
|
+
* @returns {value is JsonObject}
|
|
28
|
+
*/
|
|
29
|
+
export function isJsonObject(value: unknown): value is JsonObject;
|
|
30
|
+
export type ClientError = import("@econ-v1/domain").ClientError;
|
|
31
|
+
export type JsonObject = import("@econ-v1/domain").JsonObject;
|
|
32
|
+
export type JsonValue = import("@econ-v1/domain").JsonValue;
|
|
33
|
+
export type SerializableClientError = import("@econ-v1/domain").SerializableClientError;
|
|
7
34
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.js"],"names":[],"mappings":"AAUA,mEAAmE;AACnE,iEAAiE;AACjE,+DAA+D;AAC/D,2FAA2F;AAE3F;;;GAGG;AACH,4CAHW,WAAW,GACT,uBAAuB,CAInC;AAED;;;GAGG;AACH,8CAHW,OAAO,GACL,WAAW,CAavB;AAED;;;GAGG;AACH,iDAHW,OAAO,GACL,KAAK,IAAI,uBAAuB,CAmB5C;AAED;;;GAGG;AACH,mCAHW,OAAO,GACL,KAAK,IAAI,SAAS,CAO9B;AAED;;;GAGG;AACH,oCAHW,OAAO,GACL,KAAK,IAAI,UAAU,CAI/B;0BAtEa,OAAO,iBAAiB,EAAE,WAAW;yBACrC,OAAO,iBAAiB,EAAE,UAAU;wBACpC,OAAO,iBAAiB,EAAE,SAAS;sCACnC,OAAO,iBAAiB,EAAE,uBAAuB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,146 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
4
|
-
export type
|
|
5
|
-
export
|
|
1
|
+
export { DEVICE_BOOT_STATE_QUERY } from "./device-boot-contract.js";
|
|
2
|
+
export { CLIENT_DEVICE_PENDING_QUERY } from "./client-device-pending-contract.js";
|
|
3
|
+
export { SYNC_CURSORS_QUERY } from "./sync-cursors-contract.js";
|
|
4
|
+
export type KernelRpcClient = import("./client.js").KernelRpcClient;
|
|
5
|
+
export type PreparedStage = import("./client.js").PreparedStage;
|
|
6
|
+
export type StageRpcSession = import("./client.js").StageRpcSession;
|
|
7
|
+
export type Unsubscribe = import("./client.js").Unsubscribe;
|
|
8
|
+
export type ClientError = import("@econ-v1/domain").ClientError;
|
|
9
|
+
export type DomainEvent = import("@econ-v1/domain").DomainEvent;
|
|
10
|
+
export type DomainErrorCode = import("@econ-v1/domain").DomainErrorCode;
|
|
11
|
+
export type KernelEventByType<T extends KernelEventType> = import("@econ-v1/domain").KernelEventByType<T>;
|
|
12
|
+
export type KernelEventPayload<T extends KernelEventType> = import("@econ-v1/domain").KernelEventPayload<T>;
|
|
13
|
+
export type KernelEventType = import("@econ-v1/domain").KernelEventType;
|
|
14
|
+
export type OutboxIntent = import("@econ-v1/domain").OutboxIntent;
|
|
15
|
+
export type QueryDiff<T> = import("@econ-v1/domain").QueryDiff<T>;
|
|
16
|
+
export type QueryName = import("@econ-v1/domain").QueryName;
|
|
17
|
+
export type SerializableClientError = import("@econ-v1/domain").SerializableClientError;
|
|
18
|
+
export type SyncErrorCode = import("@econ-v1/domain").SyncErrorCode;
|
|
19
|
+
export type TransportState = import("@econ-v1/domain").TransportState;
|
|
20
|
+
export type TransportOfflineReason = import("@econ-v1/domain").TransportOfflineReason;
|
|
21
|
+
export type TransportErrorCode = import("@econ-v1/domain").TransportErrorCode;
|
|
22
|
+
export type EncryptedStorageDiagnostic = import("@econ-v1/ports").EncryptedStorageDiagnostic;
|
|
23
|
+
export type AppDataManifest = import("@econ-v1/ports").AppDataManifest;
|
|
24
|
+
export type AppDataOfflinePolicy = import("@econ-v1/ports").AppDataOfflinePolicy;
|
|
25
|
+
export type AppDataQueryDeclaration = import("@econ-v1/ports").AppDataQueryDeclaration;
|
|
26
|
+
export type AppDataQueryKind = import("@econ-v1/ports").AppDataQueryKind;
|
|
27
|
+
export type AppDataStreamDeclaration = import("@econ-v1/ports").AppDataStreamDeclaration;
|
|
28
|
+
export type AppDataStreamKind = import("@econ-v1/ports").AppDataStreamKind;
|
|
29
|
+
export type AppDataSyncKind = import("@econ-v1/ports").AppDataSyncKind;
|
|
30
|
+
export type AppDataSyncPolicy = import("@econ-v1/ports").AppDataSyncPolicy;
|
|
31
|
+
export type ClientUiChoice = import("@econ-v1/ports").ClientUiChoice;
|
|
32
|
+
export type ClientUiPreferencePort = import("@econ-v1/ports").ClientUiPreferencePort;
|
|
33
|
+
export type ClipboardPort = import("@econ-v1/ports").ClipboardPort;
|
|
34
|
+
export type CredentialHandoffCancellationReason = import("@econ-v1/ports").CredentialHandoffCancellationReason;
|
|
35
|
+
export type CredentialHandoffConnection = import("@econ-v1/ports").CredentialHandoffConnection;
|
|
36
|
+
export type CredentialHandoffMessage = import("@econ-v1/ports").CredentialHandoffMessage;
|
|
37
|
+
export type CredentialHandoffOpenResult = import("@econ-v1/ports").CredentialHandoffOpenResult;
|
|
38
|
+
export type CredentialHandoffPort = import("@econ-v1/ports").CredentialHandoffPort;
|
|
39
|
+
export type LegacyCredentialProbePort = import("@econ-v1/ports").LegacyCredentialProbePort;
|
|
40
|
+
export type LegacyCredentialStatus = import("@econ-v1/ports").LegacyCredentialStatus;
|
|
41
|
+
export type NodeAppMemoryApp = import("@econ-v1/ports").NodeAppMemoryApp;
|
|
42
|
+
export type NodeAppMemoryReading = import("@econ-v1/ports").NodeAppMemoryReading;
|
|
43
|
+
export type NodeAppBudgetVerdict = import("@econ-v1/ports").NodeAppBudgetVerdict;
|
|
44
|
+
export type NodeAppDeviceMemory = import("@econ-v1/ports").NodeAppDeviceMemory;
|
|
45
|
+
export type NodeAppGovernorRow = import("@econ-v1/ports").NodeAppGovernorRow;
|
|
46
|
+
export type NodeAppHeapSnapshot = import("@econ-v1/ports").NodeAppHeapSnapshot;
|
|
47
|
+
export type NodeAppLaneKind = import("@econ-v1/ports").NodeAppLaneKind;
|
|
48
|
+
export type NodeAppMemoryOverview = import("@econ-v1/ports").NodeAppMemoryOverview;
|
|
49
|
+
export type NodeAppMemoryOverviewApp = import("@econ-v1/ports").NodeAppMemoryOverviewApp;
|
|
50
|
+
export type ShellCacheResetPort = import("@econ-v1/ports").ShellCacheResetPort;
|
|
51
|
+
export type ShellVersionPort = import("@econ-v1/ports").ShellVersionPort;
|
|
52
|
+
export type ShellVersionReport = import("@econ-v1/ports").ShellVersionReport;
|
|
53
|
+
export type InstallEnvironmentPort = import("@econ-v1/ports").InstallEnvironmentPort;
|
|
54
|
+
export type InstallInstructionMode = import("@econ-v1/ports").InstallInstructionMode;
|
|
55
|
+
export type MediaPreferencesPort = import("@econ-v1/ports").MediaPreferencesPort;
|
|
56
|
+
export type StageCatalogEntry = import("@econ-v1/ports").StageCatalogEntry;
|
|
57
|
+
export type StorageRecoveryCode = import("@econ-v1/ports").StorageRecoveryCode;
|
|
58
|
+
export type StorageRecoveryState = import("@econ-v1/ports").StorageRecoveryState;
|
|
59
|
+
export type ThemeEnvironmentPort = import("@econ-v1/ports").ThemeEnvironmentPort;
|
|
60
|
+
export type ThemePreference = import("@econ-v1/ports").ThemePreference;
|
|
61
|
+
export type MessagePortKernelRpcClientOptions = import("./message-port-client.js").MessagePortKernelRpcClientOptions;
|
|
62
|
+
export type DiscoveryCandidateStatus = import("./onboarding/discovery-contract.js").DiscoveryCandidateStatus;
|
|
63
|
+
export type DiscoveryCandidateView = import("./onboarding/discovery-contract.js").DiscoveryCandidateView;
|
|
64
|
+
export type DiscoveryFoundNode = import("./onboarding/discovery-contract.js").DiscoveryFoundNode;
|
|
65
|
+
export type DiscoverNodePayload = import("./onboarding/discovery-contract.js").DiscoverNodePayload;
|
|
66
|
+
export type NodeDiscoveryCandidate = import("./onboarding/discovery-contract.js").NodeDiscoveryCandidate;
|
|
67
|
+
export type NodeDiscoveryResult = import("./onboarding/discovery-contract.js").NodeDiscoveryResult;
|
|
68
|
+
export type ProbeCandidatesPayload = import("./onboarding/discovery-contract.js").ProbeCandidatesPayload;
|
|
69
|
+
export type PromoteCandidatePayload = import("./onboarding/discovery-contract.js").PromoteCandidatePayload;
|
|
70
|
+
export type OnboardingApprovalState = import("./onboarding/onboarding-contract.js").OnboardingApprovalState;
|
|
71
|
+
export type OnboardingCommand = import("./onboarding/onboarding-contract.js").OnboardingCommand;
|
|
72
|
+
export type OnboardingDiscoveryCandidate = import("./onboarding/onboarding-contract.js").OnboardingDiscoveryCandidate;
|
|
73
|
+
export type OnboardingEvent = import("./onboarding/onboarding-contract.js").OnboardingEvent;
|
|
74
|
+
export type OnboardingLifecycleState = import("./onboarding/onboarding-contract.js").OnboardingLifecycleState;
|
|
75
|
+
export type OnboardingLifecycleStatus = import("./onboarding/onboarding-contract.js").OnboardingLifecycleStatus;
|
|
76
|
+
export type OnboardingPhase = import("./onboarding/onboarding-contract.js").OnboardingPhase;
|
|
77
|
+
export type OnboardingScenario = import("./onboarding/onboarding-contract.js").OnboardingScenario;
|
|
78
|
+
export type OnboardingScreen = import("./onboarding/onboarding-contract.js").OnboardingScreen;
|
|
79
|
+
export type OnboardingView = import("./onboarding/onboarding-contract.js").OnboardingView;
|
|
80
|
+
export type NodeAppMemoryDetailQueryParams = import("./node-app-memory-contract.js").NodeAppMemoryDetailQueryParams;
|
|
81
|
+
export type DialogAction = import("./dialog-contract.js").DialogAction;
|
|
82
|
+
export type DialogCenter = import("./dialog-contract.js").DialogCenter;
|
|
83
|
+
export type DialogHandle = import("./dialog-contract.js").DialogHandle;
|
|
84
|
+
export type DialogRequest = import("./dialog-contract.js").DialogRequest;
|
|
85
|
+
export type ClientDevicePendingRow = import("./client-device-pending-contract.js").ClientDevicePendingRow;
|
|
86
|
+
export type ClientDevicePairingStatusRow = import("./pairing-status-contract.js").ClientDevicePairingStatusRow;
|
|
87
|
+
export type DeviceBootStateRow = import("./device-boot-contract.js").DeviceBootStateRow;
|
|
88
|
+
export type CleanupState = import("./device-cleanup-contract.js").CleanupState;
|
|
89
|
+
export type DeviceCleanupRequestResult = import("./device-cleanup-contract.js").DeviceCleanupRequestResult;
|
|
90
|
+
export type DeviceCleanupRow = import("./device-cleanup-contract.js").DeviceCleanupRow;
|
|
91
|
+
export type DeviceCleanupStatusResult = import("./device-cleanup-contract.js").DeviceCleanupStatusResult;
|
|
92
|
+
export type SyncCursorView = import("./sync-cursors-contract.js").SyncCursorView;
|
|
93
|
+
export type OnboardingFlowBase = import("./onboarding/onboarding-contract.js").OnboardingFlowBase;
|
|
94
|
+
export type OnboardingFlowView = import("./onboarding/onboarding-contract.js").OnboardingFlowView;
|
|
95
|
+
export type OnboardingLcdScreenBase = import("./onboarding/onboarding-contract.js").OnboardingLcdScreenBase;
|
|
96
|
+
export type OnboardingLcdScreenId = import("./onboarding/onboarding-contract.js").OnboardingLcdScreenId;
|
|
97
|
+
export type OnboardingLcdScreenState = import("./onboarding/onboarding-contract.js").OnboardingLcdScreenState;
|
|
98
|
+
export type OnboardingLcdScreenTree = import("./onboarding/onboarding-contract.js").OnboardingLcdScreenTree;
|
|
99
|
+
export type OnboardingLcdScreenView = import("./onboarding/onboarding-contract.js").OnboardingLcdScreenView;
|
|
100
|
+
export type OnboardingLcdUnavailableReason = import("./onboarding/onboarding-contract.js").OnboardingLcdUnavailableReason;
|
|
101
|
+
export type OnboardingNetwork = import("./onboarding/onboarding-contract.js").OnboardingNetwork;
|
|
102
|
+
export type OnboardingReasonCode = import("./onboarding/onboarding-contract.js").OnboardingReasonCode;
|
|
103
|
+
export type OnboardingStepId = import("./onboarding/onboarding-contract.js").OnboardingStepId;
|
|
104
|
+
export type OnboardingWifiSecurity = import("./onboarding/onboarding-contract.js").OnboardingWifiSecurity;
|
|
105
|
+
export type OwnerClaimCompleteOutcome = import("./onboarding/owner-claim-contract.js").OwnerClaimCompleteOutcome;
|
|
106
|
+
export type OwnerClaimCompletePayload = import("./onboarding/owner-claim-contract.js").OwnerClaimCompletePayload;
|
|
107
|
+
export type OwnerClaimCompleteResult = import("./onboarding/owner-claim-contract.js").OwnerClaimCompleteResult;
|
|
108
|
+
export type OwnerClaimPrepareResult = import("./onboarding/owner-claim-contract.js").OwnerClaimPrepareResult;
|
|
109
|
+
export type TrustStatusView = import("./trust-contract.js").TrustStatusView;
|
|
110
|
+
export type StageContextV1 = import("./stage-context.js").StageContextV1;
|
|
111
|
+
export type StageContextV2 = import("./stage-context.js").StageContextV2;
|
|
112
|
+
export type SystemNotice = import("./system-notice-contract.js").SystemNotice;
|
|
113
|
+
export type SystemNoticeAction = import("./system-notice-contract.js").SystemNoticeAction;
|
|
114
|
+
export type SystemNoticeActionKind = import("./system-notice-contract.js").SystemNoticeActionKind;
|
|
115
|
+
export type SystemNoticeBlockScope = import("./system-notice-contract.js").SystemNoticeBlockScope;
|
|
116
|
+
export type SystemNoticeBody = import("./system-notice-contract.js").SystemNoticeBody;
|
|
117
|
+
export type SystemNoticeCenter = import("./system-notice-contract.js").SystemNoticeCenter;
|
|
118
|
+
export type SystemNoticeDetail = import("./system-notice-contract.js").SystemNoticeDetail;
|
|
119
|
+
export type SystemNoticeDisclosure = import("./system-notice-contract.js").SystemNoticeDisclosure;
|
|
120
|
+
export type SystemNoticeHandle = import("./system-notice-contract.js").SystemNoticeHandle;
|
|
121
|
+
export type SystemNoticeInput = import("./system-notice-contract.js").SystemNoticeInput;
|
|
122
|
+
export type SystemNoticeListener = import("./system-notice-contract.js").SystemNoticeListener;
|
|
123
|
+
export type SystemNoticePatch = import("./system-notice-contract.js").SystemNoticePatch;
|
|
124
|
+
export type SystemNoticeSeverity = import("./system-notice-contract.js").SystemNoticeSeverity;
|
|
125
|
+
export type SystemNoticeState = import("./system-notice-contract.js").SystemNoticeState;
|
|
126
|
+
export type RpcEvent = import("./protocol.js").RpcEvent;
|
|
127
|
+
export type RpcRequest = import("./protocol.js").RpcRequest;
|
|
128
|
+
export type RpcResponse = import("./protocol.js").RpcResponse;
|
|
129
|
+
export type MountedStage = import("./stage-context.js").MountedStage;
|
|
130
|
+
export type StageContext = import("./stage-context.js").StageContext;
|
|
131
|
+
export type StageModule = import("./stage-context.js").StageModule;
|
|
132
|
+
export type RpcTransport = import("./transport.js").RpcTransport;
|
|
133
|
+
export type RpcTransportState = import("./transport.js").RpcTransportState;
|
|
134
|
+
export { DOMAIN_ERROR_CODES, DomainError, SYNC_ERROR_CODES, SyncError, TRANSPORT_ERROR_CODES, TransportError } from "@econ-v1/domain";
|
|
135
|
+
export { deserializeClientError, isJsonValue, isSerializableClientError, serializeClientError } from "./errors.js";
|
|
6
136
|
export { KernelRpcTimeoutError, MessagePortKernelRpcClient } from "./message-port-client.js";
|
|
7
|
-
export
|
|
8
|
-
export {
|
|
9
|
-
export
|
|
10
|
-
export {
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export {
|
|
14
|
-
export
|
|
15
|
-
export
|
|
137
|
+
export { NODE_APP_MEMORY_CAPTURE_COMMAND, NODE_APP_MEMORY_DETAIL_QUERY, NODE_APP_MEMORY_DOWNLOAD_COMMAND, NODE_APP_MEMORY_LIST_QUERY, NODE_APP_MEMORY_OVERVIEW_QUERY, NODE_APP_MEMORY_STATUS_COMMAND } from "./node-app-memory-contract.js";
|
|
138
|
+
export { CLIENT_DEVICE_PAIRING_STATUS_QUERY, CLIENT_DEVICE_WIRE_ERROR_DEVICE_NOT_REGISTERED, CLIENT_DEVICE_WIRE_ERROR_LAST_DEVICE, CLIENT_DEVICE_WIRE_ERROR_LAST_DEVICE_PROTECTED, CLIENT_DEVICE_WIRE_ERROR_NAME_TAKEN } from "./pairing-status-contract.js";
|
|
139
|
+
export { DEVICE_CLEANUP_CANCEL_COMMAND, DEVICE_CLEANUP_QUERY, DEVICE_CLEANUP_REQUEST_COMMAND, DEVICE_CLEANUP_STATUS_COMMAND } from "./device-cleanup-contract.js";
|
|
140
|
+
export { TRANSPORT_STATE_QUERY, TRANSPORT_STATE_QUERY_V2 } from "./transport-contract.js";
|
|
141
|
+
export { DISCOVER_NODE_COMMAND, DISCOVERY_PROBE_COMMAND, DISCOVERY_PROMOTE_COMMAND, DISCOVERY_QUERY, isDiscoverNodePayload, isProbeCandidatesPayload, isPromoteCandidatePayload } from "./onboarding/discovery-contract.js";
|
|
142
|
+
export { isOnboardingCommand, ONBOARDING_COMMAND, ONBOARDING_EVENTS, ONBOARDING_FLOW_QUERY, ONBOARDING_LCD_SCREEN_QUERY, ONBOARDING_STATUS_QUERY, ONBOARDING_STEP_IDS } from "./onboarding/onboarding-contract.js";
|
|
143
|
+
export { TRUST_INSTALL_RESTART_COMMAND, TRUST_SKIP_COMMAND, TRUST_STATUS_QUERY, TRUST_VERIFY_COMMAND, isTrustInstallRestartPayload, isTrustSkipPayload, isTrustVerifyPayload } from "./trust-contract.js";
|
|
144
|
+
export { isOwnerClaimCompletePayload, OWNER_CLAIM_COMPLETE_COMMAND, OWNER_CLAIM_PREPARE_COMMAND } from "./onboarding/owner-claim-contract.js";
|
|
145
|
+
export { deserializeRpcEvent, deserializeRpcRequest, deserializeRpcResponse, serializeRpcEvent, serializeRpcRequest, serializeRpcResponse } from "./protocol.js";
|
|
16
146
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";;;8BAEc,OAAO,aAAa,EAAE,eAAe;4BACrC,OAAO,aAAa,EAAE,aAAa;8BACnC,OAAO,aAAa,EAAE,eAAe;0BACrC,OAAO,aAAa,EAAE,WAAW;0BACjC,OAAO,iBAAiB,EAAE,WAAW;0BACrC,OAAO,iBAAiB,EAAE,WAAW;8BACrC,OAAO,iBAAiB,EAAE,eAAe;8BACvB,CAAC,SAAlB,eAAgB,IAAa,OAAO,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC;+BAC1D,CAAC,SAAlB,eAAgB,IAAa,OAAO,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,CAAC;8BAC7E,OAAO,iBAAiB,EAAE,eAAe;2BACzC,OAAO,iBAAiB,EAAE,YAAY;sBACtC,CAAC,IAAW,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC;wBAClD,OAAO,iBAAiB,EAAE,SAAS;sCACnC,OAAO,iBAAiB,EAAE,uBAAuB;4BACjD,OAAO,iBAAiB,EAAE,aAAa;6BACvC,OAAO,iBAAiB,EAAE,cAAc;qCACxC,OAAO,iBAAiB,EAAE,sBAAsB;iCAChD,OAAO,iBAAiB,EAAE,kBAAkB;yCAC5C,OAAO,gBAAgB,EAAE,0BAA0B;8BACnD,OAAO,gBAAgB,EAAE,eAAe;mCACxC,OAAO,gBAAgB,EAAE,oBAAoB;sCAC7C,OAAO,gBAAgB,EAAE,uBAAuB;+BAChD,OAAO,gBAAgB,EAAE,gBAAgB;uCACzC,OAAO,gBAAgB,EAAE,wBAAwB;gCACjD,OAAO,gBAAgB,EAAE,iBAAiB;8BAC1C,OAAO,gBAAgB,EAAE,eAAe;gCACxC,OAAO,gBAAgB,EAAE,iBAAiB;6BAC1C,OAAO,gBAAgB,EAAE,cAAc;qCACvC,OAAO,gBAAgB,E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ventByType, type KernelEventPayload, type KernelEventType, type QueryDiff, type QueryName } from "@econ-v1/domain";
|
|
2
|
-
import type { KernelRpcClient, PreparedStage, StageRpcSession, Unsubscribe } from "./client.js";
|
|
3
|
-
import type { RpcTransport } from "./transport.js";
|
|
4
|
-
export interface MessagePortKernelRpcClientOptions {
|
|
5
|
-
readonly now?: () => string;
|
|
6
|
-
readonly requestTimeoutMs?: number;
|
|
7
|
-
}
|
|
8
1
|
/**
|
|
9
2
|
* A single kernel RPC request exceeded its local response deadline. This is deliberately
|
|
10
3
|
* distinct from connection loss: the transport remains usable and callers may retry.
|
|
11
4
|
*/
|
|
12
|
-
export
|
|
5
|
+
export class KernelRpcTimeoutError extends Error {
|
|
6
|
+
/**
|
|
7
|
+
* @param {string} commandName
|
|
8
|
+
* @param {string} correlationId
|
|
9
|
+
* @param {number} timeoutMs
|
|
10
|
+
*/
|
|
11
|
+
constructor(commandName: string, correlationId: string, timeoutMs: number);
|
|
12
|
+
/** @readonly @type {string} */
|
|
13
13
|
readonly commandName: string;
|
|
14
|
+
/** @readonly @type {string} */
|
|
14
15
|
readonly correlationId: string;
|
|
16
|
+
/** @readonly @type {number} */
|
|
15
17
|
readonly timeoutMs: number;
|
|
16
|
-
constructor(commandName: string, correlationId: string, timeoutMs: number);
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
/** @implements {KernelRpcClient} */
|
|
20
|
+
export class MessagePortKernelRpcClient implements KernelRpcClient {
|
|
21
|
+
/**
|
|
22
|
+
* @param {RpcTransport} transport
|
|
23
|
+
* @param {MessagePortKernelRpcClientOptions} [options]
|
|
24
|
+
*/
|
|
20
25
|
constructor(transport: RpcTransport, options?: MessagePortKernelRpcClientOptions);
|
|
21
26
|
close(): void;
|
|
27
|
+
/**
|
|
28
|
+
* @template T
|
|
29
|
+
* @param {string} name
|
|
30
|
+
* @param {unknown} payload
|
|
31
|
+
* @returns {Promise<T>}
|
|
32
|
+
*/
|
|
22
33
|
command<T>(name: string, payload: unknown): Promise<T>;
|
|
23
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @template T
|
|
36
|
+
* @param {QueryName} name
|
|
37
|
+
* @param {unknown} params
|
|
38
|
+
* @param {(diff: import("@econ-v1/domain").QueryDiff<T>) => void} listener
|
|
39
|
+
* @returns {Unsubscribe}
|
|
40
|
+
*/
|
|
41
|
+
liveQuery<T>(name: QueryName, params: unknown, listener: (diff: import("@econ-v1/domain").QueryDiff<T>) => void): Unsubscribe;
|
|
42
|
+
/**
|
|
43
|
+
* @param {string} appName
|
|
44
|
+
* @param {string} manifestSha256
|
|
45
|
+
* @returns {Promise<StageRpcSession>}
|
|
46
|
+
*/
|
|
24
47
|
openStageSession(appName: string, manifestSha256: string): Promise<StageRpcSession>;
|
|
48
|
+
/**
|
|
49
|
+
* @param {string} appName
|
|
50
|
+
* @returns {Promise<PreparedStage>}
|
|
51
|
+
*/
|
|
25
52
|
prepareStage(appName: string): Promise<PreparedStage>;
|
|
53
|
+
/**
|
|
54
|
+
* @template {KernelEventType} T
|
|
55
|
+
* @param {T} type
|
|
56
|
+
* @param {import("@econ-v1/domain").KernelEventPayload<T>} payload
|
|
57
|
+
* @returns {Promise<void>}
|
|
58
|
+
*/
|
|
59
|
+
publish<T extends KernelEventType>(type: T, payload: import("@econ-v1/domain").KernelEventPayload<T>): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* @template T
|
|
62
|
+
* @param {QueryName} name
|
|
63
|
+
* @param {unknown} params
|
|
64
|
+
* @returns {Promise<T>}
|
|
65
|
+
*/
|
|
26
66
|
query<T>(name: QueryName, params: unknown): Promise<T>;
|
|
27
|
-
|
|
67
|
+
/**
|
|
68
|
+
* @template {KernelEventType} T
|
|
69
|
+
* @param {T} type
|
|
70
|
+
* @param {(event: import("@econ-v1/domain").KernelEventByType<T>) => void} listener
|
|
71
|
+
* @returns {Unsubscribe}
|
|
72
|
+
*/
|
|
73
|
+
subscribe<T extends KernelEventType>(type: T, listener: (event: import("@econ-v1/domain").KernelEventByType<T>) => void): Unsubscribe;
|
|
74
|
+
/** @param {string} sessionId */
|
|
28
75
|
closeStageSession(sessionId: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* @template T
|
|
78
|
+
* @param {string} sessionId
|
|
79
|
+
* @param {string} capability
|
|
80
|
+
* @param {unknown} payload
|
|
81
|
+
* @returns {Promise<T>}
|
|
82
|
+
*/
|
|
29
83
|
invokeStageCapability<T>(sessionId: string, capability: string, payload: unknown): Promise<T>;
|
|
30
|
-
|
|
31
|
-
|
|
84
|
+
/**
|
|
85
|
+
* @template T
|
|
86
|
+
* @param {string} sessionId
|
|
87
|
+
* @param {QueryName} name
|
|
88
|
+
* @param {unknown} params
|
|
89
|
+
* @param {(diff: import("@econ-v1/domain").QueryDiff<T>) => void} listener
|
|
90
|
+
* @returns {Unsubscribe}
|
|
91
|
+
*/
|
|
92
|
+
liveQueryStage<T>(sessionId: string, name: QueryName, params: unknown, listener: (diff: import("@econ-v1/domain").QueryDiff<T>) => void): Unsubscribe;
|
|
93
|
+
/**
|
|
94
|
+
* @template {KernelEventType} T
|
|
95
|
+
* @param {string} sessionId
|
|
96
|
+
* @param {T} type
|
|
97
|
+
* @param {import("@econ-v1/domain").KernelEventPayload<T>} payload
|
|
98
|
+
* @returns {Promise<void>}
|
|
99
|
+
*/
|
|
100
|
+
publishStage<T extends KernelEventType>(sessionId: string, type: T, payload: import("@econ-v1/domain").KernelEventPayload<T>): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* @template T
|
|
103
|
+
* @param {string} sessionId
|
|
104
|
+
* @param {QueryName} name
|
|
105
|
+
* @param {unknown} params
|
|
106
|
+
* @returns {Promise<T>}
|
|
107
|
+
*/
|
|
32
108
|
queryStage<T>(sessionId: string, name: QueryName, params: unknown): Promise<T>;
|
|
33
|
-
|
|
109
|
+
/**
|
|
110
|
+
* @template {KernelEventType} T
|
|
111
|
+
* @param {string} sessionId
|
|
112
|
+
* @param {T} type
|
|
113
|
+
* @param {(event: import("@econ-v1/domain").KernelEventByType<T>) => void} listener
|
|
114
|
+
* @returns {Unsubscribe}
|
|
115
|
+
*/
|
|
116
|
+
subscribeStage<T extends KernelEventType>(sessionId: string, type: T, listener: (event: import("@econ-v1/domain").KernelEventByType<T>) => void): Unsubscribe;
|
|
117
|
+
#private;
|
|
34
118
|
}
|
|
119
|
+
export type DomainEvent = import("@econ-v1/domain").DomainEvent;
|
|
120
|
+
export type JsonValue = import("@econ-v1/domain").JsonValue;
|
|
121
|
+
export type KernelEventType = import("@econ-v1/domain").KernelEventType;
|
|
122
|
+
export type QueryName = import("@econ-v1/domain").QueryName;
|
|
123
|
+
export type KernelRpcClient = import("./client.js").KernelRpcClient;
|
|
124
|
+
export type PreparedStage = import("./client.js").PreparedStage;
|
|
125
|
+
export type StageRpcSession = import("./client.js").StageRpcSession;
|
|
126
|
+
export type Unsubscribe = import("./client.js").Unsubscribe;
|
|
127
|
+
export type RpcRequest = import("./protocol.js").RpcRequest;
|
|
128
|
+
export type RpcRequestWithoutId = RpcRequest extends infer TRequest ? TRequest extends RpcRequest ? Omit<TRequest, "id"> : never : never;
|
|
129
|
+
export type RpcTransport = import("./transport.js").RpcTransport;
|
|
130
|
+
export type PendingRequest = {
|
|
131
|
+
readonly reject: (error: unknown) => void;
|
|
132
|
+
readonly resolve: (value: JsonValue) => void;
|
|
133
|
+
readonly sessionId: string | undefined;
|
|
134
|
+
readonly timeoutId: ReturnType<typeof globalThis.setTimeout>;
|
|
135
|
+
};
|
|
136
|
+
export type EventGroup = {
|
|
137
|
+
readonly eventType: KernelEventType;
|
|
138
|
+
readonly listeners: Set<(event: DomainEvent) => void>;
|
|
139
|
+
readonly sessionId: string | undefined;
|
|
140
|
+
readonly subscriptionId: string;
|
|
141
|
+
};
|
|
142
|
+
export type LiveQueryGroup = {
|
|
143
|
+
readonly listeners: Set<(diff: import("@econ-v1/domain").QueryDiff<JsonValue>) => void>;
|
|
144
|
+
readonly name: QueryName;
|
|
145
|
+
readonly params: JsonValue;
|
|
146
|
+
readonly sessionId: string | undefined;
|
|
147
|
+
readonly subscriptionId: string;
|
|
148
|
+
};
|
|
149
|
+
export type MessagePortKernelRpcClientOptions = {
|
|
150
|
+
readonly now?: () => string;
|
|
151
|
+
readonly requestTimeoutMs?: number;
|
|
152
|
+
};
|
|
35
153
|
//# sourceMappingURL=message-port-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-port-client.d.ts","sourceRoot":"","sources":["../src/message-port-client.
|
|
1
|
+
{"version":3,"file":"message-port-client.d.ts","sourceRoot":"","sources":["../src/message-port-client.js"],"names":[],"mappings":"AA+CA;;;GAGG;AACH;IAQE;;;;OAIG;IACH,yBAJW,MAAM,iBACN,MAAM,aACN,MAAM,EAQhB;IAlBD,+BAA+B;IAC/B,sBADqB,MAAM,CACf;IACZ,+BAA+B;IAC/B,wBADqB,MAAM,CACb;IACd,+BAA+B;IAC/B,oBADqB,MAAM,CACjB;CAcX;AAMD,oCAAoC;AACpC,mDADiB,eAAe;IA0B9B;;;OAGG;IACH,uBAHW,YAAY,YACZ,iCAAiC,EAQ3C;IAED,cAIC;IAED;;;;;OAKG;IACH,QALa,CAAC,QACH,MAAM,WACN,OAAO,GACL,OAAO,CAAC,CAAC,CAAC,CAItB;IAED;;;;;;OAMG;IACH,UANa,CAAC,QACH,SAAS,UACT,OAAO,YACP,CAAC,IAAI,EAAE,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,GACpD,WAAW,CAIvB;IAED;;;;OAIG;IACH,0BAJW,MAAM,kBACN,MAAM,GACJ,OAAO,CAAC,eAAe,CAAC,CAQpC;IAED;;;OAGG;IACH,sBAHW,MAAM,GACJ,OAAO,CAAC,aAAa,CAAC,CAmBlC;IAED;;;;;OAKG;IACH,QAL+B,CAAC,SAAlB,eAAgB,QACnB,CAAC,WACD,OAAO,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,I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
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const NODE_APP_MEMORY_LIST_QUERY: "node-app-memory.list.v1";
|
|
2
|
+
export const NODE_APP_MEMORY_DETAIL_QUERY: "node-app-memory.detail.v1";
|
|
3
|
+
export const NODE_APP_MEMORY_OVERVIEW_QUERY: "node-app-memory.overview.v1";
|
|
4
|
+
export const NODE_APP_MEMORY_CAPTURE_COMMAND: "node-app-memory.capture.v1";
|
|
5
|
+
export const NODE_APP_MEMORY_STATUS_COMMAND: "node-app-memory.status.v1";
|
|
6
|
+
export const NODE_APP_MEMORY_DOWNLOAD_COMMAND: "node-app-memory.download.v1";
|
|
7
|
+
export type NodeAppMemoryDetailQueryParams = {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=node-app-memory-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-app-memory-contract.d.ts","sourceRoot":"","sources":["../src/node-app-memory-contract.js"],"names":[],"mappings":"AAEA,yCAA0C,yBAAyB,CAAC;AACpE,2CAA4C,2BAA2B,CAAC;AACxE,6CAA8C,6BAA6B,CAAC;AAC5E,8CAA+C,4BAA4B,CAAC;AAC5E,6CAA8C,2BAA2B,CAAC;AAC1E,+CAAgD,6BAA6B,CAAC;6CAEhE;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE"}
|