@hypequery/protocol 0.15.0 → 0.17.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.
Files changed (41) hide show
  1. package/dist/cache-preimages/cache-preimages.d.ts +21 -0
  2. package/dist/cache-preimages/cache-preimages.d.ts.map +1 -0
  3. package/dist/cache-preimages/cache-preimages.js +143 -0
  4. package/dist/cache-preimages/index.d.ts +3 -0
  5. package/dist/cache-preimages/index.d.ts.map +1 -0
  6. package/dist/cache-preimages/index.js +1 -0
  7. package/dist/cache-preimages/types.d.ts +29 -0
  8. package/dist/cache-preimages/types.d.ts.map +1 -0
  9. package/dist/cache-preimages/types.js +1 -0
  10. package/dist/deployments/codec.d.ts +8 -1
  11. package/dist/deployments/codec.d.ts.map +1 -1
  12. package/dist/deployments/codec.js +12 -4
  13. package/dist/deployments/index.d.ts +4 -4
  14. package/dist/deployments/index.d.ts.map +1 -1
  15. package/dist/deployments/index.js +2 -2
  16. package/dist/deployments/segments.d.ts +21 -0
  17. package/dist/deployments/segments.d.ts.map +1 -0
  18. package/dist/deployments/segments.js +57 -0
  19. package/dist/deployments/types.d.ts +71 -1
  20. package/dist/deployments/types.d.ts.map +1 -1
  21. package/dist/deployments/validate.d.ts +11 -1
  22. package/dist/deployments/validate.d.ts.map +1 -1
  23. package/dist/deployments/validate.js +205 -22
  24. package/dist/expressions/index.d.ts +1 -1
  25. package/dist/expressions/index.d.ts.map +1 -1
  26. package/dist/expressions/types.d.ts +29 -3
  27. package/dist/expressions/types.d.ts.map +1 -1
  28. package/dist/expressions/validate.d.ts.map +1 -1
  29. package/dist/expressions/validate.js +38 -9
  30. package/dist/index.d.ts +7 -5
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +3 -2
  33. package/dist/invocations/index.d.ts +2 -2
  34. package/dist/invocations/index.d.ts.map +1 -1
  35. package/dist/invocations/index.js +1 -1
  36. package/dist/invocations/types.d.ts +8 -0
  37. package/dist/invocations/types.d.ts.map +1 -1
  38. package/dist/invocations/validate.d.ts +10 -1
  39. package/dist/invocations/validate.d.ts.map +1 -1
  40. package/dist/invocations/validate.js +32 -7
  41. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ import type { BuildProtocolCachePreimageOptions, ProtocolCachePreimageErrorCode } from './types.js';
2
+ export declare class ProtocolCachePreimageError extends Error {
3
+ readonly code: ProtocolCachePreimageErrorCode;
4
+ constructor(code: ProtocolCachePreimageErrorCode);
5
+ }
6
+ /**
7
+ * The RFC 0009 tenant fingerprint: tells two tenants apart without revealing
8
+ * either. Keyed by a namespace secret, because tenant identifier spaces are
9
+ * small enough that an unkeyed digest could be reversed by enumeration.
10
+ */
11
+ export declare function deriveProtocolTenantFingerprint(secret: Uint8Array, tenantId: string): string;
12
+ /**
13
+ * Builds the RFC 0009 cache preimage: the canonical bytes that identify a
14
+ * cached semantic result. Feed them to `deriveProtocolCacheKey` (RFC 0013); never
15
+ * log them, emit them, or use them as a key.
16
+ *
17
+ * Checks run in the RFC's normative order, so every implementation reports the
18
+ * same first failure.
19
+ */
20
+ export declare function buildProtocolCachePreimage(options: BuildProtocolCachePreimageOptions): string;
21
+ //# sourceMappingURL=cache-preimages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-preimages.d.ts","sourceRoot":"","sources":["../../src/cache-preimages/cache-preimages.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,iCAAiC,EACjC,8BAA8B,EAC/B,MAAM,YAAY,CAAC;AAQpB,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC;gBAElC,IAAI,EAAE,8BAA8B;CAOjD;AAwBD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5F;AAoED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,iCAAiC,GAAG,MAAM,CAmB7F"}
@@ -0,0 +1,143 @@
1
+ import { hmac } from '@noble/hashes/hmac';
2
+ import { sha256 } from '@noble/hashes/sha2';
3
+ import { bytesToHex } from '@noble/hashes/utils';
4
+ import { validateProtocolSemanticQuery } from '../expressions/validate.js';
5
+ import { serializeJcs } from '../values/jcs.js';
6
+ const FINGERPRINT_DOMAIN = 'hypequery.tenant.fingerprint.v1';
7
+ const MIN_SECRET_BYTES = 32;
8
+ const DEFINITION_IDENTITY = /^[0-9a-f]{64}$/;
9
+ const textEncoder = new TextEncoder();
10
+ export class ProtocolCachePreimageError extends Error {
11
+ code;
12
+ constructor(code) {
13
+ // The code and nothing else: the secret, tenant identifiers, and filter
14
+ // values are all in scope wherever this is raised.
15
+ super(code);
16
+ this.name = 'ProtocolCachePreimageError';
17
+ this.code = code;
18
+ }
19
+ }
20
+ function fail(code) {
21
+ throw new ProtocolCachePreimageError(code);
22
+ }
23
+ function requireSecret(secret) {
24
+ if (!secret || secret.byteLength === 0)
25
+ fail('HQ_CACHE_PREIMAGE_SECRET_MISSING');
26
+ if (secret.byteLength < MIN_SECRET_BYTES)
27
+ fail('HQ_CACHE_PREIMAGE_SECRET_TOO_SHORT');
28
+ return secret;
29
+ }
30
+ function fingerprint(secret, tenantId) {
31
+ if (typeof tenantId !== 'string' || tenantId.length === 0) {
32
+ fail('HQ_CACHE_PREIMAGE_INVALID_TENANT');
33
+ }
34
+ const domain = textEncoder.encode(FINGERPRINT_DOMAIN);
35
+ const id = textEncoder.encode(tenantId);
36
+ const input = new Uint8Array(domain.byteLength + 1 + id.byteLength);
37
+ input.set(domain, 0);
38
+ input.set(id, domain.byteLength + 1);
39
+ return bytesToHex(hmac(sha256, secret, input));
40
+ }
41
+ /**
42
+ * The RFC 0009 tenant fingerprint: tells two tenants apart without revealing
43
+ * either. Keyed by a namespace secret, because tenant identifier spaces are
44
+ * small enough that an unkeyed digest could be reversed by enumeration.
45
+ */
46
+ export function deriveProtocolTenantFingerprint(secret, tenantId) {
47
+ return fingerprint(requireSecret(secret), tenantId);
48
+ }
49
+ /** Byte order of the UTF-8 encoding, which is what the RFC sorts by. */
50
+ function compareUtf8(left, right) {
51
+ const a = textEncoder.encode(left);
52
+ const b = textEncoder.encode(right);
53
+ const length = Math.min(a.byteLength, b.byteLength);
54
+ for (let index = 0; index < length; index += 1) {
55
+ const difference = a[index] - b[index];
56
+ if (difference !== 0)
57
+ return difference;
58
+ }
59
+ return a.byteLength - b.byteLength;
60
+ }
61
+ function normalizeQuery(source) {
62
+ let query;
63
+ try {
64
+ query = validateProtocolSemanticQuery(source, { extension: 2 });
65
+ }
66
+ catch {
67
+ // The expression code is not surfaced, so this family's set stays closed.
68
+ fail('HQ_CACHE_PREIMAGE_INVALID_QUERY');
69
+ }
70
+ // AND-combined, so order cannot change rows; identical filters collapse.
71
+ const filters = new Map();
72
+ for (const filter of query.filters ?? [])
73
+ filters.set(serializeJcs(filter), filter);
74
+ const normalized = {
75
+ kind: query.kind,
76
+ dataset: query.dataset,
77
+ dimensions: query.dimensions ?? [],
78
+ filters: [...filters.keys()].sort(compareUtf8).map((key) => filters.get(key)),
79
+ segments: [...(query.segments ?? [])].sort(compareUtf8),
80
+ orderBy: query.orderBy ?? [],
81
+ by: query.by ?? null,
82
+ offset: query.offset || null,
83
+ };
84
+ if (query.kind === 'metric') {
85
+ normalized.metric = query.metric;
86
+ }
87
+ else {
88
+ // Absent selects every measure and `[]` selects none, so they stay distinct.
89
+ normalized.measures = query.measures ?? null;
90
+ }
91
+ return normalized;
92
+ }
93
+ function normalizeTenant(tenant, secret) {
94
+ if (tenant === null || typeof tenant !== 'object' || Array.isArray(tenant)) {
95
+ fail('HQ_CACHE_PREIMAGE_INVALID_TENANT');
96
+ }
97
+ const record = tenant;
98
+ const fields = Object.keys(record).sort().join(',');
99
+ if ((record.mode === 'none' || record.mode === 'all') && fields === 'mode') {
100
+ return { mode: record.mode };
101
+ }
102
+ if (record.mode !== 'scoped' || fields !== 'ids,mode')
103
+ fail('HQ_CACHE_PREIMAGE_INVALID_TENANT');
104
+ const ids = record.ids;
105
+ if (!Array.isArray(ids) || ids.length === 0)
106
+ fail('HQ_CACHE_PREIMAGE_INVALID_TENANT');
107
+ const fingerprints = new Set(ids.map((id) => fingerprint(secret, id)));
108
+ return { mode: 'scoped', fingerprints: [...fingerprints].sort() };
109
+ }
110
+ function normalizeRowLimit(rowLimit) {
111
+ if (rowLimit === null)
112
+ return null;
113
+ if (typeof rowLimit !== 'number' || !Number.isSafeInteger(rowLimit) || rowLimit < 0) {
114
+ fail('HQ_CACHE_PREIMAGE_INVALID_LIMIT');
115
+ }
116
+ return rowLimit;
117
+ }
118
+ /**
119
+ * Builds the RFC 0009 cache preimage: the canonical bytes that identify a
120
+ * cached semantic result. Feed them to `deriveProtocolCacheKey` (RFC 0013); never
121
+ * log them, emit them, or use them as a key.
122
+ *
123
+ * Checks run in the RFC's normative order, so every implementation reports the
124
+ * same first failure.
125
+ */
126
+ export function buildProtocolCachePreimage(options) {
127
+ const secret = requireSecret(options.secret);
128
+ if (typeof options.definitionIdentity !== 'string'
129
+ || !DEFINITION_IDENTITY.test(options.definitionIdentity)) {
130
+ fail('HQ_CACHE_PREIMAGE_INVALID_DEFINITION');
131
+ }
132
+ const query = normalizeQuery(options.query);
133
+ const tenant = normalizeTenant(options.tenant, secret);
134
+ const rowLimit = normalizeRowLimit(options.rowLimit);
135
+ return serializeJcs({
136
+ kind: 'hypequery-cache-preimage',
137
+ version: 1,
138
+ definition: options.definitionIdentity,
139
+ query,
140
+ tenant,
141
+ rowLimit,
142
+ });
143
+ }
@@ -0,0 +1,3 @@
1
+ export { ProtocolCachePreimageError, buildProtocolCachePreimage, deriveProtocolTenantFingerprint, } from './cache-preimages.js';
2
+ export type { BuildProtocolCachePreimageOptions, ProtocolCachePreimageErrorCode, ProtocolCacheTenantScope, } from './types.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cache-preimages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,iCAAiC,EACjC,8BAA8B,EAC9B,wBAAwB,GACzB,MAAM,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export { ProtocolCachePreimageError, buildProtocolCachePreimage, deriveProtocolTenantFingerprint, } from './cache-preimages.js';
@@ -0,0 +1,29 @@
1
+ /** Stable failure codes for cache preimage version 1 (RFC 0009). */
2
+ export type ProtocolCachePreimageErrorCode = 'HQ_CACHE_PREIMAGE_SECRET_MISSING' | 'HQ_CACHE_PREIMAGE_SECRET_TOO_SHORT' | 'HQ_CACHE_PREIMAGE_INVALID_DEFINITION' | 'HQ_CACHE_PREIMAGE_INVALID_QUERY' | 'HQ_CACHE_PREIMAGE_INVALID_TENANT' | 'HQ_CACHE_PREIMAGE_INVALID_LIMIT';
3
+ /**
4
+ * The tenant scope an execution runs under, as resolved server-side.
5
+ *
6
+ * `all` is a trusted execution the runtime itself scopes to every tenant. It
7
+ * is never reachable from a request and is not the cross-tenant administrative
8
+ * capability, which never touches the data plane.
9
+ */
10
+ export type ProtocolCacheTenantScope = {
11
+ readonly mode: 'none';
12
+ } | {
13
+ readonly mode: 'scoped';
14
+ readonly ids: readonly string[];
15
+ } | {
16
+ readonly mode: 'all';
17
+ };
18
+ export interface BuildProtocolCachePreimageOptions {
19
+ /** The namespace's RFC 0013 cache-key secret; keys tenant fingerprints. */
20
+ readonly secret: Uint8Array;
21
+ /** 64 lowercase hex characters; the RFC 0007 bundle identity when released. */
22
+ readonly definitionIdentity: string;
23
+ /** An RFC 0003 semantic query, validated under expression extension 2. */
24
+ readonly query: unknown;
25
+ readonly tenant: ProtocolCacheTenantScope;
26
+ /** The effective maximum row count, or `null` when none applies. */
27
+ readonly rowLimit: number | null;
28
+ }
29
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cache-preimages/types.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,MAAM,8BAA8B,GACtC,kCAAkC,GAClC,oCAAoC,GACpC,sCAAsC,GACtC,iCAAiC,GACjC,kCAAkC,GAClC,iCAAiC,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC5D;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAE7B,MAAM,WAAW,iCAAiC;IAChD,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -1,12 +1,19 @@
1
- import type { ProtocolDeploymentContract, ProtocolDeploymentOptions } from './types.js';
1
+ import type { ProtocolDeploymentContract, ProtocolDeploymentContractV3, ProtocolDeploymentOptions } from './types.js';
2
2
  export declare const PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN = "hypequery:deployment:v2\0";
3
+ /** Identity domain for deployment contract 3 (RFC 0015). */
4
+ export declare const PROTOCOL_DEPLOYMENT_V3_IDENTITY_DOMAIN = "hypequery:deployment:v3\0";
3
5
  export interface PreparedProtocolDeploymentContract {
4
6
  readonly contract: ProtocolDeploymentContract;
5
7
  readonly canonical: string;
6
8
  readonly bytes: Uint8Array;
7
9
  readonly identity: string;
8
10
  }
11
+ export interface PreparedProtocolDeploymentContractV3 extends Omit<PreparedProtocolDeploymentContract, 'contract'> {
12
+ readonly contract: ProtocolDeploymentContractV3;
13
+ }
9
14
  export declare function prepareProtocolDeploymentContract(input: unknown, options?: ProtocolDeploymentOptions): PreparedProtocolDeploymentContract;
15
+ /** Validates, canonically encodes, and identifies a deployment contract 3. */
16
+ export declare function prepareProtocolDeploymentContractV3(input: unknown, options?: ProtocolDeploymentOptions): PreparedProtocolDeploymentContractV3;
10
17
  export declare function encodeProtocolDeploymentContract(input: unknown, options?: ProtocolDeploymentOptions): Uint8Array;
11
18
  export declare function hashProtocolDeploymentContract(input: unknown, options?: ProtocolDeploymentOptions): string;
12
19
  export declare function encodeProtocolDeploymentContractToString(input: unknown, options?: ProtocolDeploymentOptions): string;
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/deployments/codec.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAKxF,eAAO,MAAM,mCAAmC,8BAA8B,CAAC;AAE/E,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,kCAAkC,CASpC;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,UAAU,CAEZ;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,MAAM,CAER;AAED,wBAAgB,wCAAwC,CACtD,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,MAAM,CAER"}
1
+ {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/deployments/codec.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAKpB,eAAO,MAAM,mCAAmC,8BAA8B,CAAC;AAC/E,4DAA4D;AAC5D,eAAO,MAAM,sCAAsC,8BAA8B,CAAC;AAElF,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,oCACf,SAAQ,IAAI,CAAC,kCAAkC,EAAE,UAAU,CAAC;IAC5D,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC;CACjD;AAYD,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,kCAAkC,CAEpC;AAED,8EAA8E;AAC9E,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,oCAAoC,CAEtC;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,UAAU,CAEZ;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,MAAM,CAER;AAED,wBAAgB,wCAAwC,CACtD,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,MAAM,CAER"}
@@ -1,19 +1,27 @@
1
1
  import { sha256 } from '@noble/hashes/sha2';
2
2
  import { bytesToHex } from '@noble/hashes/utils';
3
3
  import { serializeJcs } from '../values/jcs.js';
4
- import { validateProtocolDeploymentContract } from './validate.js';
4
+ import { validateProtocolDeploymentContract, validateProtocolDeploymentContractV3 } from './validate.js';
5
5
  const textEncoder = new TextEncoder();
6
6
  export const PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN = 'hypequery:deployment:v2\0';
7
- export function prepareProtocolDeploymentContract(input, options = {}) {
8
- const contract = validateProtocolDeploymentContract(input, options);
7
+ /** Identity domain for deployment contract 3 (RFC 0015). */
8
+ export const PROTOCOL_DEPLOYMENT_V3_IDENTITY_DOMAIN = 'hypequery:deployment:v3\0';
9
+ function identify(contract, domain) {
9
10
  const canonical = serializeJcs(contract);
10
11
  const bytes = textEncoder.encode(canonical);
11
12
  const identity = bytesToHex(sha256.create()
12
- .update(textEncoder.encode(PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN))
13
+ .update(textEncoder.encode(domain))
13
14
  .update(bytes)
14
15
  .digest());
15
16
  return Object.freeze({ contract, canonical, bytes, identity });
16
17
  }
18
+ export function prepareProtocolDeploymentContract(input, options = {}) {
19
+ return identify(validateProtocolDeploymentContract(input, options), PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN);
20
+ }
21
+ /** Validates, canonically encodes, and identifies a deployment contract 3. */
22
+ export function prepareProtocolDeploymentContractV3(input, options = {}) {
23
+ return identify(validateProtocolDeploymentContractV3(input, options), PROTOCOL_DEPLOYMENT_V3_IDENTITY_DOMAIN);
24
+ }
17
25
  export function encodeProtocolDeploymentContract(input, options = {}) {
18
26
  return prepareProtocolDeploymentContract(input, options).bytes;
19
27
  }
@@ -1,7 +1,7 @@
1
1
  export { ProtocolDeploymentError } from './errors.js';
2
- export { PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN, encodeProtocolDeploymentContract, encodeProtocolDeploymentContractToString, hashProtocolDeploymentContract, prepareProtocolDeploymentContract, } from './codec.js';
3
- export type { PreparedProtocolDeploymentContract } from './codec.js';
2
+ export { PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN, PROTOCOL_DEPLOYMENT_V3_IDENTITY_DOMAIN, encodeProtocolDeploymentContract, encodeProtocolDeploymentContractToString, hashProtocolDeploymentContract, prepareProtocolDeploymentContract, prepareProtocolDeploymentContractV3, } from './codec.js';
3
+ export type { PreparedProtocolDeploymentContract, PreparedProtocolDeploymentContractV3, } from './codec.js';
4
4
  export { DEFAULT_PROTOCOL_DEPLOYMENT_LIMITS } from './limits.js';
5
- export { validateProtocolDatasetContract, validateProtocolDeploymentContract, } from './validate.js';
6
- export type { ProtocolDatasetDerivedMeasure, ProtocolDeploymentDataset, ProtocolDeploymentMeasure, ProtocolAccessPolicy, ProtocolDatasetContract, ProtocolDatasetDefaults, ProtocolDatasetDimension, ProtocolDatasetFieldSource, ProtocolDatasetFieldType, ProtocolDatasetFilter, ProtocolDatasetFreshness, ProtocolDatasetLimits, ProtocolDatasetMeasure, ProtocolDatasetMetric, ProtocolDatasetRelationship, ProtocolDatasetTenantPolicy, ProtocolSemanticMetadata, ProtocolSemanticSensitivity, ProtocolDeploymentContract, ProtocolDeploymentErrorCode, ProtocolDeploymentLimits, ProtocolDeploymentOptions, ProtocolEndpointPolicy, ProtocolEndpointTenantPolicy, ProtocolMetricDerivation, ProtocolMetricInput, } from './types.js';
5
+ export { validateProtocolDatasetContract, validateProtocolDeploymentContract, validateProtocolDeploymentContractV3, } from './validate.js';
6
+ export type { ProtocolDatasetDerivedMeasure, ProtocolDeploymentDataset, ProtocolDeploymentMeasure, ProtocolAccessPolicy, ProtocolDatasetContract, ProtocolDatasetDefaults, ProtocolDatasetDimension, ProtocolDatasetFieldSource, ProtocolDatasetFieldType, ProtocolDatasetFilter, ProtocolDatasetFreshness, ProtocolDatasetLimits, ProtocolDatasetMeasure, ProtocolDatasetMetric, ProtocolDatasetRelationship, ProtocolDatasetTenantPolicy, ProtocolSemanticMetadata, ProtocolSemanticSensitivity, ProtocolDeploymentContract, ProtocolDeploymentContractV3, ProtocolDeploymentDatasetV3, ProtocolDeploymentMeasureV3, ProtocolDatasetDerivedMeasureV3, ProtocolDatasetMeasureV3, ProtocolDatasetSegment, ProtocolDatasetShiftMeasure, ProtocolDatasetWindowMeasure, ProtocolTimeInterval, ProtocolDeploymentErrorCode, ProtocolDeploymentLimits, ProtocolDeploymentOptions, ProtocolEndpointPolicy, ProtocolEndpointTenantPolicy, ProtocolMetricDerivation, ProtocolMetricInput, } from './types.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deployments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,wCAAwC,EACxC,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deployments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EACL,mCAAmC,EACnC,sCAAsC,EACtC,gCAAgC,EAChC,wCAAwC,EACxC,8BAA8B,EAC9B,iCAAiC,EACjC,mCAAmC,GACpC,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,2BAA2B,EAC3B,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,oBAAoB,EACpB,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export { ProtocolDeploymentError } from './errors.js';
2
- export { PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN, encodeProtocolDeploymentContract, encodeProtocolDeploymentContractToString, hashProtocolDeploymentContract, prepareProtocolDeploymentContract, } from './codec.js';
2
+ export { PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN, PROTOCOL_DEPLOYMENT_V3_IDENTITY_DOMAIN, encodeProtocolDeploymentContract, encodeProtocolDeploymentContractToString, hashProtocolDeploymentContract, prepareProtocolDeploymentContract, prepareProtocolDeploymentContractV3, } from './codec.js';
3
3
  export { DEFAULT_PROTOCOL_DEPLOYMENT_LIMITS } from './limits.js';
4
- export { validateProtocolDatasetContract, validateProtocolDeploymentContract, } from './validate.js';
4
+ export { validateProtocolDatasetContract, validateProtocolDeploymentContract, validateProtocolDeploymentContractV3, } from './validate.js';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Contract 3 segment rules (RFC 0015) that depend on the owning dataset:
3
+ * predicate shape, and which references a predicate may make.
4
+ */
5
+ import type { ProtocolExpression } from '../expressions/index.js';
6
+ import type { ProtocolDatasetDimension, ProtocolDatasetTenantPolicy } from './types.js';
7
+ /**
8
+ * True for a comparison between references and literals, or a logical tree
9
+ * whose leaves are all such comparisons. Aggregates, arithmetic, and calls are
10
+ * excluded: a segment selects rows by their own dimension values.
11
+ */
12
+ export declare function isSegmentPredicate(expression: ProtocolExpression): boolean;
13
+ /** Every reference name in an expression, in document order. */
14
+ export declare function expressionReferences(expression: ProtocolExpression): string[];
15
+ /**
16
+ * True when a segment predicate may reference `name`. It must be one of the
17
+ * dataset's own dimensions: never relationship-qualified, and never the tenant
18
+ * field, which only trusted runtime context may constrain.
19
+ */
20
+ export declare function isSegmentReference(name: string, dimensions: readonly ProtocolDatasetDimension[], tenant: ProtocolDatasetTenantPolicy): boolean;
21
+ //# sourceMappingURL=segments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../src/deployments/segments.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAExF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAQ1E;AAMD,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAmB7E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,SAAS,wBAAwB,EAAE,EAC/C,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAMT"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Contract 3 segment rules (RFC 0015) that depend on the owning dataset:
3
+ * predicate shape, and which references a predicate may make.
4
+ */
5
+ /**
6
+ * True for a comparison between references and literals, or a logical tree
7
+ * whose leaves are all such comparisons. Aggregates, arithmetic, and calls are
8
+ * excluded: a segment selects rows by their own dimension values.
9
+ */
10
+ export function isSegmentPredicate(expression) {
11
+ if (expression.kind === 'comparison') {
12
+ return isSegmentOperand(expression.left) && isSegmentOperand(expression.right);
13
+ }
14
+ if (expression.kind !== 'logical')
15
+ return false;
16
+ return expression.operator === 'not'
17
+ ? isSegmentPredicate(expression.operand)
18
+ : expression.operands.every(isSegmentPredicate);
19
+ }
20
+ function isSegmentOperand(expression) {
21
+ return expression.kind === 'reference' || expression.kind === 'literal';
22
+ }
23
+ /** Every reference name in an expression, in document order. */
24
+ export function expressionReferences(expression) {
25
+ switch (expression.kind) {
26
+ case 'reference':
27
+ return [expression.name];
28
+ case 'literal':
29
+ return [];
30
+ case 'binary':
31
+ case 'comparison':
32
+ return [...expressionReferences(expression.left), ...expressionReferences(expression.right)];
33
+ case 'call':
34
+ return expression.args.flatMap(expressionReferences);
35
+ case 'logical':
36
+ return expression.operator === 'not'
37
+ ? expressionReferences(expression.operand)
38
+ : expression.operands.flatMap(expressionReferences);
39
+ case 'aggregate':
40
+ // Not reachable for a predicate; listed so a caller cannot miss one.
41
+ return [expression.field];
42
+ }
43
+ }
44
+ /**
45
+ * True when a segment predicate may reference `name`. It must be one of the
46
+ * dataset's own dimensions: never relationship-qualified, and never the tenant
47
+ * field, which only trusted runtime context may constrain.
48
+ */
49
+ export function isSegmentReference(name, dimensions, tenant) {
50
+ const dimension = dimensions.find(item => item.name === name);
51
+ if (!dimension)
52
+ return false;
53
+ if (tenant.kind !== 'required')
54
+ return true;
55
+ const column = dimension.source.kind === 'column' ? dimension.source.column : undefined;
56
+ return dimension.name !== tenant.field && column !== tenant.field;
57
+ }
@@ -1,4 +1,4 @@
1
- import type { ProtocolExpression, ProtocolTimeGrain } from '../expressions/index.js';
1
+ import type { ProtocolExpression, ProtocolQueryTimeGrain, ProtocolTimeGrain } from '../expressions/index.js';
2
2
  import type { ProtocolIdentifier, ProtocolQualifiedIdentifier } from '../identifiers/index.js';
3
3
  import type { ProtocolSqlExpression } from '../query-implementations/index.js';
4
4
  export type ProtocolDatasetFieldType = 'string' | 'number' | 'boolean' | 'timestamp';
@@ -174,6 +174,75 @@ export interface ProtocolDeploymentContract {
174
174
  readonly queries?: never;
175
175
  readonly artifacts?: never;
176
176
  }
177
+ /** A named, author-defined predicate over a dataset's own dimensions (RFC 0015). */
178
+ export interface ProtocolDatasetSegment extends ProtocolSemanticMetadata {
179
+ readonly name: ProtocolIdentifier;
180
+ readonly predicate: ProtocolExpression;
181
+ readonly label?: string;
182
+ readonly description?: string;
183
+ }
184
+ /** A contract 3 base measure: adds `approxCountDistinct` and its `approximate` marker. */
185
+ export interface ProtocolDatasetMeasureV3 extends Omit<ProtocolDatasetMeasure, 'aggregation'> {
186
+ readonly aggregation: ProtocolDatasetMeasure['aggregation'] | 'approxCountDistinct';
187
+ /** Present, and `true`, exactly when the aggregation is approximate. */
188
+ readonly approximate?: true;
189
+ }
190
+ /** A contract 3 derived measure: approximate when any measure it uses is. */
191
+ export interface ProtocolDatasetDerivedMeasureV3 extends ProtocolDatasetDerivedMeasure {
192
+ readonly approximate?: true;
193
+ }
194
+ /** A whole number of time units, such as `{ amount: 7, unit: 'day' }`. */
195
+ export interface ProtocolTimeInterval {
196
+ readonly amount: number;
197
+ readonly unit: ProtocolQueryTimeGrain;
198
+ }
199
+ interface ProtocolTimeMeasureCommon extends ProtocolSemanticMetadata {
200
+ readonly name: ProtocolIdentifier;
201
+ /** The base measure of the same dataset this measure wraps. */
202
+ readonly measure: ProtocolIdentifier;
203
+ /** Signals that selecting this measure requires a grain and bounded time range. */
204
+ readonly requiresTimeRange: true;
205
+ /** Present, and `true`, exactly when the wrapped measure is approximate. */
206
+ readonly approximate?: true;
207
+ readonly label?: string;
208
+ readonly description?: string;
209
+ }
210
+ /**
211
+ * A rolling, to-date, or cumulative window over a base measure (RFC 0015).
212
+ * Exactly one of `trailing`, `toDate`, and `cumulative` is present.
213
+ */
214
+ export interface ProtocolDatasetWindowMeasure extends ProtocolTimeMeasureCommon {
215
+ readonly kind: 'window';
216
+ readonly trailing?: ProtocolTimeInterval;
217
+ readonly toDate?: Exclude<ProtocolQueryTimeGrain, 'minute'>;
218
+ readonly cumulative?: true;
219
+ }
220
+ /** A base measure evaluated over the bucket shifted back by `interval` (RFC 0015). */
221
+ export interface ProtocolDatasetShiftMeasure extends ProtocolTimeMeasureCommon {
222
+ readonly kind: 'shift';
223
+ readonly interval: ProtocolTimeInterval;
224
+ }
225
+ export type ProtocolDeploymentMeasureV3 = ProtocolDatasetMeasureV3 | ProtocolDatasetDerivedMeasureV3 | ProtocolDatasetWindowMeasure | ProtocolDatasetShiftMeasure;
226
+ /**
227
+ * A contract 3 dataset. The filter allow-list is renamed `allowedFilters`, and
228
+ * datasets may carry `segments`.
229
+ */
230
+ export interface ProtocolDeploymentDatasetV3 extends Omit<ProtocolDeploymentDataset, 'measures' | 'filters' | 'defaults'> {
231
+ readonly measures: readonly ProtocolDeploymentMeasureV3[];
232
+ readonly allowedFilters: readonly ProtocolDatasetFilter[];
233
+ readonly segments?: readonly ProtocolDatasetSegment[];
234
+ readonly defaults?: {
235
+ readonly dimensions?: readonly ProtocolIdentifier[];
236
+ readonly timeGrain?: ProtocolQueryTimeGrain;
237
+ };
238
+ readonly filters?: never;
239
+ }
240
+ /** Deployment contract 3 (RFC 0015). */
241
+ export interface ProtocolDeploymentContractV3 {
242
+ readonly kind: 'hypequery-deployment';
243
+ readonly version: 3;
244
+ readonly datasets: readonly ProtocolDeploymentDatasetV3[];
245
+ }
177
246
  export interface ProtocolDeploymentLimits {
178
247
  readonly maxDatasets: number;
179
248
  readonly maxDatasetItems: number;
@@ -200,4 +269,5 @@ export interface ProtocolDeploymentOptions {
200
269
  readonly limits?: Partial<ProtocolDeploymentLimits>;
201
270
  }
202
271
  export type ProtocolDeploymentErrorCode = 'HQ_DEPLOYMENT_TYPE' | 'HQ_DEPLOYMENT_UNKNOWN_FIELD' | 'HQ_DEPLOYMENT_INVALID_VERSION' | 'HQ_DEPLOYMENT_INVALID_IDENTIFIER' | 'HQ_DEPLOYMENT_INVALID_VALUE' | 'HQ_DEPLOYMENT_INVALID_REFERENCE' | 'HQ_DEPLOYMENT_TOO_MANY_ITEMS' | 'HQ_DEPLOYMENT_TOO_LARGE' | 'HQ_DEPLOYMENT_UNSAFE_OBJECT';
272
+ export {};
203
273
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/deployments/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AACrF,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,YAAY,CAAC;AAEhG,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ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E,SAAS,kBAAkB,EAAE,CAAC;QACpD,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,CAAC;KAC7C,CAAC;IACF,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CAC1B;AAED,wCAAwC;AACxC,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,SAAS,2BAA2B,EAAE,CAAC;CAC3D;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACrD;AAED,MAAM,MAAM,2BAA2B,GACnC,oBAAoB,GACpB,6BAA6B,GAC7B,+BAA+B,GAC/B,kCAAkC,GAClC,6BAA6B,GAC7B,iCAAiC,GACjC,8BAA8B,GAC9B,yBAAyB,GACzB,6BAA6B,CAAC"}
@@ -1,5 +1,15 @@
1
- import type { ProtocolDatasetContract, ProtocolDeploymentContract, ProtocolDeploymentOptions } from './types.js';
1
+ import type { ProtocolDatasetContract, ProtocolDeploymentContract, ProtocolDeploymentContractV3, ProtocolDeploymentOptions } from './types.js';
2
2
  export declare function validateProtocolDatasetContract(input: unknown, options?: ProtocolDeploymentOptions): ProtocolDatasetContract;
3
3
  /** Validate the deployment contract. Unsupported fields are forbidden, even when empty. */
4
4
  export declare function validateProtocolDeploymentContract(input: unknown, options?: ProtocolDeploymentOptions): ProtocolDeploymentContract;
5
+ /**
6
+ * Validate a deployment contract 3 (RFC 0015). Contract 3 renames the dataset
7
+ * filter allow-list to `allowedFilters` and adds segments, `approxCountDistinct`,
8
+ * window and shift measures, and sub-day default grains.
9
+ *
10
+ * Under the lowest-version rule, a contract that uses none of those is only
11
+ * valid as contract 2. Rejecting it here keeps a deployment's identity a
12
+ * function of its content rather than of which producer emitted it.
13
+ */
14
+ export declare function validateProtocolDeploymentContractV3(input: unknown, options?: ProtocolDeploymentOptions): ProtocolDeploymentContractV3;
5
15
  //# sourceMappingURL=validate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/deployments/validate.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,uBAAuB,EAEvB,0BAA0B,EAa1B,yBAAyB,EAG1B,MAAM,YAAY,CAAC;AAqwBpB,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,uBAAuB,CAEzB;AA8ID,2FAA2F;AAC3F,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,0BAA0B,CAU5B"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/deployments/validate.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAEV,uBAAuB,EAEvB,0BAA0B,EAC1B,4BAA4B,EAe5B,yBAAyB,EAG1B,MAAM,YAAY,CAAC;AAw0BpB,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,uBAAuB,CAEzB;AAiQD,2FAA2F;AAC3F,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,0BAA0B,CAU5B;AAYD;;;;;;;;GAQG;AACH,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,4BAA4B,CAa9B"}