@independo/inderun-contracts 0.4.0 → 0.5.0-rc.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.
Files changed (52) hide show
  1. package/dist/generated/execution-provenance.d.ts +1 -1
  2. package/dist/generated/execution-provenance.d.ts.map +1 -1
  3. package/dist/generated/inderun-error.d.ts +1 -1
  4. package/dist/generated/inderun-error.d.ts.map +1 -1
  5. package/dist/generated/index.d.ts +3 -0
  6. package/dist/generated/index.d.ts.map +1 -1
  7. package/dist/generated/provider-capability-snapshot.d.ts +370 -0
  8. package/dist/generated/provider-capability-snapshot.d.ts.map +1 -0
  9. package/dist/generated/provider-capability-snapshot.js +2 -0
  10. package/dist/generated/provider-descriptor.d.ts +264 -0
  11. package/dist/generated/provider-descriptor.d.ts.map +1 -0
  12. package/dist/generated/provider-descriptor.js +2 -0
  13. package/dist/generated/provider-dynamic-capabilities.d.ts +99 -0
  14. package/dist/generated/provider-dynamic-capabilities.d.ts.map +1 -0
  15. package/dist/generated/provider-dynamic-capabilities.js +2 -0
  16. package/dist/generated/route-plan.d.ts +47 -3
  17. package/dist/generated/route-plan.d.ts.map +1 -1
  18. package/dist/generated/route-planner-input.d.ts +417 -32
  19. package/dist/generated/route-planner-input.d.ts.map +1 -1
  20. package/dist/generated/schemas.d.ts +458 -85
  21. package/dist/generated/schemas.d.ts.map +1 -1
  22. package/dist/generated/schemas.js +549 -104
  23. package/dist/generated/stream-event.d.ts +1 -1
  24. package/dist/generated/stream-event.d.ts.map +1 -1
  25. package/dist/generated/stream-terminal-outcome.d.ts +1 -1
  26. package/dist/generated/stream-terminal-outcome.d.ts.map +1 -1
  27. package/dist/generated/task-result.d.ts +1 -1
  28. package/dist/generated/task-result.d.ts.map +1 -1
  29. package/dist/index.d.ts +4 -4
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +2 -2
  32. package/dist/types.d.ts +7 -1
  33. package/dist/types.d.ts.map +1 -1
  34. package/dist/validators.d.ts +9 -0
  35. package/dist/validators.d.ts.map +1 -1
  36. package/dist/validators.js +24 -1
  37. package/package.json +1 -1
  38. package/src/generated/execution-provenance.ts +1 -1
  39. package/src/generated/inderun-error.ts +1 -1
  40. package/src/generated/index.ts +3 -0
  41. package/src/generated/provider-capability-snapshot.ts +388 -0
  42. package/src/generated/provider-descriptor.ts +278 -0
  43. package/src/generated/provider-dynamic-capabilities.ts +103 -0
  44. package/src/generated/route-plan.ts +49 -3
  45. package/src/generated/route-planner-input.ts +437 -36
  46. package/src/generated/schemas.ts +552 -104
  47. package/src/generated/stream-event.ts +1 -1
  48. package/src/generated/stream-terminal-outcome.ts +1 -1
  49. package/src/generated/task-result.ts +1 -1
  50. package/src/index.ts +13 -1
  51. package/src/types.ts +7 -0
  52. package/src/validators.ts +39 -0
@@ -0,0 +1,264 @@
1
+ /**
2
+ * A provider's static capability declaration: identity, placement, transport, supported
3
+ * interaction modes and tasks, cancellation guarantee, resource limits and privacy posture.
4
+ * It does not change while the provider is registered. The route planner,
5
+ * checkCapabilities() and execution provenance all read this one shape.
6
+ */
7
+ export type ProviderDescriptor = {
8
+ /**
9
+ * Cancellation guarantee: 'hard' stops processing including remote work, 'soft' stops
10
+ * reading locally while remote work may continue, 'none' means cancellation is unsupported.
11
+ * Independently of this value, the engine delivers no event after a cancel.
12
+ */
13
+ cancel: CancelSemantics;
14
+ /**
15
+ * Unique identifier of the provider instance (a target), e.g. 'apple_foundation_models' or
16
+ * 'openai_compatible_cloud:gpt-5-mini'. Model profiles list targets by this id.
17
+ */
18
+ id: string;
19
+ /**
20
+ * Optional input and output resource limits.
21
+ */
22
+ limits?: ProviderLimits;
23
+ /**
24
+ * The model this provider instance is bound to, when it can name one. Cloud providers
25
+ * report the model id they send; platform-managed models report an opaque platform alias
26
+ * rather than a guessed weight name. Absent means the provider cannot name its model.
27
+ */
28
+ model?: string;
29
+ /**
30
+ * Data-egress posture, used to enforce local and cloud routing rules. Absent means a local
31
+ * or edge provider is treated as keeping data on the device and a cloud provider as sending
32
+ * it off.
33
+ */
34
+ privacy?: ProviderDescriptorPrivacy;
35
+ /**
36
+ * How a streaming provider delivers incremental output: individual tokens, larger chunks,
37
+ * or whole snapshots. Absent for providers that do not stream.
38
+ */
39
+ streamingStyle?: StreamingStyle;
40
+ /**
41
+ * Interaction modes and features the provider statically declares.
42
+ */
43
+ supports: ProviderSupports;
44
+ /**
45
+ * What the provider can do for each task: accepted inputs, interaction modes, output
46
+ * deliveries and formats, cancellation, locales and privacy. When present it is
47
+ * authoritative for routing and must list every task the provider serves. When absent (a
48
+ * legacy descriptor), routing infers exactly one entry — 'text_to_text' with text input,
49
+ * inline output, run/stream from supports and cancel from cancel — if tasks contains
50
+ * 'text_to_text', and nothing for any other task: a legacy descriptor is never treated as
51
+ * capable of a non-text task.
52
+ */
53
+ taskCapabilities?: ProviderTaskCapability[];
54
+ /**
55
+ * Task kinds the provider supports, e.g. 'text_to_text'. When taskCapabilities is present
56
+ * it must describe the same kinds and is what routing reads; without it, routing infers
57
+ * capabilities for 'text_to_text' alone (see taskCapabilities).
58
+ */
59
+ tasks: string[];
60
+ /**
61
+ * How the engine reaches the provider: in-process runtime, operating-system service,
62
+ * buffered HTTP, server-sent events, or a realtime connection.
63
+ */
64
+ transport: ProviderTransport;
65
+ /**
66
+ * Execution placement: 'local' (on the device), 'edge', or 'cloud'.
67
+ */
68
+ type: ProviderType;
69
+ [property: string]: unknown;
70
+ };
71
+ /**
72
+ * Cancellation guarantee: 'hard' stops processing including remote work, 'soft' stops
73
+ * reading locally while remote work may continue, 'none' means cancellation is unsupported.
74
+ * Independently of this value, the engine delivers no event after a cancel.
75
+ *
76
+ * Cancellation guarantee for this task. It may differ from the provider-level cancel, e.g.
77
+ * when stopping playback is immediate but a synthesis request cannot be aborted.
78
+ */
79
+ export type CancelSemantics = "hard" | "soft" | "none";
80
+ /**
81
+ * Optional input and output resource limits.
82
+ */
83
+ export type ProviderLimits = {
84
+ /**
85
+ * Longest accepted or produced audio, in seconds.
86
+ */
87
+ maxAudioSeconds?: number;
88
+ /**
89
+ * Largest accepted image, in bytes.
90
+ */
91
+ maxImageBytes?: number;
92
+ /**
93
+ * Largest accepted input, in tokens.
94
+ */
95
+ maxInputTokens?: number;
96
+ /**
97
+ * Largest output the provider produces, in tokens.
98
+ */
99
+ maxOutputTokens?: number;
100
+ [property: string]: unknown;
101
+ };
102
+ /**
103
+ * Data-egress posture, used to enforce local and cloud routing rules. Absent means a local
104
+ * or edge provider is treated as keeping data on the device and a cloud provider as sending
105
+ * it off.
106
+ */
107
+ export type ProviderDescriptorPrivacy = {
108
+ /**
109
+ * Whether request content leaves the device.
110
+ */
111
+ dataLeavesDevice: boolean;
112
+ /**
113
+ * Geographic regions where a cloud provider processes data.
114
+ */
115
+ regions?: string[];
116
+ [property: string]: unknown;
117
+ };
118
+ /**
119
+ * How a streaming provider delivers incremental output: individual tokens, larger chunks,
120
+ * or whole snapshots. Absent for providers that do not stream.
121
+ */
122
+ export type StreamingStyle = "tokens" | "chunks" | "snapshots";
123
+ /**
124
+ * Interaction modes and features the provider statically declares.
125
+ */
126
+ export type ProviderSupports = {
127
+ /**
128
+ * Whether the provider accepts non-text inputs such as images or audio.
129
+ */
130
+ multimodal: boolean;
131
+ /**
132
+ * Whether the provider supports Mode 3 realtime sessions. Reserved; no engine implements
133
+ * Mode 3 yet.
134
+ */
135
+ realtime: boolean;
136
+ /**
137
+ * Whether the provider emits reasoning events alongside content.
138
+ */
139
+ reasoningEvents: boolean;
140
+ /**
141
+ * Whether the provider supports Mode 1 run (request/response).
142
+ */
143
+ run: boolean;
144
+ /**
145
+ * Whether the provider supports Mode 2 stream. A provider that declares it must also
146
+ * implement the streaming adapter; the engines report it as unavailable otherwise.
147
+ */
148
+ streaming: boolean;
149
+ /**
150
+ * Whether the provider supports structured output constrained by a JSON schema.
151
+ */
152
+ structuredOutput: boolean;
153
+ /**
154
+ * Whether the provider supports tool calling.
155
+ */
156
+ tools: boolean;
157
+ [property: string]: unknown;
158
+ };
159
+ /**
160
+ * The provider's static capabilities for one task kind.
161
+ */
162
+ export type ProviderTaskCapability = {
163
+ /**
164
+ * Cancellation guarantee for this task. It may differ from the provider-level cancel, e.g.
165
+ * when stopping playback is immediate but a synthesis request cannot be aborted.
166
+ */
167
+ cancel: CancelSemantics;
168
+ /**
169
+ * Input media kinds the provider accepts for this task.
170
+ */
171
+ inputs: [TaskInputKind, ...TaskInputKind[]];
172
+ /**
173
+ * Interaction modes the provider supports for this task.
174
+ */
175
+ interaction: ProviderTaskInteraction;
176
+ /**
177
+ * The task kind this entry describes, e.g. 'text_to_speech'.
178
+ */
179
+ kind: string;
180
+ /**
181
+ * BCP 47 locales the provider can serve for this task, when it knows them statically.
182
+ * Absent means unknown; the dynamic check may report them instead.
183
+ */
184
+ locales?: string[];
185
+ /**
186
+ * How results of this task can be delivered. A provider lists only what it really produces:
187
+ * a provider that can only play audio lists 'playback' and never 'artifact'.
188
+ */
189
+ outputs: [ProviderTaskOutput, ...ProviderTaskOutput[]];
190
+ /**
191
+ * Data-egress posture for this task when it differs from the provider-level privacy, e.g. a
192
+ * provider whose speech synthesis uses a network service. Absent inherits
193
+ * descriptor.privacy.
194
+ */
195
+ privacy?: TaskCapabilityPrivacy;
196
+ [property: string]: unknown;
197
+ };
198
+ /**
199
+ * A kind of input medium a task consumes.
200
+ */
201
+ export type TaskInputKind = "text" | "image" | "audio";
202
+ /**
203
+ * Interaction modes the provider supports for this task.
204
+ */
205
+ export type ProviderTaskInteraction = {
206
+ /**
207
+ * Whether the provider supports Mode 1 run for this task.
208
+ */
209
+ run: boolean;
210
+ /**
211
+ * Whether the provider supports Mode 2 stream for this task.
212
+ */
213
+ stream: boolean;
214
+ [property: string]: unknown;
215
+ };
216
+ /**
217
+ * One way the provider can deliver a task's result.
218
+ */
219
+ export type ProviderTaskOutput = {
220
+ delivery: OutputDelivery;
221
+ /**
222
+ * Media types the provider can produce with this delivery, e.g. 'audio/wav'. Absent means
223
+ * the provider does not declare them; a request that requires specific media types never
224
+ * routes to such an output.
225
+ */
226
+ mediaTypes?: string[];
227
+ [property: string]: unknown;
228
+ };
229
+ /**
230
+ * How a task's result reaches the application: 'inline' content in the result (text),
231
+ * 'playback' as a managed, audible effect on the device with no retrievable bytes, or
232
+ * 'artifact' as retrievable media.
233
+ */
234
+ export type OutputDelivery = "inline" | "playback" | "artifact";
235
+ /**
236
+ * Data-egress posture for this task when it differs from the provider-level privacy, e.g. a
237
+ * provider whose speech synthesis uses a network service. Absent inherits
238
+ * descriptor.privacy.
239
+ *
240
+ * Data-egress posture, used to enforce local and cloud routing rules. Absent means a local
241
+ * or edge provider is treated as keeping data on the device and a cloud provider as sending
242
+ * it off.
243
+ */
244
+ export type TaskCapabilityPrivacy = {
245
+ /**
246
+ * Whether request content leaves the device.
247
+ */
248
+ dataLeavesDevice: boolean;
249
+ /**
250
+ * Geographic regions where a cloud provider processes data.
251
+ */
252
+ regions?: string[];
253
+ [property: string]: unknown;
254
+ };
255
+ /**
256
+ * How the engine reaches the provider: in-process runtime, operating-system service,
257
+ * buffered HTTP, server-sent events, or a realtime connection.
258
+ */
259
+ export type ProviderTransport = "in_process" | "system_service" | "http" | "sse" | "realtime";
260
+ /**
261
+ * Execution placement: 'local' (on the device), 'edge', or 'cloud'.
262
+ */
263
+ export type ProviderType = "local" | "edge" | "cloud";
264
+ //# sourceMappingURL=provider-descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-descriptor.d.ts","sourceRoot":"","sources":["../../src/generated/provider-descriptor.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B;;;;OAIG;IACH,MAAM,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,E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,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,gBAAgB,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ /* This file was generated from JSON Schema using quicktype. Do not edit by hand. */
2
+ export {};
@@ -0,0 +1,99 @@
1
+ /**
2
+ * A provider's live capability check, evaluated on the current host when routing or when
3
+ * checkCapabilities() is called. Unlike the descriptor it can change between calls.
4
+ */
5
+ export type ProviderDynamicCapabilities = {
6
+ /**
7
+ * Whether the provider is available and functional on this host right now.
8
+ */
9
+ available: boolean;
10
+ /**
11
+ * Whether cancellation is honored on this host right now. Absent inherits the static
12
+ * descriptor.cancel value: any value other than 'none' means available. Never null.
13
+ */
14
+ cancellationAvailable?: boolean;
15
+ /**
16
+ * Why the provider is unavailable, when available is false.
17
+ */
18
+ reason?: string;
19
+ /**
20
+ * Whether the provider can stream (Mode 2) on this host right now. Absent inherits the
21
+ * static descriptor.supports.streaming value; only set it when the host takes streaming
22
+ * away from a provider that otherwise declares it. Never null.
23
+ */
24
+ streamingAvailable?: boolean;
25
+ /**
26
+ * Why streaming is unavailable, when streamingAvailable is false. Absent lets the route
27
+ * planner synthesize a default message.
28
+ */
29
+ streamingUnavailableReason?: string;
30
+ /**
31
+ * Per-task overrides of the provider-level check, for tasks whose availability differs on
32
+ * this host, e.g. a voice that is not installed. Every field of an entry is optional and
33
+ * absent inherits the provider-level value; a false at either level wins.
34
+ */
35
+ taskCapabilities?: ProviderTaskAvailability[];
36
+ [property: string]: unknown;
37
+ };
38
+ /**
39
+ * The live check for one task kind.
40
+ */
41
+ export type ProviderTaskAvailability = {
42
+ /**
43
+ * Whether the task can run on this host right now. Absent inherits the provider-level
44
+ * available. Never null.
45
+ */
46
+ available?: boolean;
47
+ /**
48
+ * Whether cancellation is honored for this task right now. Absent inherits. Never null.
49
+ */
50
+ cancellationAvailable?: boolean;
51
+ /**
52
+ * The task kind this entry describes.
53
+ */
54
+ kind: string;
55
+ /**
56
+ * BCP 47 locales available for this task right now. Absent means the provider cannot
57
+ * enumerate them.
58
+ */
59
+ locales?: string[];
60
+ /**
61
+ * Why the task is unavailable, when available is false.
62
+ */
63
+ reason?: string;
64
+ /**
65
+ * Whether the task can stream on this host right now. Absent inherits. Never null.
66
+ */
67
+ streamingAvailable?: boolean;
68
+ /**
69
+ * Why streaming is unavailable for this task, when streamingAvailable is false.
70
+ */
71
+ streamingUnavailableReason?: string;
72
+ /**
73
+ * Voices available for this task right now. Absent means the provider cannot enumerate
74
+ * them; a request that requires a voice then never routes to it.
75
+ */
76
+ voices?: ProviderVoice[];
77
+ [property: string]: unknown;
78
+ };
79
+ /**
80
+ * Provider-neutral traits of one available voice. Carries no provider voice identifier.
81
+ */
82
+ export type ProviderVoice = {
83
+ gender?: VoiceGender;
84
+ /**
85
+ * BCP 47 locale the voice speaks.
86
+ */
87
+ locale: string;
88
+ /**
89
+ * Whether using the voice sends data off the device. Absent inherits the task's privacy
90
+ * posture.
91
+ */
92
+ networkRequired?: boolean;
93
+ [property: string]: unknown;
94
+ };
95
+ /**
96
+ * Perceived gender of a voice, as the platform reports it.
97
+ */
98
+ export type VoiceGender = "female" | "male" | "neutral";
99
+ //# sourceMappingURL=provider-dynamic-capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-dynamic-capabilities.d.ts","sourceRoot":"","sources":["../../src/generated/provider-dynamic-capabilities.ts"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GAAG,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ /* This file was generated from JSON Schema using quicktype. Do not edit by hand. */
2
+ export {};
@@ -31,8 +31,46 @@ export type RoutePlan = {
31
31
  export type Candidate = {
32
32
  order: number;
33
33
  providerId: string;
34
+ /**
35
+ * The voice this candidate must use if it is attempted, chosen by the planner from the
36
+ * provider's dynamic voice inventory. It is the best voice that satisfies the request's
37
+ * locale, required voice traits and privacy — under local-required privacy always one that
38
+ * keeps data on the device — ranked by preferred gender, then exact locale region, then
39
+ * on-device before network. The adapter must use a voice with exactly these traits. Absent
40
+ * when the request names no locale or voice, or the provider does not list its voices; the
41
+ * adapter then chooses itself under the same rules.
42
+ */
43
+ voice?: ProviderVoice;
44
+ [property: string]: unknown;
45
+ };
46
+ /**
47
+ * The voice this candidate must use if it is attempted, chosen by the planner from the
48
+ * provider's dynamic voice inventory. It is the best voice that satisfies the request's
49
+ * locale, required voice traits and privacy — under local-required privacy always one that
50
+ * keeps data on the device — ranked by preferred gender, then exact locale region, then
51
+ * on-device before network. The adapter must use a voice with exactly these traits. Absent
52
+ * when the request names no locale or voice, or the provider does not list its voices; the
53
+ * adapter then chooses itself under the same rules.
54
+ *
55
+ * Provider-neutral traits of one available voice. Carries no provider voice identifier.
56
+ */
57
+ export type ProviderVoice = {
58
+ gender?: VoiceGender;
59
+ /**
60
+ * BCP 47 locale the voice speaks.
61
+ */
62
+ locale: string;
63
+ /**
64
+ * Whether using the voice sends data off the device. Absent inherits the task's privacy
65
+ * posture.
66
+ */
67
+ networkRequired?: boolean;
34
68
  [property: string]: unknown;
35
69
  };
70
+ /**
71
+ * Perceived gender of a voice, as the platform reports it.
72
+ */
73
+ export type VoiceGender = "female" | "male" | "neutral";
36
74
  /**
37
75
  * Human-readable selection or failure explanation suitable for telemetry/debugging.
38
76
  */
@@ -56,7 +94,10 @@ export type Reason = {
56
94
  * statically declare Mode-2 streaming; 'streaming_unavailable' means it declares streaming
57
95
  * but the dynamic capability snapshot reports it cannot stream in the current host
58
96
  * environment. 'not_in_model_profile' means the request named a model profile that does not
59
- * list this provider.
97
+ * list this provider. 'input_not_supported', 'output_delivery_not_supported',
98
+ * 'output_format_not_supported', 'locale_not_supported' and 'voice_not_available' mean the
99
+ * provider's task capability lacks an input kind, output delivery, media type, locale or
100
+ * voice the request requires.
60
101
  */
61
102
  code: Code;
62
103
  message: string;
@@ -67,7 +108,10 @@ export type Reason = {
67
108
  * statically declare Mode-2 streaming; 'streaming_unavailable' means it declares streaming
68
109
  * but the dynamic capability snapshot reports it cannot stream in the current host
69
110
  * environment. 'not_in_model_profile' means the request named a model profile that does not
70
- * list this provider.
111
+ * list this provider. 'input_not_supported', 'output_delivery_not_supported',
112
+ * 'output_format_not_supported', 'locale_not_supported' and 'voice_not_available' mean the
113
+ * provider's task capability lacks an input kind, output delivery, media type, locale or
114
+ * voice the request requires.
71
115
  */
72
- export type Code = "task_not_supported" | "run_not_supported" | "streaming_not_supported" | "streaming_unavailable" | "privacy_constraint" | "cloud_constraint" | "offline" | "capability_unavailable" | "not_in_model_profile";
116
+ export type Code = "task_not_supported" | "run_not_supported" | "streaming_not_supported" | "streaming_unavailable" | "privacy_constraint" | "cloud_constraint" | "offline" | "capability_unavailable" | "not_in_model_profile" | "input_not_supported" | "output_delivery_not_supported" | "output_format_not_supported" | "locale_not_supported" | "voice_not_available";
73
117
  //# sourceMappingURL=route-plan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"route-plan.d.ts","sourceRoot":"","sources":["../../src/generated/route-plan.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;OAEG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B;;OAEG;IACH,iBAAiB,EAAE,gBAA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