@inf-monkeys-tech/monkeys 1.1.41 → 1.1.43
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/lib/contracts/agent-data.d.ts +470 -0
- package/lib/contracts/agent-data.d.ts.map +1 -0
- package/lib/contracts/agent-data.js +139 -0
- package/lib/contracts/agent-data.js.map +1 -0
- package/lib/contracts/agent-work.d.ts +52 -0
- package/lib/contracts/agent-work.d.ts.map +1 -1
- package/lib/contracts/agent-work.js +16 -1
- package/lib/contracts/agent-work.js.map +1 -1
- package/lib/contracts/declarative-control-http.d.ts +201 -193
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control.d.ts +34 -30
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-diagnostic.d.ts +2 -2
- package/lib/contracts/declarative-document-import.d.ts +2 -2
- package/lib/contracts/declarative-publication-job.d.ts +80 -80
- package/lib/contracts/file.d.ts +137 -4
- package/lib/contracts/file.d.ts.map +1 -1
- package/lib/contracts/file.js +62 -6
- package/lib/contracts/file.js.map +1 -1
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/menu.d.ts +2 -2
- package/lib/contracts/page.d.ts +7 -7
- package/lib/contracts/render.d.ts +5 -5
- package/lib/contracts/semantic.d.ts +2 -2
- package/lib/contracts/tenant.d.ts +10 -10
- package/lib/esm/{chunk-ZSSYNYLX.mjs → chunk-33OQXBRM.mjs} +53 -4
- package/lib/esm/chunk-33OQXBRM.mjs.map +1 -0
- package/lib/esm/{chunk-CWB4ZZ52.mjs → chunk-3YISMAL3.mjs} +3 -3
- package/lib/esm/{chunk-6REXMVTC.mjs → chunk-UUUHWSYL.mjs} +2 -2
- package/lib/esm/{chunk-22EMXUOT.mjs → chunk-WRSX2N7O.mjs} +2 -2
- package/lib/esm/{chunk-QCNO3BPY.mjs → chunk-XUWZH2H3.mjs} +548 -490
- package/lib/esm/chunk-XUWZH2H3.mjs.map +1 -0
- package/lib/esm/chunk-ZH6D5O6Q.mjs +431 -0
- package/lib/esm/chunk-ZH6D5O6Q.mjs.map +1 -0
- package/lib/esm/contracts/index.mjs +52 -4
- package/lib/esm/index.mjs +60 -6
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +9 -3
- package/lib/esm/schemas/index.mjs +3 -3
- package/lib/json-schema/page-runtime-bundle.schema.json +1 -0
- package/lib/json-schema/page.schema.json +1 -0
- package/lib/runtime/file-reference.d.ts +10 -0
- package/lib/runtime/file-reference.d.ts.map +1 -0
- package/lib/runtime/file-reference.js +66 -0
- package/lib/runtime/file-reference.js.map +1 -0
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/runtime-definition-wire.d.ts +16 -16
- package/lib/schemas/index.d.ts +29 -28
- package/lib/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/esm/chunk-DR3BUHQG.mjs +0 -255
- package/lib/esm/chunk-DR3BUHQG.mjs.map +0 -1
- package/lib/esm/chunk-QCNO3BPY.mjs.map +0 -1
- package/lib/esm/chunk-ZSSYNYLX.mjs.map +0 -1
- /package/lib/esm/{chunk-CWB4ZZ52.mjs.map → chunk-3YISMAL3.mjs.map} +0 -0
- /package/lib/esm/{chunk-6REXMVTC.mjs.map → chunk-UUUHWSYL.mjs.map} +0 -0
- /package/lib/esm/{chunk-22EMXUOT.mjs.map → chunk-WRSX2N7O.mjs.map} +0 -0
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Verified provenance. Transport credentials never belong in durable data. */
|
|
3
|
+
export declare const AgentDataOriginSchema: z.ZodObject<{
|
|
4
|
+
version: z.ZodLiteral<1>;
|
|
5
|
+
tenantId: z.ZodString;
|
|
6
|
+
teamId: z.ZodString;
|
|
7
|
+
threadId: z.ZodString;
|
|
8
|
+
userId: z.ZodString;
|
|
9
|
+
actorId: z.ZodString;
|
|
10
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
epoch: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export declare const AgentDataOperationContextSchema: z.ZodObject<{
|
|
15
|
+
origin: z.ZodObject<{
|
|
16
|
+
version: z.ZodLiteral<1>;
|
|
17
|
+
tenantId: z.ZodString;
|
|
18
|
+
teamId: z.ZodString;
|
|
19
|
+
threadId: z.ZodString;
|
|
20
|
+
userId: z.ZodString;
|
|
21
|
+
actorId: z.ZodString;
|
|
22
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
23
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
24
|
+
epoch: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
operationId: z.ZodString;
|
|
27
|
+
resultScope: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
ontologyId: z.ZodString;
|
|
29
|
+
assetIds: z.ZodArray<z.ZodString>;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export type AgentDataOperationContext = z.infer<typeof AgentDataOperationContextSchema>;
|
|
33
|
+
export declare const AgentDataSourceSchema: z.ZodObject<{
|
|
34
|
+
teamId: z.ZodString;
|
|
35
|
+
ontologyId: z.ZodString;
|
|
36
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
37
|
+
viewRevision: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
viewContentHash: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
export declare const AgentDataQueryOperationSchema: z.ZodEnum<{
|
|
41
|
+
"data.asset.list": "data.asset.list";
|
|
42
|
+
"data.asset.search": "data.asset.search";
|
|
43
|
+
"data.asset.searchAdvanced": "data.asset.searchAdvanced";
|
|
44
|
+
"data.asset.searchGroupedTags": "data.asset.searchGroupedTags";
|
|
45
|
+
"data.asset.aggregate": "data.asset.aggregate";
|
|
46
|
+
"data.view.rows": "data.view.rows";
|
|
47
|
+
"data.view.sample": "data.view.sample";
|
|
48
|
+
"agent.view.legacy": "agent.view.legacy";
|
|
49
|
+
}>;
|
|
50
|
+
/** A bounded selection from an existing native View query. Tag groups retain native DNF semantics. */
|
|
51
|
+
export declare const AgentDataViewQuerySchema: z.ZodObject<{
|
|
52
|
+
ontologyId: z.ZodString;
|
|
53
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
name: z.ZodOptional<z.ZodString>;
|
|
55
|
+
tagGroups: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
56
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
57
|
+
pageToken: z.ZodOptional<z.ZodString>;
|
|
58
|
+
priorityTagIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
|
+
sample: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
size: z.ZodNumber;
|
|
61
|
+
poolSize: z.ZodNumber;
|
|
62
|
+
seed: z.ZodString;
|
|
63
|
+
requireImage: z.ZodDefault<z.ZodBoolean>;
|
|
64
|
+
}, z.core.$strict>>;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
export type AgentDataViewQuery = z.infer<typeof AgentDataViewQuerySchema>;
|
|
67
|
+
export declare const AgentDataRecordRefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
+
kind: z.ZodLiteral<"asset">;
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
teamId: z.ZodString;
|
|
71
|
+
ontologyId: z.ZodString;
|
|
72
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
73
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"file">;
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
teamId: z.ZodString;
|
|
77
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"domain-record">;
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
teamId: z.ZodString;
|
|
82
|
+
contract: z.ZodString;
|
|
83
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
}, z.core.$strict>], "kind">;
|
|
85
|
+
export declare const AgentDataSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
86
|
+
kind: z.ZodLiteral<"query">;
|
|
87
|
+
operation: z.ZodEnum<{
|
|
88
|
+
"data.asset.list": "data.asset.list";
|
|
89
|
+
"data.asset.search": "data.asset.search";
|
|
90
|
+
"data.asset.searchAdvanced": "data.asset.searchAdvanced";
|
|
91
|
+
"data.asset.searchGroupedTags": "data.asset.searchGroupedTags";
|
|
92
|
+
"data.asset.aggregate": "data.asset.aggregate";
|
|
93
|
+
"data.view.rows": "data.view.rows";
|
|
94
|
+
"data.view.sample": "data.view.sample";
|
|
95
|
+
"agent.view.legacy": "agent.view.legacy";
|
|
96
|
+
}>;
|
|
97
|
+
source: z.ZodObject<{
|
|
98
|
+
teamId: z.ZodString;
|
|
99
|
+
ontologyId: z.ZodString;
|
|
100
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
viewRevision: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
viewContentHash: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strict>;
|
|
104
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodType<import("./common").JsonValue, unknown, z.core.$ZodTypeInternals<import("./common").JsonValue, unknown>>>;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
kind: z.ZodLiteral<"results">;
|
|
107
|
+
resultSetId: z.ZodString;
|
|
108
|
+
members: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
|
+
kind: z.ZodLiteral<"asset">;
|
|
110
|
+
id: z.ZodString;
|
|
111
|
+
teamId: z.ZodString;
|
|
112
|
+
ontologyId: z.ZodString;
|
|
113
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
114
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
115
|
+
kind: z.ZodLiteral<"file">;
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
teamId: z.ZodString;
|
|
118
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
120
|
+
kind: z.ZodLiteral<"domain-record">;
|
|
121
|
+
id: z.ZodString;
|
|
122
|
+
teamId: z.ZodString;
|
|
123
|
+
contract: z.ZodString;
|
|
124
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
}, z.core.$strict>], "kind">>;
|
|
126
|
+
complete: z.ZodBoolean;
|
|
127
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
operation: z.ZodEnum<{
|
|
129
|
+
"data.asset.list": "data.asset.list";
|
|
130
|
+
"data.asset.search": "data.asset.search";
|
|
131
|
+
"data.asset.searchAdvanced": "data.asset.searchAdvanced";
|
|
132
|
+
"data.asset.searchGroupedTags": "data.asset.searchGroupedTags";
|
|
133
|
+
"data.asset.aggregate": "data.asset.aggregate";
|
|
134
|
+
"data.view.rows": "data.view.rows";
|
|
135
|
+
"data.view.sample": "data.view.sample";
|
|
136
|
+
"agent.view.legacy": "agent.view.legacy";
|
|
137
|
+
}>;
|
|
138
|
+
source: z.ZodObject<{
|
|
139
|
+
teamId: z.ZodString;
|
|
140
|
+
ontologyId: z.ZodString;
|
|
141
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
viewRevision: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
viewContentHash: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$strict>;
|
|
145
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodType<import("./common").JsonValue, unknown, z.core.$ZodTypeInternals<import("./common").JsonValue, unknown>>>;
|
|
146
|
+
}, z.core.$strict>>;
|
|
147
|
+
}, z.core.$strict>], "kind">;
|
|
148
|
+
export declare const AgentDataStatusSchema: z.ZodEnum<{
|
|
149
|
+
running: "running";
|
|
150
|
+
completed: "completed";
|
|
151
|
+
failed: "failed";
|
|
152
|
+
partial: "partial";
|
|
153
|
+
cancelled: "cancelled";
|
|
154
|
+
}>;
|
|
155
|
+
/** One replayable effect of a logical operation; phase keys deduplicate transport retries. */
|
|
156
|
+
export declare const AgentDataReceiptSchema: z.ZodObject<{
|
|
157
|
+
contract: z.ZodLiteral<"AgentDataReceipt">;
|
|
158
|
+
version: z.ZodLiteral<1>;
|
|
159
|
+
operationId: z.ZodString;
|
|
160
|
+
phaseId: z.ZodOptional<z.ZodString>;
|
|
161
|
+
origin: z.ZodObject<{
|
|
162
|
+
version: z.ZodLiteral<1>;
|
|
163
|
+
tenantId: z.ZodString;
|
|
164
|
+
teamId: z.ZodString;
|
|
165
|
+
threadId: z.ZodString;
|
|
166
|
+
userId: z.ZodString;
|
|
167
|
+
actorId: z.ZodString;
|
|
168
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
169
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
170
|
+
epoch: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
kind: z.ZodEnum<{
|
|
173
|
+
query: "query";
|
|
174
|
+
generated: "generated";
|
|
175
|
+
}>;
|
|
176
|
+
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
177
|
+
kind: z.ZodLiteral<"query">;
|
|
178
|
+
operation: z.ZodEnum<{
|
|
179
|
+
"data.asset.list": "data.asset.list";
|
|
180
|
+
"data.asset.search": "data.asset.search";
|
|
181
|
+
"data.asset.searchAdvanced": "data.asset.searchAdvanced";
|
|
182
|
+
"data.asset.searchGroupedTags": "data.asset.searchGroupedTags";
|
|
183
|
+
"data.asset.aggregate": "data.asset.aggregate";
|
|
184
|
+
"data.view.rows": "data.view.rows";
|
|
185
|
+
"data.view.sample": "data.view.sample";
|
|
186
|
+
"agent.view.legacy": "agent.view.legacy";
|
|
187
|
+
}>;
|
|
188
|
+
source: z.ZodObject<{
|
|
189
|
+
teamId: z.ZodString;
|
|
190
|
+
ontologyId: z.ZodString;
|
|
191
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
192
|
+
viewRevision: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
viewContentHash: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodType<import("./common").JsonValue, unknown, z.core.$ZodTypeInternals<import("./common").JsonValue, unknown>>>;
|
|
196
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
197
|
+
kind: z.ZodLiteral<"results">;
|
|
198
|
+
resultSetId: z.ZodString;
|
|
199
|
+
members: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
200
|
+
kind: z.ZodLiteral<"asset">;
|
|
201
|
+
id: z.ZodString;
|
|
202
|
+
teamId: z.ZodString;
|
|
203
|
+
ontologyId: z.ZodString;
|
|
204
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
205
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
206
|
+
kind: z.ZodLiteral<"file">;
|
|
207
|
+
id: z.ZodString;
|
|
208
|
+
teamId: z.ZodString;
|
|
209
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
211
|
+
kind: z.ZodLiteral<"domain-record">;
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
teamId: z.ZodString;
|
|
214
|
+
contract: z.ZodString;
|
|
215
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
}, z.core.$strict>], "kind">>;
|
|
217
|
+
complete: z.ZodBoolean;
|
|
218
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
219
|
+
operation: z.ZodEnum<{
|
|
220
|
+
"data.asset.list": "data.asset.list";
|
|
221
|
+
"data.asset.search": "data.asset.search";
|
|
222
|
+
"data.asset.searchAdvanced": "data.asset.searchAdvanced";
|
|
223
|
+
"data.asset.searchGroupedTags": "data.asset.searchGroupedTags";
|
|
224
|
+
"data.asset.aggregate": "data.asset.aggregate";
|
|
225
|
+
"data.view.rows": "data.view.rows";
|
|
226
|
+
"data.view.sample": "data.view.sample";
|
|
227
|
+
"agent.view.legacy": "agent.view.legacy";
|
|
228
|
+
}>;
|
|
229
|
+
source: z.ZodObject<{
|
|
230
|
+
teamId: z.ZodString;
|
|
231
|
+
ontologyId: z.ZodString;
|
|
232
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
233
|
+
viewRevision: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
viewContentHash: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodType<import("./common").JsonValue, unknown, z.core.$ZodTypeInternals<import("./common").JsonValue, unknown>>>;
|
|
237
|
+
}, z.core.$strict>>;
|
|
238
|
+
}, z.core.$strict>], "kind">;
|
|
239
|
+
status: z.ZodEnum<{
|
|
240
|
+
running: "running";
|
|
241
|
+
completed: "completed";
|
|
242
|
+
failed: "failed";
|
|
243
|
+
partial: "partial";
|
|
244
|
+
cancelled: "cancelled";
|
|
245
|
+
}>;
|
|
246
|
+
title: z.ZodOptional<z.ZodString>;
|
|
247
|
+
occurredAt: z.ZodString;
|
|
248
|
+
result: z.ZodObject<{
|
|
249
|
+
returned: z.ZodNumber;
|
|
250
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
hasMore: z.ZodOptional<z.ZodBoolean>;
|
|
252
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, z.core.$strict>;
|
|
254
|
+
sourceCommit: z.ZodOptional<z.ZodString>;
|
|
255
|
+
}, z.core.$strict>;
|
|
256
|
+
/** Small read model for the artifact popover. Opening resolves the selection separately. */
|
|
257
|
+
export declare const AgentLinkedDataItemSchema: z.ZodObject<{
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
threadId: z.ZodString;
|
|
260
|
+
operationId: z.ZodString;
|
|
261
|
+
kind: z.ZodEnum<{
|
|
262
|
+
query: "query";
|
|
263
|
+
generated: "generated";
|
|
264
|
+
}>;
|
|
265
|
+
status: z.ZodEnum<{
|
|
266
|
+
running: "running";
|
|
267
|
+
completed: "completed";
|
|
268
|
+
failed: "failed";
|
|
269
|
+
partial: "partial";
|
|
270
|
+
cancelled: "cancelled";
|
|
271
|
+
}>;
|
|
272
|
+
title: z.ZodString;
|
|
273
|
+
occurredAt: z.ZodString;
|
|
274
|
+
returned: z.ZodNumber;
|
|
275
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
277
|
+
teamId: z.ZodString;
|
|
278
|
+
ontologyId: z.ZodString;
|
|
279
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
280
|
+
viewRevision: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
viewContentHash: z.ZodOptional<z.ZodString>;
|
|
282
|
+
}, z.core.$strict>>;
|
|
283
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
284
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
285
|
+
}, z.core.$strict>;
|
|
286
|
+
/** Ephemeral, authorized projection of a canonical source record. */
|
|
287
|
+
export declare const AgentLinkedDataRowSchema: z.ZodObject<{
|
|
288
|
+
id: z.ZodString;
|
|
289
|
+
reference: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
290
|
+
kind: z.ZodLiteral<"asset">;
|
|
291
|
+
id: z.ZodString;
|
|
292
|
+
teamId: z.ZodString;
|
|
293
|
+
ontologyId: z.ZodString;
|
|
294
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
295
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
296
|
+
kind: z.ZodLiteral<"file">;
|
|
297
|
+
id: z.ZodString;
|
|
298
|
+
teamId: z.ZodString;
|
|
299
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
300
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
301
|
+
kind: z.ZodLiteral<"domain-record">;
|
|
302
|
+
id: z.ZodString;
|
|
303
|
+
teamId: z.ZodString;
|
|
304
|
+
contract: z.ZodString;
|
|
305
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
306
|
+
}, z.core.$strict>], "kind">>;
|
|
307
|
+
openToken: z.ZodOptional<z.ZodString>;
|
|
308
|
+
viewer: z.ZodOptional<z.ZodEnum<{
|
|
309
|
+
file: "file";
|
|
310
|
+
record: "record";
|
|
311
|
+
"session-canvas": "session-canvas";
|
|
312
|
+
}>>;
|
|
313
|
+
title: z.ZodString;
|
|
314
|
+
availability: z.ZodEnum<{
|
|
315
|
+
unavailable: "unavailable";
|
|
316
|
+
ready: "ready";
|
|
317
|
+
}>;
|
|
318
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
319
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
320
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
321
|
+
id: z.ZodString;
|
|
322
|
+
label: z.ZodString;
|
|
323
|
+
labelKey: z.ZodOptional<z.ZodString>;
|
|
324
|
+
value: z.ZodType<import("./common").JsonValue, unknown, z.core.$ZodTypeInternals<import("./common").JsonValue, unknown>>;
|
|
325
|
+
}, z.core.$strict>>;
|
|
326
|
+
}, z.core.$strict>;
|
|
327
|
+
export declare const AgentLinkedDataPageInfoSchema: z.ZodObject<{
|
|
328
|
+
pageSize: z.ZodNumber;
|
|
329
|
+
returned: z.ZodNumber;
|
|
330
|
+
hasMore: z.ZodBoolean;
|
|
331
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
332
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
export declare const AgentLinkedDataListSchema: z.ZodObject<{
|
|
335
|
+
items: z.ZodArray<z.ZodObject<{
|
|
336
|
+
id: z.ZodString;
|
|
337
|
+
threadId: z.ZodString;
|
|
338
|
+
operationId: z.ZodString;
|
|
339
|
+
kind: z.ZodEnum<{
|
|
340
|
+
query: "query";
|
|
341
|
+
generated: "generated";
|
|
342
|
+
}>;
|
|
343
|
+
status: z.ZodEnum<{
|
|
344
|
+
running: "running";
|
|
345
|
+
completed: "completed";
|
|
346
|
+
failed: "failed";
|
|
347
|
+
partial: "partial";
|
|
348
|
+
cancelled: "cancelled";
|
|
349
|
+
}>;
|
|
350
|
+
title: z.ZodString;
|
|
351
|
+
occurredAt: z.ZodString;
|
|
352
|
+
returned: z.ZodNumber;
|
|
353
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
354
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
355
|
+
teamId: z.ZodString;
|
|
356
|
+
ontologyId: z.ZodString;
|
|
357
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
358
|
+
viewRevision: z.ZodOptional<z.ZodNumber>;
|
|
359
|
+
viewContentHash: z.ZodOptional<z.ZodString>;
|
|
360
|
+
}, z.core.$strict>>;
|
|
361
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
362
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
363
|
+
}, z.core.$strict>>;
|
|
364
|
+
pageInfo: z.ZodObject<{
|
|
365
|
+
pageSize: z.ZodNumber;
|
|
366
|
+
returned: z.ZodNumber;
|
|
367
|
+
hasMore: z.ZodBoolean;
|
|
368
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
369
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
370
|
+
}, z.core.$strict>;
|
|
371
|
+
}, z.core.$strict>;
|
|
372
|
+
export declare const AgentLinkedDataPageSchema: z.ZodObject<{
|
|
373
|
+
contract: z.ZodLiteral<"AgentLinkedDataPage">;
|
|
374
|
+
version: z.ZodLiteral<1>;
|
|
375
|
+
view: z.ZodObject<{
|
|
376
|
+
id: z.ZodString;
|
|
377
|
+
threadId: z.ZodString;
|
|
378
|
+
operationId: z.ZodString;
|
|
379
|
+
kind: z.ZodEnum<{
|
|
380
|
+
query: "query";
|
|
381
|
+
generated: "generated";
|
|
382
|
+
}>;
|
|
383
|
+
status: z.ZodEnum<{
|
|
384
|
+
running: "running";
|
|
385
|
+
completed: "completed";
|
|
386
|
+
failed: "failed";
|
|
387
|
+
partial: "partial";
|
|
388
|
+
cancelled: "cancelled";
|
|
389
|
+
}>;
|
|
390
|
+
title: z.ZodString;
|
|
391
|
+
occurredAt: z.ZodString;
|
|
392
|
+
returned: z.ZodNumber;
|
|
393
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
394
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
395
|
+
teamId: z.ZodString;
|
|
396
|
+
ontologyId: z.ZodString;
|
|
397
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
398
|
+
viewRevision: z.ZodOptional<z.ZodNumber>;
|
|
399
|
+
viewContentHash: z.ZodOptional<z.ZodString>;
|
|
400
|
+
}, z.core.$strict>>;
|
|
401
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
402
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
403
|
+
}, z.core.$strict>;
|
|
404
|
+
semantics: z.ZodEnum<{
|
|
405
|
+
"live-query": "live-query";
|
|
406
|
+
"fixed-results": "fixed-results";
|
|
407
|
+
}>;
|
|
408
|
+
items: z.ZodArray<z.ZodObject<{
|
|
409
|
+
id: z.ZodString;
|
|
410
|
+
reference: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
411
|
+
kind: z.ZodLiteral<"asset">;
|
|
412
|
+
id: z.ZodString;
|
|
413
|
+
teamId: z.ZodString;
|
|
414
|
+
ontologyId: z.ZodString;
|
|
415
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
416
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
417
|
+
kind: z.ZodLiteral<"file">;
|
|
418
|
+
id: z.ZodString;
|
|
419
|
+
teamId: z.ZodString;
|
|
420
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
421
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
422
|
+
kind: z.ZodLiteral<"domain-record">;
|
|
423
|
+
id: z.ZodString;
|
|
424
|
+
teamId: z.ZodString;
|
|
425
|
+
contract: z.ZodString;
|
|
426
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
}, z.core.$strict>], "kind">>;
|
|
428
|
+
openToken: z.ZodOptional<z.ZodString>;
|
|
429
|
+
viewer: z.ZodOptional<z.ZodEnum<{
|
|
430
|
+
file: "file";
|
|
431
|
+
record: "record";
|
|
432
|
+
"session-canvas": "session-canvas";
|
|
433
|
+
}>>;
|
|
434
|
+
title: z.ZodString;
|
|
435
|
+
availability: z.ZodEnum<{
|
|
436
|
+
unavailable: "unavailable";
|
|
437
|
+
ready: "ready";
|
|
438
|
+
}>;
|
|
439
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
440
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
441
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
442
|
+
id: z.ZodString;
|
|
443
|
+
label: z.ZodString;
|
|
444
|
+
labelKey: z.ZodOptional<z.ZodString>;
|
|
445
|
+
value: z.ZodType<import("./common").JsonValue, unknown, z.core.$ZodTypeInternals<import("./common").JsonValue, unknown>>;
|
|
446
|
+
}, z.core.$strict>>;
|
|
447
|
+
}, z.core.$strict>>;
|
|
448
|
+
pageInfo: z.ZodObject<{
|
|
449
|
+
pageSize: z.ZodNumber;
|
|
450
|
+
returned: z.ZodNumber;
|
|
451
|
+
hasMore: z.ZodBoolean;
|
|
452
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
453
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
454
|
+
}, z.core.$strict>;
|
|
455
|
+
}, z.core.$strict>;
|
|
456
|
+
export type AgentLinkedDataRow = z.infer<typeof AgentLinkedDataRowSchema>;
|
|
457
|
+
export type AgentLinkedDataPage = z.infer<typeof AgentLinkedDataPageSchema>;
|
|
458
|
+
export type AgentLinkedDataList = z.infer<typeof AgentLinkedDataListSchema>;
|
|
459
|
+
export type AgentDataOrigin = z.infer<typeof AgentDataOriginSchema>;
|
|
460
|
+
export type AgentDataSource = z.infer<typeof AgentDataSourceSchema>;
|
|
461
|
+
export type AgentDataQueryOperation = z.infer<typeof AgentDataQueryOperationSchema>;
|
|
462
|
+
export type AgentDataRecordRef = z.infer<typeof AgentDataRecordRefSchema>;
|
|
463
|
+
export type AgentDataSelection = z.infer<typeof AgentDataSelectionSchema>;
|
|
464
|
+
export type AgentDataReceipt = z.infer<typeof AgentDataReceiptSchema>;
|
|
465
|
+
export type AgentLinkedDataItem = z.infer<typeof AgentLinkedDataItemSchema>;
|
|
466
|
+
export declare const AGENT_DATA_CONTEXT_HEADER = "x-monkeys-agent-context";
|
|
467
|
+
export declare const AGENT_DATA_OPERATION_HEADER = "x-monkeys-agent-operation";
|
|
468
|
+
export declare const AGENT_DATA_CONTEXT_ENV = "MONKEYS_AGENT_CONTEXT";
|
|
469
|
+
export declare const AGENT_DATA_CONTEXT_FILE_ENV = "MONKEYS_AGENT_CONTEXT_FILE";
|
|
470
|
+
//# sourceMappingURL=agent-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-data.d.ts","sourceRoot":"","sources":["../../src/contracts/agent-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB;;;;;;;;;;kBAUvB,CAAC;A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HEADER = exports.AgentLinkedDataPageSchema = exports.AgentLinkedDataListSchema = exports.AgentLinkedDataPageInfoSchema = exports.AgentLinkedDataRowSchema = exports.AgentLinkedDataItemSchema = exports.AgentDataReceiptSchema = exports.AgentDataStatusSchema = exports.AgentDataSelectionSchema = exports.AgentDataRecordRefSchema = exports.AgentDataViewQuerySchema = exports.AgentDataQueryOperationSchema = exports.AgentDataSourceSchema = exports.AgentDataOperationContextSchema = exports.AgentDataOriginSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("./common");
|
|
6
|
+
const id = common_1.ContractIdentifierSchema;
|
|
7
|
+
/** Verified provenance. Transport credentials never belong in durable data. */
|
|
8
|
+
exports.AgentDataOriginSchema = zod_1.z.object({
|
|
9
|
+
version: zod_1.z.literal(1),
|
|
10
|
+
tenantId: id,
|
|
11
|
+
teamId: id,
|
|
12
|
+
threadId: id,
|
|
13
|
+
userId: id,
|
|
14
|
+
actorId: id,
|
|
15
|
+
runId: id.optional(),
|
|
16
|
+
messageId: id.optional(),
|
|
17
|
+
epoch: zod_1.z.number().int().positive().optional(),
|
|
18
|
+
}).strict();
|
|
19
|
+
exports.AgentDataOperationContextSchema = zod_1.z.object({
|
|
20
|
+
origin: exports.AgentDataOriginSchema,
|
|
21
|
+
operationId: id,
|
|
22
|
+
resultScope: zod_1.z.object({ ontologyId: id, assetIds: zod_1.z.array(id).min(1).max(64) }).strict().optional(),
|
|
23
|
+
}).strict();
|
|
24
|
+
exports.AgentDataSourceSchema = zod_1.z.object({
|
|
25
|
+
teamId: id,
|
|
26
|
+
ontologyId: id,
|
|
27
|
+
viewId: id.optional(),
|
|
28
|
+
viewRevision: zod_1.z.number().int().positive().optional(),
|
|
29
|
+
viewContentHash: zod_1.z.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
30
|
+
}).strict();
|
|
31
|
+
exports.AgentDataQueryOperationSchema = zod_1.z.enum([
|
|
32
|
+
'data.asset.list',
|
|
33
|
+
'data.asset.search',
|
|
34
|
+
'data.asset.searchAdvanced',
|
|
35
|
+
'data.asset.searchGroupedTags',
|
|
36
|
+
'data.asset.aggregate',
|
|
37
|
+
'data.view.rows',
|
|
38
|
+
'data.view.sample',
|
|
39
|
+
'agent.view.legacy',
|
|
40
|
+
]);
|
|
41
|
+
/** A bounded selection from an existing native View query. Tag groups retain native DNF semantics. */
|
|
42
|
+
exports.AgentDataViewQuerySchema = zod_1.z.object({
|
|
43
|
+
ontologyId: id, viewId: id.optional(), name: zod_1.z.string().max(512).optional(), tagGroups: zod_1.z.array(zod_1.z.array(id).max(64)).max(64).optional(),
|
|
44
|
+
pageSize: zod_1.z.number().int().min(1).max(1000).default(50), pageToken: zod_1.z.string().max(32768).optional(),
|
|
45
|
+
priorityTagIds: zod_1.z.array(id).max(500).optional(),
|
|
46
|
+
sample: zod_1.z.object({ size: zod_1.z.number().int().min(1).max(200), poolSize: zod_1.z.number().int().min(1).max(2000), seed: zod_1.z.string().min(1).max(256), requireImage: zod_1.z.boolean().default(true) }).strict().optional(),
|
|
47
|
+
}).strict();
|
|
48
|
+
/** The registered operation owns parameter validation and query semantics. */
|
|
49
|
+
const parameters = common_1.JsonObjectSchema.superRefine((value, context) => {
|
|
50
|
+
for (const key of ['pageToken', 'cursor', 'authorization', 'headers', 'accessToken', 'cookie']) {
|
|
51
|
+
if (key in value)
|
|
52
|
+
context.addIssue({ code: 'custom', path: [key], message: 'Transport state cannot be stored in a view definition.' });
|
|
53
|
+
}
|
|
54
|
+
if (JSON.stringify(value).length > 131072)
|
|
55
|
+
context.addIssue({ code: 'custom', message: 'View parameters exceed 128 KiB.' });
|
|
56
|
+
});
|
|
57
|
+
exports.AgentDataRecordRefSchema = zod_1.z.discriminatedUnion('kind', [
|
|
58
|
+
zod_1.z.object({ kind: zod_1.z.literal('asset'), id, teamId: id, ontologyId: id, version: zod_1.z.union([zod_1.z.string().min(1), zod_1.z.number().int().nonnegative()]).optional() }).strict(),
|
|
59
|
+
zod_1.z.object({ kind: zod_1.z.literal('file'), id, teamId: id, version: zod_1.z.number().int().nonnegative().optional() }).strict(),
|
|
60
|
+
zod_1.z.object({ kind: zod_1.z.literal('domain-record'), id, teamId: id, contract: id, version: zod_1.z.number().int().positive().optional() }).strict(),
|
|
61
|
+
]);
|
|
62
|
+
exports.AgentDataSelectionSchema = zod_1.z.discriminatedUnion('kind', [
|
|
63
|
+
zod_1.z.object({
|
|
64
|
+
kind: zod_1.z.literal('query'),
|
|
65
|
+
operation: exports.AgentDataQueryOperationSchema,
|
|
66
|
+
source: exports.AgentDataSourceSchema,
|
|
67
|
+
parameters,
|
|
68
|
+
}).strict(),
|
|
69
|
+
zod_1.z.object({
|
|
70
|
+
kind: zod_1.z.literal('results'),
|
|
71
|
+
resultSetId: id,
|
|
72
|
+
/** Bounded receipt page; the materializer preserves the complete set across pages. */
|
|
73
|
+
members: zod_1.z.array(exports.AgentDataRecordRefSchema).max(500),
|
|
74
|
+
complete: zod_1.z.boolean(),
|
|
75
|
+
query: zod_1.z.object({ operation: exports.AgentDataQueryOperationSchema, source: exports.AgentDataSourceSchema, parameters }).strict().optional(),
|
|
76
|
+
}).strict(),
|
|
77
|
+
]);
|
|
78
|
+
exports.AgentDataStatusSchema = zod_1.z.enum(['running', 'completed', 'failed', 'partial', 'cancelled']);
|
|
79
|
+
/** One replayable effect of a logical operation; phase keys deduplicate transport retries. */
|
|
80
|
+
exports.AgentDataReceiptSchema = zod_1.z.object({
|
|
81
|
+
contract: zod_1.z.literal('AgentDataReceipt'),
|
|
82
|
+
version: zod_1.z.literal(1),
|
|
83
|
+
operationId: id,
|
|
84
|
+
phaseId: id.optional(),
|
|
85
|
+
origin: exports.AgentDataOriginSchema,
|
|
86
|
+
kind: zod_1.z.enum(['query', 'generated']),
|
|
87
|
+
selection: exports.AgentDataSelectionSchema,
|
|
88
|
+
status: exports.AgentDataStatusSchema,
|
|
89
|
+
title: zod_1.z.string().max(500).optional(),
|
|
90
|
+
occurredAt: common_1.IsoDateTimeSchema,
|
|
91
|
+
result: zod_1.z.object({
|
|
92
|
+
returned: zod_1.z.number().int().nonnegative(),
|
|
93
|
+
total: zod_1.z.number().int().nonnegative().optional(),
|
|
94
|
+
hasMore: zod_1.z.boolean().optional(),
|
|
95
|
+
errorCode: zod_1.z.string().regex(/^[A-Z][A-Z0-9_]{0,127}$/).optional(),
|
|
96
|
+
}).strict(),
|
|
97
|
+
sourceCommit: id.optional(),
|
|
98
|
+
}).strict();
|
|
99
|
+
/** Small read model for the artifact popover. Opening resolves the selection separately. */
|
|
100
|
+
exports.AgentLinkedDataItemSchema = zod_1.z.object({
|
|
101
|
+
id,
|
|
102
|
+
threadId: id,
|
|
103
|
+
operationId: id,
|
|
104
|
+
kind: zod_1.z.enum(['query', 'generated']),
|
|
105
|
+
status: exports.AgentDataStatusSchema,
|
|
106
|
+
title: zod_1.z.string().max(500),
|
|
107
|
+
occurredAt: common_1.IsoDateTimeSchema,
|
|
108
|
+
returned: zod_1.z.number().int().nonnegative(),
|
|
109
|
+
total: zod_1.z.number().int().nonnegative().optional(),
|
|
110
|
+
source: exports.AgentDataSourceSchema.optional(),
|
|
111
|
+
runId: id.optional(),
|
|
112
|
+
messageId: id.optional(),
|
|
113
|
+
}).strict();
|
|
114
|
+
/** Ephemeral, authorized projection of a canonical source record. */
|
|
115
|
+
exports.AgentLinkedDataRowSchema = zod_1.z.object({
|
|
116
|
+
id,
|
|
117
|
+
reference: exports.AgentDataRecordRefSchema.optional(),
|
|
118
|
+
openToken: zod_1.z.string().max(8192).optional(),
|
|
119
|
+
viewer: zod_1.z.enum(['record', 'file', 'session-canvas']).optional(),
|
|
120
|
+
title: zod_1.z.string(),
|
|
121
|
+
availability: zod_1.z.enum(['ready', 'unavailable']),
|
|
122
|
+
previewUrl: zod_1.z.string().optional(),
|
|
123
|
+
mimeType: zod_1.z.string().optional(),
|
|
124
|
+
fields: zod_1.z.array(zod_1.z.object({ id, label: zod_1.z.string(), labelKey: zod_1.z.string().optional(), value: common_1.JsonValueSchema }).strict()).max(200),
|
|
125
|
+
}).strict();
|
|
126
|
+
exports.AgentLinkedDataPageInfoSchema = zod_1.z.object({
|
|
127
|
+
pageSize: zod_1.z.number().int().positive().max(100), returned: zod_1.z.number().int().nonnegative().max(100),
|
|
128
|
+
hasMore: zod_1.z.boolean(), nextPageToken: zod_1.z.string().optional(), total: zod_1.z.number().int().nonnegative().optional(),
|
|
129
|
+
}).strict();
|
|
130
|
+
exports.AgentLinkedDataListSchema = zod_1.z.object({ items: zod_1.z.array(exports.AgentLinkedDataItemSchema).max(100), pageInfo: exports.AgentLinkedDataPageInfoSchema }).strict();
|
|
131
|
+
exports.AgentLinkedDataPageSchema = zod_1.z.object({
|
|
132
|
+
contract: zod_1.z.literal('AgentLinkedDataPage'), version: zod_1.z.literal(1), view: exports.AgentLinkedDataItemSchema,
|
|
133
|
+
semantics: zod_1.z.enum(['live-query', 'fixed-results']), items: zod_1.z.array(exports.AgentLinkedDataRowSchema).max(100), pageInfo: exports.AgentLinkedDataPageInfoSchema,
|
|
134
|
+
}).strict();
|
|
135
|
+
exports.AGENT_DATA_CONTEXT_HEADER = 'x-monkeys-agent-context';
|
|
136
|
+
exports.AGENT_DATA_OPERATION_HEADER = 'x-monkeys-agent-operation';
|
|
137
|
+
exports.AGENT_DATA_CONTEXT_ENV = 'MONKEYS_AGENT_CONTEXT';
|
|
138
|
+
exports.AGENT_DATA_CONTEXT_FILE_ENV = 'MONKEYS_AGENT_CONTEXT_FILE';
|
|
139
|
+
//# sourceMappingURL=agent-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-data.js","sourceRoot":"","sources":["../../src/contracts/agent-data.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qCAA0G;AAE1G,MAAM,EAAE,GAAG,iCAAwB,CAAC;AAEpC,+EAA+E;AAClE,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,OAAC,CAAC,OAAO,CA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