@xyo-network/dapp-kit-port 3.0.1 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/dist/browser/applicationPortClient.d.ts.map +1 -1
- package/dist/browser/applicationPortHost.d.ts.map +1 -1
- package/dist/browser/applicationPortModel.d.ts +39 -18
- package/dist/browser/applicationPortModel.d.ts.map +1 -1
- package/dist/browser/applicationPortOperations.d.ts +4 -0
- package/dist/browser/applicationPortOperations.d.ts.map +1 -0
- package/dist/browser/applicationPortWire.d.ts +396 -3
- package/dist/browser/applicationPortWire.d.ts.map +1 -1
- package/dist/browser/engineApplicationPortHost.d.ts.map +1 -1
- package/dist/browser/index.mjs +90 -34
- package/dist/browser/index.mjs.map +4 -4
- package/dist/browser/webSocketApplicationPortClient.d.ts +3 -1
- package/dist/browser/webSocketApplicationPortClient.d.ts.map +1 -1
- package/dist/node/applicationPortClient.d.ts.map +1 -1
- package/dist/node/applicationPortHost.d.ts.map +1 -1
- package/dist/node/applicationPortModel.d.ts +39 -18
- package/dist/node/applicationPortModel.d.ts.map +1 -1
- package/dist/node/applicationPortOperations.d.ts +4 -0
- package/dist/node/applicationPortOperations.d.ts.map +1 -0
- package/dist/node/applicationPortWire.d.ts +396 -3
- package/dist/node/applicationPortWire.d.ts.map +1 -1
- package/dist/node/engineApplicationPortHost.d.ts.map +1 -1
- package/dist/node/index.mjs +90 -34
- package/dist/node/index.mjs.map +4 -4
- package/dist/node/webSocketApplicationPortClient.d.ts +3 -1
- package/dist/node/webSocketApplicationPortClient.d.ts.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -8,6 +8,28 @@ Every frame is validated against its attachment grant, plan, system
|
|
|
8
8
|
incarnation, host session, request, port, operation, and deadline before domain
|
|
9
9
|
delivery.
|
|
10
10
|
|
|
11
|
+
The exported V1 `PortFrameZod` and canonical vectors remain immutable. V1
|
|
12
|
+
resume continues at `lastAcceptedSequence + 1`; V1 cannot represent completion
|
|
13
|
+
of a fresh zero-based stream with no accepted items. That case reports
|
|
14
|
+
`port.stream-progress-unsupported` instead of claiming successful completion.
|
|
15
|
+
|
|
16
|
+
Explicit V2 uses `nextSequence` for resume and terminal progress: the absolute
|
|
17
|
+
next expected item, including zero before the first item. Hosts, clients and
|
|
18
|
+
transcript validation require exact progress and reject mixed-version fields,
|
|
19
|
+
gaps and changed redelivery. Fresh streams may start above zero. MessagePort
|
|
20
|
+
peers capture `frameSchemaVersion` (default1); WebSocket clients declare
|
|
21
|
+
`acceptedFrameSchemaVersions` (default `[1, 2]`) and validate selection before
|
|
22
|
+
requests. Legacy hello1 selects V1; hello2 carries the selected frame version.
|
|
23
|
+
A strict V1 schema consumer rejects V2 rather than interpreting it silently.
|
|
24
|
+
|
|
25
|
+
Each returned stream exposes a frozen `initialProgress` opening snapshot with
|
|
26
|
+
its actual `nextSequence` and optional durable cursor, so V2 can resume after
|
|
27
|
+
interruption before the first item. It is not an application checkpoint for
|
|
28
|
+
queued items. Custom structural stream implementations must supply this new
|
|
29
|
+
property. Credit still counts transmitted item frames, including exact
|
|
30
|
+
redelivery, and outstanding credit cannot exceed the attachment grant.
|
|
31
|
+
Deduplication suppresses repeated delivery without making wire traffic free.
|
|
32
|
+
|
|
11
33
|
The peers depend only on a small message-endpoint interface. Platform packages
|
|
12
34
|
adapt `MessagePort`, WebSocket, or future native transports to that interface;
|
|
13
35
|
they do not duplicate the protocol state machine. Actor and provider locators
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicationPortClient.d.ts","sourceRoot":"","sources":["../../src/applicationPortClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"applicationPortClient.d.ts","sourceRoot":"","sources":["../../src/applicationPortClient.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAQ3B,MAAM,2BAA2B,CAAA;AAWlC,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF,QAAQ,CAAC,aAAa,EAAE,MAAM,MAAM,CAAA;CACrC;AAgeD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,kCAAkC,GAAG,qBAAqB,CAE9G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicationPortHost.d.ts","sourceRoot":"","sources":["../../src/applicationPortHost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"applicationPortHost.d.ts","sourceRoot":"","sources":["../../src/applicationPortHost.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAI3B,MAAM,2BAA2B,CAAA;AAYlC,MAAM,WAAW,gCAAiC,SAAQ,0BAA0B;IAClF,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,wBAAwB,CAAA;IAC/D,QAAQ,CAAC,UAAU,EAAE,SAAS,wBAAwB,EAAE,CAAA;CACzD;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,cAAc,IAAI,IAAI,CAAA;IACtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AAqeD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,gCAAgC,GAAG,mBAAmB,CAExG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonValue, PortAttachmentGrant, PortConsistencyEvidence, PortFrame, PortFrameIssue, PortOperationGrant } from '@xyo-network/dapp-kit';
|
|
1
|
+
import type { JsonValue, PortAttachmentGrant, PortConsistencyEvidence, PortFrameAnyVersion as PortFrame, PortFrameIssue, PortFrameSchemaVersion, PortOperationGrant } from '@xyo-network/dapp-kit';
|
|
2
2
|
export interface ApplicationPortMessageEndpoint {
|
|
3
3
|
addMessageListener(listener: (message: unknown) => void): void;
|
|
4
4
|
removeMessageListener(listener: (message: unknown) => void): void;
|
|
@@ -45,6 +45,8 @@ export interface ApplicationPortProtocolErrorContext {
|
|
|
45
45
|
export interface ApplicationPortPeerOptions {
|
|
46
46
|
readonly authenticatedPrincipalId: string;
|
|
47
47
|
readonly endpoint: ApplicationPortMessageEndpoint;
|
|
48
|
+
/** Trusted attachment selection; both peers must agree before dispatch. Default: V1. */
|
|
49
|
+
readonly frameSchemaVersion?: PortFrameSchemaVersion;
|
|
48
50
|
readonly grant: PortAttachmentGrant;
|
|
49
51
|
readonly now: () => number;
|
|
50
52
|
readonly onProtocolError: (context: ApplicationPortProtocolErrorContext) => void;
|
|
@@ -86,7 +88,10 @@ export interface ApplicationPortStreamSource {
|
|
|
86
88
|
next(signal: AbortSignal): Promise<ApplicationPortStreamRead>;
|
|
87
89
|
}
|
|
88
90
|
export interface ApplicationPortStreamResumeContext extends ApplicationPortRequestContext {
|
|
89
|
-
|
|
91
|
+
/** Compatibility observation; absent before a first item rather than exposing -1. */
|
|
92
|
+
readonly lastAcceptedSequence?: number;
|
|
93
|
+
/** Canonical resume boundary, including zero before accepting a first item. */
|
|
94
|
+
readonly nextSequence: number;
|
|
90
95
|
readonly resumeCursor: string;
|
|
91
96
|
readonly streamId: string;
|
|
92
97
|
}
|
|
@@ -108,20 +113,32 @@ export interface ApplicationPortRequestOptions {
|
|
|
108
113
|
export interface ApplicationPortStreamRequestOptions extends ApplicationPortRequestOptions {
|
|
109
114
|
readonly initialCredit: number;
|
|
110
115
|
}
|
|
111
|
-
|
|
116
|
+
interface ApplicationPortStreamResumeBaseOptions {
|
|
112
117
|
readonly credit: number;
|
|
113
118
|
readonly deadlineUnixMs: number;
|
|
114
|
-
readonly lastAcceptedSequence: number;
|
|
115
119
|
readonly operationId: string;
|
|
116
120
|
readonly portId: string;
|
|
117
121
|
readonly resumeCursor: string;
|
|
118
122
|
readonly signal?: AbortSignal;
|
|
119
123
|
readonly streamId: string;
|
|
120
124
|
}
|
|
125
|
+
export type ApplicationPortStreamResumeOptions = ApplicationPortStreamResumeBaseOptions & ({
|
|
126
|
+
readonly lastAcceptedSequence: number;
|
|
127
|
+
readonly nextSequence?: never;
|
|
128
|
+
} | {
|
|
129
|
+
readonly lastAcceptedSequence?: never;
|
|
130
|
+
readonly nextSequence: number;
|
|
131
|
+
});
|
|
121
132
|
export interface ApplicationPortStreamValue extends ApplicationPortStreamItem {
|
|
122
133
|
readonly sequence: number;
|
|
123
134
|
}
|
|
135
|
+
export interface ApplicationPortStreamOpeningProgress {
|
|
136
|
+
readonly nextSequence: number;
|
|
137
|
+
readonly resumeCursor?: string;
|
|
138
|
+
}
|
|
124
139
|
export interface ApplicationPortStream extends AsyncIterableIterator<ApplicationPortStreamValue> {
|
|
140
|
+
/** Immutable opening checkpoint; queued/accepted items are not app progress. */
|
|
141
|
+
readonly initialProgress: ApplicationPortStreamOpeningProgress;
|
|
125
142
|
readonly requestId: string;
|
|
126
143
|
readonly streamId: string;
|
|
127
144
|
cancel(reasonCode?: string): void;
|
|
@@ -135,22 +152,26 @@ export interface ApplicationPortClient {
|
|
|
135
152
|
}
|
|
136
153
|
export declare function applicationPortOperationKey(portId: string, operationId: string): string;
|
|
137
154
|
export declare function applicationPortOperationGrant(grant: PortAttachmentGrant, portId: string, operationId: string): PortOperationGrant | undefined;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
155
|
+
type FrameBaseInput = Pick<PortFrame, 'deadlineUnixMs' | 'operationId' | 'portId' | 'requestId'>;
|
|
156
|
+
type FrameBase = Omit<Extract<PortFrame, {
|
|
157
|
+
frameKind: 'request';
|
|
158
|
+
}>, 'body' | 'frameKind' | 'schemaVersion'>;
|
|
159
|
+
export declare function applicationPortFrameBase(grant: PortAttachmentGrant, frame: FrameBaseInput & {
|
|
160
|
+
readonly schemaVersion?: 1;
|
|
161
|
+
}): FrameBase & {
|
|
142
162
|
schemaVersion: 1;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
163
|
+
};
|
|
164
|
+
export declare function applicationPortFrameBase(grant: PortAttachmentGrant, frame: FrameBaseInput & {
|
|
165
|
+
readonly schemaVersion: 2;
|
|
166
|
+
}): FrameBase & {
|
|
167
|
+
schemaVersion: 2;
|
|
168
|
+
};
|
|
169
|
+
export declare function applicationPortFrameBase(grant: PortAttachmentGrant, frame: FrameBaseInput & {
|
|
170
|
+
readonly schemaVersion?: PortFrameSchemaVersion;
|
|
171
|
+
}): FrameBase & {
|
|
172
|
+
schemaVersion: PortFrameSchemaVersion;
|
|
153
173
|
};
|
|
154
174
|
export declare function parseApplicationPortFrame(value: unknown): PortFrame;
|
|
155
175
|
export declare function applicationPortErrorFrame(grant: PortAttachmentGrant, frame: PortFrame, error: ApplicationPortErrorData): PortFrame;
|
|
176
|
+
export {};
|
|
156
177
|
//# sourceMappingURL=applicationPortModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicationPortModel.d.ts","sourceRoot":"","sources":["../../src/applicationPortModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,SAAS,
|
|
1
|
+
{"version":3,"file":"applicationPortModel.d.ts","sourceRoot":"","sources":["../../src/applicationPortModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,IAAI,SAAS,EAChC,cAAc,EACd,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,uBAAuB,CAAA;AAG9B,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAA;IAC9D,qBAAqB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAA;IACjE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI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mB,EAAE,KAAK,EAAE,cAAc,GAAG;IAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,sBAAsB,CAAA;CAAE,GAAG,SAAS,GAAG;IAAE,aAAa,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAqBxM,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAEnE;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,mBAAmB,EAC1B,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,wBAAwB,GAC9B,SAAS,CAMX"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PortAttachmentGrant } from '@xyo-network/dapp-kit';
|
|
2
|
+
import type { ApplicationPortOperation } from './applicationPortModel.ts';
|
|
3
|
+
export declare function registeredApplicationPortOperations(attachment: PortAttachmentGrant, values: readonly ApplicationPortOperation[]): ReadonlyMap<string, ApplicationPortOperation>;
|
|
4
|
+
//# sourceMappingURL=applicationPortOperations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applicationPortOperations.d.ts","sourceRoot":"","sources":["../../src/applicationPortOperations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAQzE,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,mBAAmB,EAC/B,MAAM,EAAE,SAAS,wBAAwB,EAAE,GAC1C,WAAW,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAc/C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PortFrame } from '@xyo-network/dapp-kit';
|
|
1
|
+
import type { PortFrameAnyVersion as PortFrame } from '@xyo-network/dapp-kit';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export declare const ApplicationPortTransportSchema: "network.xyo.dapp.port.transport" & {
|
|
4
4
|
readonly __schema: true;
|
|
@@ -39,6 +39,113 @@ export declare const ApplicationPortTransportHelloZod: z.ZodObject<{
|
|
|
39
39
|
}, z.core.$strict>;
|
|
40
40
|
}, z.core.$strict>;
|
|
41
41
|
export type ApplicationPortTransportHello = z.infer<typeof ApplicationPortTransportHelloZod>;
|
|
42
|
+
export declare const ApplicationPortTransportHelloV2Zod: z.ZodObject<{
|
|
43
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
44
|
+
frameSchemaVersion: z.ZodLiteral<2>;
|
|
45
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.transport" & {
|
|
46
|
+
readonly __schema: true;
|
|
47
|
+
}>;
|
|
48
|
+
messageKind: z.ZodLiteral<"hello">;
|
|
49
|
+
maximumFrameBytes: z.ZodNumber;
|
|
50
|
+
grant: z.ZodObject<{
|
|
51
|
+
attachmentId: z.ZodString;
|
|
52
|
+
principalId: z.ZodString;
|
|
53
|
+
dappId: z.ZodString;
|
|
54
|
+
protocolVersion: z.ZodString;
|
|
55
|
+
planId: z.ZodString;
|
|
56
|
+
systemInstanceId: z.ZodString;
|
|
57
|
+
hostSessionId: z.ZodString;
|
|
58
|
+
createdAt: z.ZodNumber;
|
|
59
|
+
lastSeenAt: z.ZodNumber;
|
|
60
|
+
expiresAt: z.ZodNumber;
|
|
61
|
+
leasePolicy: z.ZodEnum<{
|
|
62
|
+
"fixed-expiry": "fixed-expiry";
|
|
63
|
+
"disconnect-expiry": "disconnect-expiry";
|
|
64
|
+
}>;
|
|
65
|
+
operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
66
|
+
portId: z.ZodString;
|
|
67
|
+
operationId: z.ZodString;
|
|
68
|
+
streaming: z.ZodLiteral<false>;
|
|
69
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
70
|
+
portId: z.ZodString;
|
|
71
|
+
operationId: z.ZodString;
|
|
72
|
+
streaming: z.ZodLiteral<true>;
|
|
73
|
+
resumable: z.ZodBoolean;
|
|
74
|
+
maximumCredit: z.ZodNumber;
|
|
75
|
+
}, z.core.$strict>], "streaming">>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
export type ApplicationPortTransportHelloV2 = z.infer<typeof ApplicationPortTransportHelloV2Zod>;
|
|
79
|
+
export declare const ApplicationPortTransportHelloAnyVersionZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
80
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.transport" & {
|
|
81
|
+
readonly __schema: true;
|
|
82
|
+
}>;
|
|
83
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
84
|
+
messageKind: z.ZodLiteral<"hello">;
|
|
85
|
+
maximumFrameBytes: z.ZodNumber;
|
|
86
|
+
grant: z.ZodObject<{
|
|
87
|
+
attachmentId: z.ZodString;
|
|
88
|
+
principalId: z.ZodString;
|
|
89
|
+
dappId: z.ZodString;
|
|
90
|
+
protocolVersion: z.ZodString;
|
|
91
|
+
planId: z.ZodString;
|
|
92
|
+
systemInstanceId: z.ZodString;
|
|
93
|
+
hostSessionId: z.ZodString;
|
|
94
|
+
createdAt: z.ZodNumber;
|
|
95
|
+
lastSeenAt: z.ZodNumber;
|
|
96
|
+
expiresAt: z.ZodNumber;
|
|
97
|
+
leasePolicy: z.ZodEnum<{
|
|
98
|
+
"fixed-expiry": "fixed-expiry";
|
|
99
|
+
"disconnect-expiry": "disconnect-expiry";
|
|
100
|
+
}>;
|
|
101
|
+
operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
102
|
+
portId: z.ZodString;
|
|
103
|
+
operationId: z.ZodString;
|
|
104
|
+
streaming: z.ZodLiteral<false>;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
portId: z.ZodString;
|
|
107
|
+
operationId: z.ZodString;
|
|
108
|
+
streaming: z.ZodLiteral<true>;
|
|
109
|
+
resumable: z.ZodBoolean;
|
|
110
|
+
maximumCredit: z.ZodNumber;
|
|
111
|
+
}, z.core.$strict>], "streaming">>;
|
|
112
|
+
}, z.core.$strict>;
|
|
113
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
114
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
115
|
+
frameSchemaVersion: z.ZodLiteral<2>;
|
|
116
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.transport" & {
|
|
117
|
+
readonly __schema: true;
|
|
118
|
+
}>;
|
|
119
|
+
messageKind: z.ZodLiteral<"hello">;
|
|
120
|
+
maximumFrameBytes: z.ZodNumber;
|
|
121
|
+
grant: z.ZodObject<{
|
|
122
|
+
attachmentId: z.ZodString;
|
|
123
|
+
principalId: z.ZodString;
|
|
124
|
+
dappId: z.ZodString;
|
|
125
|
+
protocolVersion: z.ZodString;
|
|
126
|
+
planId: z.ZodString;
|
|
127
|
+
systemInstanceId: z.ZodString;
|
|
128
|
+
hostSessionId: z.ZodString;
|
|
129
|
+
createdAt: z.ZodNumber;
|
|
130
|
+
lastSeenAt: z.ZodNumber;
|
|
131
|
+
expiresAt: z.ZodNumber;
|
|
132
|
+
leasePolicy: z.ZodEnum<{
|
|
133
|
+
"fixed-expiry": "fixed-expiry";
|
|
134
|
+
"disconnect-expiry": "disconnect-expiry";
|
|
135
|
+
}>;
|
|
136
|
+
operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
137
|
+
portId: z.ZodString;
|
|
138
|
+
operationId: z.ZodString;
|
|
139
|
+
streaming: z.ZodLiteral<false>;
|
|
140
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
141
|
+
portId: z.ZodString;
|
|
142
|
+
operationId: z.ZodString;
|
|
143
|
+
streaming: z.ZodLiteral<true>;
|
|
144
|
+
resumable: z.ZodBoolean;
|
|
145
|
+
maximumCredit: z.ZodNumber;
|
|
146
|
+
}, z.core.$strict>], "streaming">>;
|
|
147
|
+
}, z.core.$strict>;
|
|
148
|
+
}, z.core.$strict>], "schemaVersion">;
|
|
42
149
|
export declare const ApplicationPortTransportErrorZod: z.ZodObject<{
|
|
43
150
|
schema: z.ZodLiteral<"network.xyo.dapp.port.transport" & {
|
|
44
151
|
readonly __schema: true;
|
|
@@ -49,7 +156,7 @@ export declare const ApplicationPortTransportErrorZod: z.ZodObject<{
|
|
|
49
156
|
retriable: z.ZodBoolean;
|
|
50
157
|
}, z.core.$strict>;
|
|
51
158
|
export type ApplicationPortTransportError = z.infer<typeof ApplicationPortTransportErrorZod>;
|
|
52
|
-
export declare const ApplicationPortWireMessageZod: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
159
|
+
export declare const ApplicationPortWireMessageZod: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
160
|
frameKind: z.ZodLiteral<"request">;
|
|
54
161
|
body: z.ZodType<import("@xyo-network/dapp-kit").JsonValue, unknown, z.core.$ZodTypeInternals<import("@xyo-network/dapp-kit").JsonValue, unknown>>;
|
|
55
162
|
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
@@ -300,7 +407,258 @@ export declare const ApplicationPortWireMessageZod: z.ZodUnion<readonly [z.ZodDi
|
|
|
300
407
|
deadlineUnixMs: z.ZodNumber;
|
|
301
408
|
portId: z.ZodString;
|
|
302
409
|
operationId: z.ZodString;
|
|
303
|
-
}, z.core.$strict>], "frameKind">, z.ZodObject<{
|
|
410
|
+
}, z.core.$strict>], "frameKind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
411
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
412
|
+
frameKind: z.ZodLiteral<"request">;
|
|
413
|
+
body: z.ZodType<import("@xyo-network/dapp-kit").JsonValue, unknown, z.core.$ZodTypeInternals<import("@xyo-network/dapp-kit").JsonValue, unknown>>;
|
|
414
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
415
|
+
readonly __schema: true;
|
|
416
|
+
}>;
|
|
417
|
+
dappId: z.ZodString;
|
|
418
|
+
protocolVersion: z.ZodString;
|
|
419
|
+
planId: z.ZodString;
|
|
420
|
+
systemInstanceId: z.ZodString;
|
|
421
|
+
hostSessionId: z.ZodString;
|
|
422
|
+
attachmentId: z.ZodString;
|
|
423
|
+
requestId: z.ZodString;
|
|
424
|
+
deadlineUnixMs: z.ZodNumber;
|
|
425
|
+
portId: z.ZodString;
|
|
426
|
+
operationId: z.ZodString;
|
|
427
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
428
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
429
|
+
frameKind: z.ZodLiteral<"response">;
|
|
430
|
+
consistency: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
431
|
+
mode: z.ZodLiteral<"not-applicable">;
|
|
432
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
433
|
+
mode: z.ZodLiteral<"finalized-through">;
|
|
434
|
+
blockNumber: z.ZodNumber;
|
|
435
|
+
blockHash: z.ZodString;
|
|
436
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
437
|
+
mode: z.ZodLiteral<"projection-through">;
|
|
438
|
+
blockNumber: z.ZodNumber;
|
|
439
|
+
blockHash: z.ZodString;
|
|
440
|
+
projectionId: z.ZodString;
|
|
441
|
+
projectionVersion: z.ZodString;
|
|
442
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
443
|
+
mode: z.ZodLiteral<"provisional">;
|
|
444
|
+
blockNumber: z.ZodNumber;
|
|
445
|
+
blockHash: z.ZodString;
|
|
446
|
+
transactionHash: z.ZodString;
|
|
447
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
448
|
+
mode: z.ZodLiteral<"local-ephemeral">;
|
|
449
|
+
}, z.core.$strict>], "mode">;
|
|
450
|
+
body: z.ZodType<import("@xyo-network/dapp-kit").JsonValue, unknown, z.core.$ZodTypeInternals<import("@xyo-network/dapp-kit").JsonValue, unknown>>;
|
|
451
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
452
|
+
readonly __schema: true;
|
|
453
|
+
}>;
|
|
454
|
+
dappId: z.ZodString;
|
|
455
|
+
protocolVersion: z.ZodString;
|
|
456
|
+
planId: z.ZodString;
|
|
457
|
+
systemInstanceId: z.ZodString;
|
|
458
|
+
hostSessionId: z.ZodString;
|
|
459
|
+
attachmentId: z.ZodString;
|
|
460
|
+
requestId: z.ZodString;
|
|
461
|
+
deadlineUnixMs: z.ZodNumber;
|
|
462
|
+
portId: z.ZodString;
|
|
463
|
+
operationId: z.ZodString;
|
|
464
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
465
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
466
|
+
frameKind: z.ZodLiteral<"error">;
|
|
467
|
+
error: z.ZodObject<{
|
|
468
|
+
code: z.ZodString;
|
|
469
|
+
retriable: z.ZodBoolean;
|
|
470
|
+
details: z.ZodOptional<z.ZodType<import("@xyo-network/dapp-kit").JsonValue, unknown, z.core.$ZodTypeInternals<import("@xyo-network/dapp-kit").JsonValue, unknown>>>;
|
|
471
|
+
}, z.core.$strict>;
|
|
472
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
473
|
+
readonly __schema: true;
|
|
474
|
+
}>;
|
|
475
|
+
dappId: z.ZodString;
|
|
476
|
+
protocolVersion: z.ZodString;
|
|
477
|
+
planId: z.ZodString;
|
|
478
|
+
systemInstanceId: z.ZodString;
|
|
479
|
+
hostSessionId: z.ZodString;
|
|
480
|
+
attachmentId: z.ZodString;
|
|
481
|
+
requestId: z.ZodString;
|
|
482
|
+
deadlineUnixMs: z.ZodNumber;
|
|
483
|
+
portId: z.ZodString;
|
|
484
|
+
operationId: z.ZodString;
|
|
485
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
486
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
487
|
+
frameKind: z.ZodLiteral<"cancel">;
|
|
488
|
+
reasonCode: z.ZodString;
|
|
489
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
490
|
+
readonly __schema: true;
|
|
491
|
+
}>;
|
|
492
|
+
dappId: z.ZodString;
|
|
493
|
+
protocolVersion: z.ZodString;
|
|
494
|
+
planId: z.ZodString;
|
|
495
|
+
systemInstanceId: z.ZodString;
|
|
496
|
+
hostSessionId: z.ZodString;
|
|
497
|
+
attachmentId: z.ZodString;
|
|
498
|
+
requestId: z.ZodString;
|
|
499
|
+
deadlineUnixMs: z.ZodNumber;
|
|
500
|
+
portId: z.ZodString;
|
|
501
|
+
operationId: z.ZodString;
|
|
502
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
503
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
504
|
+
frameKind: z.ZodLiteral<"cancel-ack">;
|
|
505
|
+
willEmitNoNewWork: z.ZodLiteral<true>;
|
|
506
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
507
|
+
readonly __schema: true;
|
|
508
|
+
}>;
|
|
509
|
+
dappId: z.ZodString;
|
|
510
|
+
protocolVersion: z.ZodString;
|
|
511
|
+
planId: z.ZodString;
|
|
512
|
+
systemInstanceId: z.ZodString;
|
|
513
|
+
hostSessionId: z.ZodString;
|
|
514
|
+
attachmentId: z.ZodString;
|
|
515
|
+
requestId: z.ZodString;
|
|
516
|
+
deadlineUnixMs: z.ZodNumber;
|
|
517
|
+
portId: z.ZodString;
|
|
518
|
+
operationId: z.ZodString;
|
|
519
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
520
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
521
|
+
frameKind: z.ZodLiteral<"stream-open">;
|
|
522
|
+
streamId: z.ZodString;
|
|
523
|
+
delivery: z.ZodLiteral<"at-least-once">;
|
|
524
|
+
resumable: z.ZodBoolean;
|
|
525
|
+
nextSequence: z.ZodNumber;
|
|
526
|
+
resumeCursor: z.ZodOptional<z.ZodString>;
|
|
527
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
528
|
+
readonly __schema: true;
|
|
529
|
+
}>;
|
|
530
|
+
dappId: z.ZodString;
|
|
531
|
+
protocolVersion: z.ZodString;
|
|
532
|
+
planId: z.ZodString;
|
|
533
|
+
systemInstanceId: z.ZodString;
|
|
534
|
+
hostSessionId: z.ZodString;
|
|
535
|
+
attachmentId: z.ZodString;
|
|
536
|
+
requestId: z.ZodString;
|
|
537
|
+
deadlineUnixMs: z.ZodNumber;
|
|
538
|
+
portId: z.ZodString;
|
|
539
|
+
operationId: z.ZodString;
|
|
540
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
541
|
+
sequence: z.ZodNumber;
|
|
542
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
543
|
+
frameKind: z.ZodLiteral<"stream-item">;
|
|
544
|
+
streamId: z.ZodString;
|
|
545
|
+
resumeCursor: z.ZodOptional<z.ZodString>;
|
|
546
|
+
consistency: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
547
|
+
mode: z.ZodLiteral<"not-applicable">;
|
|
548
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
549
|
+
mode: z.ZodLiteral<"finalized-through">;
|
|
550
|
+
blockNumber: z.ZodNumber;
|
|
551
|
+
blockHash: z.ZodString;
|
|
552
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
553
|
+
mode: z.ZodLiteral<"projection-through">;
|
|
554
|
+
blockNumber: z.ZodNumber;
|
|
555
|
+
blockHash: z.ZodString;
|
|
556
|
+
projectionId: z.ZodString;
|
|
557
|
+
projectionVersion: z.ZodString;
|
|
558
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
559
|
+
mode: z.ZodLiteral<"provisional">;
|
|
560
|
+
blockNumber: z.ZodNumber;
|
|
561
|
+
blockHash: z.ZodString;
|
|
562
|
+
transactionHash: z.ZodString;
|
|
563
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
564
|
+
mode: z.ZodLiteral<"local-ephemeral">;
|
|
565
|
+
}, z.core.$strict>], "mode">;
|
|
566
|
+
body: z.ZodType<import("@xyo-network/dapp-kit").JsonValue, unknown, z.core.$ZodTypeInternals<import("@xyo-network/dapp-kit").JsonValue, unknown>>;
|
|
567
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
568
|
+
readonly __schema: true;
|
|
569
|
+
}>;
|
|
570
|
+
dappId: z.ZodString;
|
|
571
|
+
protocolVersion: z.ZodString;
|
|
572
|
+
planId: z.ZodString;
|
|
573
|
+
systemInstanceId: z.ZodString;
|
|
574
|
+
hostSessionId: z.ZodString;
|
|
575
|
+
attachmentId: z.ZodString;
|
|
576
|
+
requestId: z.ZodString;
|
|
577
|
+
deadlineUnixMs: z.ZodNumber;
|
|
578
|
+
portId: z.ZodString;
|
|
579
|
+
operationId: z.ZodString;
|
|
580
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
581
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
582
|
+
frameKind: z.ZodLiteral<"stream-credit">;
|
|
583
|
+
streamId: z.ZodString;
|
|
584
|
+
credit: z.ZodNumber;
|
|
585
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
586
|
+
readonly __schema: true;
|
|
587
|
+
}>;
|
|
588
|
+
dappId: z.ZodString;
|
|
589
|
+
protocolVersion: z.ZodString;
|
|
590
|
+
planId: z.ZodString;
|
|
591
|
+
systemInstanceId: z.ZodString;
|
|
592
|
+
hostSessionId: z.ZodString;
|
|
593
|
+
attachmentId: z.ZodString;
|
|
594
|
+
requestId: z.ZodString;
|
|
595
|
+
deadlineUnixMs: z.ZodNumber;
|
|
596
|
+
portId: z.ZodString;
|
|
597
|
+
operationId: z.ZodString;
|
|
598
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
599
|
+
frameKind: z.ZodLiteral<"stream-close">;
|
|
600
|
+
streamId: z.ZodString;
|
|
601
|
+
nextSequence: z.ZodNumber;
|
|
602
|
+
resumeCursor: z.ZodOptional<z.ZodString>;
|
|
603
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
604
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
605
|
+
readonly __schema: true;
|
|
606
|
+
}>;
|
|
607
|
+
dappId: z.ZodString;
|
|
608
|
+
protocolVersion: z.ZodString;
|
|
609
|
+
planId: z.ZodString;
|
|
610
|
+
systemInstanceId: z.ZodString;
|
|
611
|
+
hostSessionId: z.ZodString;
|
|
612
|
+
attachmentId: z.ZodString;
|
|
613
|
+
requestId: z.ZodString;
|
|
614
|
+
deadlineUnixMs: z.ZodNumber;
|
|
615
|
+
portId: z.ZodString;
|
|
616
|
+
operationId: z.ZodString;
|
|
617
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
618
|
+
frameKind: z.ZodLiteral<"stream-error">;
|
|
619
|
+
streamId: z.ZodString;
|
|
620
|
+
nextSequence: z.ZodNumber;
|
|
621
|
+
resumeCursor: z.ZodOptional<z.ZodString>;
|
|
622
|
+
error: z.ZodObject<{
|
|
623
|
+
code: z.ZodString;
|
|
624
|
+
retriable: z.ZodBoolean;
|
|
625
|
+
details: z.ZodOptional<z.ZodType<import("@xyo-network/dapp-kit").JsonValue, unknown, z.core.$ZodTypeInternals<import("@xyo-network/dapp-kit").JsonValue, unknown>>>;
|
|
626
|
+
}, z.core.$strict>;
|
|
627
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
628
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
629
|
+
readonly __schema: true;
|
|
630
|
+
}>;
|
|
631
|
+
dappId: z.ZodString;
|
|
632
|
+
protocolVersion: z.ZodString;
|
|
633
|
+
planId: z.ZodString;
|
|
634
|
+
systemInstanceId: z.ZodString;
|
|
635
|
+
hostSessionId: z.ZodString;
|
|
636
|
+
attachmentId: z.ZodString;
|
|
637
|
+
requestId: z.ZodString;
|
|
638
|
+
deadlineUnixMs: z.ZodNumber;
|
|
639
|
+
portId: z.ZodString;
|
|
640
|
+
operationId: z.ZodString;
|
|
641
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
642
|
+
frameKind: z.ZodLiteral<"stream-resume">;
|
|
643
|
+
streamId: z.ZodString;
|
|
644
|
+
nextSequence: z.ZodNumber;
|
|
645
|
+
resumeCursor: z.ZodString;
|
|
646
|
+
credit: z.ZodNumber;
|
|
647
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
648
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.frame" & {
|
|
649
|
+
readonly __schema: true;
|
|
650
|
+
}>;
|
|
651
|
+
dappId: z.ZodString;
|
|
652
|
+
protocolVersion: z.ZodString;
|
|
653
|
+
planId: z.ZodString;
|
|
654
|
+
systemInstanceId: z.ZodString;
|
|
655
|
+
hostSessionId: z.ZodString;
|
|
656
|
+
attachmentId: z.ZodString;
|
|
657
|
+
requestId: z.ZodString;
|
|
658
|
+
deadlineUnixMs: z.ZodNumber;
|
|
659
|
+
portId: z.ZodString;
|
|
660
|
+
operationId: z.ZodString;
|
|
661
|
+
}, z.core.$strict>], "frameKind">], "schemaVersion">, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
304
662
|
schema: z.ZodLiteral<"network.xyo.dapp.port.transport" & {
|
|
305
663
|
readonly __schema: true;
|
|
306
664
|
}>;
|
|
@@ -335,6 +693,41 @@ export declare const ApplicationPortWireMessageZod: z.ZodUnion<readonly [z.ZodDi
|
|
|
335
693
|
}, z.core.$strict>], "streaming">>;
|
|
336
694
|
}, z.core.$strict>;
|
|
337
695
|
}, z.core.$strict>, z.ZodObject<{
|
|
696
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
697
|
+
frameSchemaVersion: z.ZodLiteral<2>;
|
|
698
|
+
schema: z.ZodLiteral<"network.xyo.dapp.port.transport" & {
|
|
699
|
+
readonly __schema: true;
|
|
700
|
+
}>;
|
|
701
|
+
messageKind: z.ZodLiteral<"hello">;
|
|
702
|
+
maximumFrameBytes: z.ZodNumber;
|
|
703
|
+
grant: z.ZodObject<{
|
|
704
|
+
attachmentId: z.ZodString;
|
|
705
|
+
principalId: z.ZodString;
|
|
706
|
+
dappId: z.ZodString;
|
|
707
|
+
protocolVersion: z.ZodString;
|
|
708
|
+
planId: z.ZodString;
|
|
709
|
+
systemInstanceId: z.ZodString;
|
|
710
|
+
hostSessionId: z.ZodString;
|
|
711
|
+
createdAt: z.ZodNumber;
|
|
712
|
+
lastSeenAt: z.ZodNumber;
|
|
713
|
+
expiresAt: z.ZodNumber;
|
|
714
|
+
leasePolicy: z.ZodEnum<{
|
|
715
|
+
"fixed-expiry": "fixed-expiry";
|
|
716
|
+
"disconnect-expiry": "disconnect-expiry";
|
|
717
|
+
}>;
|
|
718
|
+
operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
719
|
+
portId: z.ZodString;
|
|
720
|
+
operationId: z.ZodString;
|
|
721
|
+
streaming: z.ZodLiteral<false>;
|
|
722
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
723
|
+
portId: z.ZodString;
|
|
724
|
+
operationId: z.ZodString;
|
|
725
|
+
streaming: z.ZodLiteral<true>;
|
|
726
|
+
resumable: z.ZodBoolean;
|
|
727
|
+
maximumCredit: z.ZodNumber;
|
|
728
|
+
}, z.core.$strict>], "streaming">>;
|
|
729
|
+
}, z.core.$strict>;
|
|
730
|
+
}, z.core.$strict>], "schemaVersion">, z.ZodObject<{
|
|
338
731
|
schema: z.ZodLiteral<"network.xyo.dapp.port.transport" & {
|
|
339
732
|
readonly __schema: true;
|
|
340
733
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicationPortWire.d.ts","sourceRoot":"","sources":["../../src/applicationPortWire.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"applicationPortWire.d.ts","sourceRoot":"","sources":["../../src/applicationPortWire.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAS7E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAA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