@aiquants/governance-core 0.1.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.
@@ -0,0 +1,1905 @@
1
+ import { z } from "zod";
2
+ export { ConfidentialityLevel, ConfidentialityLevelSchema, FileUri, FileUriSchema, TenantId, TenantIdSchema } from "@aiquants/enrichment-core";
3
+ interface GovernanceClientOptions {
4
+ baseUrl: string;
5
+ apiKey?: string;
6
+ fetchFn?: typeof fetch;
7
+ timeoutMs?: number;
8
+ }
9
+ declare class GovernanceClientError extends Error {
10
+ readonly statusCode: number;
11
+ readonly responseBody: string;
12
+ readonly parsedBody?: unknown;
13
+ constructor(message: string, statusCode: number, responseBody: string, parsedBody?: unknown);
14
+ }
15
+ declare abstract class BaseGovernanceClient {
16
+ protected readonly baseUrl: string;
17
+ protected readonly apiKey?: string;
18
+ protected readonly fetchFn: typeof fetch;
19
+ protected readonly timeoutMs: number;
20
+ constructor(options: GovernanceClientOptions);
21
+ protected request<T>(path: string, method: "GET" | "POST" | "PUT", body?: unknown, query?: Record<string, string | undefined>, signal?: AbortSignal): Promise<T>;
22
+ }
23
+ declare const GovernanceSearchRequestSchema: z.ZodObject<{
24
+ query: z.ZodString;
25
+ policyCategory: z.ZodOptional<z.ZodString>;
26
+ includeHistoricalRevisions: z.ZodOptional<z.ZodBoolean>;
27
+ maxAuthorityTier: z.ZodOptional<z.ZodUnion<[
28
+ z.ZodLiteral<1>,
29
+ z.ZodLiteral<2>,
30
+ z.ZodLiteral<3>,
31
+ z.ZodLiteral<4>,
32
+ z.ZodLiteral<5>
33
+ ]>>;
34
+ limit: z.ZodOptional<z.ZodNumber>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ query: string;
37
+ policyCategory?: string | undefined;
38
+ includeHistoricalRevisions?: boolean | undefined;
39
+ maxAuthorityTier?: 1 | 2 | 3 | 4 | 5 | undefined;
40
+ limit?: number | undefined;
41
+ }, {
42
+ query: string;
43
+ policyCategory?: string | undefined;
44
+ includeHistoricalRevisions?: boolean | undefined;
45
+ maxAuthorityTier?: 1 | 2 | 3 | 4 | 5 | undefined;
46
+ limit?: number | undefined;
47
+ }>;
48
+ type GovernanceSearchRequestInput = z.input<typeof GovernanceSearchRequestSchema>;
49
+ type GovernanceSearchRequest = z.infer<typeof GovernanceSearchRequestSchema>;
50
+ declare const GovernanceSearchSnippetSchema: z.ZodObject<{
51
+ text: z.ZodString;
52
+ citationText: z.ZodString;
53
+ chunkHash: z.ZodString;
54
+ chunkIndex: z.ZodNumber;
55
+ parentChunkUid: z.ZodOptional<z.ZodString>;
56
+ clauseIdentifier: z.ZodOptional<z.ZodString>;
57
+ breadcrumbPath: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
58
+ page: z.ZodOptional<z.ZodNumber>;
59
+ sheetName: z.ZodOptional<z.ZodString>;
60
+ slideIndex: z.ZodOptional<z.ZodNumber>;
61
+ timestampSec: z.ZodOptional<z.ZodNumber>;
62
+ score: z.ZodNumber;
63
+ }, "strip", z.ZodTypeAny, {
64
+ text: string;
65
+ citationText: string;
66
+ chunkHash: string;
67
+ chunkIndex: number;
68
+ score: number;
69
+ parentChunkUid?: string | undefined;
70
+ clauseIdentifier?: string | undefined;
71
+ breadcrumbPath?: string[] | undefined;
72
+ page?: number | undefined;
73
+ sheetName?: string | undefined;
74
+ slideIndex?: number | undefined;
75
+ timestampSec?: number | undefined;
76
+ }, {
77
+ text: string;
78
+ citationText: string;
79
+ chunkHash: string;
80
+ chunkIndex: number;
81
+ score: number;
82
+ parentChunkUid?: string | undefined;
83
+ clauseIdentifier?: string | undefined;
84
+ breadcrumbPath?: string[] | undefined;
85
+ page?: number | undefined;
86
+ sheetName?: string | undefined;
87
+ slideIndex?: number | undefined;
88
+ timestampSec?: number | undefined;
89
+ }>;
90
+ type GovernanceSearchSnippet = z.infer<typeof GovernanceSearchSnippetSchema>;
91
+ declare const RelatedDecisionSchema: z.ZodObject<{
92
+ decisionId: z.ZodString;
93
+ title: z.ZodString;
94
+ approvedBy: z.ZodString;
95
+ }, "strip", z.ZodTypeAny, {
96
+ decisionId: string;
97
+ title: string;
98
+ approvedBy: string;
99
+ }, {
100
+ decisionId: string;
101
+ title: string;
102
+ approvedBy: string;
103
+ }>;
104
+ type RelatedDecision = z.infer<typeof RelatedDecisionSchema>;
105
+ declare const AuthorityTierSchema: z.ZodUnion<[
106
+ z.ZodLiteral<1>,
107
+ z.ZodLiteral<2>,
108
+ z.ZodLiteral<3>,
109
+ z.ZodLiteral<4>,
110
+ z.ZodLiteral<5>
111
+ ]>;
112
+ type AuthorityTier = z.infer<typeof AuthorityTierSchema>;
113
+ declare const GovernanceSearchHitSchema: z.ZodObject<{
114
+ metadataId: z.ZodNumber;
115
+ fileUri: z.ZodString;
116
+ fileName: z.ZodString;
117
+ documentTitle: z.ZodString;
118
+ authorityTier: z.ZodNullable<z.ZodUnion<[
119
+ z.ZodLiteral<1>,
120
+ z.ZodLiteral<2>,
121
+ z.ZodLiteral<3>,
122
+ z.ZodLiteral<4>,
123
+ z.ZodLiteral<5>
124
+ ]>>;
125
+ validFrom: z.ZodNullable<z.ZodString>;
126
+ validUntil: z.ZodNullable<z.ZodString>;
127
+ isCurrentlyAuthoritative: z.ZodBoolean;
128
+ confidentialityLevel: z.ZodEnum<[
129
+ "PUBLIC",
130
+ "INTERNAL",
131
+ "DEPARTMENT",
132
+ "CONFIDENTIAL",
133
+ "RESTRICTED"
134
+ ]>;
135
+ snippets: z.ZodArray<z.ZodObject<{
136
+ text: z.ZodString;
137
+ citationText: z.ZodString;
138
+ chunkHash: z.ZodString;
139
+ chunkIndex: z.ZodNumber;
140
+ parentChunkUid: z.ZodOptional<z.ZodString>;
141
+ clauseIdentifier: z.ZodOptional<z.ZodString>;
142
+ breadcrumbPath: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
143
+ page: z.ZodOptional<z.ZodNumber>;
144
+ sheetName: z.ZodOptional<z.ZodString>;
145
+ slideIndex: z.ZodOptional<z.ZodNumber>;
146
+ timestampSec: z.ZodOptional<z.ZodNumber>;
147
+ score: z.ZodNumber;
148
+ }, "strip", z.ZodTypeAny, {
149
+ text: string;
150
+ citationText: string;
151
+ chunkHash: string;
152
+ chunkIndex: number;
153
+ score: number;
154
+ parentChunkUid?: string | undefined;
155
+ clauseIdentifier?: string | undefined;
156
+ breadcrumbPath?: string[] | undefined;
157
+ page?: number | undefined;
158
+ sheetName?: string | undefined;
159
+ slideIndex?: number | undefined;
160
+ timestampSec?: number | undefined;
161
+ }, {
162
+ text: string;
163
+ citationText: string;
164
+ chunkHash: string;
165
+ chunkIndex: number;
166
+ score: number;
167
+ parentChunkUid?: string | undefined;
168
+ clauseIdentifier?: string | undefined;
169
+ breadcrumbPath?: string[] | undefined;
170
+ page?: number | undefined;
171
+ sheetName?: string | undefined;
172
+ slideIndex?: number | undefined;
173
+ timestampSec?: number | undefined;
174
+ }>, "many">;
175
+ relatedDecisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
176
+ decisionId: z.ZodString;
177
+ title: z.ZodString;
178
+ approvedBy: z.ZodString;
179
+ }, "strip", z.ZodTypeAny, {
180
+ decisionId: string;
181
+ title: string;
182
+ approvedBy: string;
183
+ }, {
184
+ decisionId: string;
185
+ title: string;
186
+ approvedBy: string;
187
+ }>, "many">>;
188
+ policyWarning: z.ZodOptional<z.ZodString>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ metadataId: number;
191
+ fileUri: string;
192
+ fileName: string;
193
+ documentTitle: string;
194
+ authorityTier: 1 | 2 | 3 | 4 | 5 | null;
195
+ validFrom: string | null;
196
+ validUntil: string | null;
197
+ isCurrentlyAuthoritative: boolean;
198
+ confidentialityLevel: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
199
+ snippets: {
200
+ text: string;
201
+ citationText: string;
202
+ chunkHash: string;
203
+ chunkIndex: number;
204
+ score: number;
205
+ parentChunkUid?: string | undefined;
206
+ clauseIdentifier?: string | undefined;
207
+ breadcrumbPath?: string[] | undefined;
208
+ page?: number | undefined;
209
+ sheetName?: string | undefined;
210
+ slideIndex?: number | undefined;
211
+ timestampSec?: number | undefined;
212
+ }[];
213
+ relatedDecisions?: {
214
+ decisionId: string;
215
+ title: string;
216
+ approvedBy: string;
217
+ }[] | undefined;
218
+ policyWarning?: string | undefined;
219
+ }, {
220
+ metadataId: number;
221
+ fileUri: string;
222
+ fileName: string;
223
+ documentTitle: string;
224
+ authorityTier: 1 | 2 | 3 | 4 | 5 | null;
225
+ validFrom: string | null;
226
+ validUntil: string | null;
227
+ isCurrentlyAuthoritative: boolean;
228
+ confidentialityLevel: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
229
+ snippets: {
230
+ text: string;
231
+ citationText: string;
232
+ chunkHash: string;
233
+ chunkIndex: number;
234
+ score: number;
235
+ parentChunkUid?: string | undefined;
236
+ clauseIdentifier?: string | undefined;
237
+ breadcrumbPath?: string[] | undefined;
238
+ page?: number | undefined;
239
+ sheetName?: string | undefined;
240
+ slideIndex?: number | undefined;
241
+ timestampSec?: number | undefined;
242
+ }[];
243
+ relatedDecisions?: {
244
+ decisionId: string;
245
+ title: string;
246
+ approvedBy: string;
247
+ }[] | undefined;
248
+ policyWarning?: string | undefined;
249
+ }>;
250
+ type GovernanceSearchHit = z.infer<typeof GovernanceSearchHitSchema>;
251
+ declare const GovernanceSearchMetadataSchema: z.ZodObject<{
252
+ searchMode: z.ZodEnum<[
253
+ "tri_store",
254
+ "sql_vector",
255
+ "sql_keyword_degraded"
256
+ ]>;
257
+ qualityTier: z.ZodEnum<[
258
+ "HIGH_TRI_STORE",
259
+ "STANDARD_SEMANTIC",
260
+ "DEGRADED_KEYWORD_ONLY"
261
+ ]>;
262
+ isDegraded: z.ZodBoolean;
263
+ degradationReason: z.ZodNullable<z.ZodString>;
264
+ circuitBreakerStatus: z.ZodRecord<z.ZodString, z.ZodEnum<[
265
+ "CLOSED",
266
+ "OPEN",
267
+ "HALF_OPEN",
268
+ "HEALTHY"
269
+ ]>>;
270
+ executionTimeMs: z.ZodNumber;
271
+ }, "strip", z.ZodTypeAny, {
272
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
273
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
274
+ isDegraded: boolean;
275
+ degradationReason: string | null;
276
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
277
+ executionTimeMs: number;
278
+ }, {
279
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
280
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
281
+ isDegraded: boolean;
282
+ degradationReason: string | null;
283
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
284
+ executionTimeMs: number;
285
+ }>;
286
+ type GovernanceSearchMetadata = z.infer<typeof GovernanceSearchMetadataSchema>;
287
+ declare const GovernanceSearchResponseSchema: z.ZodObject<{
288
+ hits: z.ZodArray<z.ZodObject<{
289
+ metadataId: z.ZodNumber;
290
+ fileUri: z.ZodString;
291
+ fileName: z.ZodString;
292
+ documentTitle: z.ZodString;
293
+ authorityTier: z.ZodNullable<z.ZodUnion<[
294
+ z.ZodLiteral<1>,
295
+ z.ZodLiteral<2>,
296
+ z.ZodLiteral<3>,
297
+ z.ZodLiteral<4>,
298
+ z.ZodLiteral<5>
299
+ ]>>;
300
+ validFrom: z.ZodNullable<z.ZodString>;
301
+ validUntil: z.ZodNullable<z.ZodString>;
302
+ isCurrentlyAuthoritative: z.ZodBoolean;
303
+ confidentialityLevel: z.ZodEnum<[
304
+ "PUBLIC",
305
+ "INTERNAL",
306
+ "DEPARTMENT",
307
+ "CONFIDENTIAL",
308
+ "RESTRICTED"
309
+ ]>;
310
+ snippets: z.ZodArray<z.ZodObject<{
311
+ text: z.ZodString;
312
+ citationText: z.ZodString;
313
+ chunkHash: z.ZodString;
314
+ chunkIndex: z.ZodNumber;
315
+ parentChunkUid: z.ZodOptional<z.ZodString>;
316
+ clauseIdentifier: z.ZodOptional<z.ZodString>;
317
+ breadcrumbPath: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
318
+ page: z.ZodOptional<z.ZodNumber>;
319
+ sheetName: z.ZodOptional<z.ZodString>;
320
+ slideIndex: z.ZodOptional<z.ZodNumber>;
321
+ timestampSec: z.ZodOptional<z.ZodNumber>;
322
+ score: z.ZodNumber;
323
+ }, "strip", z.ZodTypeAny, {
324
+ text: string;
325
+ citationText: string;
326
+ chunkHash: string;
327
+ chunkIndex: number;
328
+ score: number;
329
+ parentChunkUid?: string | undefined;
330
+ clauseIdentifier?: string | undefined;
331
+ breadcrumbPath?: string[] | undefined;
332
+ page?: number | undefined;
333
+ sheetName?: string | undefined;
334
+ slideIndex?: number | undefined;
335
+ timestampSec?: number | undefined;
336
+ }, {
337
+ text: string;
338
+ citationText: string;
339
+ chunkHash: string;
340
+ chunkIndex: number;
341
+ score: number;
342
+ parentChunkUid?: string | undefined;
343
+ clauseIdentifier?: string | undefined;
344
+ breadcrumbPath?: string[] | undefined;
345
+ page?: number | undefined;
346
+ sheetName?: string | undefined;
347
+ slideIndex?: number | undefined;
348
+ timestampSec?: number | undefined;
349
+ }>, "many">;
350
+ relatedDecisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
351
+ decisionId: z.ZodString;
352
+ title: z.ZodString;
353
+ approvedBy: z.ZodString;
354
+ }, "strip", z.ZodTypeAny, {
355
+ decisionId: string;
356
+ title: string;
357
+ approvedBy: string;
358
+ }, {
359
+ decisionId: string;
360
+ title: string;
361
+ approvedBy: string;
362
+ }>, "many">>;
363
+ policyWarning: z.ZodOptional<z.ZodString>;
364
+ }, "strip", z.ZodTypeAny, {
365
+ metadataId: number;
366
+ fileUri: string;
367
+ fileName: string;
368
+ documentTitle: string;
369
+ authorityTier: 1 | 2 | 3 | 4 | 5 | null;
370
+ validFrom: string | null;
371
+ validUntil: string | null;
372
+ isCurrentlyAuthoritative: boolean;
373
+ confidentialityLevel: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
374
+ snippets: {
375
+ text: string;
376
+ citationText: string;
377
+ chunkHash: string;
378
+ chunkIndex: number;
379
+ score: number;
380
+ parentChunkUid?: string | undefined;
381
+ clauseIdentifier?: string | undefined;
382
+ breadcrumbPath?: string[] | undefined;
383
+ page?: number | undefined;
384
+ sheetName?: string | undefined;
385
+ slideIndex?: number | undefined;
386
+ timestampSec?: number | undefined;
387
+ }[];
388
+ relatedDecisions?: {
389
+ decisionId: string;
390
+ title: string;
391
+ approvedBy: string;
392
+ }[] | undefined;
393
+ policyWarning?: string | undefined;
394
+ }, {
395
+ metadataId: number;
396
+ fileUri: string;
397
+ fileName: string;
398
+ documentTitle: string;
399
+ authorityTier: 1 | 2 | 3 | 4 | 5 | null;
400
+ validFrom: string | null;
401
+ validUntil: string | null;
402
+ isCurrentlyAuthoritative: boolean;
403
+ confidentialityLevel: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
404
+ snippets: {
405
+ text: string;
406
+ citationText: string;
407
+ chunkHash: string;
408
+ chunkIndex: number;
409
+ score: number;
410
+ parentChunkUid?: string | undefined;
411
+ clauseIdentifier?: string | undefined;
412
+ breadcrumbPath?: string[] | undefined;
413
+ page?: number | undefined;
414
+ sheetName?: string | undefined;
415
+ slideIndex?: number | undefined;
416
+ timestampSec?: number | undefined;
417
+ }[];
418
+ relatedDecisions?: {
419
+ decisionId: string;
420
+ title: string;
421
+ approvedBy: string;
422
+ }[] | undefined;
423
+ policyWarning?: string | undefined;
424
+ }>, "many">;
425
+ tiers: z.ZodObject<{
426
+ sql: z.ZodBoolean;
427
+ vector: z.ZodBoolean;
428
+ graph: z.ZodBoolean;
429
+ }, "strip", z.ZodTypeAny, {
430
+ sql: boolean;
431
+ vector: boolean;
432
+ graph: boolean;
433
+ }, {
434
+ sql: boolean;
435
+ vector: boolean;
436
+ graph: boolean;
437
+ }>;
438
+ masked: z.ZodBoolean;
439
+ searchMetadata: z.ZodObject<{
440
+ searchMode: z.ZodEnum<[
441
+ "tri_store",
442
+ "sql_vector",
443
+ "sql_keyword_degraded"
444
+ ]>;
445
+ qualityTier: z.ZodEnum<[
446
+ "HIGH_TRI_STORE",
447
+ "STANDARD_SEMANTIC",
448
+ "DEGRADED_KEYWORD_ONLY"
449
+ ]>;
450
+ isDegraded: z.ZodBoolean;
451
+ degradationReason: z.ZodNullable<z.ZodString>;
452
+ circuitBreakerStatus: z.ZodRecord<z.ZodString, z.ZodEnum<[
453
+ "CLOSED",
454
+ "OPEN",
455
+ "HALF_OPEN",
456
+ "HEALTHY"
457
+ ]>>;
458
+ executionTimeMs: z.ZodNumber;
459
+ }, "strip", z.ZodTypeAny, {
460
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
461
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
462
+ isDegraded: boolean;
463
+ degradationReason: string | null;
464
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
465
+ executionTimeMs: number;
466
+ }, {
467
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
468
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
469
+ isDegraded: boolean;
470
+ degradationReason: string | null;
471
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
472
+ executionTimeMs: number;
473
+ }>;
474
+ }, "strip", z.ZodTypeAny, {
475
+ hits: {
476
+ metadataId: number;
477
+ fileUri: string;
478
+ fileName: string;
479
+ documentTitle: string;
480
+ authorityTier: 1 | 2 | 3 | 4 | 5 | null;
481
+ validFrom: string | null;
482
+ validUntil: string | null;
483
+ isCurrentlyAuthoritative: boolean;
484
+ confidentialityLevel: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
485
+ snippets: {
486
+ text: string;
487
+ citationText: string;
488
+ chunkHash: string;
489
+ chunkIndex: number;
490
+ score: number;
491
+ parentChunkUid?: string | undefined;
492
+ clauseIdentifier?: string | undefined;
493
+ breadcrumbPath?: string[] | undefined;
494
+ page?: number | undefined;
495
+ sheetName?: string | undefined;
496
+ slideIndex?: number | undefined;
497
+ timestampSec?: number | undefined;
498
+ }[];
499
+ relatedDecisions?: {
500
+ decisionId: string;
501
+ title: string;
502
+ approvedBy: string;
503
+ }[] | undefined;
504
+ policyWarning?: string | undefined;
505
+ }[];
506
+ tiers: {
507
+ sql: boolean;
508
+ vector: boolean;
509
+ graph: boolean;
510
+ };
511
+ masked: boolean;
512
+ searchMetadata: {
513
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
514
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
515
+ isDegraded: boolean;
516
+ degradationReason: string | null;
517
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
518
+ executionTimeMs: number;
519
+ };
520
+ }, {
521
+ hits: {
522
+ metadataId: number;
523
+ fileUri: string;
524
+ fileName: string;
525
+ documentTitle: string;
526
+ authorityTier: 1 | 2 | 3 | 4 | 5 | null;
527
+ validFrom: string | null;
528
+ validUntil: string | null;
529
+ isCurrentlyAuthoritative: boolean;
530
+ confidentialityLevel: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
531
+ snippets: {
532
+ text: string;
533
+ citationText: string;
534
+ chunkHash: string;
535
+ chunkIndex: number;
536
+ score: number;
537
+ parentChunkUid?: string | undefined;
538
+ clauseIdentifier?: string | undefined;
539
+ breadcrumbPath?: string[] | undefined;
540
+ page?: number | undefined;
541
+ sheetName?: string | undefined;
542
+ slideIndex?: number | undefined;
543
+ timestampSec?: number | undefined;
544
+ }[];
545
+ relatedDecisions?: {
546
+ decisionId: string;
547
+ title: string;
548
+ approvedBy: string;
549
+ }[] | undefined;
550
+ policyWarning?: string | undefined;
551
+ }[];
552
+ tiers: {
553
+ sql: boolean;
554
+ vector: boolean;
555
+ graph: boolean;
556
+ };
557
+ masked: boolean;
558
+ searchMetadata: {
559
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
560
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
561
+ isDegraded: boolean;
562
+ degradationReason: string | null;
563
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
564
+ executionTimeMs: number;
565
+ };
566
+ }>;
567
+ type GovernanceSearchResponse = z.infer<typeof GovernanceSearchResponseSchema>;
568
+ declare const GovernanceAnswerRequestSchema: z.ZodObject<{
569
+ question: z.ZodString;
570
+ asOf: z.ZodOptional<z.ZodString>;
571
+ asOfTx: z.ZodOptional<z.ZodString>;
572
+ }, "strip", z.ZodTypeAny, {
573
+ question: string;
574
+ asOf?: string | undefined;
575
+ asOfTx?: string | undefined;
576
+ }, {
577
+ question: string;
578
+ asOf?: string | undefined;
579
+ asOfTx?: string | undefined;
580
+ }>;
581
+ type GovernanceAnswerRequestInput = z.input<typeof GovernanceAnswerRequestSchema>;
582
+ type GovernanceAnswerRequest = z.infer<typeof GovernanceAnswerRequestSchema>;
583
+ declare const AuthoritativeSourceSchema: z.ZodObject<{
584
+ metadataId: z.ZodNumber;
585
+ documentTitle: z.ZodString;
586
+ authorityTier: z.ZodUnion<[
587
+ z.ZodLiteral<1>,
588
+ z.ZodLiteral<2>,
589
+ z.ZodLiteral<3>,
590
+ z.ZodLiteral<4>,
591
+ z.ZodLiteral<5>
592
+ ]>;
593
+ approvalStatus: z.ZodEnum<[
594
+ "DRAFT",
595
+ "APPROVED",
596
+ "DEPRECATED"
597
+ ]>;
598
+ validFrom: z.ZodString;
599
+ validUntil: z.ZodNullable<z.ZodString>;
600
+ isCurrentlyAuthoritative: z.ZodBoolean;
601
+ }, "strip", z.ZodTypeAny, {
602
+ metadataId: number;
603
+ documentTitle: string;
604
+ authorityTier: 1 | 2 | 3 | 4 | 5;
605
+ validFrom: string;
606
+ validUntil: string | null;
607
+ isCurrentlyAuthoritative: boolean;
608
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
609
+ }, {
610
+ metadataId: number;
611
+ documentTitle: string;
612
+ authorityTier: 1 | 2 | 3 | 4 | 5;
613
+ validFrom: string;
614
+ validUntil: string | null;
615
+ isCurrentlyAuthoritative: boolean;
616
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
617
+ }>;
618
+ type AuthoritativeSource = z.infer<typeof AuthoritativeSourceSchema>;
619
+ declare const PolicyConflictRefSchema: z.ZodObject<{
620
+ conflictId: z.ZodNumber;
621
+ sourceMetadataId: z.ZodNumber;
622
+ targetMetadataId: z.ZodNumber;
623
+ conflictSummary: z.ZodString;
624
+ severity: z.ZodEnum<[
625
+ "LOW",
626
+ "MEDIUM",
627
+ "HIGH",
628
+ "CRITICAL"
629
+ ]>;
630
+ resolutionStatus: z.ZodEnum<[
631
+ "OPEN",
632
+ "IN_REVIEW",
633
+ "RESOLVED"
634
+ ]>;
635
+ }, "strip", z.ZodTypeAny, {
636
+ conflictId: number;
637
+ sourceMetadataId: number;
638
+ targetMetadataId: number;
639
+ conflictSummary: string;
640
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
641
+ resolutionStatus: "OPEN" | "IN_REVIEW" | "RESOLVED";
642
+ }, {
643
+ conflictId: number;
644
+ sourceMetadataId: number;
645
+ targetMetadataId: number;
646
+ conflictSummary: string;
647
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
648
+ resolutionStatus: "OPEN" | "IN_REVIEW" | "RESOLVED";
649
+ }>;
650
+ type PolicyConflictRef = z.infer<typeof PolicyConflictRefSchema>;
651
+ declare const VerifiedCitationSchema: z.ZodObject<{
652
+ chunkUid: z.ZodString;
653
+ metadataId: z.ZodNumber;
654
+ documentTitle: z.ZodString;
655
+ clauseIdentifier: z.ZodString;
656
+ breadcrumbPath: z.ZodArray<z.ZodString, "many">;
657
+ exactQuotedText: z.ZodString;
658
+ chunkHash: z.ZodString;
659
+ authorityTier: z.ZodUnion<[
660
+ z.ZodLiteral<1>,
661
+ z.ZodLiteral<2>,
662
+ z.ZodLiteral<3>,
663
+ z.ZodLiteral<4>,
664
+ z.ZodLiteral<5>
665
+ ]>;
666
+ isVerified: z.ZodBoolean;
667
+ }, "strip", z.ZodTypeAny, {
668
+ chunkHash: string;
669
+ clauseIdentifier: string;
670
+ breadcrumbPath: string[];
671
+ metadataId: number;
672
+ documentTitle: string;
673
+ authorityTier: 1 | 2 | 3 | 4 | 5;
674
+ chunkUid: string;
675
+ exactQuotedText: string;
676
+ isVerified: boolean;
677
+ }, {
678
+ chunkHash: string;
679
+ clauseIdentifier: string;
680
+ breadcrumbPath: string[];
681
+ metadataId: number;
682
+ documentTitle: string;
683
+ authorityTier: 1 | 2 | 3 | 4 | 5;
684
+ chunkUid: string;
685
+ exactQuotedText: string;
686
+ isVerified: boolean;
687
+ }>;
688
+ type VerifiedCitation = z.infer<typeof VerifiedCitationSchema>;
689
+ declare const Sha256HexSchema: z.ZodString;
690
+ type Sha256Hex = z.infer<typeof Sha256HexSchema>;
691
+ declare const CitationProofLeafSchema: z.ZodObject<{
692
+ chunkUid: z.ZodString;
693
+ chunkHash: z.ZodString;
694
+ }, "strip", z.ZodTypeAny, {
695
+ chunkHash: string;
696
+ chunkUid: string;
697
+ }, {
698
+ chunkHash: string;
699
+ chunkUid: string;
700
+ }>;
701
+ type CitationProofLeaf = z.infer<typeof CitationProofLeafSchema>;
702
+ declare const CitationProofSchema: z.ZodObject<{
703
+ algorithm: z.ZodLiteral<"SHA-256">;
704
+ merkleRoot: z.ZodString;
705
+ leafCount: z.ZodNumber;
706
+ leaves: z.ZodArray<z.ZodObject<{
707
+ chunkUid: z.ZodString;
708
+ chunkHash: z.ZodString;
709
+ }, "strip", z.ZodTypeAny, {
710
+ chunkHash: string;
711
+ chunkUid: string;
712
+ }, {
713
+ chunkHash: string;
714
+ chunkUid: string;
715
+ }>, "many">;
716
+ tenantId: z.ZodString;
717
+ scopeDigest: z.ZodString;
718
+ asOf: z.ZodString;
719
+ asOfTx: z.ZodString;
720
+ generatedAt: z.ZodString;
721
+ signature: z.ZodString;
722
+ }, "strip", z.ZodTypeAny, {
723
+ asOf: string;
724
+ asOfTx: string;
725
+ algorithm: "SHA-256";
726
+ merkleRoot: string;
727
+ leafCount: number;
728
+ leaves: {
729
+ chunkHash: string;
730
+ chunkUid: string;
731
+ }[];
732
+ tenantId: string;
733
+ scopeDigest: string;
734
+ generatedAt: string;
735
+ signature: string;
736
+ }, {
737
+ asOf: string;
738
+ asOfTx: string;
739
+ algorithm: "SHA-256";
740
+ merkleRoot: string;
741
+ leafCount: number;
742
+ leaves: {
743
+ chunkHash: string;
744
+ chunkUid: string;
745
+ }[];
746
+ tenantId: string;
747
+ scopeDigest: string;
748
+ generatedAt: string;
749
+ signature: string;
750
+ }>;
751
+ type CitationProof = z.infer<typeof CitationProofSchema>;
752
+ declare const GovernanceAnswerResponseSchema: z.ZodObject<{
753
+ answer: z.ZodString;
754
+ authoritative: z.ZodArray<z.ZodObject<{
755
+ metadataId: z.ZodNumber;
756
+ documentTitle: z.ZodString;
757
+ authorityTier: z.ZodUnion<[
758
+ z.ZodLiteral<1>,
759
+ z.ZodLiteral<2>,
760
+ z.ZodLiteral<3>,
761
+ z.ZodLiteral<4>,
762
+ z.ZodLiteral<5>
763
+ ]>;
764
+ approvalStatus: z.ZodEnum<[
765
+ "DRAFT",
766
+ "APPROVED",
767
+ "DEPRECATED"
768
+ ]>;
769
+ validFrom: z.ZodString;
770
+ validUntil: z.ZodNullable<z.ZodString>;
771
+ isCurrentlyAuthoritative: z.ZodBoolean;
772
+ }, "strip", z.ZodTypeAny, {
773
+ metadataId: number;
774
+ documentTitle: string;
775
+ authorityTier: 1 | 2 | 3 | 4 | 5;
776
+ validFrom: string;
777
+ validUntil: string | null;
778
+ isCurrentlyAuthoritative: boolean;
779
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
780
+ }, {
781
+ metadataId: number;
782
+ documentTitle: string;
783
+ authorityTier: 1 | 2 | 3 | 4 | 5;
784
+ validFrom: string;
785
+ validUntil: string | null;
786
+ isCurrentlyAuthoritative: boolean;
787
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
788
+ }>, "many">;
789
+ superseded: z.ZodArray<z.ZodObject<{
790
+ metadataId: z.ZodNumber;
791
+ documentTitle: z.ZodString;
792
+ authorityTier: z.ZodUnion<[
793
+ z.ZodLiteral<1>,
794
+ z.ZodLiteral<2>,
795
+ z.ZodLiteral<3>,
796
+ z.ZodLiteral<4>,
797
+ z.ZodLiteral<5>
798
+ ]>;
799
+ approvalStatus: z.ZodEnum<[
800
+ "DRAFT",
801
+ "APPROVED",
802
+ "DEPRECATED"
803
+ ]>;
804
+ validFrom: z.ZodString;
805
+ validUntil: z.ZodNullable<z.ZodString>;
806
+ isCurrentlyAuthoritative: z.ZodBoolean;
807
+ }, "strip", z.ZodTypeAny, {
808
+ metadataId: number;
809
+ documentTitle: string;
810
+ authorityTier: 1 | 2 | 3 | 4 | 5;
811
+ validFrom: string;
812
+ validUntil: string | null;
813
+ isCurrentlyAuthoritative: boolean;
814
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
815
+ }, {
816
+ metadataId: number;
817
+ documentTitle: string;
818
+ authorityTier: 1 | 2 | 3 | 4 | 5;
819
+ validFrom: string;
820
+ validUntil: string | null;
821
+ isCurrentlyAuthoritative: boolean;
822
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
823
+ }>, "many">;
824
+ conflicts: z.ZodArray<z.ZodObject<{
825
+ conflictId: z.ZodNumber;
826
+ sourceMetadataId: z.ZodNumber;
827
+ targetMetadataId: z.ZodNumber;
828
+ conflictSummary: z.ZodString;
829
+ severity: z.ZodEnum<[
830
+ "LOW",
831
+ "MEDIUM",
832
+ "HIGH",
833
+ "CRITICAL"
834
+ ]>;
835
+ resolutionStatus: z.ZodEnum<[
836
+ "OPEN",
837
+ "IN_REVIEW",
838
+ "RESOLVED"
839
+ ]>;
840
+ }, "strip", z.ZodTypeAny, {
841
+ conflictId: number;
842
+ sourceMetadataId: number;
843
+ targetMetadataId: number;
844
+ conflictSummary: string;
845
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
846
+ resolutionStatus: "OPEN" | "IN_REVIEW" | "RESOLVED";
847
+ }, {
848
+ conflictId: number;
849
+ sourceMetadataId: number;
850
+ targetMetadataId: number;
851
+ conflictSummary: string;
852
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
853
+ resolutionStatus: "OPEN" | "IN_REVIEW" | "RESOLVED";
854
+ }>, "many">;
855
+ verifiedCitations: z.ZodArray<z.ZodObject<{
856
+ chunkUid: z.ZodString;
857
+ metadataId: z.ZodNumber;
858
+ documentTitle: z.ZodString;
859
+ clauseIdentifier: z.ZodString;
860
+ breadcrumbPath: z.ZodArray<z.ZodString, "many">;
861
+ exactQuotedText: z.ZodString;
862
+ chunkHash: z.ZodString;
863
+ authorityTier: z.ZodUnion<[
864
+ z.ZodLiteral<1>,
865
+ z.ZodLiteral<2>,
866
+ z.ZodLiteral<3>,
867
+ z.ZodLiteral<4>,
868
+ z.ZodLiteral<5>
869
+ ]>;
870
+ isVerified: z.ZodBoolean;
871
+ }, "strip", z.ZodTypeAny, {
872
+ chunkHash: string;
873
+ clauseIdentifier: string;
874
+ breadcrumbPath: string[];
875
+ metadataId: number;
876
+ documentTitle: string;
877
+ authorityTier: 1 | 2 | 3 | 4 | 5;
878
+ chunkUid: string;
879
+ exactQuotedText: string;
880
+ isVerified: boolean;
881
+ }, {
882
+ chunkHash: string;
883
+ clauseIdentifier: string;
884
+ breadcrumbPath: string[];
885
+ metadataId: number;
886
+ documentTitle: string;
887
+ authorityTier: 1 | 2 | 3 | 4 | 5;
888
+ chunkUid: string;
889
+ exactQuotedText: string;
890
+ isVerified: boolean;
891
+ }>, "many">;
892
+ citationProof: z.ZodNullable<z.ZodObject<{
893
+ algorithm: z.ZodLiteral<"SHA-256">;
894
+ merkleRoot: z.ZodString;
895
+ leafCount: z.ZodNumber;
896
+ leaves: z.ZodArray<z.ZodObject<{
897
+ chunkUid: z.ZodString;
898
+ chunkHash: z.ZodString;
899
+ }, "strip", z.ZodTypeAny, {
900
+ chunkHash: string;
901
+ chunkUid: string;
902
+ }, {
903
+ chunkHash: string;
904
+ chunkUid: string;
905
+ }>, "many">;
906
+ tenantId: z.ZodString;
907
+ scopeDigest: z.ZodString;
908
+ asOf: z.ZodString;
909
+ asOfTx: z.ZodString;
910
+ generatedAt: z.ZodString;
911
+ signature: z.ZodString;
912
+ }, "strip", z.ZodTypeAny, {
913
+ asOf: string;
914
+ asOfTx: string;
915
+ algorithm: "SHA-256";
916
+ merkleRoot: string;
917
+ leafCount: number;
918
+ leaves: {
919
+ chunkHash: string;
920
+ chunkUid: string;
921
+ }[];
922
+ tenantId: string;
923
+ scopeDigest: string;
924
+ generatedAt: string;
925
+ signature: string;
926
+ }, {
927
+ asOf: string;
928
+ asOfTx: string;
929
+ algorithm: "SHA-256";
930
+ merkleRoot: string;
931
+ leafCount: number;
932
+ leaves: {
933
+ chunkHash: string;
934
+ chunkUid: string;
935
+ }[];
936
+ tenantId: string;
937
+ scopeDigest: string;
938
+ generatedAt: string;
939
+ signature: string;
940
+ }>>;
941
+ isFullyGrounded: z.ZodBoolean;
942
+ requiresHumanArbitration: z.ZodBoolean;
943
+ tiers: z.ZodObject<{
944
+ sql: z.ZodBoolean;
945
+ vector: z.ZodBoolean;
946
+ graph: z.ZodBoolean;
947
+ }, "strip", z.ZodTypeAny, {
948
+ sql: boolean;
949
+ vector: boolean;
950
+ graph: boolean;
951
+ }, {
952
+ sql: boolean;
953
+ vector: boolean;
954
+ graph: boolean;
955
+ }>;
956
+ searchMetadata: z.ZodObject<{
957
+ searchMode: z.ZodEnum<[
958
+ "tri_store",
959
+ "sql_vector",
960
+ "sql_keyword_degraded"
961
+ ]>;
962
+ qualityTier: z.ZodEnum<[
963
+ "HIGH_TRI_STORE",
964
+ "STANDARD_SEMANTIC",
965
+ "DEGRADED_KEYWORD_ONLY"
966
+ ]>;
967
+ isDegraded: z.ZodBoolean;
968
+ degradationReason: z.ZodNullable<z.ZodString>;
969
+ circuitBreakerStatus: z.ZodRecord<z.ZodString, z.ZodEnum<[
970
+ "CLOSED",
971
+ "OPEN",
972
+ "HALF_OPEN",
973
+ "HEALTHY"
974
+ ]>>;
975
+ executionTimeMs: z.ZodNumber;
976
+ }, "strip", z.ZodTypeAny, {
977
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
978
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
979
+ isDegraded: boolean;
980
+ degradationReason: string | null;
981
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
982
+ executionTimeMs: number;
983
+ }, {
984
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
985
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
986
+ isDegraded: boolean;
987
+ degradationReason: string | null;
988
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
989
+ executionTimeMs: number;
990
+ }>;
991
+ }, "strip", z.ZodTypeAny, {
992
+ tiers: {
993
+ sql: boolean;
994
+ vector: boolean;
995
+ graph: boolean;
996
+ };
997
+ searchMetadata: {
998
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
999
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
1000
+ isDegraded: boolean;
1001
+ degradationReason: string | null;
1002
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
1003
+ executionTimeMs: number;
1004
+ };
1005
+ answer: string;
1006
+ authoritative: {
1007
+ metadataId: number;
1008
+ documentTitle: string;
1009
+ authorityTier: 1 | 2 | 3 | 4 | 5;
1010
+ validFrom: string;
1011
+ validUntil: string | null;
1012
+ isCurrentlyAuthoritative: boolean;
1013
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
1014
+ }[];
1015
+ superseded: {
1016
+ metadataId: number;
1017
+ documentTitle: string;
1018
+ authorityTier: 1 | 2 | 3 | 4 | 5;
1019
+ validFrom: string;
1020
+ validUntil: string | null;
1021
+ isCurrentlyAuthoritative: boolean;
1022
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
1023
+ }[];
1024
+ conflicts: {
1025
+ conflictId: number;
1026
+ sourceMetadataId: number;
1027
+ targetMetadataId: number;
1028
+ conflictSummary: string;
1029
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
1030
+ resolutionStatus: "OPEN" | "IN_REVIEW" | "RESOLVED";
1031
+ }[];
1032
+ verifiedCitations: {
1033
+ chunkHash: string;
1034
+ clauseIdentifier: string;
1035
+ breadcrumbPath: string[];
1036
+ metadataId: number;
1037
+ documentTitle: string;
1038
+ authorityTier: 1 | 2 | 3 | 4 | 5;
1039
+ chunkUid: string;
1040
+ exactQuotedText: string;
1041
+ isVerified: boolean;
1042
+ }[];
1043
+ citationProof: {
1044
+ asOf: string;
1045
+ asOfTx: string;
1046
+ algorithm: "SHA-256";
1047
+ merkleRoot: string;
1048
+ leafCount: number;
1049
+ leaves: {
1050
+ chunkHash: string;
1051
+ chunkUid: string;
1052
+ }[];
1053
+ tenantId: string;
1054
+ scopeDigest: string;
1055
+ generatedAt: string;
1056
+ signature: string;
1057
+ } | null;
1058
+ isFullyGrounded: boolean;
1059
+ requiresHumanArbitration: boolean;
1060
+ }, {
1061
+ tiers: {
1062
+ sql: boolean;
1063
+ vector: boolean;
1064
+ graph: boolean;
1065
+ };
1066
+ searchMetadata: {
1067
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
1068
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
1069
+ isDegraded: boolean;
1070
+ degradationReason: string | null;
1071
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
1072
+ executionTimeMs: number;
1073
+ };
1074
+ answer: string;
1075
+ authoritative: {
1076
+ metadataId: number;
1077
+ documentTitle: string;
1078
+ authorityTier: 1 | 2 | 3 | 4 | 5;
1079
+ validFrom: string;
1080
+ validUntil: string | null;
1081
+ isCurrentlyAuthoritative: boolean;
1082
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
1083
+ }[];
1084
+ superseded: {
1085
+ metadataId: number;
1086
+ documentTitle: string;
1087
+ authorityTier: 1 | 2 | 3 | 4 | 5;
1088
+ validFrom: string;
1089
+ validUntil: string | null;
1090
+ isCurrentlyAuthoritative: boolean;
1091
+ approvalStatus: "DRAFT" | "APPROVED" | "DEPRECATED";
1092
+ }[];
1093
+ conflicts: {
1094
+ conflictId: number;
1095
+ sourceMetadataId: number;
1096
+ targetMetadataId: number;
1097
+ conflictSummary: string;
1098
+ severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
1099
+ resolutionStatus: "OPEN" | "IN_REVIEW" | "RESOLVED";
1100
+ }[];
1101
+ verifiedCitations: {
1102
+ chunkHash: string;
1103
+ clauseIdentifier: string;
1104
+ breadcrumbPath: string[];
1105
+ metadataId: number;
1106
+ documentTitle: string;
1107
+ authorityTier: 1 | 2 | 3 | 4 | 5;
1108
+ chunkUid: string;
1109
+ exactQuotedText: string;
1110
+ isVerified: boolean;
1111
+ }[];
1112
+ citationProof: {
1113
+ asOf: string;
1114
+ asOfTx: string;
1115
+ algorithm: "SHA-256";
1116
+ merkleRoot: string;
1117
+ leafCount: number;
1118
+ leaves: {
1119
+ chunkHash: string;
1120
+ chunkUid: string;
1121
+ }[];
1122
+ tenantId: string;
1123
+ scopeDigest: string;
1124
+ generatedAt: string;
1125
+ signature: string;
1126
+ } | null;
1127
+ isFullyGrounded: boolean;
1128
+ requiresHumanArbitration: boolean;
1129
+ }>;
1130
+ type GovernanceAnswerResponse = z.infer<typeof GovernanceAnswerResponseSchema>;
1131
+ declare const GovernanceSimulateRequestSchema: z.ZodObject<{
1132
+ promptOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1133
+ parameterOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[
1134
+ z.ZodString,
1135
+ z.ZodNumber,
1136
+ z.ZodBoolean
1137
+ ]>>>;
1138
+ strategyOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[
1139
+ z.ZodString,
1140
+ z.ZodNumber,
1141
+ z.ZodBoolean
1142
+ ]>>>>;
1143
+ intentTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<[
1144
+ "SET",
1145
+ "DIFF",
1146
+ "PATH",
1147
+ "NEGATION",
1148
+ "COUNT"
1149
+ ]>, "many">>;
1150
+ }, "strip", z.ZodTypeAny, {
1151
+ promptOverrides?: Record<string, string> | undefined;
1152
+ parameterOverrides?: Record<string, string | number | boolean> | undefined;
1153
+ strategyOverrides?: Record<string, Record<string, string | number | boolean>> | undefined;
1154
+ intentTypes?: ("SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT")[] | undefined;
1155
+ }, {
1156
+ promptOverrides?: Record<string, string> | undefined;
1157
+ parameterOverrides?: Record<string, string | number | boolean> | undefined;
1158
+ strategyOverrides?: Record<string, Record<string, string | number | boolean>> | undefined;
1159
+ intentTypes?: ("SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT")[] | undefined;
1160
+ }>;
1161
+ type GovernanceSimulateRequestInput = z.input<typeof GovernanceSimulateRequestSchema>;
1162
+ type GovernanceSimulateRequest = z.infer<typeof GovernanceSimulateRequestSchema>;
1163
+ declare const NormalizedScoreSchema: z.ZodNumber;
1164
+ type NormalizedScore = z.infer<typeof NormalizedScoreSchema>;
1165
+ declare const GovernanceSimulateCaseScoresSchema: z.ZodObject<{
1166
+ contextRelevance: z.ZodNumber;
1167
+ groundedness: z.ZodNumber;
1168
+ answerRelevance: z.ZodNumber;
1169
+ }, "strip", z.ZodTypeAny, {
1170
+ contextRelevance: number;
1171
+ groundedness: number;
1172
+ answerRelevance: number;
1173
+ }, {
1174
+ contextRelevance: number;
1175
+ groundedness: number;
1176
+ answerRelevance: number;
1177
+ }>;
1178
+ type GovernanceSimulateCaseScores = z.infer<typeof GovernanceSimulateCaseScoresSchema>;
1179
+ declare const GovernanceSimulateScoresSchema: z.ZodObject<{
1180
+ contextRelevance: z.ZodNumber;
1181
+ groundedness: z.ZodNumber;
1182
+ answerRelevance: z.ZodNumber;
1183
+ } & {
1184
+ meanAnswerChars: z.ZodNumber;
1185
+ meanLatencyMs: z.ZodNumber;
1186
+ }, "strip", z.ZodTypeAny, {
1187
+ contextRelevance: number;
1188
+ groundedness: number;
1189
+ answerRelevance: number;
1190
+ meanAnswerChars: number;
1191
+ meanLatencyMs: number;
1192
+ }, {
1193
+ contextRelevance: number;
1194
+ groundedness: number;
1195
+ answerRelevance: number;
1196
+ meanAnswerChars: number;
1197
+ meanLatencyMs: number;
1198
+ }>;
1199
+ type GovernanceSimulateScores = z.infer<typeof GovernanceSimulateScoresSchema>;
1200
+ declare const GovernanceSimulateCaseDiffSchema: z.ZodObject<{
1201
+ caseId: z.ZodString;
1202
+ intentType: z.ZodEnum<[
1203
+ "SET",
1204
+ "DIFF",
1205
+ "PATH",
1206
+ "NEGATION",
1207
+ "COUNT"
1208
+ ]>;
1209
+ beforeScores: z.ZodObject<{
1210
+ contextRelevance: z.ZodNumber;
1211
+ groundedness: z.ZodNumber;
1212
+ answerRelevance: z.ZodNumber;
1213
+ }, "strip", z.ZodTypeAny, {
1214
+ contextRelevance: number;
1215
+ groundedness: number;
1216
+ answerRelevance: number;
1217
+ }, {
1218
+ contextRelevance: number;
1219
+ groundedness: number;
1220
+ answerRelevance: number;
1221
+ }>;
1222
+ afterScores: z.ZodObject<{
1223
+ contextRelevance: z.ZodNumber;
1224
+ groundedness: z.ZodNumber;
1225
+ answerRelevance: z.ZodNumber;
1226
+ }, "strip", z.ZodTypeAny, {
1227
+ contextRelevance: number;
1228
+ groundedness: number;
1229
+ answerRelevance: number;
1230
+ }, {
1231
+ contextRelevance: number;
1232
+ groundedness: number;
1233
+ answerRelevance: number;
1234
+ }>;
1235
+ }, "strip", z.ZodTypeAny, {
1236
+ caseId: string;
1237
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1238
+ beforeScores: {
1239
+ contextRelevance: number;
1240
+ groundedness: number;
1241
+ answerRelevance: number;
1242
+ };
1243
+ afterScores: {
1244
+ contextRelevance: number;
1245
+ groundedness: number;
1246
+ answerRelevance: number;
1247
+ };
1248
+ }, {
1249
+ caseId: string;
1250
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1251
+ beforeScores: {
1252
+ contextRelevance: number;
1253
+ groundedness: number;
1254
+ answerRelevance: number;
1255
+ };
1256
+ afterScores: {
1257
+ contextRelevance: number;
1258
+ groundedness: number;
1259
+ answerRelevance: number;
1260
+ };
1261
+ }>;
1262
+ type GovernanceSimulateCaseDiff = z.infer<typeof GovernanceSimulateCaseDiffSchema>;
1263
+ declare const GovernanceSimulateResponseSchema: z.ZodObject<{
1264
+ simulationId: z.ZodString;
1265
+ evaluatedCount: z.ZodNumber;
1266
+ before: z.ZodObject<{
1267
+ contextRelevance: z.ZodNumber;
1268
+ groundedness: z.ZodNumber;
1269
+ answerRelevance: z.ZodNumber;
1270
+ } & {
1271
+ meanAnswerChars: z.ZodNumber;
1272
+ meanLatencyMs: z.ZodNumber;
1273
+ }, "strip", z.ZodTypeAny, {
1274
+ contextRelevance: number;
1275
+ groundedness: number;
1276
+ answerRelevance: number;
1277
+ meanAnswerChars: number;
1278
+ meanLatencyMs: number;
1279
+ }, {
1280
+ contextRelevance: number;
1281
+ groundedness: number;
1282
+ answerRelevance: number;
1283
+ meanAnswerChars: number;
1284
+ meanLatencyMs: number;
1285
+ }>;
1286
+ after: z.ZodObject<{
1287
+ contextRelevance: z.ZodNumber;
1288
+ groundedness: z.ZodNumber;
1289
+ answerRelevance: z.ZodNumber;
1290
+ } & {
1291
+ meanAnswerChars: z.ZodNumber;
1292
+ meanLatencyMs: z.ZodNumber;
1293
+ }, "strip", z.ZodTypeAny, {
1294
+ contextRelevance: number;
1295
+ groundedness: number;
1296
+ answerRelevance: number;
1297
+ meanAnswerChars: number;
1298
+ meanLatencyMs: number;
1299
+ }, {
1300
+ contextRelevance: number;
1301
+ groundedness: number;
1302
+ answerRelevance: number;
1303
+ meanAnswerChars: number;
1304
+ meanLatencyMs: number;
1305
+ }>;
1306
+ delta: z.ZodObject<{
1307
+ contextRelevance: z.ZodNumber;
1308
+ groundedness: z.ZodNumber;
1309
+ answerRelevance: z.ZodNumber;
1310
+ } & {
1311
+ meanAnswerChars: z.ZodNumber;
1312
+ meanLatencyMs: z.ZodNumber;
1313
+ }, "strip", z.ZodTypeAny, {
1314
+ contextRelevance: number;
1315
+ groundedness: number;
1316
+ answerRelevance: number;
1317
+ meanAnswerChars: number;
1318
+ meanLatencyMs: number;
1319
+ }, {
1320
+ contextRelevance: number;
1321
+ groundedness: number;
1322
+ answerRelevance: number;
1323
+ meanAnswerChars: number;
1324
+ meanLatencyMs: number;
1325
+ }>;
1326
+ regressions: z.ZodArray<z.ZodObject<{
1327
+ caseId: z.ZodString;
1328
+ intentType: z.ZodEnum<[
1329
+ "SET",
1330
+ "DIFF",
1331
+ "PATH",
1332
+ "NEGATION",
1333
+ "COUNT"
1334
+ ]>;
1335
+ beforeScores: z.ZodObject<{
1336
+ contextRelevance: z.ZodNumber;
1337
+ groundedness: z.ZodNumber;
1338
+ answerRelevance: z.ZodNumber;
1339
+ }, "strip", z.ZodTypeAny, {
1340
+ contextRelevance: number;
1341
+ groundedness: number;
1342
+ answerRelevance: number;
1343
+ }, {
1344
+ contextRelevance: number;
1345
+ groundedness: number;
1346
+ answerRelevance: number;
1347
+ }>;
1348
+ afterScores: z.ZodObject<{
1349
+ contextRelevance: z.ZodNumber;
1350
+ groundedness: z.ZodNumber;
1351
+ answerRelevance: z.ZodNumber;
1352
+ }, "strip", z.ZodTypeAny, {
1353
+ contextRelevance: number;
1354
+ groundedness: number;
1355
+ answerRelevance: number;
1356
+ }, {
1357
+ contextRelevance: number;
1358
+ groundedness: number;
1359
+ answerRelevance: number;
1360
+ }>;
1361
+ }, "strip", z.ZodTypeAny, {
1362
+ caseId: string;
1363
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1364
+ beforeScores: {
1365
+ contextRelevance: number;
1366
+ groundedness: number;
1367
+ answerRelevance: number;
1368
+ };
1369
+ afterScores: {
1370
+ contextRelevance: number;
1371
+ groundedness: number;
1372
+ answerRelevance: number;
1373
+ };
1374
+ }, {
1375
+ caseId: string;
1376
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1377
+ beforeScores: {
1378
+ contextRelevance: number;
1379
+ groundedness: number;
1380
+ answerRelevance: number;
1381
+ };
1382
+ afterScores: {
1383
+ contextRelevance: number;
1384
+ groundedness: number;
1385
+ answerRelevance: number;
1386
+ };
1387
+ }>, "many">;
1388
+ improvements: z.ZodArray<z.ZodObject<{
1389
+ caseId: z.ZodString;
1390
+ intentType: z.ZodEnum<[
1391
+ "SET",
1392
+ "DIFF",
1393
+ "PATH",
1394
+ "NEGATION",
1395
+ "COUNT"
1396
+ ]>;
1397
+ beforeScores: z.ZodObject<{
1398
+ contextRelevance: z.ZodNumber;
1399
+ groundedness: z.ZodNumber;
1400
+ answerRelevance: z.ZodNumber;
1401
+ }, "strip", z.ZodTypeAny, {
1402
+ contextRelevance: number;
1403
+ groundedness: number;
1404
+ answerRelevance: number;
1405
+ }, {
1406
+ contextRelevance: number;
1407
+ groundedness: number;
1408
+ answerRelevance: number;
1409
+ }>;
1410
+ afterScores: z.ZodObject<{
1411
+ contextRelevance: z.ZodNumber;
1412
+ groundedness: z.ZodNumber;
1413
+ answerRelevance: z.ZodNumber;
1414
+ }, "strip", z.ZodTypeAny, {
1415
+ contextRelevance: number;
1416
+ groundedness: number;
1417
+ answerRelevance: number;
1418
+ }, {
1419
+ contextRelevance: number;
1420
+ groundedness: number;
1421
+ answerRelevance: number;
1422
+ }>;
1423
+ }, "strip", z.ZodTypeAny, {
1424
+ caseId: string;
1425
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1426
+ beforeScores: {
1427
+ contextRelevance: number;
1428
+ groundedness: number;
1429
+ answerRelevance: number;
1430
+ };
1431
+ afterScores: {
1432
+ contextRelevance: number;
1433
+ groundedness: number;
1434
+ answerRelevance: number;
1435
+ };
1436
+ }, {
1437
+ caseId: string;
1438
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1439
+ beforeScores: {
1440
+ contextRelevance: number;
1441
+ groundedness: number;
1442
+ answerRelevance: number;
1443
+ };
1444
+ afterScores: {
1445
+ contextRelevance: number;
1446
+ groundedness: number;
1447
+ answerRelevance: number;
1448
+ };
1449
+ }>, "many">;
1450
+ searchMetadata: z.ZodObject<{
1451
+ searchMode: z.ZodEnum<[
1452
+ "tri_store",
1453
+ "sql_vector",
1454
+ "sql_keyword_degraded"
1455
+ ]>;
1456
+ qualityTier: z.ZodEnum<[
1457
+ "HIGH_TRI_STORE",
1458
+ "STANDARD_SEMANTIC",
1459
+ "DEGRADED_KEYWORD_ONLY"
1460
+ ]>;
1461
+ isDegraded: z.ZodBoolean;
1462
+ degradationReason: z.ZodNullable<z.ZodString>;
1463
+ circuitBreakerStatus: z.ZodRecord<z.ZodString, z.ZodEnum<[
1464
+ "CLOSED",
1465
+ "OPEN",
1466
+ "HALF_OPEN",
1467
+ "HEALTHY"
1468
+ ]>>;
1469
+ executionTimeMs: z.ZodNumber;
1470
+ }, "strip", z.ZodTypeAny, {
1471
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
1472
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
1473
+ isDegraded: boolean;
1474
+ degradationReason: string | null;
1475
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
1476
+ executionTimeMs: number;
1477
+ }, {
1478
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
1479
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
1480
+ isDegraded: boolean;
1481
+ degradationReason: string | null;
1482
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
1483
+ executionTimeMs: number;
1484
+ }>;
1485
+ }, "strip", z.ZodTypeAny, {
1486
+ searchMetadata: {
1487
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
1488
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
1489
+ isDegraded: boolean;
1490
+ degradationReason: string | null;
1491
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
1492
+ executionTimeMs: number;
1493
+ };
1494
+ simulationId: string;
1495
+ evaluatedCount: number;
1496
+ before: {
1497
+ contextRelevance: number;
1498
+ groundedness: number;
1499
+ answerRelevance: number;
1500
+ meanAnswerChars: number;
1501
+ meanLatencyMs: number;
1502
+ };
1503
+ after: {
1504
+ contextRelevance: number;
1505
+ groundedness: number;
1506
+ answerRelevance: number;
1507
+ meanAnswerChars: number;
1508
+ meanLatencyMs: number;
1509
+ };
1510
+ delta: {
1511
+ contextRelevance: number;
1512
+ groundedness: number;
1513
+ answerRelevance: number;
1514
+ meanAnswerChars: number;
1515
+ meanLatencyMs: number;
1516
+ };
1517
+ regressions: {
1518
+ caseId: string;
1519
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1520
+ beforeScores: {
1521
+ contextRelevance: number;
1522
+ groundedness: number;
1523
+ answerRelevance: number;
1524
+ };
1525
+ afterScores: {
1526
+ contextRelevance: number;
1527
+ groundedness: number;
1528
+ answerRelevance: number;
1529
+ };
1530
+ }[];
1531
+ improvements: {
1532
+ caseId: string;
1533
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1534
+ beforeScores: {
1535
+ contextRelevance: number;
1536
+ groundedness: number;
1537
+ answerRelevance: number;
1538
+ };
1539
+ afterScores: {
1540
+ contextRelevance: number;
1541
+ groundedness: number;
1542
+ answerRelevance: number;
1543
+ };
1544
+ }[];
1545
+ }, {
1546
+ searchMetadata: {
1547
+ searchMode: "tri_store" | "sql_vector" | "sql_keyword_degraded";
1548
+ qualityTier: "HIGH_TRI_STORE" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
1549
+ isDegraded: boolean;
1550
+ degradationReason: string | null;
1551
+ circuitBreakerStatus: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN" | "HEALTHY">;
1552
+ executionTimeMs: number;
1553
+ };
1554
+ simulationId: string;
1555
+ evaluatedCount: number;
1556
+ before: {
1557
+ contextRelevance: number;
1558
+ groundedness: number;
1559
+ answerRelevance: number;
1560
+ meanAnswerChars: number;
1561
+ meanLatencyMs: number;
1562
+ };
1563
+ after: {
1564
+ contextRelevance: number;
1565
+ groundedness: number;
1566
+ answerRelevance: number;
1567
+ meanAnswerChars: number;
1568
+ meanLatencyMs: number;
1569
+ };
1570
+ delta: {
1571
+ contextRelevance: number;
1572
+ groundedness: number;
1573
+ answerRelevance: number;
1574
+ meanAnswerChars: number;
1575
+ meanLatencyMs: number;
1576
+ };
1577
+ regressions: {
1578
+ caseId: string;
1579
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1580
+ beforeScores: {
1581
+ contextRelevance: number;
1582
+ groundedness: number;
1583
+ answerRelevance: number;
1584
+ };
1585
+ afterScores: {
1586
+ contextRelevance: number;
1587
+ groundedness: number;
1588
+ answerRelevance: number;
1589
+ };
1590
+ }[];
1591
+ improvements: {
1592
+ caseId: string;
1593
+ intentType: "SET" | "DIFF" | "PATH" | "NEGATION" | "COUNT";
1594
+ beforeScores: {
1595
+ contextRelevance: number;
1596
+ groundedness: number;
1597
+ answerRelevance: number;
1598
+ };
1599
+ afterScores: {
1600
+ contextRelevance: number;
1601
+ groundedness: number;
1602
+ answerRelevance: number;
1603
+ };
1604
+ }[];
1605
+ }>;
1606
+ type GovernanceSimulateResponse = z.infer<typeof GovernanceSimulateResponseSchema>;
1607
+ declare function sha256(data: Uint8Array): Uint8Array;
1608
+ declare function bytesToHex(bytes: Uint8Array): string;
1609
+ declare function constantTimeCompare(a: string, b: string): boolean;
1610
+ declare function computeCitationLeafHash(tenantId: string, chunkUid: string, chunkHash: string): Uint8Array;
1611
+ declare function computeCitationMerkleRoot(leaves: Uint8Array[]): string | null;
1612
+ interface CitationProofVerificationOptions {
1613
+ expectedTenantId?: string;
1614
+ expectedCitations?: {
1615
+ chunkUid: string;
1616
+ chunkHash: string;
1617
+ }[];
1618
+ }
1619
+ declare function verifyCitationProof(proof: CitationProof, options?: CitationProofVerificationOptions): boolean;
1620
+ declare class GovernanceClient extends BaseGovernanceClient {
1621
+ search(payload: GovernanceSearchRequestInput, tenantId?: string): Promise<GovernanceSearchResponse>;
1622
+ answer(payload: GovernanceAnswerRequestInput, tenantId?: string): Promise<GovernanceAnswerResponse>;
1623
+ verifyCitationProof(proof: CitationProof, options?: CitationProofVerificationOptions): boolean;
1624
+ }
1625
+ declare class GovernanceAdminClient extends BaseGovernanceClient {
1626
+ simulate(payload: GovernanceSimulateRequestInput, tenantId?: string): Promise<GovernanceSimulateResponse>;
1627
+ }
1628
+ declare const FeatureFlagKeySchema: z.ZodEnum<[
1629
+ "ENABLE_VECTOR_SEARCH",
1630
+ "ENABLE_VECTOR_INDEXING",
1631
+ "ENABLE_GRAPH_SEARCH",
1632
+ "ENABLE_GRAPH_INDEXING",
1633
+ "ENABLE_ASSET_EXTRACTION",
1634
+ "ENABLE_MEDIA_ANALYSIS",
1635
+ "ENABLE_DYNAMIC_CLASSIFIER_RULES",
1636
+ "ENABLE_SEMANTIC_CACHE",
1637
+ "ENABLE_CONTEXT_COMPRESSION",
1638
+ "ENABLE_MULTI_AGENT_SWARM",
1639
+ "ENABLE_AUTONOMOUS_ONTOLOGY",
1640
+ "ENABLE_MERKLE_CITATION_PROOF",
1641
+ "ENABLE_REALTIME_CDC_INGESTION",
1642
+ "ENABLE_COLPALI_IMAGE_INDEXING"
1643
+ ]>;
1644
+ type FeatureFlagKey = z.infer<typeof FeatureFlagKeySchema>;
1645
+ declare const SystemFeatureFlagDtoSchema: z.ZodObject<{
1646
+ tenantId: z.ZodString;
1647
+ flagKey: z.ZodEnum<[
1648
+ "ENABLE_VECTOR_SEARCH",
1649
+ "ENABLE_VECTOR_INDEXING",
1650
+ "ENABLE_GRAPH_SEARCH",
1651
+ "ENABLE_GRAPH_INDEXING",
1652
+ "ENABLE_ASSET_EXTRACTION",
1653
+ "ENABLE_MEDIA_ANALYSIS",
1654
+ "ENABLE_DYNAMIC_CLASSIFIER_RULES",
1655
+ "ENABLE_SEMANTIC_CACHE",
1656
+ "ENABLE_CONTEXT_COMPRESSION",
1657
+ "ENABLE_MULTI_AGENT_SWARM",
1658
+ "ENABLE_AUTONOMOUS_ONTOLOGY",
1659
+ "ENABLE_MERKLE_CITATION_PROOF",
1660
+ "ENABLE_REALTIME_CDC_INGESTION",
1661
+ "ENABLE_COLPALI_IMAGE_INDEXING"
1662
+ ]>;
1663
+ isEnabled: z.ZodBoolean;
1664
+ description: z.ZodString;
1665
+ updatedBy: z.ZodString;
1666
+ updatedAt: z.ZodString;
1667
+ }, "strip", z.ZodTypeAny, {
1668
+ tenantId: string;
1669
+ flagKey: "ENABLE_VECTOR_SEARCH" | "ENABLE_VECTOR_INDEXING" | "ENABLE_GRAPH_SEARCH" | "ENABLE_GRAPH_INDEXING" | "ENABLE_ASSET_EXTRACTION" | "ENABLE_MEDIA_ANALYSIS" | "ENABLE_DYNAMIC_CLASSIFIER_RULES" | "ENABLE_SEMANTIC_CACHE" | "ENABLE_CONTEXT_COMPRESSION" | "ENABLE_MULTI_AGENT_SWARM" | "ENABLE_AUTONOMOUS_ONTOLOGY" | "ENABLE_MERKLE_CITATION_PROOF" | "ENABLE_REALTIME_CDC_INGESTION" | "ENABLE_COLPALI_IMAGE_INDEXING";
1670
+ isEnabled: boolean;
1671
+ description: string;
1672
+ updatedBy: string;
1673
+ updatedAt: string;
1674
+ }, {
1675
+ tenantId: string;
1676
+ flagKey: "ENABLE_VECTOR_SEARCH" | "ENABLE_VECTOR_INDEXING" | "ENABLE_GRAPH_SEARCH" | "ENABLE_GRAPH_INDEXING" | "ENABLE_ASSET_EXTRACTION" | "ENABLE_MEDIA_ANALYSIS" | "ENABLE_DYNAMIC_CLASSIFIER_RULES" | "ENABLE_SEMANTIC_CACHE" | "ENABLE_CONTEXT_COMPRESSION" | "ENABLE_MULTI_AGENT_SWARM" | "ENABLE_AUTONOMOUS_ONTOLOGY" | "ENABLE_MERKLE_CITATION_PROOF" | "ENABLE_REALTIME_CDC_INGESTION" | "ENABLE_COLPALI_IMAGE_INDEXING";
1677
+ isEnabled: boolean;
1678
+ description: string;
1679
+ updatedBy: string;
1680
+ updatedAt: string;
1681
+ }>;
1682
+ type SystemFeatureFlagDto = z.infer<typeof SystemFeatureFlagDtoSchema>;
1683
+ declare const GovernedCapabilitySchema: z.ZodEnum<[
1684
+ "ocr",
1685
+ "enrichment",
1686
+ "transcription",
1687
+ "asset_extraction",
1688
+ "vector_indexing",
1689
+ "graph_indexing",
1690
+ "governance_answer"
1691
+ ]>;
1692
+ type GovernedCapability = z.infer<typeof GovernedCapabilitySchema>;
1693
+ declare const CLOUD_CAPABLE_CAPABILITIES: readonly GovernedCapability[];
1694
+ declare const ConfidentialityCapabilityPolicyDtoSchema: z.ZodObject<{
1695
+ tenantId: z.ZodString;
1696
+ confidentialityLevel: z.ZodEnum<[
1697
+ "PUBLIC",
1698
+ "INTERNAL",
1699
+ "DEPARTMENT",
1700
+ "CONFIDENTIAL",
1701
+ "RESTRICTED"
1702
+ ]>;
1703
+ capability: z.ZodEnum<[
1704
+ "ocr",
1705
+ "enrichment",
1706
+ "transcription",
1707
+ "asset_extraction",
1708
+ "vector_indexing",
1709
+ "graph_indexing",
1710
+ "governance_answer"
1711
+ ]>;
1712
+ isEnabled: z.ZodBoolean;
1713
+ allowCloudProvider: z.ZodBoolean;
1714
+ promptKey: z.ZodNullable<z.ZodString>;
1715
+ description: z.ZodNullable<z.ZodString>;
1716
+ updatedBy: z.ZodString;
1717
+ updatedAt: z.ZodString;
1718
+ }, "strip", z.ZodTypeAny, {
1719
+ confidentialityLevel: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
1720
+ tenantId: string;
1721
+ isEnabled: boolean;
1722
+ description: string | null;
1723
+ updatedBy: string;
1724
+ updatedAt: string;
1725
+ capability: "ocr" | "enrichment" | "transcription" | "asset_extraction" | "vector_indexing" | "graph_indexing" | "governance_answer";
1726
+ allowCloudProvider: boolean;
1727
+ promptKey: string | null;
1728
+ }, {
1729
+ confidentialityLevel: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
1730
+ tenantId: string;
1731
+ isEnabled: boolean;
1732
+ description: string | null;
1733
+ updatedBy: string;
1734
+ updatedAt: string;
1735
+ capability: "ocr" | "enrichment" | "transcription" | "asset_extraction" | "vector_indexing" | "graph_indexing" | "governance_answer";
1736
+ allowCloudProvider: boolean;
1737
+ promptKey: string | null;
1738
+ }>;
1739
+ type ConfidentialityCapabilityPolicyDto = z.infer<typeof ConfidentialityCapabilityPolicyDtoSchema>;
1740
+ declare const SystemParameterDtoSchema: z.ZodObject<{
1741
+ tenantId: z.ZodString;
1742
+ parameterKey: z.ZodString;
1743
+ parameterValue: z.ZodString;
1744
+ dataType: z.ZodEnum<[
1745
+ "string",
1746
+ "int",
1747
+ "float",
1748
+ "bool",
1749
+ "json"
1750
+ ]>;
1751
+ description: z.ZodString;
1752
+ isSecret: z.ZodBoolean;
1753
+ updatedBy: z.ZodString;
1754
+ updatedAt: z.ZodString;
1755
+ }, "strip", z.ZodTypeAny, {
1756
+ tenantId: string;
1757
+ description: string;
1758
+ updatedBy: string;
1759
+ updatedAt: string;
1760
+ parameterKey: string;
1761
+ parameterValue: string;
1762
+ dataType: "string" | "float" | "int" | "bool" | "json";
1763
+ isSecret: boolean;
1764
+ }, {
1765
+ tenantId: string;
1766
+ description: string;
1767
+ updatedBy: string;
1768
+ updatedAt: string;
1769
+ parameterKey: string;
1770
+ parameterValue: string;
1771
+ dataType: "string" | "float" | "int" | "bool" | "json";
1772
+ isSecret: boolean;
1773
+ }>;
1774
+ type SystemParameterDto = z.infer<typeof SystemParameterDtoSchema>;
1775
+ declare const PromptTemplateDtoSchema: z.ZodObject<{
1776
+ tenantId: z.ZodString;
1777
+ promptKey: z.ZodString;
1778
+ promptVersion: z.ZodNumber;
1779
+ promptTemplate: z.ZodString;
1780
+ provider: z.ZodString;
1781
+ modelName: z.ZodString;
1782
+ temperature: z.ZodNumber;
1783
+ maxTokens: z.ZodNumber;
1784
+ isSystemPrompt: z.ZodBoolean;
1785
+ description: z.ZodString;
1786
+ updatedBy: z.ZodString;
1787
+ updatedAt: z.ZodString;
1788
+ }, "strip", z.ZodTypeAny, {
1789
+ tenantId: string;
1790
+ description: string;
1791
+ updatedBy: string;
1792
+ updatedAt: string;
1793
+ promptKey: string;
1794
+ promptVersion: number;
1795
+ promptTemplate: string;
1796
+ provider: string;
1797
+ modelName: string;
1798
+ temperature: number;
1799
+ maxTokens: number;
1800
+ isSystemPrompt: boolean;
1801
+ }, {
1802
+ tenantId: string;
1803
+ description: string;
1804
+ updatedBy: string;
1805
+ updatedAt: string;
1806
+ promptKey: string;
1807
+ promptVersion: number;
1808
+ promptTemplate: string;
1809
+ provider: string;
1810
+ modelName: string;
1811
+ temperature: number;
1812
+ maxTokens: number;
1813
+ isSystemPrompt: boolean;
1814
+ }>;
1815
+ type PromptTemplateDto = z.infer<typeof PromptTemplateDtoSchema>;
1816
+ declare const UpdateFeatureFlagRequestSchema: z.ZodObject<{
1817
+ tenantId: z.ZodString;
1818
+ flagKey: z.ZodEnum<[
1819
+ "ENABLE_VECTOR_SEARCH",
1820
+ "ENABLE_VECTOR_INDEXING",
1821
+ "ENABLE_GRAPH_SEARCH",
1822
+ "ENABLE_GRAPH_INDEXING",
1823
+ "ENABLE_ASSET_EXTRACTION",
1824
+ "ENABLE_MEDIA_ANALYSIS",
1825
+ "ENABLE_DYNAMIC_CLASSIFIER_RULES",
1826
+ "ENABLE_SEMANTIC_CACHE",
1827
+ "ENABLE_CONTEXT_COMPRESSION",
1828
+ "ENABLE_MULTI_AGENT_SWARM",
1829
+ "ENABLE_AUTONOMOUS_ONTOLOGY",
1830
+ "ENABLE_MERKLE_CITATION_PROOF",
1831
+ "ENABLE_REALTIME_CDC_INGESTION",
1832
+ "ENABLE_COLPALI_IMAGE_INDEXING"
1833
+ ]>;
1834
+ isEnabled: z.ZodBoolean;
1835
+ updatedBy: z.ZodString;
1836
+ }, "strip", z.ZodTypeAny, {
1837
+ tenantId: string;
1838
+ flagKey: "ENABLE_VECTOR_SEARCH" | "ENABLE_VECTOR_INDEXING" | "ENABLE_GRAPH_SEARCH" | "ENABLE_GRAPH_INDEXING" | "ENABLE_ASSET_EXTRACTION" | "ENABLE_MEDIA_ANALYSIS" | "ENABLE_DYNAMIC_CLASSIFIER_RULES" | "ENABLE_SEMANTIC_CACHE" | "ENABLE_CONTEXT_COMPRESSION" | "ENABLE_MULTI_AGENT_SWARM" | "ENABLE_AUTONOMOUS_ONTOLOGY" | "ENABLE_MERKLE_CITATION_PROOF" | "ENABLE_REALTIME_CDC_INGESTION" | "ENABLE_COLPALI_IMAGE_INDEXING";
1839
+ isEnabled: boolean;
1840
+ updatedBy: string;
1841
+ }, {
1842
+ tenantId: string;
1843
+ flagKey: "ENABLE_VECTOR_SEARCH" | "ENABLE_VECTOR_INDEXING" | "ENABLE_GRAPH_SEARCH" | "ENABLE_GRAPH_INDEXING" | "ENABLE_ASSET_EXTRACTION" | "ENABLE_MEDIA_ANALYSIS" | "ENABLE_DYNAMIC_CLASSIFIER_RULES" | "ENABLE_SEMANTIC_CACHE" | "ENABLE_CONTEXT_COMPRESSION" | "ENABLE_MULTI_AGENT_SWARM" | "ENABLE_AUTONOMOUS_ONTOLOGY" | "ENABLE_MERKLE_CITATION_PROOF" | "ENABLE_REALTIME_CDC_INGESTION" | "ENABLE_COLPALI_IMAGE_INDEXING";
1844
+ isEnabled: boolean;
1845
+ updatedBy: string;
1846
+ }>;
1847
+ type UpdateFeatureFlagRequestInput = z.input<typeof UpdateFeatureFlagRequestSchema>;
1848
+ type UpdateFeatureFlagRequest = z.infer<typeof UpdateFeatureFlagRequestSchema>;
1849
+ declare const UpdateParameterRequestSchema: z.ZodObject<{
1850
+ tenantId: z.ZodString;
1851
+ parameterKey: z.ZodString;
1852
+ parameterValue: z.ZodString;
1853
+ updatedBy: z.ZodString;
1854
+ }, "strip", z.ZodTypeAny, {
1855
+ tenantId: string;
1856
+ updatedBy: string;
1857
+ parameterKey: string;
1858
+ parameterValue: string;
1859
+ }, {
1860
+ tenantId: string;
1861
+ updatedBy: string;
1862
+ parameterKey: string;
1863
+ parameterValue: string;
1864
+ }>;
1865
+ type UpdateParameterRequestInput = z.input<typeof UpdateParameterRequestSchema>;
1866
+ type UpdateParameterRequest = z.infer<typeof UpdateParameterRequestSchema>;
1867
+ declare const UpdatePromptTemplateRequestSchema: z.ZodObject<{
1868
+ tenantId: z.ZodString;
1869
+ promptKey: z.ZodString;
1870
+ promptTemplate: z.ZodString;
1871
+ provider: z.ZodString;
1872
+ modelName: z.ZodString;
1873
+ temperature: z.ZodOptional<z.ZodNumber>;
1874
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1875
+ updatedBy: z.ZodString;
1876
+ }, "strip", z.ZodTypeAny, {
1877
+ tenantId: string;
1878
+ updatedBy: string;
1879
+ promptKey: string;
1880
+ promptTemplate: string;
1881
+ provider: string;
1882
+ modelName: string;
1883
+ temperature?: number | undefined;
1884
+ maxTokens?: number | undefined;
1885
+ }, {
1886
+ tenantId: string;
1887
+ updatedBy: string;
1888
+ promptKey: string;
1889
+ promptTemplate: string;
1890
+ provider: string;
1891
+ modelName: string;
1892
+ temperature?: number | undefined;
1893
+ maxTokens?: number | undefined;
1894
+ }>;
1895
+ type UpdatePromptTemplateRequestInput = z.input<typeof UpdatePromptTemplateRequestSchema>;
1896
+ type UpdatePromptTemplateRequest = z.infer<typeof UpdatePromptTemplateRequestSchema>;
1897
+ declare const JsonPrimitiveSchema: z.ZodUnion<[
1898
+ z.ZodString,
1899
+ z.ZodNumber,
1900
+ z.ZodBoolean,
1901
+ z.ZodNull
1902
+ ]>;
1903
+ type JsonPrimitive = z.infer<typeof JsonPrimitiveSchema>;
1904
+ declare const JsonValueSchema: z.ZodType<unknown>;
1905
+ export { type AuthoritativeSource, AuthoritativeSourceSchema, type AuthorityTier, AuthorityTierSchema, BaseGovernanceClient, CLOUD_CAPABLE_CAPABILITIES, type CitationProof, type CitationProofLeaf, CitationProofLeafSchema, CitationProofSchema, type CitationProofVerificationOptions, type ConfidentialityCapabilityPolicyDto, ConfidentialityCapabilityPolicyDtoSchema, type FeatureFlagKey, FeatureFlagKeySchema, GovernanceAdminClient, type GovernanceAnswerRequest, type GovernanceAnswerRequestInput, GovernanceAnswerRequestSchema, type GovernanceAnswerResponse, GovernanceAnswerResponseSchema, GovernanceClient, GovernanceClientError, type GovernanceClientOptions, type GovernanceSearchHit, GovernanceSearchHitSchema, type GovernanceSearchMetadata, GovernanceSearchMetadataSchema, type GovernanceSearchRequest, type GovernanceSearchRequestInput, GovernanceSearchRequestSchema, type GovernanceSearchResponse, GovernanceSearchResponseSchema, type GovernanceSearchSnippet, GovernanceSearchSnippetSchema, type GovernanceSimulateCaseDiff, GovernanceSimulateCaseDiffSchema, type GovernanceSimulateCaseScores, GovernanceSimulateCaseScoresSchema, type GovernanceSimulateRequest, type GovernanceSimulateRequestInput, GovernanceSimulateRequestSchema, type GovernanceSimulateResponse, GovernanceSimulateResponseSchema, type GovernanceSimulateScores, GovernanceSimulateScoresSchema, type GovernedCapability, GovernedCapabilitySchema, type JsonPrimitive, JsonPrimitiveSchema, JsonValueSchema, type NormalizedScore, NormalizedScoreSchema, type PolicyConflictRef, PolicyConflictRefSchema, type PromptTemplateDto, PromptTemplateDtoSchema, type RelatedDecision, RelatedDecisionSchema, type Sha256Hex, Sha256HexSchema, type SystemFeatureFlagDto, SystemFeatureFlagDtoSchema, type SystemParameterDto, SystemParameterDtoSchema, type UpdateFeatureFlagRequest, type UpdateFeatureFlagRequestInput, UpdateFeatureFlagRequestSchema, type UpdateParameterRequest, type UpdateParameterRequestInput, UpdateParameterRequestSchema, type UpdatePromptTemplateRequest, type UpdatePromptTemplateRequestInput, UpdatePromptTemplateRequestSchema, type VerifiedCitation, VerifiedCitationSchema, bytesToHex, computeCitationLeafHash, computeCitationMerkleRoot, constantTimeCompare, sha256, verifyCitationProof };