@xpert-ai/plugin-sdk 3.35.0 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/agent-results.cjs.js +5 -3
  2. package/agent-results.esm.js +2 -2
  3. package/analytics-result.cjs.js +64 -27
  4. package/analytics-result.esm.js +62 -28
  5. package/analytics.cjs.js +157 -15
  6. package/analytics.esm.js +154 -17
  7. package/artifact-document.cjs.js +9 -3
  8. package/artifact-document.esm.js +9 -3
  9. package/collaboration-client.cjs.js +274 -140
  10. package/collaboration-client.esm.js +273 -141
  11. package/docs/README.md +23 -0
  12. package/index.cjs.js +211 -10
  13. package/index.esm.js +191 -13
  14. package/package.json +8 -2
  15. package/remote-component.cjs.default.js +1 -0
  16. package/remote-component.cjs.js +143 -0
  17. package/remote-component.cjs.mjs +2 -0
  18. package/remote-component.d.ts +1 -0
  19. package/remote-component.esm.js +139 -0
  20. package/results.cjs.js +2 -14
  21. package/results.esm.js +2 -12
  22. package/src/analytics.d.ts +2 -0
  23. package/src/collaboration-client.d.ts +1 -0
  24. package/src/index.d.ts +1 -0
  25. package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +24 -24
  26. package/src/lib/agent/middleware/strategy.interface.d.ts +2 -0
  27. package/src/lib/agent/runtime/capability.d.ts +2 -0
  28. package/src/lib/agent/runtime/cli-model-profile.d.ts +14 -1
  29. package/src/lib/agent/runtime/dispatch.d.ts +79 -79
  30. package/src/lib/agent/runtime/execution-runner.d.ts +19 -10
  31. package/src/lib/agent/runtime/pipeline-scope.d.ts +4 -4
  32. package/src/lib/agent/runtime/results.d.ts +14 -234
  33. package/src/lib/agent/runtime/types.d.ts +19 -0
  34. package/src/lib/agent-event/index.d.ts +55 -0
  35. package/src/lib/agent-event/journal.d.ts +30 -0
  36. package/src/lib/artifact-document/dependencies.d.ts +3 -3
  37. package/src/lib/artifact-document/protocol.d.ts +2 -2
  38. package/src/lib/artifact-document/scheduler.d.ts +3 -0
  39. package/src/lib/assistant-capability/middleware.d.ts +2 -1
  40. package/src/lib/collaboration/client.d.ts +6 -59
  41. package/src/lib/collaboration/index.d.ts +1 -0
  42. package/src/lib/collaboration/operations-client.d.ts +23 -0
  43. package/src/lib/collaboration/presence.d.ts +36 -0
  44. package/src/lib/collaboration/provider.registry.d.ts +2 -2
  45. package/src/lib/collaboration/transport.d.ts +24 -0
  46. package/src/lib/collaboration/types.d.ts +57 -5
  47. package/src/lib/content-resource/catalog.d.ts +23 -1
  48. package/src/lib/content-resource/editor.d.ts +36 -1
  49. package/src/lib/data/analytics/analysis-evidence.d.ts +757 -0
  50. package/src/lib/data/analytics/analytics-certification.d.ts +64 -0
  51. package/src/lib/data/analytics/analytics-provider.d.ts +9 -0
  52. package/src/lib/data/analytics/analytics-value.d.ts +5 -0
  53. package/src/lib/data/analytics/index.d.ts +1 -0
  54. package/src/lib/evolution/runtime-capability.d.ts +1 -0
  55. package/src/lib/project-pipeline/adapters.d.ts +9 -2
  56. package/src/lib/project-pipeline/registry.d.ts +53 -50
  57. package/src/lib/project-task/acceptance.d.ts +13 -1
  58. package/src/lib/project-task/index.d.ts +4 -2
  59. package/src/lib/runtime/capabilities/project-configuration.d.ts +2 -0
  60. package/src/lib/view-extension/provider.interface.d.ts +51 -0
  61. package/src/remote-component.d.ts +13 -0
@@ -0,0 +1,757 @@
1
+ import { z } from 'zod/v3';
2
+ import type { AnalysisEvidenceSnapshot } from '@xpert-ai/contracts';
3
+ export declare const analysisEvidenceSchema: z.ZodEffects<z.ZodObject<{
4
+ schema: z.ZodLiteral<"xpert.analysis-evidence@1">;
5
+ id: z.ZodString;
6
+ title: z.ZodString;
7
+ capturedAt: z.ZodString;
8
+ source: z.ZodObject<{
9
+ artifactId: z.ZodString;
10
+ versionId: z.ZodString;
11
+ projectId: z.ZodString;
12
+ }, "strict", z.ZodTypeAny, {
13
+ versionId?: string;
14
+ artifactId?: string;
15
+ projectId?: string;
16
+ }, {
17
+ versionId?: string;
18
+ artifactId?: string;
19
+ projectId?: string;
20
+ }>;
21
+ controls: z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean>, Record<string, string | number | boolean>>;
22
+ datasets: z.ZodArray<z.ZodEffects<z.ZodObject<{
23
+ schema: z.ZodLiteral<"xpert.analytics.dataset">;
24
+ datasetId: z.ZodEffects<z.ZodString, string, string>;
25
+ fields: z.ZodArray<z.ZodObject<{
26
+ id: z.ZodString;
27
+ sourceField: z.ZodString;
28
+ label: z.ZodString;
29
+ logicalType: z.ZodEnum<["string", "boolean", "int64", "float64", "decimal", "date", "timestamp"]>;
30
+ nullable: z.ZodBoolean;
31
+ role: z.ZodEnum<["dimension", "measure", "time", "identifier"]>;
32
+ semanticRef: z.ZodOptional<z.ZodString>;
33
+ unit: z.ZodOptional<z.ZodString>;
34
+ }, "strict", z.ZodTypeAny, {
35
+ id?: string;
36
+ sourceField?: string;
37
+ label?: string;
38
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
39
+ nullable?: boolean;
40
+ role?: "dimension" | "measure" | "time" | "identifier";
41
+ semanticRef?: string;
42
+ unit?: string;
43
+ }, {
44
+ id?: string;
45
+ sourceField?: string;
46
+ label?: string;
47
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
48
+ nullable?: boolean;
49
+ role?: "dimension" | "measure" | "time" | "identifier";
50
+ semanticRef?: string;
51
+ unit?: string;
52
+ }>, "many">;
53
+ rows: z.ZodArray<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, "many">;
54
+ grain: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
55
+ completeness: z.ZodObject<{
56
+ returnedRows: z.ZodNumber;
57
+ totalRows: z.ZodOptional<z.ZodNumber>;
58
+ totalAccuracy: z.ZodEnum<["exact", "estimated", "unknown"]>;
59
+ scope: z.ZodEnum<["full_query_result", "page", "sample", "top_n"]>;
60
+ truncated: z.ZodBoolean;
61
+ }, "strict", z.ZodTypeAny, {
62
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
63
+ returnedRows?: number;
64
+ totalRows?: number;
65
+ totalAccuracy?: "exact" | "unknown" | "estimated";
66
+ truncated?: boolean;
67
+ }, {
68
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
69
+ returnedRows?: number;
70
+ totalRows?: number;
71
+ totalAccuracy?: "exact" | "unknown" | "estimated";
72
+ truncated?: boolean;
73
+ }>;
74
+ freshness: z.ZodObject<{
75
+ executedAt: z.ZodString;
76
+ sourceFetchedAt: z.ZodString;
77
+ dataAsOf: z.ZodOptional<z.ZodString>;
78
+ }, "strict", z.ZodTypeAny, {
79
+ executedAt?: string;
80
+ sourceFetchedAt?: string;
81
+ dataAsOf?: string;
82
+ }, {
83
+ executedAt?: string;
84
+ sourceFetchedAt?: string;
85
+ dataAsOf?: string;
86
+ }>;
87
+ provenance: z.ZodObject<{
88
+ executionId: z.ZodEffects<z.ZodString, string, string>;
89
+ bindingId: z.ZodEffects<z.ZodString, string, string>;
90
+ providerId: z.ZodEffects<z.ZodString, string, string>;
91
+ sourceVersion: z.ZodOptional<z.ZodString>;
92
+ upstreamExecutionId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
93
+ auditRef: z.ZodOptional<z.ZodString>;
94
+ certification: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
95
+ status: z.ZodLiteral<"legacy_unverified">;
96
+ kind: z.ZodLiteral<"business_metric">;
97
+ subjectId: z.ZodString;
98
+ verifiedAt: z.ZodString;
99
+ }, "strict", z.ZodTypeAny, {
100
+ status?: "legacy_unverified";
101
+ kind?: "business_metric";
102
+ subjectId?: string;
103
+ verifiedAt?: string;
104
+ }, {
105
+ status?: "legacy_unverified";
106
+ kind?: "business_metric";
107
+ subjectId?: string;
108
+ verifiedAt?: string;
109
+ }>, z.ZodObject<{
110
+ status: z.ZodLiteral<"verified">;
111
+ definitionHash: z.ZodString;
112
+ dependency: z.ZodObject<{
113
+ id: z.ZodString;
114
+ version: z.ZodNumber;
115
+ }, "strict", z.ZodTypeAny, {
116
+ id?: string;
117
+ version?: number;
118
+ }, {
119
+ id?: string;
120
+ version?: number;
121
+ }>;
122
+ certifiedBy: z.ZodString;
123
+ certifiedAt: z.ZodString;
124
+ kind: z.ZodLiteral<"business_metric">;
125
+ subjectId: z.ZodString;
126
+ verifiedAt: z.ZodString;
127
+ }, "strict", z.ZodTypeAny, {
128
+ status?: "verified";
129
+ kind?: "business_metric";
130
+ subjectId?: string;
131
+ verifiedAt?: string;
132
+ definitionHash?: string;
133
+ dependency?: {
134
+ id?: string;
135
+ version?: number;
136
+ };
137
+ certifiedBy?: string;
138
+ certifiedAt?: string;
139
+ }, {
140
+ status?: "verified";
141
+ kind?: "business_metric";
142
+ subjectId?: string;
143
+ verifiedAt?: string;
144
+ definitionHash?: string;
145
+ dependency?: {
146
+ id?: string;
147
+ version?: number;
148
+ };
149
+ certifiedBy?: string;
150
+ certifiedAt?: string;
151
+ }>]>>;
152
+ }, "strict", z.ZodTypeAny, {
153
+ providerId?: string;
154
+ certification?: {
155
+ status?: "legacy_unverified";
156
+ kind?: "business_metric";
157
+ subjectId?: string;
158
+ verifiedAt?: string;
159
+ } | {
160
+ status?: "verified";
161
+ kind?: "business_metric";
162
+ subjectId?: string;
163
+ verifiedAt?: string;
164
+ definitionHash?: string;
165
+ dependency?: {
166
+ id?: string;
167
+ version?: number;
168
+ };
169
+ certifiedBy?: string;
170
+ certifiedAt?: string;
171
+ };
172
+ executionId?: string;
173
+ bindingId?: string;
174
+ sourceVersion?: string;
175
+ upstreamExecutionId?: string;
176
+ auditRef?: string;
177
+ }, {
178
+ providerId?: string;
179
+ certification?: {
180
+ status?: "legacy_unverified";
181
+ kind?: "business_metric";
182
+ subjectId?: string;
183
+ verifiedAt?: string;
184
+ } | {
185
+ status?: "verified";
186
+ kind?: "business_metric";
187
+ subjectId?: string;
188
+ verifiedAt?: string;
189
+ definitionHash?: string;
190
+ dependency?: {
191
+ id?: string;
192
+ version?: number;
193
+ };
194
+ certifiedBy?: string;
195
+ certifiedAt?: string;
196
+ };
197
+ executionId?: string;
198
+ bindingId?: string;
199
+ sourceVersion?: string;
200
+ upstreamExecutionId?: string;
201
+ auditRef?: string;
202
+ }>;
203
+ }, "strict", z.ZodTypeAny, {
204
+ datasetId?: string;
205
+ fields?: {
206
+ id?: string;
207
+ sourceField?: string;
208
+ label?: string;
209
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
210
+ nullable?: boolean;
211
+ role?: "dimension" | "measure" | "time" | "identifier";
212
+ semanticRef?: string;
213
+ unit?: string;
214
+ }[];
215
+ grain?: string[];
216
+ rows?: Record<string, string | number | boolean>[];
217
+ schema?: "xpert.analytics.dataset";
218
+ completeness?: {
219
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
220
+ returnedRows?: number;
221
+ totalRows?: number;
222
+ totalAccuracy?: "exact" | "unknown" | "estimated";
223
+ truncated?: boolean;
224
+ };
225
+ provenance?: {
226
+ providerId?: string;
227
+ certification?: {
228
+ status?: "legacy_unverified";
229
+ kind?: "business_metric";
230
+ subjectId?: string;
231
+ verifiedAt?: string;
232
+ } | {
233
+ status?: "verified";
234
+ kind?: "business_metric";
235
+ subjectId?: string;
236
+ verifiedAt?: string;
237
+ definitionHash?: string;
238
+ dependency?: {
239
+ id?: string;
240
+ version?: number;
241
+ };
242
+ certifiedBy?: string;
243
+ certifiedAt?: string;
244
+ };
245
+ executionId?: string;
246
+ bindingId?: string;
247
+ sourceVersion?: string;
248
+ upstreamExecutionId?: string;
249
+ auditRef?: string;
250
+ };
251
+ freshness?: {
252
+ executedAt?: string;
253
+ sourceFetchedAt?: string;
254
+ dataAsOf?: string;
255
+ };
256
+ }, {
257
+ datasetId?: string;
258
+ fields?: {
259
+ id?: string;
260
+ sourceField?: string;
261
+ label?: string;
262
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
263
+ nullable?: boolean;
264
+ role?: "dimension" | "measure" | "time" | "identifier";
265
+ semanticRef?: string;
266
+ unit?: string;
267
+ }[];
268
+ grain?: string[];
269
+ rows?: Record<string, string | number | boolean>[];
270
+ schema?: "xpert.analytics.dataset";
271
+ completeness?: {
272
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
273
+ returnedRows?: number;
274
+ totalRows?: number;
275
+ totalAccuracy?: "exact" | "unknown" | "estimated";
276
+ truncated?: boolean;
277
+ };
278
+ provenance?: {
279
+ providerId?: string;
280
+ certification?: {
281
+ status?: "legacy_unverified";
282
+ kind?: "business_metric";
283
+ subjectId?: string;
284
+ verifiedAt?: string;
285
+ } | {
286
+ status?: "verified";
287
+ kind?: "business_metric";
288
+ subjectId?: string;
289
+ verifiedAt?: string;
290
+ definitionHash?: string;
291
+ dependency?: {
292
+ id?: string;
293
+ version?: number;
294
+ };
295
+ certifiedBy?: string;
296
+ certifiedAt?: string;
297
+ };
298
+ executionId?: string;
299
+ bindingId?: string;
300
+ sourceVersion?: string;
301
+ upstreamExecutionId?: string;
302
+ auditRef?: string;
303
+ };
304
+ freshness?: {
305
+ executedAt?: string;
306
+ sourceFetchedAt?: string;
307
+ dataAsOf?: string;
308
+ };
309
+ }>, {
310
+ datasetId?: string;
311
+ fields?: {
312
+ id?: string;
313
+ sourceField?: string;
314
+ label?: string;
315
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
316
+ nullable?: boolean;
317
+ role?: "dimension" | "measure" | "time" | "identifier";
318
+ semanticRef?: string;
319
+ unit?: string;
320
+ }[];
321
+ grain?: string[];
322
+ rows?: Record<string, string | number | boolean>[];
323
+ schema?: "xpert.analytics.dataset";
324
+ completeness?: {
325
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
326
+ returnedRows?: number;
327
+ totalRows?: number;
328
+ totalAccuracy?: "exact" | "unknown" | "estimated";
329
+ truncated?: boolean;
330
+ };
331
+ provenance?: {
332
+ providerId?: string;
333
+ certification?: {
334
+ status?: "legacy_unverified";
335
+ kind?: "business_metric";
336
+ subjectId?: string;
337
+ verifiedAt?: string;
338
+ } | {
339
+ status?: "verified";
340
+ kind?: "business_metric";
341
+ subjectId?: string;
342
+ verifiedAt?: string;
343
+ definitionHash?: string;
344
+ dependency?: {
345
+ id?: string;
346
+ version?: number;
347
+ };
348
+ certifiedBy?: string;
349
+ certifiedAt?: string;
350
+ };
351
+ executionId?: string;
352
+ bindingId?: string;
353
+ sourceVersion?: string;
354
+ upstreamExecutionId?: string;
355
+ auditRef?: string;
356
+ };
357
+ freshness?: {
358
+ executedAt?: string;
359
+ sourceFetchedAt?: string;
360
+ dataAsOf?: string;
361
+ };
362
+ }, {
363
+ datasetId?: string;
364
+ fields?: {
365
+ id?: string;
366
+ sourceField?: string;
367
+ label?: string;
368
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
369
+ nullable?: boolean;
370
+ role?: "dimension" | "measure" | "time" | "identifier";
371
+ semanticRef?: string;
372
+ unit?: string;
373
+ }[];
374
+ grain?: string[];
375
+ rows?: Record<string, string | number | boolean>[];
376
+ schema?: "xpert.analytics.dataset";
377
+ completeness?: {
378
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
379
+ returnedRows?: number;
380
+ totalRows?: number;
381
+ totalAccuracy?: "exact" | "unknown" | "estimated";
382
+ truncated?: boolean;
383
+ };
384
+ provenance?: {
385
+ providerId?: string;
386
+ certification?: {
387
+ status?: "legacy_unverified";
388
+ kind?: "business_metric";
389
+ subjectId?: string;
390
+ verifiedAt?: string;
391
+ } | {
392
+ status?: "verified";
393
+ kind?: "business_metric";
394
+ subjectId?: string;
395
+ verifiedAt?: string;
396
+ definitionHash?: string;
397
+ dependency?: {
398
+ id?: string;
399
+ version?: number;
400
+ };
401
+ certifiedBy?: string;
402
+ certifiedAt?: string;
403
+ };
404
+ executionId?: string;
405
+ bindingId?: string;
406
+ sourceVersion?: string;
407
+ upstreamExecutionId?: string;
408
+ auditRef?: string;
409
+ };
410
+ freshness?: {
411
+ executedAt?: string;
412
+ sourceFetchedAt?: string;
413
+ dataAsOf?: string;
414
+ };
415
+ }>, "many">;
416
+ statements: z.ZodArray<z.ZodObject<{
417
+ kind: z.ZodEnum<["fact", "inference", "unverified"]>;
418
+ text: z.ZodString;
419
+ citations: z.ZodArray<z.ZodObject<{
420
+ datasetId: z.ZodEffects<z.ZodString, string, string>;
421
+ row: z.ZodNumber;
422
+ field: z.ZodEffects<z.ZodString, string, string>;
423
+ }, "strict", z.ZodTypeAny, {
424
+ datasetId?: string;
425
+ field?: string;
426
+ row?: number;
427
+ }, {
428
+ datasetId?: string;
429
+ field?: string;
430
+ row?: number;
431
+ }>, "many">;
432
+ }, "strict", z.ZodTypeAny, {
433
+ kind?: "fact" | "inference" | "unverified";
434
+ text?: string;
435
+ citations?: {
436
+ datasetId?: string;
437
+ field?: string;
438
+ row?: number;
439
+ }[];
440
+ }, {
441
+ kind?: "fact" | "inference" | "unverified";
442
+ text?: string;
443
+ citations?: {
444
+ datasetId?: string;
445
+ field?: string;
446
+ row?: number;
447
+ }[];
448
+ }>, "many">;
449
+ sha256: z.ZodString;
450
+ }, "strict", z.ZodTypeAny, {
451
+ id?: string;
452
+ title?: string;
453
+ source?: {
454
+ versionId?: string;
455
+ artifactId?: string;
456
+ projectId?: string;
457
+ };
458
+ controls?: Record<string, string | number | boolean>;
459
+ schema?: "xpert.analysis-evidence@1";
460
+ datasets?: {
461
+ datasetId?: string;
462
+ fields?: {
463
+ id?: string;
464
+ sourceField?: string;
465
+ label?: string;
466
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
467
+ nullable?: boolean;
468
+ role?: "dimension" | "measure" | "time" | "identifier";
469
+ semanticRef?: string;
470
+ unit?: string;
471
+ }[];
472
+ grain?: string[];
473
+ rows?: Record<string, string | number | boolean>[];
474
+ schema?: "xpert.analytics.dataset";
475
+ completeness?: {
476
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
477
+ returnedRows?: number;
478
+ totalRows?: number;
479
+ totalAccuracy?: "exact" | "unknown" | "estimated";
480
+ truncated?: boolean;
481
+ };
482
+ provenance?: {
483
+ providerId?: string;
484
+ certification?: {
485
+ status?: "legacy_unverified";
486
+ kind?: "business_metric";
487
+ subjectId?: string;
488
+ verifiedAt?: string;
489
+ } | {
490
+ status?: "verified";
491
+ kind?: "business_metric";
492
+ subjectId?: string;
493
+ verifiedAt?: string;
494
+ definitionHash?: string;
495
+ dependency?: {
496
+ id?: string;
497
+ version?: number;
498
+ };
499
+ certifiedBy?: string;
500
+ certifiedAt?: string;
501
+ };
502
+ executionId?: string;
503
+ bindingId?: string;
504
+ sourceVersion?: string;
505
+ upstreamExecutionId?: string;
506
+ auditRef?: string;
507
+ };
508
+ freshness?: {
509
+ executedAt?: string;
510
+ sourceFetchedAt?: string;
511
+ dataAsOf?: string;
512
+ };
513
+ }[];
514
+ capturedAt?: string;
515
+ statements?: {
516
+ kind?: "fact" | "inference" | "unverified";
517
+ text?: string;
518
+ citations?: {
519
+ datasetId?: string;
520
+ field?: string;
521
+ row?: number;
522
+ }[];
523
+ }[];
524
+ sha256?: string;
525
+ }, {
526
+ id?: string;
527
+ title?: string;
528
+ source?: {
529
+ versionId?: string;
530
+ artifactId?: string;
531
+ projectId?: string;
532
+ };
533
+ controls?: Record<string, string | number | boolean>;
534
+ schema?: "xpert.analysis-evidence@1";
535
+ datasets?: {
536
+ datasetId?: string;
537
+ fields?: {
538
+ id?: string;
539
+ sourceField?: string;
540
+ label?: string;
541
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
542
+ nullable?: boolean;
543
+ role?: "dimension" | "measure" | "time" | "identifier";
544
+ semanticRef?: string;
545
+ unit?: string;
546
+ }[];
547
+ grain?: string[];
548
+ rows?: Record<string, string | number | boolean>[];
549
+ schema?: "xpert.analytics.dataset";
550
+ completeness?: {
551
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
552
+ returnedRows?: number;
553
+ totalRows?: number;
554
+ totalAccuracy?: "exact" | "unknown" | "estimated";
555
+ truncated?: boolean;
556
+ };
557
+ provenance?: {
558
+ providerId?: string;
559
+ certification?: {
560
+ status?: "legacy_unverified";
561
+ kind?: "business_metric";
562
+ subjectId?: string;
563
+ verifiedAt?: string;
564
+ } | {
565
+ status?: "verified";
566
+ kind?: "business_metric";
567
+ subjectId?: string;
568
+ verifiedAt?: string;
569
+ definitionHash?: string;
570
+ dependency?: {
571
+ id?: string;
572
+ version?: number;
573
+ };
574
+ certifiedBy?: string;
575
+ certifiedAt?: string;
576
+ };
577
+ executionId?: string;
578
+ bindingId?: string;
579
+ sourceVersion?: string;
580
+ upstreamExecutionId?: string;
581
+ auditRef?: string;
582
+ };
583
+ freshness?: {
584
+ executedAt?: string;
585
+ sourceFetchedAt?: string;
586
+ dataAsOf?: string;
587
+ };
588
+ }[];
589
+ capturedAt?: string;
590
+ statements?: {
591
+ kind?: "fact" | "inference" | "unverified";
592
+ text?: string;
593
+ citations?: {
594
+ datasetId?: string;
595
+ field?: string;
596
+ row?: number;
597
+ }[];
598
+ }[];
599
+ sha256?: string;
600
+ }>, {
601
+ id?: string;
602
+ title?: string;
603
+ source?: {
604
+ versionId?: string;
605
+ artifactId?: string;
606
+ projectId?: string;
607
+ };
608
+ controls?: Record<string, string | number | boolean>;
609
+ schema?: "xpert.analysis-evidence@1";
610
+ datasets?: {
611
+ datasetId?: string;
612
+ fields?: {
613
+ id?: string;
614
+ sourceField?: string;
615
+ label?: string;
616
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
617
+ nullable?: boolean;
618
+ role?: "dimension" | "measure" | "time" | "identifier";
619
+ semanticRef?: string;
620
+ unit?: string;
621
+ }[];
622
+ grain?: string[];
623
+ rows?: Record<string, string | number | boolean>[];
624
+ schema?: "xpert.analytics.dataset";
625
+ completeness?: {
626
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
627
+ returnedRows?: number;
628
+ totalRows?: number;
629
+ totalAccuracy?: "exact" | "unknown" | "estimated";
630
+ truncated?: boolean;
631
+ };
632
+ provenance?: {
633
+ providerId?: string;
634
+ certification?: {
635
+ status?: "legacy_unverified";
636
+ kind?: "business_metric";
637
+ subjectId?: string;
638
+ verifiedAt?: string;
639
+ } | {
640
+ status?: "verified";
641
+ kind?: "business_metric";
642
+ subjectId?: string;
643
+ verifiedAt?: string;
644
+ definitionHash?: string;
645
+ dependency?: {
646
+ id?: string;
647
+ version?: number;
648
+ };
649
+ certifiedBy?: string;
650
+ certifiedAt?: string;
651
+ };
652
+ executionId?: string;
653
+ bindingId?: string;
654
+ sourceVersion?: string;
655
+ upstreamExecutionId?: string;
656
+ auditRef?: string;
657
+ };
658
+ freshness?: {
659
+ executedAt?: string;
660
+ sourceFetchedAt?: string;
661
+ dataAsOf?: string;
662
+ };
663
+ }[];
664
+ capturedAt?: string;
665
+ statements?: {
666
+ kind?: "fact" | "inference" | "unverified";
667
+ text?: string;
668
+ citations?: {
669
+ datasetId?: string;
670
+ field?: string;
671
+ row?: number;
672
+ }[];
673
+ }[];
674
+ sha256?: string;
675
+ }, {
676
+ id?: string;
677
+ title?: string;
678
+ source?: {
679
+ versionId?: string;
680
+ artifactId?: string;
681
+ projectId?: string;
682
+ };
683
+ controls?: Record<string, string | number | boolean>;
684
+ schema?: "xpert.analysis-evidence@1";
685
+ datasets?: {
686
+ datasetId?: string;
687
+ fields?: {
688
+ id?: string;
689
+ sourceField?: string;
690
+ label?: string;
691
+ logicalType?: "string" | "boolean" | "date" | "int64" | "float64" | "decimal" | "timestamp";
692
+ nullable?: boolean;
693
+ role?: "dimension" | "measure" | "time" | "identifier";
694
+ semanticRef?: string;
695
+ unit?: string;
696
+ }[];
697
+ grain?: string[];
698
+ rows?: Record<string, string | number | boolean>[];
699
+ schema?: "xpert.analytics.dataset";
700
+ completeness?: {
701
+ scope?: "full_query_result" | "page" | "sample" | "top_n";
702
+ returnedRows?: number;
703
+ totalRows?: number;
704
+ totalAccuracy?: "exact" | "unknown" | "estimated";
705
+ truncated?: boolean;
706
+ };
707
+ provenance?: {
708
+ providerId?: string;
709
+ certification?: {
710
+ status?: "legacy_unverified";
711
+ kind?: "business_metric";
712
+ subjectId?: string;
713
+ verifiedAt?: string;
714
+ } | {
715
+ status?: "verified";
716
+ kind?: "business_metric";
717
+ subjectId?: string;
718
+ verifiedAt?: string;
719
+ definitionHash?: string;
720
+ dependency?: {
721
+ id?: string;
722
+ version?: number;
723
+ };
724
+ certifiedBy?: string;
725
+ certifiedAt?: string;
726
+ };
727
+ executionId?: string;
728
+ bindingId?: string;
729
+ sourceVersion?: string;
730
+ upstreamExecutionId?: string;
731
+ auditRef?: string;
732
+ };
733
+ freshness?: {
734
+ executedAt?: string;
735
+ sourceFetchedAt?: string;
736
+ dataAsOf?: string;
737
+ };
738
+ }[];
739
+ capturedAt?: string;
740
+ statements?: {
741
+ kind?: "fact" | "inference" | "unverified";
742
+ text?: string;
743
+ citations?: {
744
+ datasetId?: string;
745
+ field?: string;
746
+ row?: number;
747
+ }[];
748
+ }[];
749
+ sha256?: string;
750
+ }>;
751
+ /** Canonicalize validated JSON: sort object keys, but preserve array order and exact scalar values.
752
+ * Omitted optional properties do not affect the digest. Hashing stays in the consumer's runtime. */
753
+ export declare function canonicalEvidenceJson(value: unknown): string;
754
+ /** Validate shape and cell references; callers must verify the digest and current source access separately. */
755
+ export declare function parseAnalysisEvidence(value: unknown): AnalysisEvidenceSnapshot;
756
+ /** Exclude only the digest itself; source, capture time, cells and statement classifications stay covered. */
757
+ export declare function analysisEvidenceDigestInput(value: AnalysisEvidenceSnapshot): string;