@ixo/flow-work 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/bounded-canonical.d.ts +10 -0
- package/dist/bounded-canonical.d.ts.map +1 -0
- package/dist/bounded-canonical.js +77 -0
- package/dist/bounded-canonical.js.map +1 -0
- package/dist/bounded-codec.d.ts +20 -0
- package/dist/bounded-codec.d.ts.map +1 -0
- package/dist/bounded-codec.js +301 -0
- package/dist/bounded-codec.js.map +1 -0
- package/dist/bounded-contracts.d.ts +114 -0
- package/dist/bounded-contracts.d.ts.map +1 -0
- package/dist/bounded-contracts.js +311 -0
- package/dist/bounded-contracts.js.map +1 -0
- package/dist/bounded-definitions.d.ts +44 -0
- package/dist/bounded-definitions.d.ts.map +1 -0
- package/dist/bounded-definitions.js +340 -0
- package/dist/bounded-definitions.js.map +1 -0
- package/dist/bounded-protocol.d.ts +461 -0
- package/dist/bounded-protocol.d.ts.map +1 -0
- package/dist/bounded-protocol.js +193 -0
- package/dist/bounded-protocol.js.map +1 -0
- package/dist/bounded.d.ts +18 -0
- package/dist/bounded.d.ts.map +1 -0
- package/dist/bounded.js +18 -0
- package/dist/bounded.js.map +1 -0
- package/dist/capability-adapter.d.ts +6 -0
- package/dist/capability-adapter.d.ts.map +1 -0
- package/dist/capability-adapter.js +56 -0
- package/dist/capability-adapter.js.map +1 -0
- package/dist/capability.d.ts +2 -0
- package/dist/capability.d.ts.map +1 -1
- package/dist/capability.js.map +1 -1
- package/dist/durable-input.d.ts +18 -0
- package/dist/durable-input.d.ts.map +1 -0
- package/dist/durable-input.js +126 -0
- package/dist/durable-input.js.map +1 -0
- package/dist/durable-listener.d.ts +55 -0
- package/dist/durable-listener.d.ts.map +1 -0
- package/dist/durable-listener.js +202 -0
- package/dist/durable-listener.js.map +1 -0
- package/dist/durable-store.d.ts +43 -0
- package/dist/durable-store.d.ts.map +1 -0
- package/dist/durable-store.js +188 -0
- package/dist/durable-store.js.map +1 -0
- package/dist/execution-rpc.d.ts +19 -0
- package/dist/execution-rpc.d.ts.map +1 -0
- package/dist/execution-rpc.js +72 -0
- package/dist/execution-rpc.js.map +1 -0
- package/dist/execution-service.d.ts +117 -0
- package/dist/execution-service.d.ts.map +1 -0
- package/dist/execution-service.js +343 -0
- package/dist/execution-service.js.map +1 -0
- package/dist/external-catalog.d.ts +43 -0
- package/dist/external-catalog.d.ts.map +1 -0
- package/dist/external-catalog.js +121 -0
- package/dist/external-catalog.js.map +1 -0
- package/dist/gateway-client.d.ts +30 -0
- package/dist/gateway-client.d.ts.map +1 -0
- package/dist/gateway-client.js +97 -0
- package/dist/gateway-client.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/input-requests.d.ts +1 -1
- package/dist/input-requests.d.ts.map +1 -1
- package/dist/input-requests.js.map +1 -1
- package/dist/listener.d.ts +1 -1
- package/dist/listener.d.ts.map +1 -1
- package/dist/matrix-port-types.d.ts +56 -0
- package/dist/matrix-port-types.d.ts.map +1 -0
- package/dist/matrix-port-types.js +10 -0
- package/dist/matrix-port-types.js.map +1 -0
- package/dist/matrix-port.d.ts +8 -50
- package/dist/matrix-port.d.ts.map +1 -1
- package/dist/matrix-port.js.map +1 -1
- package/dist/node-sqlite.d.ts +12 -0
- package/dist/node-sqlite.d.ts.map +1 -0
- package/dist/node-sqlite.js +45 -0
- package/dist/node-sqlite.js.map +1 -0
- package/dist/protocol.d.ts +4 -4
- package/dist/provider-journal.d.ts +26 -0
- package/dist/provider-journal.d.ts.map +1 -0
- package/dist/provider-journal.js +94 -0
- package/dist/provider-journal.js.map +1 -0
- package/dist/work-authority.d.ts +16 -0
- package/dist/work-authority.d.ts.map +1 -0
- package/dist/work-authority.js +31 -0
- package/dist/work-authority.js.map +1 -0
- package/package.json +33 -1
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BOUNDED_PROTOCOL, RESOURCE_PROFILE, recordDigest } from './bounded-contracts.js';
|
|
3
|
+
import { decodeBoundedJson, encodeBoundedJson, readBoundedRecord, type BoundedJson } from './bounded-codec.js';
|
|
4
|
+
export { BOUNDED_PROTOCOL, RESOURCE_PROFILE, decodeBoundedJson, encodeBoundedJson, recordDigest, readBoundedRecord, };
|
|
5
|
+
export type { BoundedJson };
|
|
6
|
+
export declare const id: z.ZodString;
|
|
7
|
+
export declare const digest: z.ZodString;
|
|
8
|
+
export declare const admissionSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
flowId: z.ZodString;
|
|
11
|
+
roomId: z.ZodString;
|
|
12
|
+
runId: z.ZodString;
|
|
13
|
+
stepId: z.ZodString;
|
|
14
|
+
operationId: z.ZodString;
|
|
15
|
+
fingerprint: z.ZodString;
|
|
16
|
+
inputDigest: z.ZodString;
|
|
17
|
+
eligibilityDigest: z.ZodString;
|
|
18
|
+
grantDigest: z.ZodString;
|
|
19
|
+
definitionRevision: z.ZodString;
|
|
20
|
+
actor: z.ZodString;
|
|
21
|
+
audience: z.ZodString;
|
|
22
|
+
epoch: z.ZodNumber;
|
|
23
|
+
stateVersion: z.ZodNumber;
|
|
24
|
+
safety: z.ZodEnum<{
|
|
25
|
+
pure: "pure";
|
|
26
|
+
provider_idempotent: "provider_idempotent";
|
|
27
|
+
fenced: "fenced";
|
|
28
|
+
approval_only: "approval_only";
|
|
29
|
+
}>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
export declare const effectSchema: z.ZodObject<{
|
|
32
|
+
admission: z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
flowId: z.ZodString;
|
|
35
|
+
roomId: z.ZodString;
|
|
36
|
+
runId: z.ZodString;
|
|
37
|
+
stepId: z.ZodString;
|
|
38
|
+
operationId: z.ZodString;
|
|
39
|
+
fingerprint: z.ZodString;
|
|
40
|
+
inputDigest: z.ZodString;
|
|
41
|
+
eligibilityDigest: z.ZodString;
|
|
42
|
+
grantDigest: z.ZodString;
|
|
43
|
+
definitionRevision: z.ZodString;
|
|
44
|
+
actor: z.ZodString;
|
|
45
|
+
audience: z.ZodString;
|
|
46
|
+
epoch: z.ZodNumber;
|
|
47
|
+
stateVersion: z.ZodNumber;
|
|
48
|
+
safety: z.ZodEnum<{
|
|
49
|
+
pure: "pure";
|
|
50
|
+
provider_idempotent: "provider_idempotent";
|
|
51
|
+
fenced: "fenced";
|
|
52
|
+
approval_only: "approval_only";
|
|
53
|
+
}>;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
sequence: z.ZodNumber;
|
|
56
|
+
fence: z.ZodNumber;
|
|
57
|
+
state: z.ZodEnum<{
|
|
58
|
+
reserved: "reserved";
|
|
59
|
+
armed: "armed";
|
|
60
|
+
needs_verification: "needs_verification";
|
|
61
|
+
prepared: "prepared";
|
|
62
|
+
succeeded: "succeeded";
|
|
63
|
+
failed_before_effect: "failed_before_effect";
|
|
64
|
+
}>;
|
|
65
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
66
|
+
expiresAt: z.ZodNumber;
|
|
67
|
+
startEvent: z.ZodNullable<z.ZodString>;
|
|
68
|
+
outputDigest: z.ZodNullable<z.ZodString>;
|
|
69
|
+
outcomesDigest: z.ZodNullable<z.ZodString>;
|
|
70
|
+
successEvent: z.ZodNullable<z.ZodString>;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
export type Admission = z.infer<typeof admissionSchema>;
|
|
73
|
+
export type Effect = z.infer<typeof effectSchema>;
|
|
74
|
+
export declare const executionRequestSchema: z.ZodObject<{
|
|
75
|
+
effect: z.ZodObject<{
|
|
76
|
+
admission: z.ZodObject<{
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
flowId: z.ZodString;
|
|
79
|
+
roomId: z.ZodString;
|
|
80
|
+
runId: z.ZodString;
|
|
81
|
+
stepId: z.ZodString;
|
|
82
|
+
operationId: z.ZodString;
|
|
83
|
+
fingerprint: z.ZodString;
|
|
84
|
+
inputDigest: z.ZodString;
|
|
85
|
+
eligibilityDigest: z.ZodString;
|
|
86
|
+
grantDigest: z.ZodString;
|
|
87
|
+
definitionRevision: z.ZodString;
|
|
88
|
+
actor: z.ZodString;
|
|
89
|
+
audience: z.ZodString;
|
|
90
|
+
epoch: z.ZodNumber;
|
|
91
|
+
stateVersion: z.ZodNumber;
|
|
92
|
+
safety: z.ZodEnum<{
|
|
93
|
+
pure: "pure";
|
|
94
|
+
provider_idempotent: "provider_idempotent";
|
|
95
|
+
fenced: "fenced";
|
|
96
|
+
approval_only: "approval_only";
|
|
97
|
+
}>;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
sequence: z.ZodNumber;
|
|
100
|
+
fence: z.ZodNumber;
|
|
101
|
+
state: z.ZodEnum<{
|
|
102
|
+
reserved: "reserved";
|
|
103
|
+
armed: "armed";
|
|
104
|
+
needs_verification: "needs_verification";
|
|
105
|
+
prepared: "prepared";
|
|
106
|
+
succeeded: "succeeded";
|
|
107
|
+
failed_before_effect: "failed_before_effect";
|
|
108
|
+
}>;
|
|
109
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
110
|
+
expiresAt: z.ZodNumber;
|
|
111
|
+
startEvent: z.ZodNullable<z.ZodString>;
|
|
112
|
+
outputDigest: z.ZodNullable<z.ZodString>;
|
|
113
|
+
outcomesDigest: z.ZodNullable<z.ZodString>;
|
|
114
|
+
successEvent: z.ZodNullable<z.ZodString>;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
inputs: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
export type ExecutionRequest = z.infer<typeof executionRequestSchema>;
|
|
119
|
+
export declare const resultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
120
|
+
outcome: z.ZodLiteral<"succeeded">;
|
|
121
|
+
output: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
122
|
+
outcomes: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
123
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
124
|
+
outcome: z.ZodLiteral<"failed_before_effect">;
|
|
125
|
+
error: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
126
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
127
|
+
outcome: z.ZodLiteral<"needs_verification">;
|
|
128
|
+
}, z.core.$strict>], "outcome">;
|
|
129
|
+
export type ExecutionResult = z.infer<typeof resultSchema>;
|
|
130
|
+
/** The signed domain grant repeats the complete execution identity. */
|
|
131
|
+
export declare const bindingSchema: z.ZodObject<{
|
|
132
|
+
protocol: z.ZodLiteral<"bounded-v1">;
|
|
133
|
+
resourceProfile: z.ZodLiteral<"bounded-v1-60mib">;
|
|
134
|
+
admission: z.ZodObject<{
|
|
135
|
+
id: z.ZodString;
|
|
136
|
+
flowId: z.ZodString;
|
|
137
|
+
roomId: z.ZodString;
|
|
138
|
+
runId: z.ZodString;
|
|
139
|
+
stepId: z.ZodString;
|
|
140
|
+
operationId: z.ZodString;
|
|
141
|
+
fingerprint: z.ZodString;
|
|
142
|
+
inputDigest: z.ZodString;
|
|
143
|
+
eligibilityDigest: z.ZodString;
|
|
144
|
+
grantDigest: z.ZodString;
|
|
145
|
+
definitionRevision: z.ZodString;
|
|
146
|
+
actor: z.ZodString;
|
|
147
|
+
audience: z.ZodString;
|
|
148
|
+
epoch: z.ZodNumber;
|
|
149
|
+
stateVersion: z.ZodNumber;
|
|
150
|
+
safety: z.ZodEnum<{
|
|
151
|
+
pure: "pure";
|
|
152
|
+
provider_idempotent: "provider_idempotent";
|
|
153
|
+
fenced: "fenced";
|
|
154
|
+
approval_only: "approval_only";
|
|
155
|
+
}>;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
invocationId: z.ZodString;
|
|
158
|
+
attempt: z.ZodNumber;
|
|
159
|
+
managerDid: z.ZodString;
|
|
160
|
+
managerMatrixId: z.ZodString;
|
|
161
|
+
helperDid: z.ZodString;
|
|
162
|
+
helperMatrixId: z.ZodString;
|
|
163
|
+
capability: z.ZodString;
|
|
164
|
+
actionType: z.ZodString;
|
|
165
|
+
resource: z.ZodString;
|
|
166
|
+
deadline: z.ZodNumber;
|
|
167
|
+
contractCaveats: z.ZodRecord<z.ZodString, z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
export type BoundedWorkBinding = z.infer<typeof bindingSchema>;
|
|
170
|
+
export declare const eventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
171
|
+
phase: z.ZodLiteral<"assign">;
|
|
172
|
+
binding: z.ZodObject<{
|
|
173
|
+
protocol: z.ZodLiteral<"bounded-v1">;
|
|
174
|
+
resourceProfile: z.ZodLiteral<"bounded-v1-60mib">;
|
|
175
|
+
admission: z.ZodObject<{
|
|
176
|
+
id: z.ZodString;
|
|
177
|
+
flowId: z.ZodString;
|
|
178
|
+
roomId: z.ZodString;
|
|
179
|
+
runId: z.ZodString;
|
|
180
|
+
stepId: z.ZodString;
|
|
181
|
+
operationId: z.ZodString;
|
|
182
|
+
fingerprint: z.ZodString;
|
|
183
|
+
inputDigest: z.ZodString;
|
|
184
|
+
eligibilityDigest: z.ZodString;
|
|
185
|
+
grantDigest: z.ZodString;
|
|
186
|
+
definitionRevision: z.ZodString;
|
|
187
|
+
actor: z.ZodString;
|
|
188
|
+
audience: z.ZodString;
|
|
189
|
+
epoch: z.ZodNumber;
|
|
190
|
+
stateVersion: z.ZodNumber;
|
|
191
|
+
safety: z.ZodEnum<{
|
|
192
|
+
pure: "pure";
|
|
193
|
+
provider_idempotent: "provider_idempotent";
|
|
194
|
+
fenced: "fenced";
|
|
195
|
+
approval_only: "approval_only";
|
|
196
|
+
}>;
|
|
197
|
+
}, z.core.$strict>;
|
|
198
|
+
invocationId: z.ZodString;
|
|
199
|
+
attempt: z.ZodNumber;
|
|
200
|
+
managerDid: z.ZodString;
|
|
201
|
+
managerMatrixId: z.ZodString;
|
|
202
|
+
helperDid: z.ZodString;
|
|
203
|
+
helperMatrixId: z.ZodString;
|
|
204
|
+
capability: z.ZodString;
|
|
205
|
+
actionType: z.ZodString;
|
|
206
|
+
resource: z.ZodString;
|
|
207
|
+
deadline: z.ZodNumber;
|
|
208
|
+
contractCaveats: z.ZodRecord<z.ZodString, z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>>;
|
|
209
|
+
}, z.core.$strict>;
|
|
210
|
+
delegation: z.ZodString;
|
|
211
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
212
|
+
phase: z.ZodLiteral<"ready">;
|
|
213
|
+
binding: z.ZodObject<{
|
|
214
|
+
protocol: z.ZodLiteral<"bounded-v1">;
|
|
215
|
+
resourceProfile: z.ZodLiteral<"bounded-v1-60mib">;
|
|
216
|
+
admission: z.ZodObject<{
|
|
217
|
+
id: z.ZodString;
|
|
218
|
+
flowId: z.ZodString;
|
|
219
|
+
roomId: z.ZodString;
|
|
220
|
+
runId: z.ZodString;
|
|
221
|
+
stepId: z.ZodString;
|
|
222
|
+
operationId: z.ZodString;
|
|
223
|
+
fingerprint: z.ZodString;
|
|
224
|
+
inputDigest: z.ZodString;
|
|
225
|
+
eligibilityDigest: z.ZodString;
|
|
226
|
+
grantDigest: z.ZodString;
|
|
227
|
+
definitionRevision: z.ZodString;
|
|
228
|
+
actor: z.ZodString;
|
|
229
|
+
audience: z.ZodString;
|
|
230
|
+
epoch: z.ZodNumber;
|
|
231
|
+
stateVersion: z.ZodNumber;
|
|
232
|
+
safety: z.ZodEnum<{
|
|
233
|
+
pure: "pure";
|
|
234
|
+
provider_idempotent: "provider_idempotent";
|
|
235
|
+
fenced: "fenced";
|
|
236
|
+
approval_only: "approval_only";
|
|
237
|
+
}>;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
invocationId: z.ZodString;
|
|
240
|
+
attempt: z.ZodNumber;
|
|
241
|
+
managerDid: z.ZodString;
|
|
242
|
+
managerMatrixId: z.ZodString;
|
|
243
|
+
helperDid: z.ZodString;
|
|
244
|
+
helperMatrixId: z.ZodString;
|
|
245
|
+
capability: z.ZodString;
|
|
246
|
+
actionType: z.ZodString;
|
|
247
|
+
resource: z.ZodString;
|
|
248
|
+
deadline: z.ZodNumber;
|
|
249
|
+
contractCaveats: z.ZodRecord<z.ZodString, z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>>;
|
|
250
|
+
}, z.core.$strict>;
|
|
251
|
+
requestEventId: z.ZodString;
|
|
252
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
253
|
+
phase: z.ZodLiteral<"invoke">;
|
|
254
|
+
binding: z.ZodObject<{
|
|
255
|
+
protocol: z.ZodLiteral<"bounded-v1">;
|
|
256
|
+
resourceProfile: z.ZodLiteral<"bounded-v1-60mib">;
|
|
257
|
+
admission: z.ZodObject<{
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
flowId: z.ZodString;
|
|
260
|
+
roomId: z.ZodString;
|
|
261
|
+
runId: z.ZodString;
|
|
262
|
+
stepId: z.ZodString;
|
|
263
|
+
operationId: z.ZodString;
|
|
264
|
+
fingerprint: z.ZodString;
|
|
265
|
+
inputDigest: z.ZodString;
|
|
266
|
+
eligibilityDigest: z.ZodString;
|
|
267
|
+
grantDigest: z.ZodString;
|
|
268
|
+
definitionRevision: z.ZodString;
|
|
269
|
+
actor: z.ZodString;
|
|
270
|
+
audience: z.ZodString;
|
|
271
|
+
epoch: z.ZodNumber;
|
|
272
|
+
stateVersion: z.ZodNumber;
|
|
273
|
+
safety: z.ZodEnum<{
|
|
274
|
+
pure: "pure";
|
|
275
|
+
provider_idempotent: "provider_idempotent";
|
|
276
|
+
fenced: "fenced";
|
|
277
|
+
approval_only: "approval_only";
|
|
278
|
+
}>;
|
|
279
|
+
}, z.core.$strict>;
|
|
280
|
+
invocationId: z.ZodString;
|
|
281
|
+
attempt: z.ZodNumber;
|
|
282
|
+
managerDid: z.ZodString;
|
|
283
|
+
managerMatrixId: z.ZodString;
|
|
284
|
+
helperDid: z.ZodString;
|
|
285
|
+
helperMatrixId: z.ZodString;
|
|
286
|
+
capability: z.ZodString;
|
|
287
|
+
actionType: z.ZodString;
|
|
288
|
+
resource: z.ZodString;
|
|
289
|
+
deadline: z.ZodNumber;
|
|
290
|
+
contractCaveats: z.ZodRecord<z.ZodString, z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>>;
|
|
291
|
+
}, z.core.$strict>;
|
|
292
|
+
requestEventId: z.ZodString;
|
|
293
|
+
inputs: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
294
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
295
|
+
phase: z.ZodLiteral<"receipt">;
|
|
296
|
+
binding: z.ZodObject<{
|
|
297
|
+
protocol: z.ZodLiteral<"bounded-v1">;
|
|
298
|
+
resourceProfile: z.ZodLiteral<"bounded-v1-60mib">;
|
|
299
|
+
admission: z.ZodObject<{
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
flowId: z.ZodString;
|
|
302
|
+
roomId: z.ZodString;
|
|
303
|
+
runId: z.ZodString;
|
|
304
|
+
stepId: z.ZodString;
|
|
305
|
+
operationId: z.ZodString;
|
|
306
|
+
fingerprint: z.ZodString;
|
|
307
|
+
inputDigest: z.ZodString;
|
|
308
|
+
eligibilityDigest: z.ZodString;
|
|
309
|
+
grantDigest: z.ZodString;
|
|
310
|
+
definitionRevision: z.ZodString;
|
|
311
|
+
actor: z.ZodString;
|
|
312
|
+
audience: z.ZodString;
|
|
313
|
+
epoch: z.ZodNumber;
|
|
314
|
+
stateVersion: z.ZodNumber;
|
|
315
|
+
safety: z.ZodEnum<{
|
|
316
|
+
pure: "pure";
|
|
317
|
+
provider_idempotent: "provider_idempotent";
|
|
318
|
+
fenced: "fenced";
|
|
319
|
+
approval_only: "approval_only";
|
|
320
|
+
}>;
|
|
321
|
+
}, z.core.$strict>;
|
|
322
|
+
invocationId: z.ZodString;
|
|
323
|
+
attempt: z.ZodNumber;
|
|
324
|
+
managerDid: z.ZodString;
|
|
325
|
+
managerMatrixId: z.ZodString;
|
|
326
|
+
helperDid: z.ZodString;
|
|
327
|
+
helperMatrixId: z.ZodString;
|
|
328
|
+
capability: z.ZodString;
|
|
329
|
+
actionType: z.ZodString;
|
|
330
|
+
resource: z.ZodString;
|
|
331
|
+
deadline: z.ZodNumber;
|
|
332
|
+
contractCaveats: z.ZodRecord<z.ZodString, z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>>;
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
requestEventId: z.ZodString;
|
|
335
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
336
|
+
outcome: z.ZodLiteral<"succeeded">;
|
|
337
|
+
output: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
338
|
+
outcomes: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
339
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
340
|
+
outcome: z.ZodLiteral<"failed_before_effect">;
|
|
341
|
+
error: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
342
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
343
|
+
outcome: z.ZodLiteral<"needs_verification">;
|
|
344
|
+
}, z.core.$strict>], "outcome">;
|
|
345
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
346
|
+
phase: z.ZodLiteral<"input_request">;
|
|
347
|
+
binding: z.ZodObject<{
|
|
348
|
+
protocol: z.ZodLiteral<"bounded-v1">;
|
|
349
|
+
resourceProfile: z.ZodLiteral<"bounded-v1-60mib">;
|
|
350
|
+
admission: z.ZodObject<{
|
|
351
|
+
id: z.ZodString;
|
|
352
|
+
flowId: z.ZodString;
|
|
353
|
+
roomId: z.ZodString;
|
|
354
|
+
runId: z.ZodString;
|
|
355
|
+
stepId: z.ZodString;
|
|
356
|
+
operationId: z.ZodString;
|
|
357
|
+
fingerprint: z.ZodString;
|
|
358
|
+
inputDigest: z.ZodString;
|
|
359
|
+
eligibilityDigest: z.ZodString;
|
|
360
|
+
grantDigest: z.ZodString;
|
|
361
|
+
definitionRevision: z.ZodString;
|
|
362
|
+
actor: z.ZodString;
|
|
363
|
+
audience: z.ZodString;
|
|
364
|
+
epoch: z.ZodNumber;
|
|
365
|
+
stateVersion: z.ZodNumber;
|
|
366
|
+
safety: z.ZodEnum<{
|
|
367
|
+
pure: "pure";
|
|
368
|
+
provider_idempotent: "provider_idempotent";
|
|
369
|
+
fenced: "fenced";
|
|
370
|
+
approval_only: "approval_only";
|
|
371
|
+
}>;
|
|
372
|
+
}, z.core.$strict>;
|
|
373
|
+
invocationId: z.ZodString;
|
|
374
|
+
attempt: z.ZodNumber;
|
|
375
|
+
managerDid: z.ZodString;
|
|
376
|
+
managerMatrixId: z.ZodString;
|
|
377
|
+
helperDid: z.ZodString;
|
|
378
|
+
helperMatrixId: z.ZodString;
|
|
379
|
+
capability: z.ZodString;
|
|
380
|
+
actionType: z.ZodString;
|
|
381
|
+
resource: z.ZodString;
|
|
382
|
+
deadline: z.ZodNumber;
|
|
383
|
+
contractCaveats: z.ZodRecord<z.ZodString, z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>>;
|
|
384
|
+
}, z.core.$strict>;
|
|
385
|
+
requestKey: z.ZodString;
|
|
386
|
+
request: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
387
|
+
responders: z.ZodArray<z.ZodString>;
|
|
388
|
+
deadline: z.ZodNumber;
|
|
389
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
390
|
+
phase: z.ZodLiteral<"input_response">;
|
|
391
|
+
binding: z.ZodObject<{
|
|
392
|
+
protocol: z.ZodLiteral<"bounded-v1">;
|
|
393
|
+
resourceProfile: z.ZodLiteral<"bounded-v1-60mib">;
|
|
394
|
+
admission: z.ZodObject<{
|
|
395
|
+
id: z.ZodString;
|
|
396
|
+
flowId: z.ZodString;
|
|
397
|
+
roomId: z.ZodString;
|
|
398
|
+
runId: z.ZodString;
|
|
399
|
+
stepId: z.ZodString;
|
|
400
|
+
operationId: z.ZodString;
|
|
401
|
+
fingerprint: z.ZodString;
|
|
402
|
+
inputDigest: z.ZodString;
|
|
403
|
+
eligibilityDigest: z.ZodString;
|
|
404
|
+
grantDigest: z.ZodString;
|
|
405
|
+
definitionRevision: z.ZodString;
|
|
406
|
+
actor: z.ZodString;
|
|
407
|
+
audience: z.ZodString;
|
|
408
|
+
epoch: z.ZodNumber;
|
|
409
|
+
stateVersion: z.ZodNumber;
|
|
410
|
+
safety: z.ZodEnum<{
|
|
411
|
+
pure: "pure";
|
|
412
|
+
provider_idempotent: "provider_idempotent";
|
|
413
|
+
fenced: "fenced";
|
|
414
|
+
approval_only: "approval_only";
|
|
415
|
+
}>;
|
|
416
|
+
}, z.core.$strict>;
|
|
417
|
+
invocationId: z.ZodString;
|
|
418
|
+
attempt: z.ZodNumber;
|
|
419
|
+
managerDid: z.ZodString;
|
|
420
|
+
managerMatrixId: z.ZodString;
|
|
421
|
+
helperDid: z.ZodString;
|
|
422
|
+
helperMatrixId: z.ZodString;
|
|
423
|
+
capability: z.ZodString;
|
|
424
|
+
actionType: z.ZodString;
|
|
425
|
+
resource: z.ZodString;
|
|
426
|
+
deadline: z.ZodNumber;
|
|
427
|
+
contractCaveats: z.ZodRecord<z.ZodString, z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>>;
|
|
428
|
+
}, z.core.$strict>;
|
|
429
|
+
requestKey: z.ZodString;
|
|
430
|
+
requestEventId: z.ZodString;
|
|
431
|
+
response: z.ZodCustom<import("./bounded-canonical.js").CanonicalJsonValue, import("./bounded-canonical.js").CanonicalJsonValue>;
|
|
432
|
+
}, z.core.$strict>], "phase">;
|
|
433
|
+
export type BoundedWorkEvent = z.infer<typeof eventSchema>;
|
|
434
|
+
export type GatewayEvent = {
|
|
435
|
+
eventId: string;
|
|
436
|
+
roomId: string;
|
|
437
|
+
sender: string;
|
|
438
|
+
type: string;
|
|
439
|
+
content: BoundedJson;
|
|
440
|
+
encrypted: boolean;
|
|
441
|
+
originServerTs: number;
|
|
442
|
+
};
|
|
443
|
+
export declare const EVENT_TYPES: {
|
|
444
|
+
readonly assign: "ixo.flow.work.assign";
|
|
445
|
+
readonly ready: "ixo.flow.work.ready";
|
|
446
|
+
readonly invoke: "ixo.flow.work.invoke";
|
|
447
|
+
readonly receipt: "ixo.flow.work.receipt";
|
|
448
|
+
readonly input_request: "ixo.flow.work.input.request";
|
|
449
|
+
readonly input_response: "ixo.flow.work.input.response";
|
|
450
|
+
};
|
|
451
|
+
/** Validate allocation limits before schema traversal or provider execution. */
|
|
452
|
+
export declare function bounded<T>(schema: z.ZodType<T>, value: unknown): T;
|
|
453
|
+
export declare function text(value: unknown): string;
|
|
454
|
+
export declare function parse<T>(schema: z.ZodType<T>, value: string): T;
|
|
455
|
+
export declare function same(left: unknown, right: unknown): boolean;
|
|
456
|
+
export declare function hash(value: unknown): Promise<string>;
|
|
457
|
+
export declare function validateRequest(value: unknown): Promise<ExecutionRequest>;
|
|
458
|
+
export declare function grantCaveats(binding: BoundedWorkBinding): Record<string, unknown>;
|
|
459
|
+
/** Run and admission may change; an operation's business and authority identity may not. */
|
|
460
|
+
export declare function operationIdentity(binding: BoundedWorkBinding): unknown;
|
|
461
|
+
//# sourceMappingURL=bounded-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounded-protocol.d.ts","sourceRoot":"","sources":["../src/bounded-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,CAAC;AACF,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B,eAAO,MAAM,EAAE,aAIiB,CAAC;AACjC,eAAO,MAAM,MAAM,aAA4C,CAAC;AAEhE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;kBAmBjB,CAAC;AACZ,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoBd,CAAC;AACZ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAGlD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAExB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,eAAO,MAAM,YAAY;;;;;;;;;+BAQvB,CAAC;AACH,MAAM,MAAM,eA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AAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAE/D;AACD,wBAAgB,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D;AACD,wBAAsB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAE1D;AACD,wBAAsB,eAAe,CACnC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,gBAAgB,CAAC,CAK3B;AACD,wBAAgB,YAAY,CAC1B,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGzB;AAED,4FAA4F;AAC5F,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAqBtE"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BOUNDED_PROTOCOL, RESOURCE_PROFILE, recordDigest, } from './bounded-contracts.js';
|
|
3
|
+
import { decodeBoundedJson, encodeBoundedJson, readBoundedRecord, } from './bounded-codec.js';
|
|
4
|
+
export { BOUNDED_PROTOCOL, RESOURCE_PROFILE, decodeBoundedJson, encodeBoundedJson, recordDigest, readBoundedRecord, };
|
|
5
|
+
export const id = z
|
|
6
|
+
.string()
|
|
7
|
+
.min(1)
|
|
8
|
+
.max(480)
|
|
9
|
+
.refine((v) => v.trim() === v);
|
|
10
|
+
export const digest = z.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
11
|
+
const integer = z.number().int().safe().nonnegative();
|
|
12
|
+
export const admissionSchema = z
|
|
13
|
+
.object({
|
|
14
|
+
id,
|
|
15
|
+
flowId: id,
|
|
16
|
+
roomId: id,
|
|
17
|
+
runId: id,
|
|
18
|
+
stepId: id,
|
|
19
|
+
operationId: id,
|
|
20
|
+
fingerprint: digest,
|
|
21
|
+
inputDigest: digest,
|
|
22
|
+
eligibilityDigest: digest,
|
|
23
|
+
grantDigest: digest,
|
|
24
|
+
definitionRevision: digest,
|
|
25
|
+
actor: id,
|
|
26
|
+
audience: id,
|
|
27
|
+
epoch: integer.positive(),
|
|
28
|
+
stateVersion: integer.positive(),
|
|
29
|
+
safety: z.enum(['pure', 'provider_idempotent', 'fenced', 'approval_only']),
|
|
30
|
+
})
|
|
31
|
+
.strict();
|
|
32
|
+
export const effectSchema = z
|
|
33
|
+
.object({
|
|
34
|
+
admission: admissionSchema,
|
|
35
|
+
sequence: integer,
|
|
36
|
+
fence: integer,
|
|
37
|
+
state: z.enum([
|
|
38
|
+
'reserved',
|
|
39
|
+
'armed',
|
|
40
|
+
'needs_verification',
|
|
41
|
+
'prepared',
|
|
42
|
+
'succeeded',
|
|
43
|
+
'failed_before_effect',
|
|
44
|
+
]),
|
|
45
|
+
owner: id.nullable(),
|
|
46
|
+
expiresAt: integer,
|
|
47
|
+
startEvent: id.nullable(),
|
|
48
|
+
outputDigest: digest.nullable(),
|
|
49
|
+
outcomesDigest: digest.nullable(),
|
|
50
|
+
successEvent: id.nullable(),
|
|
51
|
+
})
|
|
52
|
+
.strict();
|
|
53
|
+
const json = z.custom(() => true);
|
|
54
|
+
export const executionRequestSchema = z
|
|
55
|
+
.object({ effect: effectSchema, inputs: json })
|
|
56
|
+
.strict();
|
|
57
|
+
export const resultSchema = z.discriminatedUnion('outcome', [
|
|
58
|
+
z
|
|
59
|
+
.object({ outcome: z.literal('succeeded'), output: json, outcomes: json })
|
|
60
|
+
.strict(),
|
|
61
|
+
z
|
|
62
|
+
.object({ outcome: z.literal('failed_before_effect'), error: json })
|
|
63
|
+
.strict(),
|
|
64
|
+
z.object({ outcome: z.literal('needs_verification') }).strict(),
|
|
65
|
+
]);
|
|
66
|
+
/** The signed domain grant repeats the complete execution identity. */
|
|
67
|
+
export const bindingSchema = z
|
|
68
|
+
.object({
|
|
69
|
+
protocol: z.literal(BOUNDED_PROTOCOL),
|
|
70
|
+
resourceProfile: z.literal(RESOURCE_PROFILE.id),
|
|
71
|
+
admission: admissionSchema,
|
|
72
|
+
invocationId: id,
|
|
73
|
+
attempt: integer.positive().max(RESOURCE_PROFILE.retryAttempts),
|
|
74
|
+
managerDid: id,
|
|
75
|
+
managerMatrixId: id,
|
|
76
|
+
helperDid: id,
|
|
77
|
+
helperMatrixId: id,
|
|
78
|
+
capability: id,
|
|
79
|
+
actionType: id,
|
|
80
|
+
resource: id,
|
|
81
|
+
deadline: integer.positive(),
|
|
82
|
+
contractCaveats: z.record(z.string(), json),
|
|
83
|
+
})
|
|
84
|
+
.strict();
|
|
85
|
+
export const eventSchema = z.discriminatedUnion('phase', [
|
|
86
|
+
z
|
|
87
|
+
.object({
|
|
88
|
+
phase: z.literal('assign'),
|
|
89
|
+
binding: bindingSchema,
|
|
90
|
+
delegation: z.string().min(1).max(RESOURCE_PROFILE.proofBytes),
|
|
91
|
+
})
|
|
92
|
+
.strict(),
|
|
93
|
+
z
|
|
94
|
+
.object({
|
|
95
|
+
phase: z.literal('ready'),
|
|
96
|
+
binding: bindingSchema,
|
|
97
|
+
requestEventId: id,
|
|
98
|
+
})
|
|
99
|
+
.strict(),
|
|
100
|
+
z
|
|
101
|
+
.object({
|
|
102
|
+
phase: z.literal('invoke'),
|
|
103
|
+
binding: bindingSchema,
|
|
104
|
+
requestEventId: id,
|
|
105
|
+
inputs: json,
|
|
106
|
+
})
|
|
107
|
+
.strict(),
|
|
108
|
+
z
|
|
109
|
+
.object({
|
|
110
|
+
phase: z.literal('receipt'),
|
|
111
|
+
binding: bindingSchema,
|
|
112
|
+
requestEventId: id,
|
|
113
|
+
result: resultSchema,
|
|
114
|
+
})
|
|
115
|
+
.strict(),
|
|
116
|
+
z
|
|
117
|
+
.object({
|
|
118
|
+
phase: z.literal('input_request'),
|
|
119
|
+
binding: bindingSchema,
|
|
120
|
+
requestKey: id,
|
|
121
|
+
request: json,
|
|
122
|
+
responders: z.array(id).min(1).max(32),
|
|
123
|
+
deadline: integer.positive(),
|
|
124
|
+
})
|
|
125
|
+
.strict(),
|
|
126
|
+
z
|
|
127
|
+
.object({
|
|
128
|
+
phase: z.literal('input_response'),
|
|
129
|
+
binding: bindingSchema,
|
|
130
|
+
requestKey: id,
|
|
131
|
+
requestEventId: id,
|
|
132
|
+
response: json,
|
|
133
|
+
})
|
|
134
|
+
.strict(),
|
|
135
|
+
]);
|
|
136
|
+
export const EVENT_TYPES = {
|
|
137
|
+
assign: 'ixo.flow.work.assign',
|
|
138
|
+
ready: 'ixo.flow.work.ready',
|
|
139
|
+
invoke: 'ixo.flow.work.invoke',
|
|
140
|
+
receipt: 'ixo.flow.work.receipt',
|
|
141
|
+
input_request: 'ixo.flow.work.input.request',
|
|
142
|
+
input_response: 'ixo.flow.work.input.response',
|
|
143
|
+
};
|
|
144
|
+
/** Validate allocation limits before schema traversal or provider execution. */
|
|
145
|
+
export function bounded(schema, value) {
|
|
146
|
+
return schema.parse(decodeBoundedJson(encodeBoundedJson(value)));
|
|
147
|
+
}
|
|
148
|
+
export function text(value) {
|
|
149
|
+
return new TextDecoder().decode(encodeBoundedJson(value));
|
|
150
|
+
}
|
|
151
|
+
export function parse(schema, value) {
|
|
152
|
+
return schema.parse(decodeBoundedJson(new TextEncoder().encode(value)));
|
|
153
|
+
}
|
|
154
|
+
export function same(left, right) {
|
|
155
|
+
return text(left) === text(right);
|
|
156
|
+
}
|
|
157
|
+
export async function hash(value) {
|
|
158
|
+
return recordDigest(encodeBoundedJson(value));
|
|
159
|
+
}
|
|
160
|
+
export async function validateRequest(value) {
|
|
161
|
+
const request = bounded(executionRequestSchema, value);
|
|
162
|
+
if ((await hash(request.inputs)) !== request.effect.admission.inputDigest)
|
|
163
|
+
throw new Error('INPUT_DIGEST_MISMATCH');
|
|
164
|
+
return request;
|
|
165
|
+
}
|
|
166
|
+
export function grantCaveats(binding) {
|
|
167
|
+
// Domain caveats remain nested: they cannot replace any execution binding.
|
|
168
|
+
return { ...binding, delegationDepth: 0 };
|
|
169
|
+
}
|
|
170
|
+
/** Run and admission may change; an operation's business and authority identity may not. */
|
|
171
|
+
export function operationIdentity(binding) {
|
|
172
|
+
const a = binding.admission;
|
|
173
|
+
return {
|
|
174
|
+
flowId: a.flowId,
|
|
175
|
+
operationId: a.operationId,
|
|
176
|
+
fingerprint: a.fingerprint,
|
|
177
|
+
roomId: a.roomId,
|
|
178
|
+
stepId: a.stepId,
|
|
179
|
+
safety: a.safety,
|
|
180
|
+
inputDigest: a.inputDigest,
|
|
181
|
+
actor: a.actor,
|
|
182
|
+
audience: a.audience,
|
|
183
|
+
helperDid: binding.helperDid,
|
|
184
|
+
helperMatrixId: binding.helperMatrixId,
|
|
185
|
+
managerDid: binding.managerDid,
|
|
186
|
+
managerMatrixId: binding.managerMatrixId,
|
|
187
|
+
capability: binding.capability,
|
|
188
|
+
actionType: binding.actionType,
|
|
189
|
+
resource: binding.resource,
|
|
190
|
+
contractCaveats: binding.contractCaveats,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=bounded-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounded-protocol.js","sourceRoot":"","sources":["../src/bounded-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAElB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,CAAC;AAEF,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;KAChB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAA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