@x12i/memorix-scoper-contracts 1.0.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 (62) hide show
  1. package/README.md +9 -0
  2. package/dist/errors.d.ts +24 -0
  3. package/dist/errors.d.ts.map +1 -0
  4. package/dist/errors.js +70 -0
  5. package/dist/errors.js.map +1 -0
  6. package/dist/evidence.d.ts +2 -0
  7. package/dist/evidence.d.ts.map +1 -0
  8. package/dist/evidence.js +2 -0
  9. package/dist/evidence.js.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +3 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/schemas/catalog.d.ts +441 -0
  15. package/dist/schemas/catalog.d.ts.map +1 -0
  16. package/dist/schemas/catalog.js +55 -0
  17. package/dist/schemas/catalog.js.map +1 -0
  18. package/dist/schemas/evidence.d.ts +602 -0
  19. package/dist/schemas/evidence.d.ts.map +1 -0
  20. package/dist/schemas/evidence.js +83 -0
  21. package/dist/schemas/evidence.js.map +1 -0
  22. package/dist/schemas/index.d.ts +6 -0
  23. package/dist/schemas/index.d.ts.map +1 -0
  24. package/dist/schemas/index.js +6 -0
  25. package/dist/schemas/index.js.map +1 -0
  26. package/dist/schemas/nexum-persist.d.ts +47 -0
  27. package/dist/schemas/nexum-persist.d.ts.map +1 -0
  28. package/dist/schemas/nexum-persist.js +27 -0
  29. package/dist/schemas/nexum-persist.js.map +1 -0
  30. package/dist/schemas/profile.d.ts +69 -0
  31. package/dist/schemas/profile.d.ts.map +1 -0
  32. package/dist/schemas/profile.js +15 -0
  33. package/dist/schemas/profile.js.map +1 -0
  34. package/dist/schemas/request.d.ts +296 -0
  35. package/dist/schemas/request.d.ts.map +1 -0
  36. package/dist/schemas/request.js +98 -0
  37. package/dist/schemas/request.js.map +1 -0
  38. package/dist/schemas.d.ts +1077 -0
  39. package/dist/schemas.d.ts.map +1 -0
  40. package/dist/schemas.js +199 -0
  41. package/dist/schemas.js.map +1 -0
  42. package/dist/schemas.test.d.ts +2 -0
  43. package/dist/schemas.test.d.ts.map +1 -0
  44. package/dist/schemas.test.js +29 -0
  45. package/dist/schemas.test.js.map +1 -0
  46. package/package.json +53 -0
  47. package/schemas/CatalogEntry.json +17 -0
  48. package/schemas/CatalogEntry.schema.json +157 -0
  49. package/schemas/EvidenceBundle.json +15 -0
  50. package/schemas/EvidenceBundle.schema.json +469 -0
  51. package/schemas/EvidenceItem.json +15 -0
  52. package/schemas/EvidenceRef.json +9 -0
  53. package/schemas/EvidenceSelection.schema.json +83 -0
  54. package/schemas/RetrievalPlan.json +13 -0
  55. package/schemas/RetrievalPlan.schema.json +73 -0
  56. package/schemas/RetrievalStep.json +14 -0
  57. package/schemas/ScopeRequest.json +28 -0
  58. package/schemas/ScopeRequest.schema.json +108 -0
  59. package/schemas/ScoperBudgets.json +14 -0
  60. package/schemas/ScoperProfile.json +17 -0
  61. package/schemas/TrustedExecutionContext.json +22 -0
  62. package/schemas/TrustedExecutionContext.schema.json +129 -0
@@ -0,0 +1,1077 @@
1
+ import { z } from "zod";
2
+ export declare const ScoperBudgetsSchema: z.ZodObject<{
3
+ maxWallTimeMs: z.ZodNumber;
4
+ maxSdkCalls: z.ZodNumber;
5
+ maxPages: z.ZodNumber;
6
+ maxRecords: z.ZodNumber;
7
+ maxBytes: z.ZodNumber;
8
+ maxEvidenceItems: z.ZodNumber;
9
+ maxRelationshipDepth: z.ZodNumber;
10
+ maxReasoningRounds: z.ZodNumber;
11
+ maxParallelCalls: z.ZodNumber;
12
+ }, "strip", z.ZodTypeAny, {
13
+ maxEvidenceItems: number;
14
+ maxParallelCalls: number;
15
+ maxWallTimeMs: number;
16
+ maxSdkCalls: number;
17
+ maxPages: number;
18
+ maxRecords: number;
19
+ maxBytes: number;
20
+ maxRelationshipDepth: number;
21
+ maxReasoningRounds: number;
22
+ }, {
23
+ maxEvidenceItems: number;
24
+ maxParallelCalls: number;
25
+ maxWallTimeMs: number;
26
+ maxSdkCalls: number;
27
+ maxPages: number;
28
+ maxRecords: number;
29
+ maxBytes: number;
30
+ maxRelationshipDepth: number;
31
+ maxReasoningRounds: number;
32
+ }>;
33
+ export type ScoperBudgets = z.infer<typeof ScoperBudgetsSchema>;
34
+ export declare const ScopeRequestSchema: z.ZodEffects<z.ZodObject<{
35
+ objective: z.ZodString;
36
+ seeds: z.ZodOptional<z.ZodArray<z.ZodObject<{
37
+ kind: z.ZodString;
38
+ id: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ kind: string;
41
+ id: string;
42
+ }, {
43
+ kind: string;
44
+ id: string;
45
+ }>, "many">>;
46
+ domains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
47
+ timeRange: z.ZodOptional<z.ZodObject<{
48
+ from: z.ZodString;
49
+ to: z.ZodString;
50
+ }, "strip", z.ZodTypeAny, {
51
+ from: string;
52
+ to: string;
53
+ }, {
54
+ from: string;
55
+ to: string;
56
+ }>>;
57
+ freshness: z.ZodOptional<z.ZodObject<{
58
+ includeStable: z.ZodOptional<z.ZodBoolean>;
59
+ includeLive: z.ZodOptional<z.ZodBoolean>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ includeStable?: boolean | undefined;
62
+ includeLive?: boolean | undefined;
63
+ }, {
64
+ includeStable?: boolean | undefined;
65
+ includeLive?: boolean | undefined;
66
+ }>>;
67
+ requestedLimits: z.ZodOptional<z.ZodObject<{
68
+ maxEvidenceItems: z.ZodOptional<z.ZodNumber>;
69
+ maxRelationshipDepth: z.ZodOptional<z.ZodNumber>;
70
+ deadlineMs: z.ZodOptional<z.ZodNumber>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ maxEvidenceItems?: number | undefined;
73
+ maxRelationshipDepth?: number | undefined;
74
+ deadlineMs?: number | undefined;
75
+ }, {
76
+ maxEvidenceItems?: number | undefined;
77
+ maxRelationshipDepth?: number | undefined;
78
+ deadlineMs?: number | undefined;
79
+ }>>;
80
+ responseMode: z.ZodOptional<z.ZodLiteral<"evidence-bundle">>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ objective: string;
83
+ seeds?: {
84
+ kind: string;
85
+ id: string;
86
+ }[] | undefined;
87
+ domains?: string[] | undefined;
88
+ timeRange?: {
89
+ from: string;
90
+ to: string;
91
+ } | undefined;
92
+ freshness?: {
93
+ includeStable?: boolean | undefined;
94
+ includeLive?: boolean | undefined;
95
+ } | undefined;
96
+ requestedLimits?: {
97
+ maxEvidenceItems?: number | undefined;
98
+ maxRelationshipDepth?: number | undefined;
99
+ deadlineMs?: number | undefined;
100
+ } | undefined;
101
+ responseMode?: "evidence-bundle" | undefined;
102
+ }, {
103
+ objective: string;
104
+ seeds?: {
105
+ kind: string;
106
+ id: string;
107
+ }[] | undefined;
108
+ domains?: string[] | undefined;
109
+ timeRange?: {
110
+ from: string;
111
+ to: string;
112
+ } | undefined;
113
+ freshness?: {
114
+ includeStable?: boolean | undefined;
115
+ includeLive?: boolean | undefined;
116
+ } | undefined;
117
+ requestedLimits?: {
118
+ maxEvidenceItems?: number | undefined;
119
+ maxRelationshipDepth?: number | undefined;
120
+ deadlineMs?: number | undefined;
121
+ } | undefined;
122
+ responseMode?: "evidence-bundle" | undefined;
123
+ }>, {
124
+ objective: string;
125
+ seeds?: {
126
+ kind: string;
127
+ id: string;
128
+ }[] | undefined;
129
+ domains?: string[] | undefined;
130
+ timeRange?: {
131
+ from: string;
132
+ to: string;
133
+ } | undefined;
134
+ freshness?: {
135
+ includeStable?: boolean | undefined;
136
+ includeLive?: boolean | undefined;
137
+ } | undefined;
138
+ requestedLimits?: {
139
+ maxEvidenceItems?: number | undefined;
140
+ maxRelationshipDepth?: number | undefined;
141
+ deadlineMs?: number | undefined;
142
+ } | undefined;
143
+ responseMode?: "evidence-bundle" | undefined;
144
+ }, {
145
+ objective: string;
146
+ seeds?: {
147
+ kind: string;
148
+ id: string;
149
+ }[] | undefined;
150
+ domains?: string[] | undefined;
151
+ timeRange?: {
152
+ from: string;
153
+ to: string;
154
+ } | undefined;
155
+ freshness?: {
156
+ includeStable?: boolean | undefined;
157
+ includeLive?: boolean | undefined;
158
+ } | undefined;
159
+ requestedLimits?: {
160
+ maxEvidenceItems?: number | undefined;
161
+ maxRelationshipDepth?: number | undefined;
162
+ deadlineMs?: number | undefined;
163
+ } | undefined;
164
+ responseMode?: "evidence-bundle" | undefined;
165
+ }>;
166
+ export type ScopeRequest = z.infer<typeof ScopeRequestSchema>;
167
+ export declare const TrustedExecutionContextSchema: z.ZodObject<{
168
+ orgId: z.ZodString;
169
+ agentIds: z.ZodArray<z.ZodString, "many">;
170
+ callerId: z.ZodString;
171
+ principalId: z.ZodOptional<z.ZodString>;
172
+ permissions: z.ZodArray<z.ZodString, "many">;
173
+ classificationCeiling: z.ZodString;
174
+ traceId: z.ZodString;
175
+ deadlineAt: z.ZodString;
176
+ budgets: z.ZodObject<{
177
+ maxWallTimeMs: z.ZodNumber;
178
+ maxSdkCalls: z.ZodNumber;
179
+ maxPages: z.ZodNumber;
180
+ maxRecords: z.ZodNumber;
181
+ maxBytes: z.ZodNumber;
182
+ maxEvidenceItems: z.ZodNumber;
183
+ maxRelationshipDepth: z.ZodNumber;
184
+ maxReasoningRounds: z.ZodNumber;
185
+ maxParallelCalls: z.ZodNumber;
186
+ }, "strip", z.ZodTypeAny, {
187
+ maxEvidenceItems: number;
188
+ maxParallelCalls: number;
189
+ maxWallTimeMs: number;
190
+ maxSdkCalls: number;
191
+ maxPages: number;
192
+ maxRecords: number;
193
+ maxBytes: number;
194
+ maxRelationshipDepth: number;
195
+ maxReasoningRounds: number;
196
+ }, {
197
+ maxEvidenceItems: number;
198
+ maxParallelCalls: number;
199
+ maxWallTimeMs: number;
200
+ maxSdkCalls: number;
201
+ maxPages: number;
202
+ maxRecords: number;
203
+ maxBytes: number;
204
+ maxRelationshipDepth: number;
205
+ maxReasoningRounds: number;
206
+ }>;
207
+ flags: z.ZodObject<{
208
+ bagsOnly: z.ZodBoolean;
209
+ nexumExploreEnabled: z.ZodBoolean;
210
+ }, "strip", z.ZodTypeAny, {
211
+ bagsOnly: boolean;
212
+ nexumExploreEnabled: boolean;
213
+ }, {
214
+ bagsOnly: boolean;
215
+ nexumExploreEnabled: boolean;
216
+ }>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ orgId: string;
219
+ agentIds: string[];
220
+ traceId: string;
221
+ budgets: {
222
+ maxEvidenceItems: number;
223
+ maxParallelCalls: number;
224
+ maxWallTimeMs: number;
225
+ maxSdkCalls: number;
226
+ maxPages: number;
227
+ maxRecords: number;
228
+ maxBytes: number;
229
+ maxRelationshipDepth: number;
230
+ maxReasoningRounds: number;
231
+ };
232
+ callerId: string;
233
+ permissions: string[];
234
+ classificationCeiling: string;
235
+ deadlineAt: string;
236
+ flags: {
237
+ bagsOnly: boolean;
238
+ nexumExploreEnabled: boolean;
239
+ };
240
+ principalId?: string | undefined;
241
+ }, {
242
+ orgId: string;
243
+ agentIds: string[];
244
+ traceId: string;
245
+ budgets: {
246
+ maxEvidenceItems: number;
247
+ maxParallelCalls: number;
248
+ maxWallTimeMs: number;
249
+ maxSdkCalls: number;
250
+ maxPages: number;
251
+ maxRecords: number;
252
+ maxBytes: number;
253
+ maxRelationshipDepth: number;
254
+ maxReasoningRounds: number;
255
+ };
256
+ callerId: string;
257
+ permissions: string[];
258
+ classificationCeiling: string;
259
+ deadlineAt: string;
260
+ flags: {
261
+ bagsOnly: boolean;
262
+ nexumExploreEnabled: boolean;
263
+ };
264
+ principalId?: string | undefined;
265
+ }>;
266
+ export type TrustedExecutionContext = z.infer<typeof TrustedExecutionContextSchema>;
267
+ export declare const ConflictItemSchema: z.ZodObject<{
268
+ description: z.ZodString;
269
+ evidenceIds: z.ZodArray<z.ZodString, "many">;
270
+ resolution: z.ZodEnum<["unresolved", "source-precedence", "different-context"]>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ evidenceIds: string[];
273
+ description: string;
274
+ resolution: "unresolved" | "source-precedence" | "different-context";
275
+ }, {
276
+ evidenceIds: string[];
277
+ description: string;
278
+ resolution: "unresolved" | "source-precedence" | "different-context";
279
+ }>;
280
+ export declare const UnknownItemSchema: z.ZodObject<{
281
+ question: z.ZodString;
282
+ reason: z.ZodString;
283
+ missingDatasets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
284
+ }, "strip", z.ZodTypeAny, {
285
+ question: string;
286
+ reason: string;
287
+ missingDatasets?: string[] | undefined;
288
+ }, {
289
+ question: string;
290
+ reason: string;
291
+ missingDatasets?: string[] | undefined;
292
+ }>;
293
+ export declare const WarningItemSchema: z.ZodObject<{
294
+ code: z.ZodString;
295
+ message: z.ZodString;
296
+ }, "strip", z.ZodTypeAny, {
297
+ code: string;
298
+ message: string;
299
+ }, {
300
+ code: string;
301
+ message: string;
302
+ }>;
303
+ export type WarningItem = z.infer<typeof WarningItemSchema>;
304
+ export type ConflictItem = z.infer<typeof ConflictItemSchema>;
305
+ export type UnknownItem = z.infer<typeof UnknownItemSchema>;
306
+ export type Continuation = z.infer<typeof ContinuationSchema>;
307
+ export declare const ContinuationSchema: z.ZodObject<{
308
+ kind: z.ZodEnum<["cursor", "refinement-required", "budget-exhausted"]>;
309
+ token: z.ZodOptional<z.ZodString>;
310
+ suggestion: z.ZodOptional<z.ZodString>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ kind: "cursor" | "refinement-required" | "budget-exhausted";
313
+ token?: string | undefined;
314
+ suggestion?: string | undefined;
315
+ }, {
316
+ kind: "cursor" | "refinement-required" | "budget-exhausted";
317
+ token?: string | undefined;
318
+ suggestion?: string | undefined;
319
+ }>;
320
+ export declare const EvidenceBundleSchema: z.ZodObject<{
321
+ requestId: z.ZodString;
322
+ status: z.ZodEnum<["complete", "partial", "unavailable", "rejected"]>;
323
+ interpretation: z.ZodObject<{
324
+ objective: z.ZodString;
325
+ assumptions: z.ZodArray<z.ZodString, "many">;
326
+ }, "strip", z.ZodTypeAny, {
327
+ objective: string;
328
+ assumptions: string[];
329
+ }, {
330
+ objective: string;
331
+ assumptions: string[];
332
+ }>;
333
+ execution: z.ZodObject<{
334
+ catalogVersion: z.ZodString;
335
+ profiles: z.ZodArray<z.ZodObject<{
336
+ id: z.ZodString;
337
+ version: z.ZodString;
338
+ }, "strip", z.ZodTypeAny, {
339
+ id: string;
340
+ version: string;
341
+ }, {
342
+ id: string;
343
+ version: string;
344
+ }>, "many">;
345
+ surfaces: z.ZodArray<z.ZodEnum<["estate-bag", "subject", "knowledge-explore"]>, "many">;
346
+ }, "strip", z.ZodTypeAny, {
347
+ catalogVersion: string;
348
+ profiles: {
349
+ id: string;
350
+ version: string;
351
+ }[];
352
+ surfaces: ("subject" | "estate-bag" | "knowledge-explore")[];
353
+ }, {
354
+ catalogVersion: string;
355
+ profiles: {
356
+ id: string;
357
+ version: string;
358
+ }[];
359
+ surfaces: ("subject" | "estate-bag" | "knowledge-explore")[];
360
+ }>;
361
+ evidence: z.ZodArray<z.ZodObject<{
362
+ id: z.ZodString;
363
+ ref: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
364
+ kind: z.ZodLiteral<"subject">;
365
+ orgId: z.ZodString;
366
+ objectType: z.ZodString;
367
+ contentType: z.ZodString;
368
+ recordId: z.ZodString;
369
+ revision: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ kind: "subject";
372
+ orgId: string;
373
+ objectType: string;
374
+ contentType: string;
375
+ recordId: string;
376
+ revision?: string | number | undefined;
377
+ }, {
378
+ kind: "subject";
379
+ orgId: string;
380
+ objectType: string;
381
+ contentType: string;
382
+ recordId: string;
383
+ revision?: string | number | undefined;
384
+ }>, z.ZodObject<{
385
+ kind: z.ZodLiteral<"estate-bag">;
386
+ orgId: z.ZodString;
387
+ sessionId: z.ZodString;
388
+ bagId: z.ZodString;
389
+ path: z.ZodOptional<z.ZodString>;
390
+ }, "strip", z.ZodTypeAny, {
391
+ kind: "estate-bag";
392
+ orgId: string;
393
+ sessionId: string;
394
+ bagId: string;
395
+ path?: string | undefined;
396
+ }, {
397
+ kind: "estate-bag";
398
+ orgId: string;
399
+ sessionId: string;
400
+ bagId: string;
401
+ path?: string | undefined;
402
+ }>, z.ZodObject<{
403
+ kind: z.ZodLiteral<"knowledge-explore">;
404
+ orgId: z.ZodString;
405
+ exploreQueryId: z.ZodString;
406
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
407
+ }, "strip", z.ZodTypeAny, {
408
+ kind: "knowledge-explore";
409
+ orgId: string;
410
+ exploreQueryId: string;
411
+ nodeIds?: string[] | undefined;
412
+ }, {
413
+ kind: "knowledge-explore";
414
+ orgId: string;
415
+ exploreQueryId: string;
416
+ nodeIds?: string[] | undefined;
417
+ }>]>;
418
+ summary: z.ZodString;
419
+ epistemic: z.ZodEnum<["OBSERVED", "INFERRED", "POLICY_CANDIDATE", "REACHABLE", "UNKNOWN", "CONFLICTING"]>;
420
+ confidence: z.ZodOptional<z.ZodNumber>;
421
+ payload: z.ZodOptional<z.ZodUnknown>;
422
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ id: string;
425
+ ref: {
426
+ kind: "subject";
427
+ orgId: string;
428
+ objectType: string;
429
+ contentType: string;
430
+ recordId: string;
431
+ revision?: string | number | undefined;
432
+ } | {
433
+ kind: "estate-bag";
434
+ orgId: string;
435
+ sessionId: string;
436
+ bagId: string;
437
+ path?: string | undefined;
438
+ } | {
439
+ kind: "knowledge-explore";
440
+ orgId: string;
441
+ exploreQueryId: string;
442
+ nodeIds?: string[] | undefined;
443
+ };
444
+ summary: string;
445
+ epistemic: "OBSERVED" | "INFERRED" | "POLICY_CANDIDATE" | "REACHABLE" | "UNKNOWN" | "CONFLICTING";
446
+ confidence?: number | undefined;
447
+ payload?: unknown;
448
+ tags?: string[] | undefined;
449
+ }, {
450
+ id: string;
451
+ ref: {
452
+ kind: "subject";
453
+ orgId: string;
454
+ objectType: string;
455
+ contentType: string;
456
+ recordId: string;
457
+ revision?: string | number | undefined;
458
+ } | {
459
+ kind: "estate-bag";
460
+ orgId: string;
461
+ sessionId: string;
462
+ bagId: string;
463
+ path?: string | undefined;
464
+ } | {
465
+ kind: "knowledge-explore";
466
+ orgId: string;
467
+ exploreQueryId: string;
468
+ nodeIds?: string[] | undefined;
469
+ };
470
+ summary: string;
471
+ epistemic: "OBSERVED" | "INFERRED" | "POLICY_CANDIDATE" | "REACHABLE" | "UNKNOWN" | "CONFLICTING";
472
+ confidence?: number | undefined;
473
+ payload?: unknown;
474
+ tags?: string[] | undefined;
475
+ }>, "many">;
476
+ coverage: z.ZodObject<{
477
+ complete: z.ZodBoolean;
478
+ datasetsRead: z.ZodArray<z.ZodString, "many">;
479
+ datasetsSkipped: z.ZodArray<z.ZodObject<{
480
+ id: z.ZodString;
481
+ reason: z.ZodString;
482
+ }, "strip", z.ZodTypeAny, {
483
+ id: string;
484
+ reason: string;
485
+ }, {
486
+ id: string;
487
+ reason: string;
488
+ }>, "many">;
489
+ countChecks: z.ZodArray<z.ZodObject<{
490
+ dataset: z.ZodString;
491
+ expected: z.ZodOptional<z.ZodNumber>;
492
+ actual: z.ZodNumber;
493
+ matched: z.ZodBoolean;
494
+ }, "strip", z.ZodTypeAny, {
495
+ dataset: string;
496
+ actual: number;
497
+ matched: boolean;
498
+ expected?: number | undefined;
499
+ }, {
500
+ dataset: string;
501
+ actual: number;
502
+ matched: boolean;
503
+ expected?: number | undefined;
504
+ }>, "many">;
505
+ }, "strip", z.ZodTypeAny, {
506
+ complete: boolean;
507
+ datasetsRead: string[];
508
+ datasetsSkipped: {
509
+ id: string;
510
+ reason: string;
511
+ }[];
512
+ countChecks: {
513
+ dataset: string;
514
+ actual: number;
515
+ matched: boolean;
516
+ expected?: number | undefined;
517
+ }[];
518
+ }, {
519
+ complete: boolean;
520
+ datasetsRead: string[];
521
+ datasetsSkipped: {
522
+ id: string;
523
+ reason: string;
524
+ }[];
525
+ countChecks: {
526
+ dataset: string;
527
+ actual: number;
528
+ matched: boolean;
529
+ expected?: number | undefined;
530
+ }[];
531
+ }>;
532
+ conflicts: z.ZodArray<z.ZodObject<{
533
+ description: z.ZodString;
534
+ evidenceIds: z.ZodArray<z.ZodString, "many">;
535
+ resolution: z.ZodEnum<["unresolved", "source-precedence", "different-context"]>;
536
+ }, "strip", z.ZodTypeAny, {
537
+ evidenceIds: string[];
538
+ description: string;
539
+ resolution: "unresolved" | "source-precedence" | "different-context";
540
+ }, {
541
+ evidenceIds: string[];
542
+ description: string;
543
+ resolution: "unresolved" | "source-precedence" | "different-context";
544
+ }>, "many">;
545
+ unknowns: z.ZodArray<z.ZodObject<{
546
+ question: z.ZodString;
547
+ reason: z.ZodString;
548
+ missingDatasets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
549
+ }, "strip", z.ZodTypeAny, {
550
+ question: string;
551
+ reason: string;
552
+ missingDatasets?: string[] | undefined;
553
+ }, {
554
+ question: string;
555
+ reason: string;
556
+ missingDatasets?: string[] | undefined;
557
+ }>, "many">;
558
+ warnings: z.ZodArray<z.ZodObject<{
559
+ code: z.ZodString;
560
+ message: z.ZodString;
561
+ }, "strip", z.ZodTypeAny, {
562
+ code: string;
563
+ message: string;
564
+ }, {
565
+ code: string;
566
+ message: string;
567
+ }>, "many">;
568
+ continuation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
569
+ kind: z.ZodEnum<["cursor", "refinement-required", "budget-exhausted"]>;
570
+ token: z.ZodOptional<z.ZodString>;
571
+ suggestion: z.ZodOptional<z.ZodString>;
572
+ }, "strip", z.ZodTypeAny, {
573
+ kind: "cursor" | "refinement-required" | "budget-exhausted";
574
+ token?: string | undefined;
575
+ suggestion?: string | undefined;
576
+ }, {
577
+ kind: "cursor" | "refinement-required" | "budget-exhausted";
578
+ token?: string | undefined;
579
+ suggestion?: string | undefined;
580
+ }>>>;
581
+ traceId: z.ZodString;
582
+ }, "strip", z.ZodTypeAny, {
583
+ status: "complete" | "partial" | "unavailable" | "rejected";
584
+ conflicts: {
585
+ evidenceIds: string[];
586
+ description: string;
587
+ resolution: "unresolved" | "source-precedence" | "different-context";
588
+ }[];
589
+ unknowns: {
590
+ question: string;
591
+ reason: string;
592
+ missingDatasets?: string[] | undefined;
593
+ }[];
594
+ warnings: {
595
+ code: string;
596
+ message: string;
597
+ }[];
598
+ traceId: string;
599
+ requestId: string;
600
+ interpretation: {
601
+ objective: string;
602
+ assumptions: string[];
603
+ };
604
+ execution: {
605
+ catalogVersion: string;
606
+ profiles: {
607
+ id: string;
608
+ version: string;
609
+ }[];
610
+ surfaces: ("subject" | "estate-bag" | "knowledge-explore")[];
611
+ };
612
+ evidence: {
613
+ id: string;
614
+ ref: {
615
+ kind: "subject";
616
+ orgId: string;
617
+ objectType: string;
618
+ contentType: string;
619
+ recordId: string;
620
+ revision?: string | number | undefined;
621
+ } | {
622
+ kind: "estate-bag";
623
+ orgId: string;
624
+ sessionId: string;
625
+ bagId: string;
626
+ path?: string | undefined;
627
+ } | {
628
+ kind: "knowledge-explore";
629
+ orgId: string;
630
+ exploreQueryId: string;
631
+ nodeIds?: string[] | undefined;
632
+ };
633
+ summary: string;
634
+ epistemic: "OBSERVED" | "INFERRED" | "POLICY_CANDIDATE" | "REACHABLE" | "UNKNOWN" | "CONFLICTING";
635
+ confidence?: number | undefined;
636
+ payload?: unknown;
637
+ tags?: string[] | undefined;
638
+ }[];
639
+ coverage: {
640
+ complete: boolean;
641
+ datasetsRead: string[];
642
+ datasetsSkipped: {
643
+ id: string;
644
+ reason: string;
645
+ }[];
646
+ countChecks: {
647
+ dataset: string;
648
+ actual: number;
649
+ matched: boolean;
650
+ expected?: number | undefined;
651
+ }[];
652
+ };
653
+ continuation?: {
654
+ kind: "cursor" | "refinement-required" | "budget-exhausted";
655
+ token?: string | undefined;
656
+ suggestion?: string | undefined;
657
+ } | null | undefined;
658
+ }, {
659
+ status: "complete" | "partial" | "unavailable" | "rejected";
660
+ conflicts: {
661
+ evidenceIds: string[];
662
+ description: string;
663
+ resolution: "unresolved" | "source-precedence" | "different-context";
664
+ }[];
665
+ unknowns: {
666
+ question: string;
667
+ reason: string;
668
+ missingDatasets?: string[] | undefined;
669
+ }[];
670
+ warnings: {
671
+ code: string;
672
+ message: string;
673
+ }[];
674
+ traceId: string;
675
+ requestId: string;
676
+ interpretation: {
677
+ objective: string;
678
+ assumptions: string[];
679
+ };
680
+ execution: {
681
+ catalogVersion: string;
682
+ profiles: {
683
+ id: string;
684
+ version: string;
685
+ }[];
686
+ surfaces: ("subject" | "estate-bag" | "knowledge-explore")[];
687
+ };
688
+ evidence: {
689
+ id: string;
690
+ ref: {
691
+ kind: "subject";
692
+ orgId: string;
693
+ objectType: string;
694
+ contentType: string;
695
+ recordId: string;
696
+ revision?: string | number | undefined;
697
+ } | {
698
+ kind: "estate-bag";
699
+ orgId: string;
700
+ sessionId: string;
701
+ bagId: string;
702
+ path?: string | undefined;
703
+ } | {
704
+ kind: "knowledge-explore";
705
+ orgId: string;
706
+ exploreQueryId: string;
707
+ nodeIds?: string[] | undefined;
708
+ };
709
+ summary: string;
710
+ epistemic: "OBSERVED" | "INFERRED" | "POLICY_CANDIDATE" | "REACHABLE" | "UNKNOWN" | "CONFLICTING";
711
+ confidence?: number | undefined;
712
+ payload?: unknown;
713
+ tags?: string[] | undefined;
714
+ }[];
715
+ coverage: {
716
+ complete: boolean;
717
+ datasetsRead: string[];
718
+ datasetsSkipped: {
719
+ id: string;
720
+ reason: string;
721
+ }[];
722
+ countChecks: {
723
+ dataset: string;
724
+ actual: number;
725
+ matched: boolean;
726
+ expected?: number | undefined;
727
+ }[];
728
+ };
729
+ continuation?: {
730
+ kind: "cursor" | "refinement-required" | "budget-exhausted";
731
+ token?: string | undefined;
732
+ suggestion?: string | undefined;
733
+ } | null | undefined;
734
+ }>;
735
+ export type EvidenceBundle = z.infer<typeof EvidenceBundleSchema>;
736
+ export declare const RetrievalStepSchema: z.ZodObject<{
737
+ stepId: z.ZodString;
738
+ operationId: z.ZodString;
739
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
740
+ dependsOn: z.ZodArray<z.ZodString, "many">;
741
+ purpose: z.ZodString;
742
+ optional: z.ZodBoolean;
743
+ }, "strip", z.ZodTypeAny, {
744
+ stepId: string;
745
+ operationId: string;
746
+ arguments: Record<string, unknown>;
747
+ dependsOn: string[];
748
+ purpose: string;
749
+ optional: boolean;
750
+ }, {
751
+ stepId: string;
752
+ operationId: string;
753
+ arguments: Record<string, unknown>;
754
+ dependsOn: string[];
755
+ purpose: string;
756
+ optional: boolean;
757
+ }>;
758
+ export declare const RetrievalPlanSchema: z.ZodObject<{
759
+ planId: z.ZodString;
760
+ objective: z.ZodString;
761
+ profiles: z.ZodArray<z.ZodString, "many">;
762
+ steps: z.ZodArray<z.ZodObject<{
763
+ stepId: z.ZodString;
764
+ operationId: z.ZodString;
765
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
766
+ dependsOn: z.ZodArray<z.ZodString, "many">;
767
+ purpose: z.ZodString;
768
+ optional: z.ZodBoolean;
769
+ }, "strip", z.ZodTypeAny, {
770
+ stepId: string;
771
+ operationId: string;
772
+ arguments: Record<string, unknown>;
773
+ dependsOn: string[];
774
+ purpose: string;
775
+ optional: boolean;
776
+ }, {
777
+ stepId: string;
778
+ operationId: string;
779
+ arguments: Record<string, unknown>;
780
+ dependsOn: string[];
781
+ purpose: string;
782
+ optional: boolean;
783
+ }>, "many">;
784
+ }, "strip", z.ZodTypeAny, {
785
+ planId: string;
786
+ steps: {
787
+ stepId: string;
788
+ operationId: string;
789
+ arguments: Record<string, unknown>;
790
+ dependsOn: string[];
791
+ purpose: string;
792
+ optional: boolean;
793
+ }[];
794
+ objective: string;
795
+ profiles: string[];
796
+ }, {
797
+ planId: string;
798
+ steps: {
799
+ stepId: string;
800
+ operationId: string;
801
+ arguments: Record<string, unknown>;
802
+ dependsOn: string[];
803
+ purpose: string;
804
+ optional: boolean;
805
+ }[];
806
+ objective: string;
807
+ profiles: string[];
808
+ }>;
809
+ export type RetrievalPlan = z.infer<typeof RetrievalPlanSchema>;
810
+ export type RetrievalStep = z.infer<typeof RetrievalStepSchema>;
811
+ export declare const EvidenceSelectionSchema: z.ZodObject<{
812
+ selectedEvidenceIds: z.ZodArray<z.ZodString, "many">;
813
+ conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
814
+ description: z.ZodString;
815
+ evidenceIds: z.ZodArray<z.ZodString, "many">;
816
+ resolution: z.ZodEnum<["unresolved", "source-precedence", "different-context"]>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ evidenceIds: string[];
819
+ description: string;
820
+ resolution: "unresolved" | "source-precedence" | "different-context";
821
+ }, {
822
+ evidenceIds: string[];
823
+ description: string;
824
+ resolution: "unresolved" | "source-precedence" | "different-context";
825
+ }>, "many">>;
826
+ unknowns: z.ZodOptional<z.ZodArray<z.ZodObject<{
827
+ question: z.ZodString;
828
+ reason: z.ZodString;
829
+ missingDatasets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
830
+ }, "strip", z.ZodTypeAny, {
831
+ question: string;
832
+ reason: string;
833
+ missingDatasets?: string[] | undefined;
834
+ }, {
835
+ question: string;
836
+ reason: string;
837
+ missingDatasets?: string[] | undefined;
838
+ }>, "many">>;
839
+ notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
840
+ }, "strip", z.ZodTypeAny, {
841
+ selectedEvidenceIds: string[];
842
+ conflicts?: {
843
+ evidenceIds: string[];
844
+ description: string;
845
+ resolution: "unresolved" | "source-precedence" | "different-context";
846
+ }[] | undefined;
847
+ unknowns?: {
848
+ question: string;
849
+ reason: string;
850
+ missingDatasets?: string[] | undefined;
851
+ }[] | undefined;
852
+ notes?: string[] | undefined;
853
+ }, {
854
+ selectedEvidenceIds: string[];
855
+ conflicts?: {
856
+ evidenceIds: string[];
857
+ description: string;
858
+ resolution: "unresolved" | "source-precedence" | "different-context";
859
+ }[] | undefined;
860
+ unknowns?: {
861
+ question: string;
862
+ reason: string;
863
+ missingDatasets?: string[] | undefined;
864
+ }[] | undefined;
865
+ notes?: string[] | undefined;
866
+ }>;
867
+ export type EvidenceSelection = z.infer<typeof EvidenceSelectionSchema>;
868
+ export declare const IdentifierDescriptorSchema: z.ZodObject<{
869
+ name: z.ZodString;
870
+ kind: z.ZodString;
871
+ required: z.ZodOptional<z.ZodBoolean>;
872
+ }, "strip", z.ZodTypeAny, {
873
+ kind: string;
874
+ name: string;
875
+ required?: boolean | undefined;
876
+ }, {
877
+ kind: string;
878
+ name: string;
879
+ required?: boolean | undefined;
880
+ }>;
881
+ export declare const RelationshipDescriptorSchema: z.ZodObject<{
882
+ name: z.ZodString;
883
+ target: z.ZodString;
884
+ cardinality: z.ZodString;
885
+ strength: z.ZodEnum<["identity", "authoritative-relation", "weak-correlation"]>;
886
+ }, "strip", z.ZodTypeAny, {
887
+ name: string;
888
+ target: string;
889
+ cardinality: string;
890
+ strength: "identity" | "authoritative-relation" | "weak-correlation";
891
+ }, {
892
+ name: string;
893
+ target: string;
894
+ cardinality: string;
895
+ strength: "identity" | "authoritative-relation" | "weak-correlation";
896
+ }>;
897
+ export declare const CatalogEntrySchema: z.ZodObject<{
898
+ id: z.ZodString;
899
+ version: z.ZodString;
900
+ description: z.ZodString;
901
+ surface: z.ZodEnum<["estate-bag", "subject", "knowledge-explore"]>;
902
+ operation: z.ZodString;
903
+ physicalContractVersion: z.ZodString;
904
+ identifiers: z.ZodArray<z.ZodObject<{
905
+ name: z.ZodString;
906
+ kind: z.ZodString;
907
+ required: z.ZodOptional<z.ZodBoolean>;
908
+ }, "strip", z.ZodTypeAny, {
909
+ kind: string;
910
+ name: string;
911
+ required?: boolean | undefined;
912
+ }, {
913
+ kind: string;
914
+ name: string;
915
+ required?: boolean | undefined;
916
+ }>, "many">;
917
+ relationships: z.ZodArray<z.ZodObject<{
918
+ name: z.ZodString;
919
+ target: z.ZodString;
920
+ cardinality: z.ZodString;
921
+ strength: z.ZodEnum<["identity", "authoritative-relation", "weak-correlation"]>;
922
+ }, "strip", z.ZodTypeAny, {
923
+ name: string;
924
+ target: string;
925
+ cardinality: string;
926
+ strength: "identity" | "authoritative-relation" | "weak-correlation";
927
+ }, {
928
+ name: string;
929
+ target: string;
930
+ cardinality: string;
931
+ strength: "identity" | "authoritative-relation" | "weak-correlation";
932
+ }>, "many">;
933
+ clock: z.ZodOptional<z.ZodEnum<["stable", "live"]>>;
934
+ epistemicPlanes: z.ZodArray<z.ZodString, "many">;
935
+ limits: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean]>>;
936
+ classification: z.ZodString;
937
+ requiredPermissions: z.ZodArray<z.ZodString, "many">;
938
+ mayBeMissing: z.ZodBoolean;
939
+ limitations: z.ZodArray<z.ZodString, "many">;
940
+ prohibitedInferences: z.ZodArray<z.ZodString, "many">;
941
+ owner: z.ZodString;
942
+ }, "strip", z.ZodTypeAny, {
943
+ id: string;
944
+ description: string;
945
+ version: string;
946
+ surface: "subject" | "estate-bag" | "knowledge-explore";
947
+ operation: string;
948
+ physicalContractVersion: string;
949
+ identifiers: {
950
+ kind: string;
951
+ name: string;
952
+ required?: boolean | undefined;
953
+ }[];
954
+ relationships: {
955
+ name: string;
956
+ target: string;
957
+ cardinality: string;
958
+ strength: "identity" | "authoritative-relation" | "weak-correlation";
959
+ }[];
960
+ epistemicPlanes: string[];
961
+ limits: Record<string, string | number | boolean>;
962
+ classification: string;
963
+ requiredPermissions: string[];
964
+ mayBeMissing: boolean;
965
+ limitations: string[];
966
+ prohibitedInferences: string[];
967
+ owner: string;
968
+ clock?: "stable" | "live" | undefined;
969
+ }, {
970
+ id: string;
971
+ description: string;
972
+ version: string;
973
+ surface: "subject" | "estate-bag" | "knowledge-explore";
974
+ operation: string;
975
+ physicalContractVersion: string;
976
+ identifiers: {
977
+ kind: string;
978
+ name: string;
979
+ required?: boolean | undefined;
980
+ }[];
981
+ relationships: {
982
+ name: string;
983
+ target: string;
984
+ cardinality: string;
985
+ strength: "identity" | "authoritative-relation" | "weak-correlation";
986
+ }[];
987
+ epistemicPlanes: string[];
988
+ limits: Record<string, string | number | boolean>;
989
+ classification: string;
990
+ requiredPermissions: string[];
991
+ mayBeMissing: boolean;
992
+ limitations: string[];
993
+ prohibitedInferences: string[];
994
+ owner: string;
995
+ clock?: "stable" | "live" | undefined;
996
+ }>;
997
+ export type CatalogEntry = z.infer<typeof CatalogEntrySchema>;
998
+ export declare const ScoperProfileSchema: z.ZodObject<{
999
+ id: z.ZodString;
1000
+ version: z.ZodString;
1001
+ description: z.ZodString;
1002
+ domains: z.ZodArray<z.ZodString, "many">;
1003
+ requiredCatalogEntries: z.ZodArray<z.ZodString, "many">;
1004
+ retrievalGuidance: z.ZodArray<z.ZodString, "many">;
1005
+ prohibitedInferences: z.ZodArray<z.ZodString, "many">;
1006
+ defaultBudgets: z.ZodObject<{
1007
+ maxWallTimeMs: z.ZodOptional<z.ZodNumber>;
1008
+ maxSdkCalls: z.ZodOptional<z.ZodNumber>;
1009
+ maxPages: z.ZodOptional<z.ZodNumber>;
1010
+ maxRecords: z.ZodOptional<z.ZodNumber>;
1011
+ maxBytes: z.ZodOptional<z.ZodNumber>;
1012
+ maxEvidenceItems: z.ZodOptional<z.ZodNumber>;
1013
+ maxRelationshipDepth: z.ZodOptional<z.ZodNumber>;
1014
+ maxReasoningRounds: z.ZodOptional<z.ZodNumber>;
1015
+ maxParallelCalls: z.ZodOptional<z.ZodNumber>;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ maxEvidenceItems?: number | undefined;
1018
+ maxParallelCalls?: number | undefined;
1019
+ maxWallTimeMs?: number | undefined;
1020
+ maxSdkCalls?: number | undefined;
1021
+ maxPages?: number | undefined;
1022
+ maxRecords?: number | undefined;
1023
+ maxBytes?: number | undefined;
1024
+ maxRelationshipDepth?: number | undefined;
1025
+ maxReasoningRounds?: number | undefined;
1026
+ }, {
1027
+ maxEvidenceItems?: number | undefined;
1028
+ maxParallelCalls?: number | undefined;
1029
+ maxWallTimeMs?: number | undefined;
1030
+ maxSdkCalls?: number | undefined;
1031
+ maxPages?: number | undefined;
1032
+ maxRecords?: number | undefined;
1033
+ maxBytes?: number | undefined;
1034
+ maxRelationshipDepth?: number | undefined;
1035
+ maxReasoningRounds?: number | undefined;
1036
+ }>;
1037
+ }, "strip", z.ZodTypeAny, {
1038
+ id: string;
1039
+ description: string;
1040
+ version: string;
1041
+ defaultBudgets: {
1042
+ maxEvidenceItems?: number | undefined;
1043
+ maxParallelCalls?: number | undefined;
1044
+ maxWallTimeMs?: number | undefined;
1045
+ maxSdkCalls?: number | undefined;
1046
+ maxPages?: number | undefined;
1047
+ maxRecords?: number | undefined;
1048
+ maxBytes?: number | undefined;
1049
+ maxRelationshipDepth?: number | undefined;
1050
+ maxReasoningRounds?: number | undefined;
1051
+ };
1052
+ domains: string[];
1053
+ prohibitedInferences: string[];
1054
+ requiredCatalogEntries: string[];
1055
+ retrievalGuidance: string[];
1056
+ }, {
1057
+ id: string;
1058
+ description: string;
1059
+ version: string;
1060
+ defaultBudgets: {
1061
+ maxEvidenceItems?: number | undefined;
1062
+ maxParallelCalls?: number | undefined;
1063
+ maxWallTimeMs?: number | undefined;
1064
+ maxSdkCalls?: number | undefined;
1065
+ maxPages?: number | undefined;
1066
+ maxRecords?: number | undefined;
1067
+ maxBytes?: number | undefined;
1068
+ maxRelationshipDepth?: number | undefined;
1069
+ maxReasoningRounds?: number | undefined;
1070
+ };
1071
+ domains: string[];
1072
+ prohibitedInferences: string[];
1073
+ requiredCatalogEntries: string[];
1074
+ retrievalGuidance: string[];
1075
+ }>;
1076
+ export type ScoperProfile = z.infer<typeof ScoperProfileSchema>;
1077
+ //# sourceMappingURL=schemas.d.ts.map