@llm-dev-ops/agentics-cli 1.3.16 → 1.4.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 (56) hide show
  1. package/dist/adapters/base-adapter.d.ts +36 -0
  2. package/dist/adapters/base-adapter.d.ts.map +1 -1
  3. package/dist/adapters/base-adapter.js +93 -7
  4. package/dist/adapters/base-adapter.js.map +1 -1
  5. package/dist/agents/cli-ux-agent.d.ts +153 -0
  6. package/dist/agents/cli-ux-agent.d.ts.map +1 -0
  7. package/dist/agents/cli-ux-agent.js +488 -0
  8. package/dist/agents/cli-ux-agent.js.map +1 -0
  9. package/dist/agents/decision-event.d.ts +177 -0
  10. package/dist/agents/decision-event.d.ts.map +1 -0
  11. package/dist/agents/decision-event.js +346 -0
  12. package/dist/agents/decision-event.js.map +1 -0
  13. package/dist/agents/index.d.ts +20 -0
  14. package/dist/agents/index.d.ts.map +1 -0
  15. package/dist/agents/index.js +23 -0
  16. package/dist/agents/index.js.map +1 -0
  17. package/dist/agents/types.d.ts +304 -0
  18. package/dist/agents/types.d.ts.map +1 -0
  19. package/dist/agents/types.js +74 -0
  20. package/dist/agents/types.js.map +1 -0
  21. package/dist/auth/gcp-identity.d.ts +61 -0
  22. package/dist/auth/gcp-identity.d.ts.map +1 -0
  23. package/dist/auth/gcp-identity.js +228 -0
  24. package/dist/auth/gcp-identity.js.map +1 -0
  25. package/dist/auth/index.d.ts +8 -0
  26. package/dist/auth/index.d.ts.map +1 -0
  27. package/dist/auth/index.js +8 -0
  28. package/dist/auth/index.js.map +1 -0
  29. package/dist/cli/index.js +75 -66
  30. package/dist/cli/index.js.map +1 -1
  31. package/dist/commands/login.d.ts.map +1 -1
  32. package/dist/commands/login.js +4 -2
  33. package/dist/commands/login.js.map +1 -1
  34. package/dist/commands/policy.d.ts +0 -50
  35. package/dist/commands/policy.d.ts.map +1 -1
  36. package/dist/commands/policy.js +0 -266
  37. package/dist/commands/policy.js.map +1 -1
  38. package/dist/commands/whoami.d.ts +8 -0
  39. package/dist/commands/whoami.d.ts.map +1 -1
  40. package/dist/commands/whoami.js +54 -7
  41. package/dist/commands/whoami.js.map +1 -1
  42. package/dist/contracts/schemas/index.d.ts +505 -0
  43. package/dist/contracts/schemas/index.d.ts.map +1 -1
  44. package/dist/contracts/schemas/index.js +315 -0
  45. package/dist/contracts/schemas/index.js.map +1 -1
  46. package/dist/gates/execution-gate.d.ts +84 -0
  47. package/dist/gates/execution-gate.d.ts.map +1 -0
  48. package/dist/gates/execution-gate.js +196 -0
  49. package/dist/gates/execution-gate.js.map +1 -0
  50. package/dist/gates/index.d.ts +8 -0
  51. package/dist/gates/index.d.ts.map +1 -0
  52. package/dist/gates/index.js +8 -0
  53. package/dist/gates/index.js.map +1 -0
  54. package/dist/types/index.d.ts +1 -0
  55. package/dist/types/index.d.ts.map +1 -1
  56. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decision-event.d.ts","sourceRoot":"","sources":["../../src/agents/decision-event.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,kBAAkB,EAElB,kBAAkB,EAClB,kBAAkB,EAElB,kBAAkB,EAClB,aAAa,EACd,MAAM,YAAY,CAAC;AAUpB,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAS;IAErC,OAAO,CAAC,aAAa,CAAwC;IAC7D,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,WAAW,CAA+C;IAClE,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C,EAAE,0BAA0B,GAClC,oBAAoB,CAEtB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,CAAC,EAAE,sBAAsB,GAC9B,gBAAgB,CAElB"}
@@ -0,0 +1,346 @@
1
+ /**
2
+ * DecisionEvent Emitter
3
+ *
4
+ * CONSTITUTION REFERENCE: PROMPT 0, PROMPT 2
5
+ *
6
+ * PURPOSE: Emit CLI UX-level DecisionEvents to ruvector-service.
7
+ *
8
+ * EMISSION RULES:
9
+ * - At most ONE DecisionEvent per agent invocation
10
+ * - Async, non-blocking emission only
11
+ * - NEVER persists locally
12
+ * - MAY fail silently (UX must not depend on emission)
13
+ *
14
+ * DATA RULES:
15
+ * - Only emit UX telemetry and interaction data
16
+ * - Never emit raw inputs or sensitive data
17
+ * - Always use hashes for reproducibility
18
+ */
19
+ import * as crypto from 'node:crypto';
20
+ import { CLI_UX_AGENT_ID, CLI_UX_AGENT_VERSION, } from './types.js';
21
+ /**
22
+ * Builder for constructing DecisionEvents.
23
+ * Ensures all required fields are set before emission.
24
+ */
25
+ export class DecisionEventBuilder {
26
+ trace_id;
27
+ command;
28
+ subcommand;
29
+ decision_type = 'cli_ux_orchestration';
30
+ inputs_hash = '';
31
+ result_type = 'success';
32
+ artifact_ref;
33
+ services_invoked = [];
34
+ confidence = {
35
+ value: 1.0,
36
+ basis: 'command_resolution',
37
+ };
38
+ constraints = {
39
+ permissions: [],
40
+ environment: {
41
+ is_local: true,
42
+ is_production: false,
43
+ execution_gate_enabled: true,
44
+ auth_present: false,
45
+ },
46
+ scope: [],
47
+ };
48
+ execution_ref = null;
49
+ constructor(options) {
50
+ this.trace_id = options.trace_id;
51
+ this.command = options.command;
52
+ this.subcommand = options.subcommand;
53
+ }
54
+ /**
55
+ * Set decision type.
56
+ */
57
+ withDecisionType(type) {
58
+ this.decision_type = type;
59
+ return this;
60
+ }
61
+ /**
62
+ * Set inputs hash from raw inputs.
63
+ * Computes hash, never stores raw data.
64
+ */
65
+ withInputsHash(inputs) {
66
+ this.inputs_hash = this.computeHash(inputs);
67
+ return this;
68
+ }
69
+ /**
70
+ * Set result type.
71
+ */
72
+ withResultType(type) {
73
+ this.result_type = type;
74
+ return this;
75
+ }
76
+ /**
77
+ * Set artifact reference.
78
+ */
79
+ withArtifactRef(ref) {
80
+ this.artifact_ref = ref;
81
+ return this;
82
+ }
83
+ /**
84
+ * Add services that were invoked.
85
+ */
86
+ withServicesInvoked(services) {
87
+ this.services_invoked = services;
88
+ return this;
89
+ }
90
+ /**
91
+ * Set confidence score.
92
+ */
93
+ withConfidence(confidence) {
94
+ this.confidence = confidence;
95
+ return this;
96
+ }
97
+ /**
98
+ * Set constraints applied.
99
+ */
100
+ withConstraints(constraints) {
101
+ this.constraints = constraints;
102
+ return this;
103
+ }
104
+ /**
105
+ * Set environment context.
106
+ */
107
+ withEnvironment(env) {
108
+ this.constraints = {
109
+ ...this.constraints,
110
+ environment: env,
111
+ };
112
+ return this;
113
+ }
114
+ /**
115
+ * Set execution reference from downstream service.
116
+ */
117
+ withExecutionRef(ref) {
118
+ this.execution_ref = ref;
119
+ return this;
120
+ }
121
+ /**
122
+ * Build the DecisionEvent.
123
+ */
124
+ build() {
125
+ const outputs = {
126
+ command: this.command,
127
+ subcommand: this.subcommand,
128
+ result_type: this.result_type,
129
+ artifact_ref: this.artifact_ref,
130
+ services_invoked: this.services_invoked,
131
+ };
132
+ return {
133
+ agent_id: CLI_UX_AGENT_ID,
134
+ agent_version: CLI_UX_AGENT_VERSION,
135
+ decision_type: this.decision_type,
136
+ inputs_hash: this.inputs_hash,
137
+ outputs,
138
+ confidence: this.confidence,
139
+ constraints_applied: this.constraints,
140
+ execution_ref: this.execution_ref,
141
+ timestamp: new Date().toISOString(),
142
+ trace_id: this.trace_id,
143
+ };
144
+ }
145
+ /**
146
+ * Compute hash of inputs for reproducibility.
147
+ */
148
+ computeHash(inputs) {
149
+ const canonical = JSON.stringify(inputs, this.sortKeys);
150
+ return crypto.createHash('sha256').update(canonical).digest('hex').slice(0, 16);
151
+ }
152
+ sortKeys(_key, value) {
153
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
154
+ return Object.keys(value)
155
+ .sort()
156
+ .reduce((sorted, key) => {
157
+ sorted[key] = value[key];
158
+ return sorted;
159
+ }, {});
160
+ }
161
+ return value;
162
+ }
163
+ }
164
+ /**
165
+ * Emits DecisionEvents to ruvector-service.
166
+ *
167
+ * CRITICAL: Emission is async and non-blocking.
168
+ * Failures are logged but do not affect UX flow.
169
+ */
170
+ export class DecisionEventEmitter {
171
+ config;
172
+ constructor(config = {}) {
173
+ this.config = {
174
+ ruvector_url: config.ruvector_url ?? process.env['RUVECTOR_SERVICE_URL'] ?? '',
175
+ enabled: config.enabled ?? !!config.ruvector_url,
176
+ timeout: config.timeout ?? 5000,
177
+ auth_token: config.auth_token ?? '',
178
+ };
179
+ }
180
+ /**
181
+ * Check if emission is enabled.
182
+ */
183
+ isEnabled() {
184
+ return this.config.enabled && !!this.config.ruvector_url;
185
+ }
186
+ /**
187
+ * Emit a DecisionEvent.
188
+ *
189
+ * RULES:
190
+ * - Async, non-blocking
191
+ * - Never throws - failures are silent
192
+ * - Only one event per invocation should be emitted
193
+ */
194
+ async emit(event) {
195
+ if (!this.isEnabled()) {
196
+ return {
197
+ success: false,
198
+ reason: 'emission_disabled',
199
+ };
200
+ }
201
+ try {
202
+ const controller = new AbortController();
203
+ const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);
204
+ const headers = {
205
+ 'Content-Type': 'application/json',
206
+ 'X-Trace-ID': event.trace_id,
207
+ 'X-Agent-ID': event.agent_id,
208
+ 'X-Agent-Version': event.agent_version,
209
+ };
210
+ if (this.config.auth_token) {
211
+ headers['Authorization'] = `Bearer ${this.config.auth_token}`;
212
+ }
213
+ const response = await fetch(`${this.config.ruvector_url}/v1/decision-events`, {
214
+ method: 'POST',
215
+ headers,
216
+ body: JSON.stringify(event),
217
+ signal: controller.signal,
218
+ });
219
+ clearTimeout(timeoutId);
220
+ if (!response.ok) {
221
+ return {
222
+ success: false,
223
+ reason: 'http_error',
224
+ status_code: response.status,
225
+ };
226
+ }
227
+ return {
228
+ success: true,
229
+ event_id: event.trace_id,
230
+ };
231
+ }
232
+ catch (error) {
233
+ // Silent failure - emission must not affect UX
234
+ return {
235
+ success: false,
236
+ reason: error instanceof Error && error.name === 'AbortError' ? 'timeout' : 'network_error',
237
+ };
238
+ }
239
+ }
240
+ /**
241
+ * Emit without waiting (fire and forget).
242
+ * Use when you don't care about the result.
243
+ */
244
+ emitAsync(event) {
245
+ if (!this.isEnabled()) {
246
+ return;
247
+ }
248
+ // Fire and forget - don't await
249
+ this.emit(event).catch(() => {
250
+ // Silently ignore emission failures
251
+ });
252
+ }
253
+ }
254
+ /**
255
+ * Emits telemetry events compatible with LLM-Observatory.
256
+ */
257
+ export class TelemetryEmitter {
258
+ config;
259
+ buffer = [];
260
+ flushTimer = null;
261
+ constructor(config = {}) {
262
+ this.config = {
263
+ enabled: config.enabled ?? false,
264
+ endpoint: config.endpoint ?? '',
265
+ batch_size: config.batch_size ?? 10,
266
+ flush_interval: config.flush_interval ?? 5000,
267
+ };
268
+ if (this.config.enabled && this.config.endpoint) {
269
+ this.startFlushTimer();
270
+ }
271
+ }
272
+ /**
273
+ * Record a telemetry event.
274
+ */
275
+ record(event_type, agent_id, trace_id, data) {
276
+ if (!this.config.enabled) {
277
+ return;
278
+ }
279
+ const event = {
280
+ event_type,
281
+ agent_id,
282
+ timestamp: new Date().toISOString(),
283
+ trace_id,
284
+ data,
285
+ };
286
+ this.buffer.push(event);
287
+ if (this.buffer.length >= this.config.batch_size) {
288
+ this.flush();
289
+ }
290
+ }
291
+ /**
292
+ * Flush buffered events.
293
+ */
294
+ async flush() {
295
+ if (this.buffer.length === 0 || !this.config.endpoint) {
296
+ return;
297
+ }
298
+ const events = this.buffer.splice(0, this.buffer.length);
299
+ try {
300
+ await fetch(this.config.endpoint, {
301
+ method: 'POST',
302
+ headers: { 'Content-Type': 'application/json' },
303
+ body: JSON.stringify({ events }),
304
+ });
305
+ }
306
+ catch {
307
+ // Silent failure for telemetry
308
+ }
309
+ }
310
+ /**
311
+ * Stop the flush timer.
312
+ */
313
+ stop() {
314
+ if (this.flushTimer) {
315
+ clearInterval(this.flushTimer);
316
+ this.flushTimer = null;
317
+ }
318
+ }
319
+ startFlushTimer() {
320
+ this.flushTimer = setInterval(() => {
321
+ this.flush();
322
+ }, this.config.flush_interval);
323
+ }
324
+ }
325
+ // ============================================================================
326
+ // Factory Functions
327
+ // ============================================================================
328
+ /**
329
+ * Create a DecisionEvent builder.
330
+ */
331
+ export function createDecisionEventBuilder(options) {
332
+ return new DecisionEventBuilder(options);
333
+ }
334
+ /**
335
+ * Create a DecisionEvent emitter.
336
+ */
337
+ export function createDecisionEventEmitter(config) {
338
+ return new DecisionEventEmitter(config);
339
+ }
340
+ /**
341
+ * Create a telemetry emitter.
342
+ */
343
+ export function createTelemetryEmitter(config) {
344
+ return new TelemetryEmitter(config);
345
+ }
346
+ //# sourceMappingURL=decision-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decision-event.js","sourceRoot":"","sources":["../../src/agents/decision-event.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAatC,OAAO,EACL,eAAe,EACf,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAYpB;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IACd,QAAQ,CAAS;IACjB,OAAO,CAAS;IAChB,UAAU,CAAU;IAE7B,aAAa,GAAiB,sBAAsB,CAAC;IACrD,WAAW,GAAW,EAAE,CAAC;IACzB,WAAW,GAAqC,SAAS,CAAC;IAC1D,YAAY,CAAU;IACtB,gBAAgB,GAAa,EAAE,CAAC;IAChC,UAAU,GAAoB;QACpC,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,oBAAoB;KAC5B,CAAC;IACM,WAAW,GAAuB;QACxC,WAAW,EAAE,EA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AAO,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAA+B;IAE/B,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Agent Module Exports
3
+ *
4
+ * CONSTITUTION REFERENCE: PROMPT 0, PROMPT 3
5
+ *
6
+ * This module provides the public API for CLI UX Agent infrastructure.
7
+ *
8
+ * ARCHITECTURE:
9
+ * - types.ts: All type definitions including DecisionEvent schema
10
+ * - decision-event.ts: DecisionEvent and telemetry emission
11
+ * - cli-ux-agent.ts: CLI UX Agent implementation
12
+ */
13
+ export type { AgentClassification, AgentIdentifier, DecisionType, ConfidenceScore, ConfidenceBasis, ConfidenceComponent, ConstraintsApplied, EnvironmentContext, ScopeLimitation, DecisionEvent, DecisionOutputs, ExecutionReference, CLIUXAgentInput, CLIUXAgentOutput, ParsedCommand, AgentContext, OutputFormat, AgentResult, SuccessResult, ErrorResult, GuidanceResult, GuidanceOption, TimingInfo, AgentRegistration, FailureMode, TelemetryEvent, TelemetryEventType, TelemetryData, InvocationTelemetry, CompletionTelemetry, ServiceCallTelemetry, ValidationTelemetry, ErrorTelemetry, } from './types.js';
14
+ export { CLI_UX_AGENT_ID, CLI_UX_AGENT_VERSION, CLI_UX_AGENT_CLASSIFICATION, INVOCABLE_SERVICES, NON_RESPONSIBILITIES, } from './types.js';
15
+ export { isSuccessResult, isErrorResult, isGuidanceResult, } from './types.js';
16
+ export type { DecisionEventBuilderOptions, DecisionEventEmitterConfig, EmissionResult, TelemetryEmitterConfig, } from './decision-event.js';
17
+ export { DecisionEventBuilder, DecisionEventEmitter, TelemetryEmitter, createDecisionEventBuilder, createDecisionEventEmitter, createTelemetryEmitter, } from './decision-event.js';
18
+ export type { ICLIUXAgent, CLIUXAgentConfig, ValidationResult, ValidationError, } from './cli-ux-agent.js';
19
+ export { CLIUXAgent, CLI_UX_AGENT_REGISTRATION, createCLIUXAgent, getCLIUXAgentRegistration, } from './cli-ux-agent.js';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,YAAY,EAEV,mBAAmB,EACnB,eAAe,EAGf,YAAY,EACZ,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,eAAe,EACf,kBAAkB,EAGlB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,EACX,cAAc,EACd,cAAc,EACd,UAAU,EAGV,iBAAiB,EACjB,WAAW,EAGX,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,GACf,MAAM,YAAY,CAAC;AAMpB,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAMpB,OAAO,EACL,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAMpB,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,cAAc,EACd,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAM7B,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Agent Module Exports
3
+ *
4
+ * CONSTITUTION REFERENCE: PROMPT 0, PROMPT 3
5
+ *
6
+ * This module provides the public API for CLI UX Agent infrastructure.
7
+ *
8
+ * ARCHITECTURE:
9
+ * - types.ts: All type definitions including DecisionEvent schema
10
+ * - decision-event.ts: DecisionEvent and telemetry emission
11
+ * - cli-ux-agent.ts: CLI UX Agent implementation
12
+ */
13
+ // ============================================================================
14
+ // Constant Exports
15
+ // ============================================================================
16
+ export { CLI_UX_AGENT_ID, CLI_UX_AGENT_VERSION, CLI_UX_AGENT_CLASSIFICATION, INVOCABLE_SERVICES, NON_RESPONSIBILITIES, } from './types.js';
17
+ // ============================================================================
18
+ // Type Guard Exports
19
+ // ============================================================================
20
+ export { isSuccessResult, isErrorResult, isGuidanceResult, } from './types.js';
21
+ export { DecisionEventBuilder, DecisionEventEmitter, TelemetryEmitter, createDecisionEventBuilder, createDecisionEventEmitter, createTelemetryEmitter, } from './decision-event.js';
22
+ export { CLIUXAgent, CLI_UX_AGENT_REGISTRATION, createCLIUXAgent, getCLIUXAgentRegistration, } from './cli-ux-agent.js';
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmDH,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,OAAO,EACL,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAapB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAa7B,OAAO,EACL,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC"}