@hypequery/protocol 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/events/errors.d.ts +14 -0
- package/dist/events/errors.d.ts.map +1 -0
- package/dist/events/errors.js +26 -0
- package/dist/events/index.d.ts +5 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +3 -0
- package/dist/events/limits.d.ts +4 -0
- package/dist/events/limits.d.ts.map +1 -0
- package/dist/events/limits.js +19 -0
- package/dist/events/types.d.ts +52 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/events/types.js +1 -0
- package/dist/events/validate.d.ts +4 -0
- package/dist/events/validate.d.ts.map +1 -0
- package/dist/events/validate.js +240 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ProtocolQueryDiagnosticsErrorCode, ProtocolQueryEventErrorCode } from './types.js';
|
|
2
|
+
export declare class ProtocolQueryEventError extends TypeError {
|
|
3
|
+
readonly code: ProtocolQueryEventErrorCode;
|
|
4
|
+
readonly path: string;
|
|
5
|
+
constructor(code: ProtocolQueryEventErrorCode, path?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare function eventError(code: ProtocolQueryEventErrorCode, path?: string): never;
|
|
8
|
+
export declare class ProtocolQueryDiagnosticsError extends TypeError {
|
|
9
|
+
readonly code: ProtocolQueryDiagnosticsErrorCode;
|
|
10
|
+
readonly path: string;
|
|
11
|
+
constructor(code: ProtocolQueryDiagnosticsErrorCode, path?: string);
|
|
12
|
+
}
|
|
13
|
+
export declare function diagnosticsError(code: ProtocolQueryDiagnosticsErrorCode, path?: string): never;
|
|
14
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/events/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAEpB,qBAAa,uBAAwB,SAAQ,SAAS;IACpD,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,2BAA2B,EAAE,IAAI,SAAM;CAM1D;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,2BAA2B,EACjC,IAAI,SAAM,GACT,KAAK,CAEP;AAED,qBAAa,6BAA8B,SAAQ,SAAS;IAC1D,QAAQ,CAAC,IAAI,EAAE,iCAAiC,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,iCAAiC,EAAE,IAAI,SAAM;CAMhE;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,iCAAiC,EACvC,IAAI,SAAM,GACT,KAAK,CAEP"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class ProtocolQueryEventError extends TypeError {
|
|
2
|
+
code;
|
|
3
|
+
path;
|
|
4
|
+
constructor(code, path = '$') {
|
|
5
|
+
super(`${code} at ${path}`);
|
|
6
|
+
this.name = 'ProtocolQueryEventError';
|
|
7
|
+
this.code = code;
|
|
8
|
+
this.path = path;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export function eventError(code, path = '$') {
|
|
12
|
+
throw new ProtocolQueryEventError(code, path);
|
|
13
|
+
}
|
|
14
|
+
export class ProtocolQueryDiagnosticsError extends TypeError {
|
|
15
|
+
code;
|
|
16
|
+
path;
|
|
17
|
+
constructor(code, path = '$') {
|
|
18
|
+
super(`${code} at ${path}`);
|
|
19
|
+
this.name = 'ProtocolQueryDiagnosticsError';
|
|
20
|
+
this.code = code;
|
|
21
|
+
this.path = path;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export function diagnosticsError(code, path = '$') {
|
|
25
|
+
throw new ProtocolQueryDiagnosticsError(code, path);
|
|
26
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ProtocolQueryDiagnosticsError, ProtocolQueryEventError, } from './errors.js';
|
|
2
|
+
export { DEFAULT_PROTOCOL_QUERY_EVENT_LIMITS } from './limits.js';
|
|
3
|
+
export { validateProtocolQueryDiagnostics, validateProtocolQueryEvent, } from './validate.js';
|
|
4
|
+
export type { ProtocolQueryDiagnostics, ProtocolQueryDiagnosticsErrorCode, ProtocolQueryErrorCategory, ProtocolQueryEvent, ProtocolQueryEventErrorCode, ProtocolQueryEventLimits, ProtocolQueryEventOptions, ProtocolQueryEventOutcome, ProtocolQueryEventTarget, ProtocolQueryOperation, ProtocolQueryTerminalReason, } from './types.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EACL,gCAAgC,EAChC,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,wBAAwB,EACxB,iCAAiC,EACjC,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProtocolQueryEventLimits, ProtocolQueryEventOptions } from './types.js';
|
|
2
|
+
export declare const DEFAULT_PROTOCOL_QUERY_EVENT_LIMITS: Readonly<ProtocolQueryEventLimits>;
|
|
3
|
+
export declare function resolveQueryEventLimits(options?: ProtocolQueryEventOptions): Readonly<ProtocolQueryEventLimits>;
|
|
4
|
+
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/events/limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,mCAAmC,EAChD,QAAQ,CAAC,wBAAwB,CAG/B,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,yBAA8B,GACtC,QAAQ,CAAC,wBAAwB,CAAC,CAepC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const DEFAULT_PROTOCOL_QUERY_EVENT_LIMITS = Object.freeze({
|
|
2
|
+
maxStringBytes: 1_024,
|
|
3
|
+
maxDebugBytes: 4_096,
|
|
4
|
+
});
|
|
5
|
+
export function resolveQueryEventLimits(options = {}) {
|
|
6
|
+
const result = { ...DEFAULT_PROTOCOL_QUERY_EVENT_LIMITS };
|
|
7
|
+
for (const key of Object.keys(result)) {
|
|
8
|
+
const value = options.limits?.[key];
|
|
9
|
+
if (value === undefined)
|
|
10
|
+
continue;
|
|
11
|
+
const maximum = DEFAULT_PROTOCOL_QUERY_EVENT_LIMITS[key];
|
|
12
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > maximum) {
|
|
13
|
+
throw new RangeError(`${key} must be a positive safe integer no greater than ${maximum} `
|
|
14
|
+
+ '(the query event v1 maximum)');
|
|
15
|
+
}
|
|
16
|
+
result[key] = value;
|
|
17
|
+
}
|
|
18
|
+
return Object.freeze(result);
|
|
19
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface ProtocolQueryEventTarget {
|
|
2
|
+
readonly project: string;
|
|
3
|
+
readonly environment: string;
|
|
4
|
+
}
|
|
5
|
+
export type ProtocolQueryOperation = 'query' | 'command' | 'insert';
|
|
6
|
+
export type ProtocolQueryEventOutcome = 'success' | 'failure';
|
|
7
|
+
/** RFC 0010 version 1 minimum public error categories. */
|
|
8
|
+
export type ProtocolQueryErrorCategory = 'input-invalid' | 'unauthenticated' | 'forbidden' | 'tenant-required' | 'not-found' | 'too-large' | 'aborted' | 'deadline-exceeded' | 'unavailable' | 'internal';
|
|
9
|
+
/** Metadata-only record of one execution. Never carries values, SQL, or credentials. */
|
|
10
|
+
export interface ProtocolQueryEvent {
|
|
11
|
+
readonly kind: 'hypequery-query-event';
|
|
12
|
+
readonly version: 1;
|
|
13
|
+
readonly eventId: string;
|
|
14
|
+
readonly occurredAt: string;
|
|
15
|
+
readonly target: ProtocolQueryEventTarget;
|
|
16
|
+
readonly queryName: string;
|
|
17
|
+
readonly operation: ProtocolQueryOperation;
|
|
18
|
+
readonly outcome: ProtocolQueryEventOutcome;
|
|
19
|
+
/** Required when outcome is 'failure'; forbidden when outcome is 'success'. */
|
|
20
|
+
readonly errorCategory?: ProtocolQueryErrorCategory;
|
|
21
|
+
readonly durationMs: number;
|
|
22
|
+
readonly rowCount?: number;
|
|
23
|
+
/** Derived server-side fingerprint; the raw tenant identifier is prohibited. */
|
|
24
|
+
readonly tenantFingerprint?: string;
|
|
25
|
+
/** External correlation only; never authoritative. */
|
|
26
|
+
readonly correlationId?: string;
|
|
27
|
+
}
|
|
28
|
+
export type ProtocolQueryTerminalReason = 'completed' | 'aborted' | 'deadline-exceeded' | 'drained';
|
|
29
|
+
/** Privileged diagnostics projection; requires the RFC 0009 diagnostic capability. */
|
|
30
|
+
export interface ProtocolQueryDiagnostics {
|
|
31
|
+
readonly kind: 'hypequery-query-diagnostics';
|
|
32
|
+
readonly version: 1;
|
|
33
|
+
readonly eventId: string;
|
|
34
|
+
readonly queryId: string;
|
|
35
|
+
readonly terminalReason: ProtocolQueryTerminalReason;
|
|
36
|
+
readonly attempts: number;
|
|
37
|
+
readonly runtimeIdentity?: string;
|
|
38
|
+
/** Non-executable RFC 0010 debug form; contains no values. */
|
|
39
|
+
readonly debugQuery?: string;
|
|
40
|
+
readonly safeMessage?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ProtocolQueryEventLimits {
|
|
43
|
+
readonly maxStringBytes: number;
|
|
44
|
+
readonly maxDebugBytes: number;
|
|
45
|
+
}
|
|
46
|
+
/** Parser budgets that may tighten, but not raise, query-event v1 limits. */
|
|
47
|
+
export interface ProtocolQueryEventOptions {
|
|
48
|
+
readonly limits?: Partial<ProtocolQueryEventLimits>;
|
|
49
|
+
}
|
|
50
|
+
export type ProtocolQueryEventErrorCode = 'HQ_EVENT_TYPE' | 'HQ_EVENT_UNKNOWN_FIELD' | 'HQ_EVENT_INVALID_VERSION' | 'HQ_EVENT_INVALID_VALUE' | 'HQ_EVENT_TOO_LARGE' | 'HQ_EVENT_UNSAFE_OBJECT';
|
|
51
|
+
export type ProtocolQueryDiagnosticsErrorCode = 'HQ_DIAGNOSTICS_TYPE' | 'HQ_DIAGNOSTICS_UNKNOWN_FIELD' | 'HQ_DIAGNOSTICS_INVALID_VERSION' | 'HQ_DIAGNOSTICS_INVALID_VALUE' | 'HQ_DIAGNOSTICS_TOO_LARGE' | 'HQ_DIAGNOSTICS_UNSAFE_OBJECT';
|
|
52
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/events/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEpE,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,SAAS,CAAC;AAE9D,0DAA0D;AAC1D,MAAM,MAAM,0BAA0B,GAClC,eAAe,GACf,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,WAAW,GACX,SAAS,GACT,mBAAmB,GACnB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C7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,6EAA6E;AAC7E,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACrD;AAED,MAAM,MAAM,2BAA2B,GACnC,eAAe,GACf,wBAAwB,GACxB,0BAA0B,GAC1B,wBAAwB,GACxB,oBAAoB,GACpB,wBAAwB,CAAC;AAE7B,MAAM,MAAM,iCAAiC,GACzC,qBAAqB,GACrB,8BAA8B,GAC9B,gCAAgC,GAChC,8BAA8B,GAC9B,0BAA0B,GAC1B,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProtocolQueryDiagnostics, ProtocolQueryEvent, ProtocolQueryEventOptions } from './types.js';
|
|
2
|
+
export declare function validateProtocolQueryEvent(input: unknown, options?: ProtocolQueryEventOptions): ProtocolQueryEvent;
|
|
3
|
+
export declare function validateProtocolQueryDiagnostics(input: unknown, options?: ProtocolQueryEventOptions): ProtocolQueryDiagnostics;
|
|
4
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/events/validate.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,wBAAwB,EAExB,kBAAkB,EAElB,yBAAyB,EAE1B,MAAM,YAAY,CAAC;AA4OpB,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,kBAAkB,CAuDpB;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,yBAA8B,GACtC,wBAAwB,CA+B1B"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { ProtocolIdentifierError, parseProtocolQualifiedIdentifier } from '../identifiers/index.js';
|
|
2
|
+
import { ProtocolDeploymentReleaseError, validateProtocolDeploymentReleaseTarget, } from '../releases/index.js';
|
|
3
|
+
import { diagnosticsError, eventError } from './errors.js';
|
|
4
|
+
import { resolveQueryEventLimits } from './limits.js';
|
|
5
|
+
const EVENT_CONTEXT = {
|
|
6
|
+
codes: {
|
|
7
|
+
type: 'HQ_EVENT_TYPE',
|
|
8
|
+
unknownField: 'HQ_EVENT_UNKNOWN_FIELD',
|
|
9
|
+
invalidVersion: 'HQ_EVENT_INVALID_VERSION',
|
|
10
|
+
invalidValue: 'HQ_EVENT_INVALID_VALUE',
|
|
11
|
+
tooLarge: 'HQ_EVENT_TOO_LARGE',
|
|
12
|
+
unsafeObject: 'HQ_EVENT_UNSAFE_OBJECT',
|
|
13
|
+
},
|
|
14
|
+
fail: eventError,
|
|
15
|
+
};
|
|
16
|
+
const DIAGNOSTICS_CONTEXT = {
|
|
17
|
+
codes: {
|
|
18
|
+
type: 'HQ_DIAGNOSTICS_TYPE',
|
|
19
|
+
unknownField: 'HQ_DIAGNOSTICS_UNKNOWN_FIELD',
|
|
20
|
+
invalidVersion: 'HQ_DIAGNOSTICS_INVALID_VERSION',
|
|
21
|
+
invalidValue: 'HQ_DIAGNOSTICS_INVALID_VALUE',
|
|
22
|
+
tooLarge: 'HQ_DIAGNOSTICS_TOO_LARGE',
|
|
23
|
+
unsafeObject: 'HQ_DIAGNOSTICS_UNSAFE_OBJECT',
|
|
24
|
+
},
|
|
25
|
+
fail: diagnosticsError,
|
|
26
|
+
};
|
|
27
|
+
const HEX64_PATTERN = /^[0-9a-f]{64}$/;
|
|
28
|
+
const OCCURRED_AT_PATTERN = /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\.[0-9]{1,3})?Z$/;
|
|
29
|
+
const OPERATIONS = ['query', 'command', 'insert'];
|
|
30
|
+
const OUTCOMES = ['success', 'failure'];
|
|
31
|
+
const ERROR_CATEGORIES = [
|
|
32
|
+
'input-invalid',
|
|
33
|
+
'unauthenticated',
|
|
34
|
+
'forbidden',
|
|
35
|
+
'tenant-required',
|
|
36
|
+
'not-found',
|
|
37
|
+
'too-large',
|
|
38
|
+
'aborted',
|
|
39
|
+
'deadline-exceeded',
|
|
40
|
+
'unavailable',
|
|
41
|
+
'internal',
|
|
42
|
+
];
|
|
43
|
+
const TERMINAL_REASONS = ['completed', 'aborted', 'deadline-exceeded', 'drained'];
|
|
44
|
+
const MAX_DURATION_MS = 86_400_000;
|
|
45
|
+
const MAX_ROW_COUNT = 1_000_000_000_000;
|
|
46
|
+
const MAX_ATTEMPTS = 64;
|
|
47
|
+
const textEncoder = new TextEncoder();
|
|
48
|
+
function requireRecord(context, input, path) {
|
|
49
|
+
const { codes, fail } = context;
|
|
50
|
+
if (typeof input !== 'object' || input === null || Array.isArray(input)) {
|
|
51
|
+
fail(codes.type, path);
|
|
52
|
+
}
|
|
53
|
+
const prototype = Object.getPrototypeOf(input);
|
|
54
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
55
|
+
fail(codes.unsafeObject, path);
|
|
56
|
+
}
|
|
57
|
+
if (Object.getOwnPropertySymbols(input).length > 0) {
|
|
58
|
+
fail(codes.unsafeObject, path);
|
|
59
|
+
}
|
|
60
|
+
for (const descriptor of Object.values(Object.getOwnPropertyDescriptors(input))) {
|
|
61
|
+
if (!descriptor.enumerable || !('value' in descriptor)) {
|
|
62
|
+
fail(codes.unsafeObject, path);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return input;
|
|
66
|
+
}
|
|
67
|
+
function exactFields(context, value, required, optional, path) {
|
|
68
|
+
const { codes, fail } = context;
|
|
69
|
+
const allowed = new Set([...required, ...optional]);
|
|
70
|
+
for (const key of Object.keys(value)) {
|
|
71
|
+
if (!allowed.has(key))
|
|
72
|
+
fail(codes.unknownField, `${path}.${key}`);
|
|
73
|
+
}
|
|
74
|
+
for (const key of required) {
|
|
75
|
+
if (!Object.hasOwn(value, key))
|
|
76
|
+
fail(codes.type, `${path}.${key}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function freezeRecord(entries) {
|
|
80
|
+
return Object.freeze(Object.assign(Object.create(null), entries));
|
|
81
|
+
}
|
|
82
|
+
function requireString(context, value, path) {
|
|
83
|
+
if (typeof value !== 'string')
|
|
84
|
+
context.fail(context.codes.type, path);
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
function hasControlCharacter(text) {
|
|
88
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
89
|
+
const code = text.charCodeAt(index);
|
|
90
|
+
if (code <= 0x1f || (code >= 0x7f && code <= 0x9f))
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
function boundedText(context, value, path, maximum) {
|
|
96
|
+
const text = requireString(context, value, path);
|
|
97
|
+
if (text.length > maximum || textEncoder.encode(text).byteLength > maximum) {
|
|
98
|
+
context.fail(context.codes.tooLarge, path);
|
|
99
|
+
}
|
|
100
|
+
if (hasControlCharacter(text)) {
|
|
101
|
+
context.fail(context.codes.invalidValue, path);
|
|
102
|
+
}
|
|
103
|
+
return text;
|
|
104
|
+
}
|
|
105
|
+
function hexIdentity(context, value, path) {
|
|
106
|
+
const text = requireString(context, value, path);
|
|
107
|
+
if (!HEX64_PATTERN.test(text))
|
|
108
|
+
context.fail(context.codes.invalidValue, path);
|
|
109
|
+
return text;
|
|
110
|
+
}
|
|
111
|
+
function occurredAt(context, value, path) {
|
|
112
|
+
const text = requireString(context, value, path);
|
|
113
|
+
if (!OCCURRED_AT_PATTERN.test(text) || Number.isNaN(Date.parse(text))) {
|
|
114
|
+
context.fail(context.codes.invalidValue, path);
|
|
115
|
+
}
|
|
116
|
+
return text;
|
|
117
|
+
}
|
|
118
|
+
function boundedCount(context, value, path, minimum, maximum) {
|
|
119
|
+
if (typeof value !== 'number')
|
|
120
|
+
context.fail(context.codes.type, path);
|
|
121
|
+
if (!Number.isSafeInteger(value) || value < minimum || value > maximum) {
|
|
122
|
+
context.fail(context.codes.invalidValue, path);
|
|
123
|
+
}
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
function stringChoice(context, value, path, choices) {
|
|
127
|
+
const text = requireString(context, value, path);
|
|
128
|
+
if (!choices.includes(text))
|
|
129
|
+
context.fail(context.codes.invalidValue, path);
|
|
130
|
+
return text;
|
|
131
|
+
}
|
|
132
|
+
function queryTarget(context, value, path) {
|
|
133
|
+
try {
|
|
134
|
+
return validateProtocolDeploymentReleaseTarget(value);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
if (error instanceof ProtocolDeploymentReleaseError) {
|
|
138
|
+
context.fail(context.codes.invalidValue, path);
|
|
139
|
+
}
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function queryName(context, value, path) {
|
|
144
|
+
const text = requireString(context, value, path);
|
|
145
|
+
try {
|
|
146
|
+
parseProtocolQualifiedIdentifier(text);
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
if (error instanceof ProtocolIdentifierError) {
|
|
150
|
+
context.fail(context.codes.invalidValue, path);
|
|
151
|
+
}
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
return text;
|
|
155
|
+
}
|
|
156
|
+
function kindAndVersion(context, value, kind) {
|
|
157
|
+
const { codes, fail } = context;
|
|
158
|
+
if (value.kind !== kind) {
|
|
159
|
+
if (typeof value.kind !== 'string')
|
|
160
|
+
fail(codes.type, '$.kind');
|
|
161
|
+
fail(codes.invalidValue, '$.kind');
|
|
162
|
+
}
|
|
163
|
+
if (value.version !== 1) {
|
|
164
|
+
if (typeof value.version !== 'number')
|
|
165
|
+
fail(codes.type, '$.version');
|
|
166
|
+
fail(codes.invalidVersion, '$.version');
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
export function validateProtocolQueryEvent(input, options = {}) {
|
|
170
|
+
const limits = resolveQueryEventLimits(options);
|
|
171
|
+
const context = EVENT_CONTEXT;
|
|
172
|
+
const value = requireRecord(context, input, '$');
|
|
173
|
+
exactFields(context, value, [
|
|
174
|
+
'kind',
|
|
175
|
+
'version',
|
|
176
|
+
'eventId',
|
|
177
|
+
'occurredAt',
|
|
178
|
+
'target',
|
|
179
|
+
'queryName',
|
|
180
|
+
'operation',
|
|
181
|
+
'outcome',
|
|
182
|
+
'durationMs',
|
|
183
|
+
], ['errorCategory', 'rowCount', 'tenantFingerprint', 'correlationId'], '$');
|
|
184
|
+
kindAndVersion(context, value, 'hypequery-query-event');
|
|
185
|
+
const outcome = stringChoice(context, value.outcome, '$.outcome', OUTCOMES);
|
|
186
|
+
const hasCategory = Object.hasOwn(value, 'errorCategory');
|
|
187
|
+
if (outcome === 'failure' && !hasCategory) {
|
|
188
|
+
eventError('HQ_EVENT_INVALID_VALUE', '$.errorCategory');
|
|
189
|
+
}
|
|
190
|
+
if (outcome === 'success' && hasCategory) {
|
|
191
|
+
eventError('HQ_EVENT_INVALID_VALUE', '$.errorCategory');
|
|
192
|
+
}
|
|
193
|
+
return freezeRecord({
|
|
194
|
+
kind: 'hypequery-query-event',
|
|
195
|
+
version: 1,
|
|
196
|
+
eventId: hexIdentity(context, value.eventId, '$.eventId'),
|
|
197
|
+
occurredAt: occurredAt(context, value.occurredAt, '$.occurredAt'),
|
|
198
|
+
target: queryTarget(context, value.target, '$.target'),
|
|
199
|
+
queryName: queryName(context, value.queryName, '$.queryName'),
|
|
200
|
+
operation: stringChoice(context, value.operation, '$.operation', OPERATIONS),
|
|
201
|
+
outcome,
|
|
202
|
+
...(hasCategory ? {
|
|
203
|
+
errorCategory: stringChoice(context, value.errorCategory, '$.errorCategory', ERROR_CATEGORIES),
|
|
204
|
+
} : {}),
|
|
205
|
+
durationMs: boundedCount(context, value.durationMs, '$.durationMs', 0, MAX_DURATION_MS),
|
|
206
|
+
...(Object.hasOwn(value, 'rowCount') ? {
|
|
207
|
+
rowCount: boundedCount(context, value.rowCount, '$.rowCount', 0, MAX_ROW_COUNT),
|
|
208
|
+
} : {}),
|
|
209
|
+
...(Object.hasOwn(value, 'tenantFingerprint') ? {
|
|
210
|
+
tenantFingerprint: hexIdentity(context, value.tenantFingerprint, '$.tenantFingerprint'),
|
|
211
|
+
} : {}),
|
|
212
|
+
...(Object.hasOwn(value, 'correlationId') ? {
|
|
213
|
+
correlationId: boundedText(context, value.correlationId, '$.correlationId', limits.maxStringBytes),
|
|
214
|
+
} : {}),
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
export function validateProtocolQueryDiagnostics(input, options = {}) {
|
|
218
|
+
const limits = resolveQueryEventLimits(options);
|
|
219
|
+
const context = DIAGNOSTICS_CONTEXT;
|
|
220
|
+
const value = requireRecord(context, input, '$');
|
|
221
|
+
exactFields(context, value, ['kind', 'version', 'eventId', 'queryId', 'terminalReason', 'attempts'], ['runtimeIdentity', 'debugQuery', 'safeMessage'], '$');
|
|
222
|
+
kindAndVersion(context, value, 'hypequery-query-diagnostics');
|
|
223
|
+
return freezeRecord({
|
|
224
|
+
kind: 'hypequery-query-diagnostics',
|
|
225
|
+
version: 1,
|
|
226
|
+
eventId: hexIdentity(context, value.eventId, '$.eventId'),
|
|
227
|
+
queryId: hexIdentity(context, value.queryId, '$.queryId'),
|
|
228
|
+
terminalReason: stringChoice(context, value.terminalReason, '$.terminalReason', TERMINAL_REASONS),
|
|
229
|
+
attempts: boundedCount(context, value.attempts, '$.attempts', 1, MAX_ATTEMPTS),
|
|
230
|
+
...(Object.hasOwn(value, 'runtimeIdentity') ? {
|
|
231
|
+
runtimeIdentity: hexIdentity(context, value.runtimeIdentity, '$.runtimeIdentity'),
|
|
232
|
+
} : {}),
|
|
233
|
+
...(Object.hasOwn(value, 'debugQuery') ? {
|
|
234
|
+
debugQuery: boundedText(context, value.debugQuery, '$.debugQuery', limits.maxDebugBytes),
|
|
235
|
+
} : {}),
|
|
236
|
+
...(Object.hasOwn(value, 'safeMessage') ? {
|
|
237
|
+
safeMessage: boundedText(context, value.safeMessage, '$.safeMessage', limits.maxStringBytes),
|
|
238
|
+
} : {}),
|
|
239
|
+
});
|
|
240
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export type { ProtocolSchema, ProtocolSchemaErrorCode, ProtocolSchemaLimits, Pro
|
|
|
7
7
|
export type { ProtocolAggregation, ProtocolBinaryOperator, ProtocolComparisonOperator, ProtocolDatasetQuery, ProtocolExpression, ProtocolExpressionErrorCode, ProtocolExpressionLimits, ProtocolExpressionOptions, ProtocolFunctionName, ProtocolMetricQuery, ProtocolOrderBy, ProtocolSemanticQuery, ProtocolTimeGrain, } from './expressions/index.js';
|
|
8
8
|
export type { ProtocolIdentifier, ProtocolIdentifierErrorCode, ProtocolQualifiedIdentifier, } from './identifiers/index.js';
|
|
9
9
|
export { DEFAULT_PROTOCOL_QUERY_IMPLEMENTATION_LIMITS, ProtocolQueryImplementationError, validateProtocolQueryImplementation, validateProtocolSqlExpression, } from './query-implementations/index.js';
|
|
10
|
+
export { DEFAULT_PROTOCOL_QUERY_EVENT_LIMITS, ProtocolQueryDiagnosticsError, ProtocolQueryEventError, validateProtocolQueryDiagnostics, validateProtocolQueryEvent, } from './events/index.js';
|
|
11
|
+
export type { ProtocolQueryDiagnostics, ProtocolQueryDiagnosticsErrorCode, ProtocolQueryErrorCategory, ProtocolQueryEvent, ProtocolQueryEventErrorCode, ProtocolQueryEventLimits, ProtocolQueryEventOptions, ProtocolQueryEventOutcome, ProtocolQueryEventTarget, ProtocolQueryOperation, ProtocolQueryTerminalReason, } from './events/index.js';
|
|
10
12
|
export { DEFAULT_PROTOCOL_DEPLOYMENT_BUNDLE_LIMITS, PROTOCOL_DEPLOYMENT_BUNDLE_IDENTITY_DOMAIN, ProtocolDeploymentBundleError, encodeProtocolDeploymentBundleManifest, encodeProtocolDeploymentBundleManifestToString, hashProtocolDeploymentBundleManifest, prepareProtocolDeploymentBundleManifest, validateProtocolDeploymentBundleManifest, } from './bundles/index.js';
|
|
11
13
|
export { DEFAULT_PROTOCOL_DEPLOYMENT_RELEASE_LIMITS, PROTOCOL_DEPLOYMENT_RELEASE_IDENTITY_DOMAIN, ProtocolDeploymentReleaseError, encodeProtocolDeploymentReleaseEnvelope, encodeProtocolDeploymentReleaseEnvelopeToString, hashProtocolDeploymentReleaseEnvelope, prepareProtocolDeploymentReleaseEnvelope, validateProtocolDeploymentReleaseEnvelope, validateProtocolDeploymentReleaseTarget, } from './releases/index.js';
|
|
12
14
|
export type { PreparedProtocolDeploymentReleaseEnvelope, ProtocolDeploymentReleaseEnvelope, ProtocolDeploymentReleaseErrorCode, ProtocolDeploymentReleaseLimits, ProtocolDeploymentReleaseOptions, ProtocolDeploymentReleaseTarget, } from './releases/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,6BAA6B,EAC7B,+BAA+B,EAC/B,uBAAuB,EACvB,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AA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ChC,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACV,wCAAwC,EACxC,gCAAgC,EAChC,kCAAkC,EAClC,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,kCAAkC,EAClC,mCAAmC,EACnC,uBAAuB,EACvB,gCAAgC,EAChC,wCAAwC,EACxC,8BAA8B,EAC9B,iCAAiC,EACjC,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,kCAAkC,EAClC,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,2BAA2B,EAC3B,oCAAoC,EACpC,iCAAiC,EACjC,kCAAkC,EAClC,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,cAAc,E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AAC;AAEhC,YAAY,EACV,2BAA2B,EAC3B,oCAAoC,EACpC,iCAAiC,EACjC,kCAAkC,EAClC,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { PROTOCOL_IDENTIFIER_LIMITS, ProtocolIdentifierError, isProtocolIdentifi
|
|
|
3
3
|
export { DEFAULT_PROTOCOL_EXPRESSION_LIMITS, ProtocolExpressionError, validateProtocolExpression, validateProtocolSemanticQuery, } from './expressions/index.js';
|
|
4
4
|
export { DEFAULT_PROTOCOL_SCHEMA_LIMITS, DEFAULT_PROTOCOL_SCHEMA_VALUE_LIMITS, ProtocolSchemaError, ProtocolSchemaValueError, applyProtocolSchemaValue, createProtocolSchemaValueParser, resolveProtocolSchemaValueLimits, validateProtocolSchema, } from './schemas/index.js';
|
|
5
5
|
export { DEFAULT_PROTOCOL_QUERY_IMPLEMENTATION_LIMITS, ProtocolQueryImplementationError, validateProtocolQueryImplementation, validateProtocolSqlExpression, } from './query-implementations/index.js';
|
|
6
|
+
export { DEFAULT_PROTOCOL_QUERY_EVENT_LIMITS, ProtocolQueryDiagnosticsError, ProtocolQueryEventError, validateProtocolQueryDiagnostics, validateProtocolQueryEvent, } from './events/index.js';
|
|
6
7
|
export { DEFAULT_PROTOCOL_DEPLOYMENT_BUNDLE_LIMITS, PROTOCOL_DEPLOYMENT_BUNDLE_IDENTITY_DOMAIN, ProtocolDeploymentBundleError, encodeProtocolDeploymentBundleManifest, encodeProtocolDeploymentBundleManifestToString, hashProtocolDeploymentBundleManifest, prepareProtocolDeploymentBundleManifest, validateProtocolDeploymentBundleManifest, } from './bundles/index.js';
|
|
7
8
|
export { DEFAULT_PROTOCOL_DEPLOYMENT_RELEASE_LIMITS, PROTOCOL_DEPLOYMENT_RELEASE_IDENTITY_DOMAIN, ProtocolDeploymentReleaseError, encodeProtocolDeploymentReleaseEnvelope, encodeProtocolDeploymentReleaseEnvelopeToString, hashProtocolDeploymentReleaseEnvelope, prepareProtocolDeploymentReleaseEnvelope, validateProtocolDeploymentReleaseEnvelope, validateProtocolDeploymentReleaseTarget, } from './releases/index.js';
|
|
8
9
|
export { DEFAULT_PROTOCOL_DEPLOYMENT_LIMITS, PROTOCOL_DEPLOYMENT_IDENTITY_DOMAIN, ProtocolDeploymentError, encodeProtocolDeploymentContract, encodeProtocolDeploymentContractToString, hashProtocolDeploymentContract, prepareProtocolDeploymentContract, validateProtocolDatasetContract, validateProtocolDeploymentContract, } from './deployments/index.js';
|