@schift-io/knowledge-scope 0.1.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/LICENSE +202 -0
  2. package/README.md +387 -0
  3. package/dist/context-pack.js +4771 -0
  4. package/dist/index.js +8044 -0
  5. package/dist/main.js +7550 -0
  6. package/dist/types/adapters/evidence-policy.d.ts +3 -0
  7. package/dist/types/adapters/gates.d.ts +13 -0
  8. package/dist/types/adapters/http-policy.d.ts +10 -0
  9. package/dist/types/adapters/open-connector.d.ts +20 -0
  10. package/dist/types/adapters/provider-port.d.ts +27 -0
  11. package/dist/types/adapters/response.d.ts +12 -0
  12. package/dist/types/adapters/schift-search-headers.d.ts +2 -0
  13. package/dist/types/adapters/schift-search-identity.d.ts +14 -0
  14. package/dist/types/adapters/schift-search.d.ts +17 -0
  15. package/dist/types/adapters/types.d.ts +136 -0
  16. package/dist/types/api-contract.d.ts +164 -0
  17. package/dist/types/api.d.ts +30 -0
  18. package/dist/types/application-batch.d.ts +4 -0
  19. package/dist/types/application-execution.d.ts +30 -0
  20. package/dist/types/application.d.ts +47 -0
  21. package/dist/types/authorization.d.ts +228 -0
  22. package/dist/types/cli-options.d.ts +6 -0
  23. package/dist/types/cli.d.ts +24 -0
  24. package/dist/types/client-error.d.ts +5 -0
  25. package/dist/types/client-validation.d.ts +8 -0
  26. package/dist/types/client.d.ts +18 -0
  27. package/dist/types/context-pack/bounded-json.d.ts +3 -0
  28. package/dist/types/context-pack/canonical.d.ts +12 -0
  29. package/dist/types/context-pack/index.d.ts +73 -0
  30. package/dist/types/context-pack/knowledge-scope-admission.d.ts +23 -0
  31. package/dist/types/context-pack/knowledge-scope-batch.d.ts +85 -0
  32. package/dist/types/context-pack/knowledge-scope-execution.d.ts +297 -0
  33. package/dist/types/context-pack/knowledge-scope-lock.d.ts +71 -0
  34. package/dist/types/context-pack/knowledge-scope-mount.d.ts +1094 -0
  35. package/dist/types/context-pack/knowledge-scope.d.ts +1843 -0
  36. package/dist/types/context-pack/scalars.d.ts +13 -0
  37. package/dist/types/doctor-config.d.ts +6 -0
  38. package/dist/types/doctor.d.ts +7 -0
  39. package/dist/types/errors.d.ts +8 -0
  40. package/dist/types/evaluation/contracts.d.ts +718 -0
  41. package/dist/types/evaluation.d.ts +20 -0
  42. package/dist/types/index.d.ts +26 -0
  43. package/dist/types/json.d.ts +17 -0
  44. package/dist/types/limits.d.ts +10 -0
  45. package/dist/types/main.d.ts +10 -0
  46. package/dist/types/onboarding-config.d.ts +9 -0
  47. package/dist/types/portable.d.ts +14 -0
  48. package/dist/types/quickstart.d.ts +10 -0
  49. package/dist/types/schema-subset.d.ts +9 -0
  50. package/dist/types/state-contract.d.ts +2867 -0
  51. package/dist/types/state-store.d.ts +29 -0
  52. package/docs/PILOT.md +184 -0
  53. package/examples/batch-consumer.mjs +19 -0
  54. package/examples/consumer.mjs +17 -0
  55. package/examples/evaluation/README.md +34 -0
  56. package/examples/evaluation/run.mjs +21 -0
  57. package/examples/evaluation/synthetic.json +59 -0
  58. package/examples/mount-bindings.json +31 -0
  59. package/examples/support-scope/schemas/query-input.json +6 -0
  60. package/examples/support-scope/schemas/result-row.json +6 -0
  61. package/examples/support-scope/scope.json +48 -0
  62. package/package.json +58 -0
@@ -0,0 +1,2867 @@
1
+ import { z } from "zod";
2
+ import type { JsonValue } from "./json.js";
3
+ export declare const StoredKnowledgeScopeSchema: z.ZodReadonly<z.ZodObject<{
4
+ definition: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
5
+ packId: z.ZodBranded<z.ZodString, "PackId">;
6
+ version: z.ZodBranded<z.ZodString, "SemanticVersion">;
7
+ responsibility: z.ZodString;
8
+ scope: z.ZodReadonly<z.ZodObject<{
9
+ root: z.ZodLiteral<"tenant">;
10
+ descendants: z.ZodReadonly<z.ZodTuple<[z.ZodLiteral<"namespace">, z.ZodLiteral<"subject">, z.ZodLiteral<"session">], null>>;
11
+ }, "strict", z.ZodTypeAny, {
12
+ root: "tenant";
13
+ descendants: readonly ["namespace", "subject", "session"];
14
+ }, {
15
+ root: "tenant";
16
+ descendants: readonly ["namespace", "subject", "session"];
17
+ }>>;
18
+ capabilities: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
19
+ operationId: z.ZodString;
20
+ provider: z.ZodReadonly<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
21
+ kind: z.ZodLiteral<"records_operation">;
22
+ operationId: z.ZodString;
23
+ }, "strict", z.ZodTypeAny, {
24
+ kind: "records_operation";
25
+ operationId: string;
26
+ }, {
27
+ kind: "records_operation";
28
+ operationId: string;
29
+ }>, z.ZodObject<{
30
+ kind: z.ZodLiteral<"open_connector_action">;
31
+ actionId: z.ZodString;
32
+ connectorRef: z.ZodString;
33
+ }, "strict", z.ZodTypeAny, {
34
+ kind: "open_connector_action";
35
+ actionId: string;
36
+ connectorRef: string;
37
+ }, {
38
+ kind: "open_connector_action";
39
+ actionId: string;
40
+ connectorRef: string;
41
+ }>, z.ZodObject<{
42
+ kind: z.ZodLiteral<"schift_search">;
43
+ indexRef: z.ZodString;
44
+ }, "strict", z.ZodTypeAny, {
45
+ kind: "schift_search";
46
+ indexRef: string;
47
+ }, {
48
+ kind: "schift_search";
49
+ indexRef: string;
50
+ }>, z.ZodObject<{
51
+ kind: z.ZodLiteral<"web_search">;
52
+ provider: z.ZodEnum<["customer", "schift"]>;
53
+ }, "strict", z.ZodTypeAny, {
54
+ kind: "web_search";
55
+ provider: "customer" | "schift";
56
+ }, {
57
+ kind: "web_search";
58
+ provider: "customer" | "schift";
59
+ }>]>>;
60
+ inputSchemaRef: z.ZodEffects<z.ZodString, string, string>;
61
+ resultSchemaRef: z.ZodEffects<z.ZodString, string, string>;
62
+ allowedFilters: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
63
+ limits: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
64
+ maxRows: z.ZodOptional<z.ZodNumber>;
65
+ maxResultBytes: z.ZodOptional<z.ZodNumber>;
66
+ }, "strict", z.ZodTypeAny, {
67
+ maxRows?: number | undefined;
68
+ maxResultBytes?: number | undefined;
69
+ }, {
70
+ maxRows?: number | undefined;
71
+ maxResultBytes?: number | undefined;
72
+ }>, {
73
+ maxRows?: number | undefined;
74
+ maxResultBytes?: number | undefined;
75
+ }, {
76
+ maxRows?: number | undefined;
77
+ maxResultBytes?: number | undefined;
78
+ }>>>;
79
+ freshness: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
80
+ maxAgeSeconds: z.ZodNumber;
81
+ }, "strict", z.ZodTypeAny, {
82
+ maxAgeSeconds: number;
83
+ }, {
84
+ maxAgeSeconds: number;
85
+ }>>>;
86
+ requiredProviderScopes: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
87
+ }, "strict", z.ZodTypeAny, {
88
+ operationId: string;
89
+ provider: Readonly<{
90
+ kind: "records_operation";
91
+ operationId: string;
92
+ }> | Readonly<{
93
+ kind: "open_connector_action";
94
+ actionId: string;
95
+ connectorRef: string;
96
+ }> | Readonly<{
97
+ kind: "schift_search";
98
+ indexRef: string;
99
+ }> | Readonly<{
100
+ kind: "web_search";
101
+ provider: "customer" | "schift";
102
+ }>;
103
+ inputSchemaRef: string;
104
+ resultSchemaRef: string;
105
+ allowedFilters?: readonly string[] | undefined;
106
+ limits?: Readonly<{
107
+ maxRows?: number | undefined;
108
+ maxResultBytes?: number | undefined;
109
+ }> | undefined;
110
+ freshness?: Readonly<{
111
+ maxAgeSeconds: number;
112
+ }> | undefined;
113
+ requiredProviderScopes?: readonly string[] | undefined;
114
+ }, {
115
+ operationId: string;
116
+ provider: Readonly<{
117
+ kind: "records_operation";
118
+ operationId: string;
119
+ }> | Readonly<{
120
+ kind: "open_connector_action";
121
+ actionId: string;
122
+ connectorRef: string;
123
+ }> | Readonly<{
124
+ kind: "schift_search";
125
+ indexRef: string;
126
+ }> | Readonly<{
127
+ kind: "web_search";
128
+ provider: "customer" | "schift";
129
+ }>;
130
+ inputSchemaRef: string;
131
+ resultSchemaRef: string;
132
+ allowedFilters?: readonly string[] | undefined;
133
+ limits?: Readonly<{
134
+ maxRows?: number | undefined;
135
+ maxResultBytes?: number | undefined;
136
+ }> | undefined;
137
+ freshness?: Readonly<{
138
+ maxAgeSeconds: number;
139
+ }> | undefined;
140
+ requiredProviderScopes?: readonly string[] | undefined;
141
+ }>>, "many">>;
142
+ contextPolicy: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
143
+ mustConsider: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
144
+ id: z.ZodString;
145
+ selector: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
146
+ sourceIds: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
147
+ sourceClasses: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["document", "records", "activity_stream"]>, "many">, ("document" | "records" | "activity_stream")[], ("document" | "records" | "activity_stream")[]>>>;
148
+ authorities: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>, "many">, ("primary" | "operational" | "approved" | "observed" | "derived")[], ("primary" | "operational" | "approved" | "observed" | "derived")[]>>>;
149
+ origins: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["observed", "derived"]>, "many">, ("observed" | "derived")[], ("observed" | "derived")[]>>>;
150
+ }, "strict", z.ZodTypeAny, {
151
+ sourceIds?: readonly string[] | undefined;
152
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
153
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
154
+ origins?: readonly ("observed" | "derived")[] | undefined;
155
+ }, {
156
+ sourceIds?: readonly string[] | undefined;
157
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
158
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
159
+ origins?: readonly ("observed" | "derived")[] | undefined;
160
+ }>, {
161
+ sourceIds?: readonly string[] | undefined;
162
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
163
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
164
+ origins?: readonly ("observed" | "derived")[] | undefined;
165
+ }, {
166
+ sourceIds?: readonly string[] | undefined;
167
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
168
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
169
+ origins?: readonly ("observed" | "derived")[] | undefined;
170
+ }>>;
171
+ minEvidence: z.ZodNumber;
172
+ maxAgeSeconds: z.ZodOptional<z.ZodNumber>;
173
+ }, "strict", z.ZodTypeAny, {
174
+ id: string;
175
+ selector: Readonly<{
176
+ sourceIds?: readonly string[] | undefined;
177
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
178
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
179
+ origins?: readonly ("observed" | "derived")[] | undefined;
180
+ }>;
181
+ minEvidence: number;
182
+ maxAgeSeconds?: number | undefined;
183
+ }, {
184
+ id: string;
185
+ selector: Readonly<{
186
+ sourceIds?: readonly string[] | undefined;
187
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
188
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
189
+ origins?: readonly ("observed" | "derived")[] | undefined;
190
+ }>;
191
+ minEvidence: number;
192
+ maxAgeSeconds?: number | undefined;
193
+ }>>, "many">>;
194
+ mayConsider: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
195
+ id: z.ZodString;
196
+ selector: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
197
+ sourceIds: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
198
+ sourceClasses: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["document", "records", "activity_stream"]>, "many">, ("document" | "records" | "activity_stream")[], ("document" | "records" | "activity_stream")[]>>>;
199
+ authorities: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>, "many">, ("primary" | "operational" | "approved" | "observed" | "derived")[], ("primary" | "operational" | "approved" | "observed" | "derived")[]>>>;
200
+ origins: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["observed", "derived"]>, "many">, ("observed" | "derived")[], ("observed" | "derived")[]>>>;
201
+ }, "strict", z.ZodTypeAny, {
202
+ sourceIds?: readonly string[] | undefined;
203
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
204
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
205
+ origins?: readonly ("observed" | "derived")[] | undefined;
206
+ }, {
207
+ sourceIds?: readonly string[] | undefined;
208
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
209
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
210
+ origins?: readonly ("observed" | "derived")[] | undefined;
211
+ }>, {
212
+ sourceIds?: readonly string[] | undefined;
213
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
214
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
215
+ origins?: readonly ("observed" | "derived")[] | undefined;
216
+ }, {
217
+ sourceIds?: readonly string[] | undefined;
218
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
219
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
220
+ origins?: readonly ("observed" | "derived")[] | undefined;
221
+ }>>;
222
+ minEvidence: z.ZodNumber;
223
+ maxAgeSeconds: z.ZodOptional<z.ZodNumber>;
224
+ }, "strict", z.ZodTypeAny, {
225
+ id: string;
226
+ selector: Readonly<{
227
+ sourceIds?: readonly string[] | undefined;
228
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
229
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
230
+ origins?: readonly ("observed" | "derived")[] | undefined;
231
+ }>;
232
+ minEvidence: number;
233
+ maxAgeSeconds?: number | undefined;
234
+ }, {
235
+ id: string;
236
+ selector: Readonly<{
237
+ sourceIds?: readonly string[] | undefined;
238
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
239
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
240
+ origins?: readonly ("observed" | "derived")[] | undefined;
241
+ }>;
242
+ minEvidence: number;
243
+ maxAgeSeconds?: number | undefined;
244
+ }>>, "many">>>;
245
+ mustNotUse: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
246
+ id: z.ZodString;
247
+ selector: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
248
+ sourceIds: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
249
+ sourceClasses: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["document", "records", "activity_stream"]>, "many">, ("document" | "records" | "activity_stream")[], ("document" | "records" | "activity_stream")[]>>>;
250
+ authorities: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>, "many">, ("primary" | "operational" | "approved" | "observed" | "derived")[], ("primary" | "operational" | "approved" | "observed" | "derived")[]>>>;
251
+ origins: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["observed", "derived"]>, "many">, ("observed" | "derived")[], ("observed" | "derived")[]>>>;
252
+ }, "strict", z.ZodTypeAny, {
253
+ sourceIds?: readonly string[] | undefined;
254
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
255
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
256
+ origins?: readonly ("observed" | "derived")[] | undefined;
257
+ }, {
258
+ sourceIds?: readonly string[] | undefined;
259
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
260
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
261
+ origins?: readonly ("observed" | "derived")[] | undefined;
262
+ }>, {
263
+ sourceIds?: readonly string[] | undefined;
264
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
265
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
266
+ origins?: readonly ("observed" | "derived")[] | undefined;
267
+ }, {
268
+ sourceIds?: readonly string[] | undefined;
269
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
270
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
271
+ origins?: readonly ("observed" | "derived")[] | undefined;
272
+ }>>;
273
+ }, "strict", z.ZodTypeAny, {
274
+ id: string;
275
+ selector: Readonly<{
276
+ sourceIds?: readonly string[] | undefined;
277
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
278
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
279
+ origins?: readonly ("observed" | "derived")[] | undefined;
280
+ }>;
281
+ }, {
282
+ id: string;
283
+ selector: Readonly<{
284
+ sourceIds?: readonly string[] | undefined;
285
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
286
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
287
+ origins?: readonly ("observed" | "derived")[] | undefined;
288
+ }>;
289
+ }>>, "many">>;
290
+ }, "strict", z.ZodTypeAny, {
291
+ mustConsider: readonly Readonly<{
292
+ id: string;
293
+ selector: Readonly<{
294
+ sourceIds?: readonly string[] | undefined;
295
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
296
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
297
+ origins?: readonly ("observed" | "derived")[] | undefined;
298
+ }>;
299
+ minEvidence: number;
300
+ maxAgeSeconds?: number | undefined;
301
+ }>[];
302
+ mustNotUse: readonly Readonly<{
303
+ id: string;
304
+ selector: Readonly<{
305
+ sourceIds?: readonly string[] | undefined;
306
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
307
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
308
+ origins?: readonly ("observed" | "derived")[] | undefined;
309
+ }>;
310
+ }>[];
311
+ mayConsider?: readonly Readonly<{
312
+ id: string;
313
+ selector: Readonly<{
314
+ sourceIds?: readonly string[] | undefined;
315
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
316
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
317
+ origins?: readonly ("observed" | "derived")[] | undefined;
318
+ }>;
319
+ minEvidence: number;
320
+ maxAgeSeconds?: number | undefined;
321
+ }>[] | undefined;
322
+ }, {
323
+ mustConsider: readonly Readonly<{
324
+ id: string;
325
+ selector: Readonly<{
326
+ sourceIds?: readonly string[] | undefined;
327
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
328
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
329
+ origins?: readonly ("observed" | "derived")[] | undefined;
330
+ }>;
331
+ minEvidence: number;
332
+ maxAgeSeconds?: number | undefined;
333
+ }>[];
334
+ mustNotUse: readonly Readonly<{
335
+ id: string;
336
+ selector: Readonly<{
337
+ sourceIds?: readonly string[] | undefined;
338
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
339
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
340
+ origins?: readonly ("observed" | "derived")[] | undefined;
341
+ }>;
342
+ }>[];
343
+ mayConsider?: readonly Readonly<{
344
+ id: string;
345
+ selector: Readonly<{
346
+ sourceIds?: readonly string[] | undefined;
347
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
348
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
349
+ origins?: readonly ("observed" | "derived")[] | undefined;
350
+ }>;
351
+ minEvidence: number;
352
+ maxAgeSeconds?: number | undefined;
353
+ }>[] | undefined;
354
+ }>, {
355
+ mustConsider: readonly Readonly<{
356
+ id: string;
357
+ selector: Readonly<{
358
+ sourceIds?: readonly string[] | undefined;
359
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
360
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
361
+ origins?: readonly ("observed" | "derived")[] | undefined;
362
+ }>;
363
+ minEvidence: number;
364
+ maxAgeSeconds?: number | undefined;
365
+ }>[];
366
+ mustNotUse: readonly Readonly<{
367
+ id: string;
368
+ selector: Readonly<{
369
+ sourceIds?: readonly string[] | undefined;
370
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
371
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
372
+ origins?: readonly ("observed" | "derived")[] | undefined;
373
+ }>;
374
+ }>[];
375
+ mayConsider?: readonly Readonly<{
376
+ id: string;
377
+ selector: Readonly<{
378
+ sourceIds?: readonly string[] | undefined;
379
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
380
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
381
+ origins?: readonly ("observed" | "derived")[] | undefined;
382
+ }>;
383
+ minEvidence: number;
384
+ maxAgeSeconds?: number | undefined;
385
+ }>[] | undefined;
386
+ }, {
387
+ mustConsider: readonly Readonly<{
388
+ id: string;
389
+ selector: Readonly<{
390
+ sourceIds?: readonly string[] | undefined;
391
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
392
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
393
+ origins?: readonly ("observed" | "derived")[] | undefined;
394
+ }>;
395
+ minEvidence: number;
396
+ maxAgeSeconds?: number | undefined;
397
+ }>[];
398
+ mustNotUse: readonly Readonly<{
399
+ id: string;
400
+ selector: Readonly<{
401
+ sourceIds?: readonly string[] | undefined;
402
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
403
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
404
+ origins?: readonly ("observed" | "derived")[] | undefined;
405
+ }>;
406
+ }>[];
407
+ mayConsider?: readonly Readonly<{
408
+ id: string;
409
+ selector: Readonly<{
410
+ sourceIds?: readonly string[] | undefined;
411
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
412
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
413
+ origins?: readonly ("observed" | "derived")[] | undefined;
414
+ }>;
415
+ minEvidence: number;
416
+ maxAgeSeconds?: number | undefined;
417
+ }>[] | undefined;
418
+ }>>;
419
+ authority: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
420
+ precedence: z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>, "many">, ("primary" | "operational" | "approved" | "observed" | "derived")[], ("primary" | "operational" | "approved" | "observed" | "derived")[]>>;
421
+ allowed: z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["read", "draft"]>, "many">, ("read" | "draft")[], ("read" | "draft")[]>>;
422
+ forbidden: z.ZodReadonly<z.ZodTuple<[z.ZodLiteral<"send">, z.ZodLiteral<"approve">, z.ZodLiteral<"mutate_source">, z.ZodLiteral<"workflow">], null>>;
423
+ }, "strict", z.ZodTypeAny, {
424
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
425
+ allowed: readonly ("read" | "draft")[];
426
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
427
+ }, {
428
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
429
+ allowed: readonly ("read" | "draft")[];
430
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
431
+ }>, {
432
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
433
+ allowed: readonly ("read" | "draft")[];
434
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
435
+ }, {
436
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
437
+ allowed: readonly ("read" | "draft")[];
438
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
439
+ }>>;
440
+ evidence: z.ZodReadonly<z.ZodObject<{
441
+ requireCitation: z.ZodBoolean;
442
+ freshness: z.ZodReadonly<z.ZodObject<{
443
+ defaultMaxAgeSeconds: z.ZodNumber;
444
+ }, "strict", z.ZodTypeAny, {
445
+ defaultMaxAgeSeconds: number;
446
+ }, {
447
+ defaultMaxAgeSeconds: number;
448
+ }>>;
449
+ coverageAssertions: z.ZodEffects<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>, readonly string[], readonly string[]>;
450
+ }, "strict", z.ZodTypeAny, {
451
+ freshness: Readonly<{
452
+ defaultMaxAgeSeconds: number;
453
+ }>;
454
+ requireCitation: boolean;
455
+ coverageAssertions: readonly string[];
456
+ }, {
457
+ freshness: Readonly<{
458
+ defaultMaxAgeSeconds: number;
459
+ }>;
460
+ requireCitation: boolean;
461
+ coverageAssertions: readonly string[];
462
+ }>>;
463
+ }, "strict", z.ZodTypeAny, {
464
+ packId: string & z.BRAND<"PackId">;
465
+ version: string & z.BRAND<"SemanticVersion">;
466
+ responsibility: string;
467
+ scope: Readonly<{
468
+ root: "tenant";
469
+ descendants: readonly ["namespace", "subject", "session"];
470
+ }>;
471
+ capabilities: readonly Readonly<{
472
+ operationId: string;
473
+ provider: Readonly<{
474
+ kind: "records_operation";
475
+ operationId: string;
476
+ }> | Readonly<{
477
+ kind: "open_connector_action";
478
+ actionId: string;
479
+ connectorRef: string;
480
+ }> | Readonly<{
481
+ kind: "schift_search";
482
+ indexRef: string;
483
+ }> | Readonly<{
484
+ kind: "web_search";
485
+ provider: "customer" | "schift";
486
+ }>;
487
+ inputSchemaRef: string;
488
+ resultSchemaRef: string;
489
+ allowedFilters?: readonly string[] | undefined;
490
+ limits?: Readonly<{
491
+ maxRows?: number | undefined;
492
+ maxResultBytes?: number | undefined;
493
+ }> | undefined;
494
+ freshness?: Readonly<{
495
+ maxAgeSeconds: number;
496
+ }> | undefined;
497
+ requiredProviderScopes?: readonly string[] | undefined;
498
+ }>[];
499
+ contextPolicy: Readonly<{
500
+ mustConsider: readonly Readonly<{
501
+ id: string;
502
+ selector: Readonly<{
503
+ sourceIds?: readonly string[] | undefined;
504
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
505
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
506
+ origins?: readonly ("observed" | "derived")[] | undefined;
507
+ }>;
508
+ minEvidence: number;
509
+ maxAgeSeconds?: number | undefined;
510
+ }>[];
511
+ mustNotUse: readonly Readonly<{
512
+ id: string;
513
+ selector: Readonly<{
514
+ sourceIds?: readonly string[] | undefined;
515
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
516
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
517
+ origins?: readonly ("observed" | "derived")[] | undefined;
518
+ }>;
519
+ }>[];
520
+ mayConsider?: readonly Readonly<{
521
+ id: string;
522
+ selector: Readonly<{
523
+ sourceIds?: readonly string[] | undefined;
524
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
525
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
526
+ origins?: readonly ("observed" | "derived")[] | undefined;
527
+ }>;
528
+ minEvidence: number;
529
+ maxAgeSeconds?: number | undefined;
530
+ }>[] | undefined;
531
+ }>;
532
+ authority: Readonly<{
533
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
534
+ allowed: readonly ("read" | "draft")[];
535
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
536
+ }>;
537
+ evidence: Readonly<{
538
+ freshness: Readonly<{
539
+ defaultMaxAgeSeconds: number;
540
+ }>;
541
+ requireCitation: boolean;
542
+ coverageAssertions: readonly string[];
543
+ }>;
544
+ }, {
545
+ packId: string;
546
+ version: string;
547
+ responsibility: string;
548
+ scope: Readonly<{
549
+ root: "tenant";
550
+ descendants: readonly ["namespace", "subject", "session"];
551
+ }>;
552
+ capabilities: readonly Readonly<{
553
+ operationId: string;
554
+ provider: Readonly<{
555
+ kind: "records_operation";
556
+ operationId: string;
557
+ }> | Readonly<{
558
+ kind: "open_connector_action";
559
+ actionId: string;
560
+ connectorRef: string;
561
+ }> | Readonly<{
562
+ kind: "schift_search";
563
+ indexRef: string;
564
+ }> | Readonly<{
565
+ kind: "web_search";
566
+ provider: "customer" | "schift";
567
+ }>;
568
+ inputSchemaRef: string;
569
+ resultSchemaRef: string;
570
+ allowedFilters?: readonly string[] | undefined;
571
+ limits?: Readonly<{
572
+ maxRows?: number | undefined;
573
+ maxResultBytes?: number | undefined;
574
+ }> | undefined;
575
+ freshness?: Readonly<{
576
+ maxAgeSeconds: number;
577
+ }> | undefined;
578
+ requiredProviderScopes?: readonly string[] | undefined;
579
+ }>[];
580
+ contextPolicy: Readonly<{
581
+ mustConsider: readonly Readonly<{
582
+ id: string;
583
+ selector: Readonly<{
584
+ sourceIds?: readonly string[] | undefined;
585
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
586
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
587
+ origins?: readonly ("observed" | "derived")[] | undefined;
588
+ }>;
589
+ minEvidence: number;
590
+ maxAgeSeconds?: number | undefined;
591
+ }>[];
592
+ mustNotUse: readonly Readonly<{
593
+ id: string;
594
+ selector: Readonly<{
595
+ sourceIds?: readonly string[] | undefined;
596
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
597
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
598
+ origins?: readonly ("observed" | "derived")[] | undefined;
599
+ }>;
600
+ }>[];
601
+ mayConsider?: readonly Readonly<{
602
+ id: string;
603
+ selector: Readonly<{
604
+ sourceIds?: readonly string[] | undefined;
605
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
606
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
607
+ origins?: readonly ("observed" | "derived")[] | undefined;
608
+ }>;
609
+ minEvidence: number;
610
+ maxAgeSeconds?: number | undefined;
611
+ }>[] | undefined;
612
+ }>;
613
+ authority: Readonly<{
614
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
615
+ allowed: readonly ("read" | "draft")[];
616
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
617
+ }>;
618
+ evidence: Readonly<{
619
+ freshness: Readonly<{
620
+ defaultMaxAgeSeconds: number;
621
+ }>;
622
+ requireCitation: boolean;
623
+ coverageAssertions: readonly string[];
624
+ }>;
625
+ }>, {
626
+ packId: string & z.BRAND<"PackId">;
627
+ version: string & z.BRAND<"SemanticVersion">;
628
+ responsibility: string;
629
+ scope: Readonly<{
630
+ root: "tenant";
631
+ descendants: readonly ["namespace", "subject", "session"];
632
+ }>;
633
+ capabilities: readonly Readonly<{
634
+ operationId: string;
635
+ provider: Readonly<{
636
+ kind: "records_operation";
637
+ operationId: string;
638
+ }> | Readonly<{
639
+ kind: "open_connector_action";
640
+ actionId: string;
641
+ connectorRef: string;
642
+ }> | Readonly<{
643
+ kind: "schift_search";
644
+ indexRef: string;
645
+ }> | Readonly<{
646
+ kind: "web_search";
647
+ provider: "customer" | "schift";
648
+ }>;
649
+ inputSchemaRef: string;
650
+ resultSchemaRef: string;
651
+ allowedFilters?: readonly string[] | undefined;
652
+ limits?: Readonly<{
653
+ maxRows?: number | undefined;
654
+ maxResultBytes?: number | undefined;
655
+ }> | undefined;
656
+ freshness?: Readonly<{
657
+ maxAgeSeconds: number;
658
+ }> | undefined;
659
+ requiredProviderScopes?: readonly string[] | undefined;
660
+ }>[];
661
+ contextPolicy: Readonly<{
662
+ mustConsider: readonly Readonly<{
663
+ id: string;
664
+ selector: Readonly<{
665
+ sourceIds?: readonly string[] | undefined;
666
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
667
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
668
+ origins?: readonly ("observed" | "derived")[] | undefined;
669
+ }>;
670
+ minEvidence: number;
671
+ maxAgeSeconds?: number | undefined;
672
+ }>[];
673
+ mustNotUse: readonly Readonly<{
674
+ id: string;
675
+ selector: Readonly<{
676
+ sourceIds?: readonly string[] | undefined;
677
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
678
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
679
+ origins?: readonly ("observed" | "derived")[] | undefined;
680
+ }>;
681
+ }>[];
682
+ mayConsider?: readonly Readonly<{
683
+ id: string;
684
+ selector: Readonly<{
685
+ sourceIds?: readonly string[] | undefined;
686
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
687
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
688
+ origins?: readonly ("observed" | "derived")[] | undefined;
689
+ }>;
690
+ minEvidence: number;
691
+ maxAgeSeconds?: number | undefined;
692
+ }>[] | undefined;
693
+ }>;
694
+ authority: Readonly<{
695
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
696
+ allowed: readonly ("read" | "draft")[];
697
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
698
+ }>;
699
+ evidence: Readonly<{
700
+ freshness: Readonly<{
701
+ defaultMaxAgeSeconds: number;
702
+ }>;
703
+ requireCitation: boolean;
704
+ coverageAssertions: readonly string[];
705
+ }>;
706
+ }, {
707
+ packId: string;
708
+ version: string;
709
+ responsibility: string;
710
+ scope: Readonly<{
711
+ root: "tenant";
712
+ descendants: readonly ["namespace", "subject", "session"];
713
+ }>;
714
+ capabilities: readonly Readonly<{
715
+ operationId: string;
716
+ provider: Readonly<{
717
+ kind: "records_operation";
718
+ operationId: string;
719
+ }> | Readonly<{
720
+ kind: "open_connector_action";
721
+ actionId: string;
722
+ connectorRef: string;
723
+ }> | Readonly<{
724
+ kind: "schift_search";
725
+ indexRef: string;
726
+ }> | Readonly<{
727
+ kind: "web_search";
728
+ provider: "customer" | "schift";
729
+ }>;
730
+ inputSchemaRef: string;
731
+ resultSchemaRef: string;
732
+ allowedFilters?: readonly string[] | undefined;
733
+ limits?: Readonly<{
734
+ maxRows?: number | undefined;
735
+ maxResultBytes?: number | undefined;
736
+ }> | undefined;
737
+ freshness?: Readonly<{
738
+ maxAgeSeconds: number;
739
+ }> | undefined;
740
+ requiredProviderScopes?: readonly string[] | undefined;
741
+ }>[];
742
+ contextPolicy: Readonly<{
743
+ mustConsider: readonly Readonly<{
744
+ id: string;
745
+ selector: Readonly<{
746
+ sourceIds?: readonly string[] | undefined;
747
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
748
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
749
+ origins?: readonly ("observed" | "derived")[] | undefined;
750
+ }>;
751
+ minEvidence: number;
752
+ maxAgeSeconds?: number | undefined;
753
+ }>[];
754
+ mustNotUse: readonly Readonly<{
755
+ id: string;
756
+ selector: Readonly<{
757
+ sourceIds?: readonly string[] | undefined;
758
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
759
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
760
+ origins?: readonly ("observed" | "derived")[] | undefined;
761
+ }>;
762
+ }>[];
763
+ mayConsider?: readonly Readonly<{
764
+ id: string;
765
+ selector: Readonly<{
766
+ sourceIds?: readonly string[] | undefined;
767
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
768
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
769
+ origins?: readonly ("observed" | "derived")[] | undefined;
770
+ }>;
771
+ minEvidence: number;
772
+ maxAgeSeconds?: number | undefined;
773
+ }>[] | undefined;
774
+ }>;
775
+ authority: Readonly<{
776
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
777
+ allowed: readonly ("read" | "draft")[];
778
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
779
+ }>;
780
+ evidence: Readonly<{
781
+ freshness: Readonly<{
782
+ defaultMaxAgeSeconds: number;
783
+ }>;
784
+ requireCitation: boolean;
785
+ coverageAssertions: readonly string[];
786
+ }>;
787
+ }>>;
788
+ lock: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
789
+ schemaVersion: z.ZodLiteral<"knowledge-scope-lock.schift.dev/v0.1">;
790
+ packId: z.ZodBranded<z.ZodString, "PackId">;
791
+ version: z.ZodBranded<z.ZodString, "SemanticVersion">;
792
+ definitionDigest: z.ZodBranded<z.ZodString, "Sha256Digest">;
793
+ files: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
794
+ path: z.ZodEffects<z.ZodString, string, string>;
795
+ digest: z.ZodBranded<z.ZodString, "Sha256Digest">;
796
+ }, "strict", z.ZodTypeAny, {
797
+ path: string;
798
+ digest: string & z.BRAND<"Sha256Digest">;
799
+ }, {
800
+ path: string;
801
+ digest: string;
802
+ }>>, "many">>;
803
+ } & {
804
+ lockDigest: z.ZodBranded<z.ZodString, "Sha256Digest">;
805
+ }, "strict", z.ZodTypeAny, {
806
+ packId: string & z.BRAND<"PackId">;
807
+ version: string & z.BRAND<"SemanticVersion">;
808
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
809
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
810
+ files: readonly Readonly<{
811
+ path: string;
812
+ digest: string & z.BRAND<"Sha256Digest">;
813
+ }>[];
814
+ lockDigest: string & z.BRAND<"Sha256Digest">;
815
+ }, {
816
+ packId: string;
817
+ version: string;
818
+ definitionDigest: string;
819
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
820
+ files: readonly Readonly<{
821
+ path: string;
822
+ digest: string;
823
+ }>[];
824
+ lockDigest: string;
825
+ }>, {
826
+ packId: string & z.BRAND<"PackId">;
827
+ version: string & z.BRAND<"SemanticVersion">;
828
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
829
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
830
+ files: readonly Readonly<{
831
+ path: string;
832
+ digest: string & z.BRAND<"Sha256Digest">;
833
+ }>[];
834
+ lockDigest: string & z.BRAND<"Sha256Digest">;
835
+ }, {
836
+ packId: string;
837
+ version: string;
838
+ definitionDigest: string;
839
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
840
+ files: readonly Readonly<{
841
+ path: string;
842
+ digest: string;
843
+ }>[];
844
+ lockDigest: string;
845
+ }>>;
846
+ files: z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>>;
847
+ mount: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
848
+ installationId: z.ZodBranded<z.ZodString, "InstallationId">;
849
+ definitionDigest: z.ZodBranded<z.ZodString, "Sha256Digest">;
850
+ scopeAuthority: z.ZodReadonly<z.ZodObject<{
851
+ organizationId: z.ZodString;
852
+ tenant: z.ZodString;
853
+ }, "strict", z.ZodTypeAny, {
854
+ tenant: string;
855
+ organizationId: string;
856
+ }, {
857
+ tenant: string;
858
+ organizationId: string;
859
+ }>>;
860
+ sourceBindings: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
861
+ sourceId: z.ZodBranded<z.ZodString, "SourceId">;
862
+ sourceClass: z.ZodEnum<["document", "records", "activity_stream"]>;
863
+ providerRef: z.ZodString;
864
+ connectorRef: z.ZodOptional<z.ZodString>;
865
+ authority: z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>;
866
+ origin: z.ZodOptional<z.ZodEnum<["observed", "derived"]>>;
867
+ permissionMode: z.ZodEnum<["live", "mirrored", "static", "unsupported"]>;
868
+ operationIds: z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
869
+ }, "strict", z.ZodTypeAny, {
870
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
871
+ sourceId: string & z.BRAND<"SourceId">;
872
+ sourceClass: "document" | "records" | "activity_stream";
873
+ providerRef: string;
874
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
875
+ operationIds: readonly string[];
876
+ connectorRef?: string | undefined;
877
+ origin?: "observed" | "derived" | undefined;
878
+ }, {
879
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
880
+ sourceId: string;
881
+ sourceClass: "document" | "records" | "activity_stream";
882
+ providerRef: string;
883
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
884
+ operationIds: readonly string[];
885
+ connectorRef?: string | undefined;
886
+ origin?: "observed" | "derived" | undefined;
887
+ }>>, "many">>;
888
+ state: z.ZodEnum<["mounted", "unmounted"]>;
889
+ revision: z.ZodNumber;
890
+ }, "strict", z.ZodTypeAny, {
891
+ installationId: string & z.BRAND<"InstallationId">;
892
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
893
+ scopeAuthority: Readonly<{
894
+ tenant: string;
895
+ organizationId: string;
896
+ }>;
897
+ revision: number;
898
+ sourceBindings: readonly Readonly<{
899
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
900
+ sourceId: string & z.BRAND<"SourceId">;
901
+ sourceClass: "document" | "records" | "activity_stream";
902
+ providerRef: string;
903
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
904
+ operationIds: readonly string[];
905
+ connectorRef?: string | undefined;
906
+ origin?: "observed" | "derived" | undefined;
907
+ }>[];
908
+ state: "mounted" | "unmounted";
909
+ }, {
910
+ installationId: string;
911
+ definitionDigest: string;
912
+ scopeAuthority: Readonly<{
913
+ tenant: string;
914
+ organizationId: string;
915
+ }>;
916
+ revision: number;
917
+ sourceBindings: readonly Readonly<{
918
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
919
+ sourceId: string;
920
+ sourceClass: "document" | "records" | "activity_stream";
921
+ providerRef: string;
922
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
923
+ operationIds: readonly string[];
924
+ connectorRef?: string | undefined;
925
+ origin?: "observed" | "derived" | undefined;
926
+ }>[];
927
+ state: "mounted" | "unmounted";
928
+ }>, {
929
+ installationId: string & z.BRAND<"InstallationId">;
930
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
931
+ scopeAuthority: Readonly<{
932
+ tenant: string;
933
+ organizationId: string;
934
+ }>;
935
+ revision: number;
936
+ sourceBindings: readonly Readonly<{
937
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
938
+ sourceId: string & z.BRAND<"SourceId">;
939
+ sourceClass: "document" | "records" | "activity_stream";
940
+ providerRef: string;
941
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
942
+ operationIds: readonly string[];
943
+ connectorRef?: string | undefined;
944
+ origin?: "observed" | "derived" | undefined;
945
+ }>[];
946
+ state: "mounted" | "unmounted";
947
+ }, {
948
+ installationId: string;
949
+ definitionDigest: string;
950
+ scopeAuthority: Readonly<{
951
+ tenant: string;
952
+ organizationId: string;
953
+ }>;
954
+ revision: number;
955
+ sourceBindings: readonly Readonly<{
956
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
957
+ sourceId: string;
958
+ sourceClass: "document" | "records" | "activity_stream";
959
+ providerRef: string;
960
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
961
+ operationIds: readonly string[];
962
+ connectorRef?: string | undefined;
963
+ origin?: "observed" | "derived" | undefined;
964
+ }>[];
965
+ state: "mounted" | "unmounted";
966
+ }>>;
967
+ }, "strict", z.ZodTypeAny, {
968
+ files: Readonly<Record<string, JsonValue>>;
969
+ definition: Readonly<{
970
+ packId: string & z.BRAND<"PackId">;
971
+ version: string & z.BRAND<"SemanticVersion">;
972
+ responsibility: string;
973
+ scope: Readonly<{
974
+ root: "tenant";
975
+ descendants: readonly ["namespace", "subject", "session"];
976
+ }>;
977
+ capabilities: readonly Readonly<{
978
+ operationId: string;
979
+ provider: Readonly<{
980
+ kind: "records_operation";
981
+ operationId: string;
982
+ }> | Readonly<{
983
+ kind: "open_connector_action";
984
+ actionId: string;
985
+ connectorRef: string;
986
+ }> | Readonly<{
987
+ kind: "schift_search";
988
+ indexRef: string;
989
+ }> | Readonly<{
990
+ kind: "web_search";
991
+ provider: "customer" | "schift";
992
+ }>;
993
+ inputSchemaRef: string;
994
+ resultSchemaRef: string;
995
+ allowedFilters?: readonly string[] | undefined;
996
+ limits?: Readonly<{
997
+ maxRows?: number | undefined;
998
+ maxResultBytes?: number | undefined;
999
+ }> | undefined;
1000
+ freshness?: Readonly<{
1001
+ maxAgeSeconds: number;
1002
+ }> | undefined;
1003
+ requiredProviderScopes?: readonly string[] | undefined;
1004
+ }>[];
1005
+ contextPolicy: Readonly<{
1006
+ mustConsider: readonly Readonly<{
1007
+ id: string;
1008
+ selector: Readonly<{
1009
+ sourceIds?: readonly string[] | undefined;
1010
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1011
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1012
+ origins?: readonly ("observed" | "derived")[] | undefined;
1013
+ }>;
1014
+ minEvidence: number;
1015
+ maxAgeSeconds?: number | undefined;
1016
+ }>[];
1017
+ mustNotUse: readonly Readonly<{
1018
+ id: string;
1019
+ selector: Readonly<{
1020
+ sourceIds?: readonly string[] | undefined;
1021
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1022
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1023
+ origins?: readonly ("observed" | "derived")[] | undefined;
1024
+ }>;
1025
+ }>[];
1026
+ mayConsider?: readonly Readonly<{
1027
+ id: string;
1028
+ selector: Readonly<{
1029
+ sourceIds?: readonly string[] | undefined;
1030
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1031
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1032
+ origins?: readonly ("observed" | "derived")[] | undefined;
1033
+ }>;
1034
+ minEvidence: number;
1035
+ maxAgeSeconds?: number | undefined;
1036
+ }>[] | undefined;
1037
+ }>;
1038
+ authority: Readonly<{
1039
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1040
+ allowed: readonly ("read" | "draft")[];
1041
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1042
+ }>;
1043
+ evidence: Readonly<{
1044
+ freshness: Readonly<{
1045
+ defaultMaxAgeSeconds: number;
1046
+ }>;
1047
+ requireCitation: boolean;
1048
+ coverageAssertions: readonly string[];
1049
+ }>;
1050
+ }>;
1051
+ lock: Readonly<{
1052
+ packId: string & z.BRAND<"PackId">;
1053
+ version: string & z.BRAND<"SemanticVersion">;
1054
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
1055
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
1056
+ files: readonly Readonly<{
1057
+ path: string;
1058
+ digest: string & z.BRAND<"Sha256Digest">;
1059
+ }>[];
1060
+ lockDigest: string & z.BRAND<"Sha256Digest">;
1061
+ }>;
1062
+ mount: Readonly<{
1063
+ installationId: string & z.BRAND<"InstallationId">;
1064
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
1065
+ scopeAuthority: Readonly<{
1066
+ tenant: string;
1067
+ organizationId: string;
1068
+ }>;
1069
+ revision: number;
1070
+ sourceBindings: readonly Readonly<{
1071
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
1072
+ sourceId: string & z.BRAND<"SourceId">;
1073
+ sourceClass: "document" | "records" | "activity_stream";
1074
+ providerRef: string;
1075
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
1076
+ operationIds: readonly string[];
1077
+ connectorRef?: string | undefined;
1078
+ origin?: "observed" | "derived" | undefined;
1079
+ }>[];
1080
+ state: "mounted" | "unmounted";
1081
+ }>;
1082
+ }, {
1083
+ files: Readonly<Record<string, JsonValue>>;
1084
+ definition: Readonly<{
1085
+ packId: string;
1086
+ version: string;
1087
+ responsibility: string;
1088
+ scope: Readonly<{
1089
+ root: "tenant";
1090
+ descendants: readonly ["namespace", "subject", "session"];
1091
+ }>;
1092
+ capabilities: readonly Readonly<{
1093
+ operationId: string;
1094
+ provider: Readonly<{
1095
+ kind: "records_operation";
1096
+ operationId: string;
1097
+ }> | Readonly<{
1098
+ kind: "open_connector_action";
1099
+ actionId: string;
1100
+ connectorRef: string;
1101
+ }> | Readonly<{
1102
+ kind: "schift_search";
1103
+ indexRef: string;
1104
+ }> | Readonly<{
1105
+ kind: "web_search";
1106
+ provider: "customer" | "schift";
1107
+ }>;
1108
+ inputSchemaRef: string;
1109
+ resultSchemaRef: string;
1110
+ allowedFilters?: readonly string[] | undefined;
1111
+ limits?: Readonly<{
1112
+ maxRows?: number | undefined;
1113
+ maxResultBytes?: number | undefined;
1114
+ }> | undefined;
1115
+ freshness?: Readonly<{
1116
+ maxAgeSeconds: number;
1117
+ }> | undefined;
1118
+ requiredProviderScopes?: readonly string[] | undefined;
1119
+ }>[];
1120
+ contextPolicy: Readonly<{
1121
+ mustConsider: readonly Readonly<{
1122
+ id: string;
1123
+ selector: Readonly<{
1124
+ sourceIds?: readonly string[] | undefined;
1125
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1126
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1127
+ origins?: readonly ("observed" | "derived")[] | undefined;
1128
+ }>;
1129
+ minEvidence: number;
1130
+ maxAgeSeconds?: number | undefined;
1131
+ }>[];
1132
+ mustNotUse: readonly Readonly<{
1133
+ id: string;
1134
+ selector: Readonly<{
1135
+ sourceIds?: readonly string[] | undefined;
1136
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1137
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1138
+ origins?: readonly ("observed" | "derived")[] | undefined;
1139
+ }>;
1140
+ }>[];
1141
+ mayConsider?: readonly Readonly<{
1142
+ id: string;
1143
+ selector: Readonly<{
1144
+ sourceIds?: readonly string[] | undefined;
1145
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1146
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1147
+ origins?: readonly ("observed" | "derived")[] | undefined;
1148
+ }>;
1149
+ minEvidence: number;
1150
+ maxAgeSeconds?: number | undefined;
1151
+ }>[] | undefined;
1152
+ }>;
1153
+ authority: Readonly<{
1154
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1155
+ allowed: readonly ("read" | "draft")[];
1156
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1157
+ }>;
1158
+ evidence: Readonly<{
1159
+ freshness: Readonly<{
1160
+ defaultMaxAgeSeconds: number;
1161
+ }>;
1162
+ requireCitation: boolean;
1163
+ coverageAssertions: readonly string[];
1164
+ }>;
1165
+ }>;
1166
+ lock: Readonly<{
1167
+ packId: string;
1168
+ version: string;
1169
+ definitionDigest: string;
1170
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
1171
+ files: readonly Readonly<{
1172
+ path: string;
1173
+ digest: string;
1174
+ }>[];
1175
+ lockDigest: string;
1176
+ }>;
1177
+ mount: Readonly<{
1178
+ installationId: string;
1179
+ definitionDigest: string;
1180
+ scopeAuthority: Readonly<{
1181
+ tenant: string;
1182
+ organizationId: string;
1183
+ }>;
1184
+ revision: number;
1185
+ sourceBindings: readonly Readonly<{
1186
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
1187
+ sourceId: string;
1188
+ sourceClass: "document" | "records" | "activity_stream";
1189
+ providerRef: string;
1190
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
1191
+ operationIds: readonly string[];
1192
+ connectorRef?: string | undefined;
1193
+ origin?: "observed" | "derived" | undefined;
1194
+ }>[];
1195
+ state: "mounted" | "unmounted";
1196
+ }>;
1197
+ }>>;
1198
+ export declare const KnowledgeScopeStateSchema: z.ZodReadonly<z.ZodObject<{
1199
+ schemaVersion: z.ZodLiteral<"knowledge-scope-state.schift.dev/v0.1">;
1200
+ revision: z.ZodNumber;
1201
+ installations: z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1202
+ definition: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1203
+ packId: z.ZodBranded<z.ZodString, "PackId">;
1204
+ version: z.ZodBranded<z.ZodString, "SemanticVersion">;
1205
+ responsibility: z.ZodString;
1206
+ scope: z.ZodReadonly<z.ZodObject<{
1207
+ root: z.ZodLiteral<"tenant">;
1208
+ descendants: z.ZodReadonly<z.ZodTuple<[z.ZodLiteral<"namespace">, z.ZodLiteral<"subject">, z.ZodLiteral<"session">], null>>;
1209
+ }, "strict", z.ZodTypeAny, {
1210
+ root: "tenant";
1211
+ descendants: readonly ["namespace", "subject", "session"];
1212
+ }, {
1213
+ root: "tenant";
1214
+ descendants: readonly ["namespace", "subject", "session"];
1215
+ }>>;
1216
+ capabilities: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1217
+ operationId: z.ZodString;
1218
+ provider: z.ZodReadonly<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1219
+ kind: z.ZodLiteral<"records_operation">;
1220
+ operationId: z.ZodString;
1221
+ }, "strict", z.ZodTypeAny, {
1222
+ kind: "records_operation";
1223
+ operationId: string;
1224
+ }, {
1225
+ kind: "records_operation";
1226
+ operationId: string;
1227
+ }>, z.ZodObject<{
1228
+ kind: z.ZodLiteral<"open_connector_action">;
1229
+ actionId: z.ZodString;
1230
+ connectorRef: z.ZodString;
1231
+ }, "strict", z.ZodTypeAny, {
1232
+ kind: "open_connector_action";
1233
+ actionId: string;
1234
+ connectorRef: string;
1235
+ }, {
1236
+ kind: "open_connector_action";
1237
+ actionId: string;
1238
+ connectorRef: string;
1239
+ }>, z.ZodObject<{
1240
+ kind: z.ZodLiteral<"schift_search">;
1241
+ indexRef: z.ZodString;
1242
+ }, "strict", z.ZodTypeAny, {
1243
+ kind: "schift_search";
1244
+ indexRef: string;
1245
+ }, {
1246
+ kind: "schift_search";
1247
+ indexRef: string;
1248
+ }>, z.ZodObject<{
1249
+ kind: z.ZodLiteral<"web_search">;
1250
+ provider: z.ZodEnum<["customer", "schift"]>;
1251
+ }, "strict", z.ZodTypeAny, {
1252
+ kind: "web_search";
1253
+ provider: "customer" | "schift";
1254
+ }, {
1255
+ kind: "web_search";
1256
+ provider: "customer" | "schift";
1257
+ }>]>>;
1258
+ inputSchemaRef: z.ZodEffects<z.ZodString, string, string>;
1259
+ resultSchemaRef: z.ZodEffects<z.ZodString, string, string>;
1260
+ allowedFilters: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
1261
+ limits: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1262
+ maxRows: z.ZodOptional<z.ZodNumber>;
1263
+ maxResultBytes: z.ZodOptional<z.ZodNumber>;
1264
+ }, "strict", z.ZodTypeAny, {
1265
+ maxRows?: number | undefined;
1266
+ maxResultBytes?: number | undefined;
1267
+ }, {
1268
+ maxRows?: number | undefined;
1269
+ maxResultBytes?: number | undefined;
1270
+ }>, {
1271
+ maxRows?: number | undefined;
1272
+ maxResultBytes?: number | undefined;
1273
+ }, {
1274
+ maxRows?: number | undefined;
1275
+ maxResultBytes?: number | undefined;
1276
+ }>>>;
1277
+ freshness: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1278
+ maxAgeSeconds: z.ZodNumber;
1279
+ }, "strict", z.ZodTypeAny, {
1280
+ maxAgeSeconds: number;
1281
+ }, {
1282
+ maxAgeSeconds: number;
1283
+ }>>>;
1284
+ requiredProviderScopes: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
1285
+ }, "strict", z.ZodTypeAny, {
1286
+ operationId: string;
1287
+ provider: Readonly<{
1288
+ kind: "records_operation";
1289
+ operationId: string;
1290
+ }> | Readonly<{
1291
+ kind: "open_connector_action";
1292
+ actionId: string;
1293
+ connectorRef: string;
1294
+ }> | Readonly<{
1295
+ kind: "schift_search";
1296
+ indexRef: string;
1297
+ }> | Readonly<{
1298
+ kind: "web_search";
1299
+ provider: "customer" | "schift";
1300
+ }>;
1301
+ inputSchemaRef: string;
1302
+ resultSchemaRef: string;
1303
+ allowedFilters?: readonly string[] | undefined;
1304
+ limits?: Readonly<{
1305
+ maxRows?: number | undefined;
1306
+ maxResultBytes?: number | undefined;
1307
+ }> | undefined;
1308
+ freshness?: Readonly<{
1309
+ maxAgeSeconds: number;
1310
+ }> | undefined;
1311
+ requiredProviderScopes?: readonly string[] | undefined;
1312
+ }, {
1313
+ operationId: string;
1314
+ provider: Readonly<{
1315
+ kind: "records_operation";
1316
+ operationId: string;
1317
+ }> | Readonly<{
1318
+ kind: "open_connector_action";
1319
+ actionId: string;
1320
+ connectorRef: string;
1321
+ }> | Readonly<{
1322
+ kind: "schift_search";
1323
+ indexRef: string;
1324
+ }> | Readonly<{
1325
+ kind: "web_search";
1326
+ provider: "customer" | "schift";
1327
+ }>;
1328
+ inputSchemaRef: string;
1329
+ resultSchemaRef: string;
1330
+ allowedFilters?: readonly string[] | undefined;
1331
+ limits?: Readonly<{
1332
+ maxRows?: number | undefined;
1333
+ maxResultBytes?: number | undefined;
1334
+ }> | undefined;
1335
+ freshness?: Readonly<{
1336
+ maxAgeSeconds: number;
1337
+ }> | undefined;
1338
+ requiredProviderScopes?: readonly string[] | undefined;
1339
+ }>>, "many">>;
1340
+ contextPolicy: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1341
+ mustConsider: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1342
+ id: z.ZodString;
1343
+ selector: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1344
+ sourceIds: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
1345
+ sourceClasses: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["document", "records", "activity_stream"]>, "many">, ("document" | "records" | "activity_stream")[], ("document" | "records" | "activity_stream")[]>>>;
1346
+ authorities: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>, "many">, ("primary" | "operational" | "approved" | "observed" | "derived")[], ("primary" | "operational" | "approved" | "observed" | "derived")[]>>>;
1347
+ origins: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["observed", "derived"]>, "many">, ("observed" | "derived")[], ("observed" | "derived")[]>>>;
1348
+ }, "strict", z.ZodTypeAny, {
1349
+ sourceIds?: readonly string[] | undefined;
1350
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1351
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1352
+ origins?: readonly ("observed" | "derived")[] | undefined;
1353
+ }, {
1354
+ sourceIds?: readonly string[] | undefined;
1355
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1356
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1357
+ origins?: readonly ("observed" | "derived")[] | undefined;
1358
+ }>, {
1359
+ sourceIds?: readonly string[] | undefined;
1360
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1361
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1362
+ origins?: readonly ("observed" | "derived")[] | undefined;
1363
+ }, {
1364
+ sourceIds?: readonly string[] | undefined;
1365
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1366
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1367
+ origins?: readonly ("observed" | "derived")[] | undefined;
1368
+ }>>;
1369
+ minEvidence: z.ZodNumber;
1370
+ maxAgeSeconds: z.ZodOptional<z.ZodNumber>;
1371
+ }, "strict", z.ZodTypeAny, {
1372
+ id: string;
1373
+ selector: Readonly<{
1374
+ sourceIds?: readonly string[] | undefined;
1375
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1376
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1377
+ origins?: readonly ("observed" | "derived")[] | undefined;
1378
+ }>;
1379
+ minEvidence: number;
1380
+ maxAgeSeconds?: number | undefined;
1381
+ }, {
1382
+ id: string;
1383
+ selector: Readonly<{
1384
+ sourceIds?: readonly string[] | undefined;
1385
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1386
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1387
+ origins?: readonly ("observed" | "derived")[] | undefined;
1388
+ }>;
1389
+ minEvidence: number;
1390
+ maxAgeSeconds?: number | undefined;
1391
+ }>>, "many">>;
1392
+ mayConsider: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1393
+ id: z.ZodString;
1394
+ selector: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1395
+ sourceIds: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
1396
+ sourceClasses: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["document", "records", "activity_stream"]>, "many">, ("document" | "records" | "activity_stream")[], ("document" | "records" | "activity_stream")[]>>>;
1397
+ authorities: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>, "many">, ("primary" | "operational" | "approved" | "observed" | "derived")[], ("primary" | "operational" | "approved" | "observed" | "derived")[]>>>;
1398
+ origins: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["observed", "derived"]>, "many">, ("observed" | "derived")[], ("observed" | "derived")[]>>>;
1399
+ }, "strict", z.ZodTypeAny, {
1400
+ sourceIds?: readonly string[] | undefined;
1401
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1402
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1403
+ origins?: readonly ("observed" | "derived")[] | undefined;
1404
+ }, {
1405
+ sourceIds?: readonly string[] | undefined;
1406
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1407
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1408
+ origins?: readonly ("observed" | "derived")[] | undefined;
1409
+ }>, {
1410
+ sourceIds?: readonly string[] | undefined;
1411
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1412
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1413
+ origins?: readonly ("observed" | "derived")[] | undefined;
1414
+ }, {
1415
+ sourceIds?: readonly string[] | undefined;
1416
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1417
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1418
+ origins?: readonly ("observed" | "derived")[] | undefined;
1419
+ }>>;
1420
+ minEvidence: z.ZodNumber;
1421
+ maxAgeSeconds: z.ZodOptional<z.ZodNumber>;
1422
+ }, "strict", z.ZodTypeAny, {
1423
+ id: string;
1424
+ selector: Readonly<{
1425
+ sourceIds?: readonly string[] | undefined;
1426
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1427
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1428
+ origins?: readonly ("observed" | "derived")[] | undefined;
1429
+ }>;
1430
+ minEvidence: number;
1431
+ maxAgeSeconds?: number | undefined;
1432
+ }, {
1433
+ id: string;
1434
+ selector: Readonly<{
1435
+ sourceIds?: readonly string[] | undefined;
1436
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1437
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1438
+ origins?: readonly ("observed" | "derived")[] | undefined;
1439
+ }>;
1440
+ minEvidence: number;
1441
+ maxAgeSeconds?: number | undefined;
1442
+ }>>, "many">>>;
1443
+ mustNotUse: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1444
+ id: z.ZodString;
1445
+ selector: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1446
+ sourceIds: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>>;
1447
+ sourceClasses: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["document", "records", "activity_stream"]>, "many">, ("document" | "records" | "activity_stream")[], ("document" | "records" | "activity_stream")[]>>>;
1448
+ authorities: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>, "many">, ("primary" | "operational" | "approved" | "observed" | "derived")[], ("primary" | "operational" | "approved" | "observed" | "derived")[]>>>;
1449
+ origins: z.ZodOptional<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["observed", "derived"]>, "many">, ("observed" | "derived")[], ("observed" | "derived")[]>>>;
1450
+ }, "strict", z.ZodTypeAny, {
1451
+ sourceIds?: readonly string[] | undefined;
1452
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1453
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1454
+ origins?: readonly ("observed" | "derived")[] | undefined;
1455
+ }, {
1456
+ sourceIds?: readonly string[] | undefined;
1457
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1458
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1459
+ origins?: readonly ("observed" | "derived")[] | undefined;
1460
+ }>, {
1461
+ sourceIds?: readonly string[] | undefined;
1462
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1463
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1464
+ origins?: readonly ("observed" | "derived")[] | undefined;
1465
+ }, {
1466
+ sourceIds?: readonly string[] | undefined;
1467
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1468
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1469
+ origins?: readonly ("observed" | "derived")[] | undefined;
1470
+ }>>;
1471
+ }, "strict", z.ZodTypeAny, {
1472
+ id: string;
1473
+ selector: Readonly<{
1474
+ sourceIds?: readonly string[] | undefined;
1475
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1476
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1477
+ origins?: readonly ("observed" | "derived")[] | undefined;
1478
+ }>;
1479
+ }, {
1480
+ id: string;
1481
+ selector: Readonly<{
1482
+ sourceIds?: readonly string[] | undefined;
1483
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1484
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1485
+ origins?: readonly ("observed" | "derived")[] | undefined;
1486
+ }>;
1487
+ }>>, "many">>;
1488
+ }, "strict", z.ZodTypeAny, {
1489
+ mustConsider: readonly Readonly<{
1490
+ id: string;
1491
+ selector: Readonly<{
1492
+ sourceIds?: readonly string[] | undefined;
1493
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1494
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1495
+ origins?: readonly ("observed" | "derived")[] | undefined;
1496
+ }>;
1497
+ minEvidence: number;
1498
+ maxAgeSeconds?: number | undefined;
1499
+ }>[];
1500
+ mustNotUse: readonly Readonly<{
1501
+ id: string;
1502
+ selector: Readonly<{
1503
+ sourceIds?: readonly string[] | undefined;
1504
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1505
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1506
+ origins?: readonly ("observed" | "derived")[] | undefined;
1507
+ }>;
1508
+ }>[];
1509
+ mayConsider?: readonly Readonly<{
1510
+ id: string;
1511
+ selector: Readonly<{
1512
+ sourceIds?: readonly string[] | undefined;
1513
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1514
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1515
+ origins?: readonly ("observed" | "derived")[] | undefined;
1516
+ }>;
1517
+ minEvidence: number;
1518
+ maxAgeSeconds?: number | undefined;
1519
+ }>[] | undefined;
1520
+ }, {
1521
+ mustConsider: readonly Readonly<{
1522
+ id: string;
1523
+ selector: Readonly<{
1524
+ sourceIds?: readonly string[] | undefined;
1525
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1526
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1527
+ origins?: readonly ("observed" | "derived")[] | undefined;
1528
+ }>;
1529
+ minEvidence: number;
1530
+ maxAgeSeconds?: number | undefined;
1531
+ }>[];
1532
+ mustNotUse: readonly Readonly<{
1533
+ id: string;
1534
+ selector: Readonly<{
1535
+ sourceIds?: readonly string[] | undefined;
1536
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1537
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1538
+ origins?: readonly ("observed" | "derived")[] | undefined;
1539
+ }>;
1540
+ }>[];
1541
+ mayConsider?: readonly Readonly<{
1542
+ id: string;
1543
+ selector: Readonly<{
1544
+ sourceIds?: readonly string[] | undefined;
1545
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1546
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1547
+ origins?: readonly ("observed" | "derived")[] | undefined;
1548
+ }>;
1549
+ minEvidence: number;
1550
+ maxAgeSeconds?: number | undefined;
1551
+ }>[] | undefined;
1552
+ }>, {
1553
+ mustConsider: readonly Readonly<{
1554
+ id: string;
1555
+ selector: Readonly<{
1556
+ sourceIds?: readonly string[] | undefined;
1557
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1558
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1559
+ origins?: readonly ("observed" | "derived")[] | undefined;
1560
+ }>;
1561
+ minEvidence: number;
1562
+ maxAgeSeconds?: number | undefined;
1563
+ }>[];
1564
+ mustNotUse: readonly Readonly<{
1565
+ id: string;
1566
+ selector: Readonly<{
1567
+ sourceIds?: readonly string[] | undefined;
1568
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1569
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1570
+ origins?: readonly ("observed" | "derived")[] | undefined;
1571
+ }>;
1572
+ }>[];
1573
+ mayConsider?: readonly Readonly<{
1574
+ id: string;
1575
+ selector: Readonly<{
1576
+ sourceIds?: readonly string[] | undefined;
1577
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1578
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1579
+ origins?: readonly ("observed" | "derived")[] | undefined;
1580
+ }>;
1581
+ minEvidence: number;
1582
+ maxAgeSeconds?: number | undefined;
1583
+ }>[] | undefined;
1584
+ }, {
1585
+ mustConsider: readonly Readonly<{
1586
+ id: string;
1587
+ selector: Readonly<{
1588
+ sourceIds?: readonly string[] | undefined;
1589
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1590
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1591
+ origins?: readonly ("observed" | "derived")[] | undefined;
1592
+ }>;
1593
+ minEvidence: number;
1594
+ maxAgeSeconds?: number | undefined;
1595
+ }>[];
1596
+ mustNotUse: readonly Readonly<{
1597
+ id: string;
1598
+ selector: Readonly<{
1599
+ sourceIds?: readonly string[] | undefined;
1600
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1601
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1602
+ origins?: readonly ("observed" | "derived")[] | undefined;
1603
+ }>;
1604
+ }>[];
1605
+ mayConsider?: readonly Readonly<{
1606
+ id: string;
1607
+ selector: Readonly<{
1608
+ sourceIds?: readonly string[] | undefined;
1609
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1610
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1611
+ origins?: readonly ("observed" | "derived")[] | undefined;
1612
+ }>;
1613
+ minEvidence: number;
1614
+ maxAgeSeconds?: number | undefined;
1615
+ }>[] | undefined;
1616
+ }>>;
1617
+ authority: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1618
+ precedence: z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>, "many">, ("primary" | "operational" | "approved" | "observed" | "derived")[], ("primary" | "operational" | "approved" | "observed" | "derived")[]>>;
1619
+ allowed: z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodEnum<["read", "draft"]>, "many">, ("read" | "draft")[], ("read" | "draft")[]>>;
1620
+ forbidden: z.ZodReadonly<z.ZodTuple<[z.ZodLiteral<"send">, z.ZodLiteral<"approve">, z.ZodLiteral<"mutate_source">, z.ZodLiteral<"workflow">], null>>;
1621
+ }, "strict", z.ZodTypeAny, {
1622
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1623
+ allowed: readonly ("read" | "draft")[];
1624
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1625
+ }, {
1626
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1627
+ allowed: readonly ("read" | "draft")[];
1628
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1629
+ }>, {
1630
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1631
+ allowed: readonly ("read" | "draft")[];
1632
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1633
+ }, {
1634
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1635
+ allowed: readonly ("read" | "draft")[];
1636
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1637
+ }>>;
1638
+ evidence: z.ZodReadonly<z.ZodObject<{
1639
+ requireCitation: z.ZodBoolean;
1640
+ freshness: z.ZodReadonly<z.ZodObject<{
1641
+ defaultMaxAgeSeconds: z.ZodNumber;
1642
+ }, "strict", z.ZodTypeAny, {
1643
+ defaultMaxAgeSeconds: number;
1644
+ }, {
1645
+ defaultMaxAgeSeconds: number;
1646
+ }>>;
1647
+ coverageAssertions: z.ZodEffects<z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>, readonly string[], readonly string[]>;
1648
+ }, "strict", z.ZodTypeAny, {
1649
+ freshness: Readonly<{
1650
+ defaultMaxAgeSeconds: number;
1651
+ }>;
1652
+ requireCitation: boolean;
1653
+ coverageAssertions: readonly string[];
1654
+ }, {
1655
+ freshness: Readonly<{
1656
+ defaultMaxAgeSeconds: number;
1657
+ }>;
1658
+ requireCitation: boolean;
1659
+ coverageAssertions: readonly string[];
1660
+ }>>;
1661
+ }, "strict", z.ZodTypeAny, {
1662
+ packId: string & z.BRAND<"PackId">;
1663
+ version: string & z.BRAND<"SemanticVersion">;
1664
+ responsibility: string;
1665
+ scope: Readonly<{
1666
+ root: "tenant";
1667
+ descendants: readonly ["namespace", "subject", "session"];
1668
+ }>;
1669
+ capabilities: readonly Readonly<{
1670
+ operationId: string;
1671
+ provider: Readonly<{
1672
+ kind: "records_operation";
1673
+ operationId: string;
1674
+ }> | Readonly<{
1675
+ kind: "open_connector_action";
1676
+ actionId: string;
1677
+ connectorRef: string;
1678
+ }> | Readonly<{
1679
+ kind: "schift_search";
1680
+ indexRef: string;
1681
+ }> | Readonly<{
1682
+ kind: "web_search";
1683
+ provider: "customer" | "schift";
1684
+ }>;
1685
+ inputSchemaRef: string;
1686
+ resultSchemaRef: string;
1687
+ allowedFilters?: readonly string[] | undefined;
1688
+ limits?: Readonly<{
1689
+ maxRows?: number | undefined;
1690
+ maxResultBytes?: number | undefined;
1691
+ }> | undefined;
1692
+ freshness?: Readonly<{
1693
+ maxAgeSeconds: number;
1694
+ }> | undefined;
1695
+ requiredProviderScopes?: readonly string[] | undefined;
1696
+ }>[];
1697
+ contextPolicy: Readonly<{
1698
+ mustConsider: readonly Readonly<{
1699
+ id: string;
1700
+ selector: Readonly<{
1701
+ sourceIds?: readonly string[] | undefined;
1702
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1703
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1704
+ origins?: readonly ("observed" | "derived")[] | undefined;
1705
+ }>;
1706
+ minEvidence: number;
1707
+ maxAgeSeconds?: number | undefined;
1708
+ }>[];
1709
+ mustNotUse: readonly Readonly<{
1710
+ id: string;
1711
+ selector: Readonly<{
1712
+ sourceIds?: readonly string[] | undefined;
1713
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1714
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1715
+ origins?: readonly ("observed" | "derived")[] | undefined;
1716
+ }>;
1717
+ }>[];
1718
+ mayConsider?: readonly Readonly<{
1719
+ id: string;
1720
+ selector: Readonly<{
1721
+ sourceIds?: readonly string[] | undefined;
1722
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1723
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1724
+ origins?: readonly ("observed" | "derived")[] | undefined;
1725
+ }>;
1726
+ minEvidence: number;
1727
+ maxAgeSeconds?: number | undefined;
1728
+ }>[] | undefined;
1729
+ }>;
1730
+ authority: Readonly<{
1731
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1732
+ allowed: readonly ("read" | "draft")[];
1733
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1734
+ }>;
1735
+ evidence: Readonly<{
1736
+ freshness: Readonly<{
1737
+ defaultMaxAgeSeconds: number;
1738
+ }>;
1739
+ requireCitation: boolean;
1740
+ coverageAssertions: readonly string[];
1741
+ }>;
1742
+ }, {
1743
+ packId: string;
1744
+ version: string;
1745
+ responsibility: string;
1746
+ scope: Readonly<{
1747
+ root: "tenant";
1748
+ descendants: readonly ["namespace", "subject", "session"];
1749
+ }>;
1750
+ capabilities: readonly Readonly<{
1751
+ operationId: string;
1752
+ provider: Readonly<{
1753
+ kind: "records_operation";
1754
+ operationId: string;
1755
+ }> | Readonly<{
1756
+ kind: "open_connector_action";
1757
+ actionId: string;
1758
+ connectorRef: string;
1759
+ }> | Readonly<{
1760
+ kind: "schift_search";
1761
+ indexRef: string;
1762
+ }> | Readonly<{
1763
+ kind: "web_search";
1764
+ provider: "customer" | "schift";
1765
+ }>;
1766
+ inputSchemaRef: string;
1767
+ resultSchemaRef: string;
1768
+ allowedFilters?: readonly string[] | undefined;
1769
+ limits?: Readonly<{
1770
+ maxRows?: number | undefined;
1771
+ maxResultBytes?: number | undefined;
1772
+ }> | undefined;
1773
+ freshness?: Readonly<{
1774
+ maxAgeSeconds: number;
1775
+ }> | undefined;
1776
+ requiredProviderScopes?: readonly string[] | undefined;
1777
+ }>[];
1778
+ contextPolicy: Readonly<{
1779
+ mustConsider: readonly Readonly<{
1780
+ id: string;
1781
+ selector: Readonly<{
1782
+ sourceIds?: readonly string[] | undefined;
1783
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1784
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1785
+ origins?: readonly ("observed" | "derived")[] | undefined;
1786
+ }>;
1787
+ minEvidence: number;
1788
+ maxAgeSeconds?: number | undefined;
1789
+ }>[];
1790
+ mustNotUse: readonly Readonly<{
1791
+ id: string;
1792
+ selector: Readonly<{
1793
+ sourceIds?: readonly string[] | undefined;
1794
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1795
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1796
+ origins?: readonly ("observed" | "derived")[] | undefined;
1797
+ }>;
1798
+ }>[];
1799
+ mayConsider?: readonly Readonly<{
1800
+ id: string;
1801
+ selector: Readonly<{
1802
+ sourceIds?: readonly string[] | undefined;
1803
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1804
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1805
+ origins?: readonly ("observed" | "derived")[] | undefined;
1806
+ }>;
1807
+ minEvidence: number;
1808
+ maxAgeSeconds?: number | undefined;
1809
+ }>[] | undefined;
1810
+ }>;
1811
+ authority: Readonly<{
1812
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1813
+ allowed: readonly ("read" | "draft")[];
1814
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1815
+ }>;
1816
+ evidence: Readonly<{
1817
+ freshness: Readonly<{
1818
+ defaultMaxAgeSeconds: number;
1819
+ }>;
1820
+ requireCitation: boolean;
1821
+ coverageAssertions: readonly string[];
1822
+ }>;
1823
+ }>, {
1824
+ packId: string & z.BRAND<"PackId">;
1825
+ version: string & z.BRAND<"SemanticVersion">;
1826
+ responsibility: string;
1827
+ scope: Readonly<{
1828
+ root: "tenant";
1829
+ descendants: readonly ["namespace", "subject", "session"];
1830
+ }>;
1831
+ capabilities: readonly Readonly<{
1832
+ operationId: string;
1833
+ provider: Readonly<{
1834
+ kind: "records_operation";
1835
+ operationId: string;
1836
+ }> | Readonly<{
1837
+ kind: "open_connector_action";
1838
+ actionId: string;
1839
+ connectorRef: string;
1840
+ }> | Readonly<{
1841
+ kind: "schift_search";
1842
+ indexRef: string;
1843
+ }> | Readonly<{
1844
+ kind: "web_search";
1845
+ provider: "customer" | "schift";
1846
+ }>;
1847
+ inputSchemaRef: string;
1848
+ resultSchemaRef: string;
1849
+ allowedFilters?: readonly string[] | undefined;
1850
+ limits?: Readonly<{
1851
+ maxRows?: number | undefined;
1852
+ maxResultBytes?: number | undefined;
1853
+ }> | undefined;
1854
+ freshness?: Readonly<{
1855
+ maxAgeSeconds: number;
1856
+ }> | undefined;
1857
+ requiredProviderScopes?: readonly string[] | undefined;
1858
+ }>[];
1859
+ contextPolicy: Readonly<{
1860
+ mustConsider: readonly Readonly<{
1861
+ id: string;
1862
+ selector: Readonly<{
1863
+ sourceIds?: readonly string[] | undefined;
1864
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1865
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1866
+ origins?: readonly ("observed" | "derived")[] | undefined;
1867
+ }>;
1868
+ minEvidence: number;
1869
+ maxAgeSeconds?: number | undefined;
1870
+ }>[];
1871
+ mustNotUse: readonly Readonly<{
1872
+ id: string;
1873
+ selector: Readonly<{
1874
+ sourceIds?: readonly string[] | undefined;
1875
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1876
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1877
+ origins?: readonly ("observed" | "derived")[] | undefined;
1878
+ }>;
1879
+ }>[];
1880
+ mayConsider?: readonly Readonly<{
1881
+ id: string;
1882
+ selector: Readonly<{
1883
+ sourceIds?: readonly string[] | undefined;
1884
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1885
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1886
+ origins?: readonly ("observed" | "derived")[] | undefined;
1887
+ }>;
1888
+ minEvidence: number;
1889
+ maxAgeSeconds?: number | undefined;
1890
+ }>[] | undefined;
1891
+ }>;
1892
+ authority: Readonly<{
1893
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1894
+ allowed: readonly ("read" | "draft")[];
1895
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1896
+ }>;
1897
+ evidence: Readonly<{
1898
+ freshness: Readonly<{
1899
+ defaultMaxAgeSeconds: number;
1900
+ }>;
1901
+ requireCitation: boolean;
1902
+ coverageAssertions: readonly string[];
1903
+ }>;
1904
+ }, {
1905
+ packId: string;
1906
+ version: string;
1907
+ responsibility: string;
1908
+ scope: Readonly<{
1909
+ root: "tenant";
1910
+ descendants: readonly ["namespace", "subject", "session"];
1911
+ }>;
1912
+ capabilities: readonly Readonly<{
1913
+ operationId: string;
1914
+ provider: Readonly<{
1915
+ kind: "records_operation";
1916
+ operationId: string;
1917
+ }> | Readonly<{
1918
+ kind: "open_connector_action";
1919
+ actionId: string;
1920
+ connectorRef: string;
1921
+ }> | Readonly<{
1922
+ kind: "schift_search";
1923
+ indexRef: string;
1924
+ }> | Readonly<{
1925
+ kind: "web_search";
1926
+ provider: "customer" | "schift";
1927
+ }>;
1928
+ inputSchemaRef: string;
1929
+ resultSchemaRef: string;
1930
+ allowedFilters?: readonly string[] | undefined;
1931
+ limits?: Readonly<{
1932
+ maxRows?: number | undefined;
1933
+ maxResultBytes?: number | undefined;
1934
+ }> | undefined;
1935
+ freshness?: Readonly<{
1936
+ maxAgeSeconds: number;
1937
+ }> | undefined;
1938
+ requiredProviderScopes?: readonly string[] | undefined;
1939
+ }>[];
1940
+ contextPolicy: Readonly<{
1941
+ mustConsider: readonly Readonly<{
1942
+ id: string;
1943
+ selector: Readonly<{
1944
+ sourceIds?: readonly string[] | undefined;
1945
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1946
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1947
+ origins?: readonly ("observed" | "derived")[] | undefined;
1948
+ }>;
1949
+ minEvidence: number;
1950
+ maxAgeSeconds?: number | undefined;
1951
+ }>[];
1952
+ mustNotUse: readonly Readonly<{
1953
+ id: string;
1954
+ selector: Readonly<{
1955
+ sourceIds?: readonly string[] | undefined;
1956
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1957
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1958
+ origins?: readonly ("observed" | "derived")[] | undefined;
1959
+ }>;
1960
+ }>[];
1961
+ mayConsider?: readonly Readonly<{
1962
+ id: string;
1963
+ selector: Readonly<{
1964
+ sourceIds?: readonly string[] | undefined;
1965
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
1966
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
1967
+ origins?: readonly ("observed" | "derived")[] | undefined;
1968
+ }>;
1969
+ minEvidence: number;
1970
+ maxAgeSeconds?: number | undefined;
1971
+ }>[] | undefined;
1972
+ }>;
1973
+ authority: Readonly<{
1974
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
1975
+ allowed: readonly ("read" | "draft")[];
1976
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
1977
+ }>;
1978
+ evidence: Readonly<{
1979
+ freshness: Readonly<{
1980
+ defaultMaxAgeSeconds: number;
1981
+ }>;
1982
+ requireCitation: boolean;
1983
+ coverageAssertions: readonly string[];
1984
+ }>;
1985
+ }>>;
1986
+ lock: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
1987
+ schemaVersion: z.ZodLiteral<"knowledge-scope-lock.schift.dev/v0.1">;
1988
+ packId: z.ZodBranded<z.ZodString, "PackId">;
1989
+ version: z.ZodBranded<z.ZodString, "SemanticVersion">;
1990
+ definitionDigest: z.ZodBranded<z.ZodString, "Sha256Digest">;
1991
+ files: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1992
+ path: z.ZodEffects<z.ZodString, string, string>;
1993
+ digest: z.ZodBranded<z.ZodString, "Sha256Digest">;
1994
+ }, "strict", z.ZodTypeAny, {
1995
+ path: string;
1996
+ digest: string & z.BRAND<"Sha256Digest">;
1997
+ }, {
1998
+ path: string;
1999
+ digest: string;
2000
+ }>>, "many">>;
2001
+ } & {
2002
+ lockDigest: z.ZodBranded<z.ZodString, "Sha256Digest">;
2003
+ }, "strict", z.ZodTypeAny, {
2004
+ packId: string & z.BRAND<"PackId">;
2005
+ version: string & z.BRAND<"SemanticVersion">;
2006
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2007
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2008
+ files: readonly Readonly<{
2009
+ path: string;
2010
+ digest: string & z.BRAND<"Sha256Digest">;
2011
+ }>[];
2012
+ lockDigest: string & z.BRAND<"Sha256Digest">;
2013
+ }, {
2014
+ packId: string;
2015
+ version: string;
2016
+ definitionDigest: string;
2017
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2018
+ files: readonly Readonly<{
2019
+ path: string;
2020
+ digest: string;
2021
+ }>[];
2022
+ lockDigest: string;
2023
+ }>, {
2024
+ packId: string & z.BRAND<"PackId">;
2025
+ version: string & z.BRAND<"SemanticVersion">;
2026
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2027
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2028
+ files: readonly Readonly<{
2029
+ path: string;
2030
+ digest: string & z.BRAND<"Sha256Digest">;
2031
+ }>[];
2032
+ lockDigest: string & z.BRAND<"Sha256Digest">;
2033
+ }, {
2034
+ packId: string;
2035
+ version: string;
2036
+ definitionDigest: string;
2037
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2038
+ files: readonly Readonly<{
2039
+ path: string;
2040
+ digest: string;
2041
+ }>[];
2042
+ lockDigest: string;
2043
+ }>>;
2044
+ files: z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>>;
2045
+ mount: z.ZodReadonly<z.ZodEffects<z.ZodObject<{
2046
+ installationId: z.ZodBranded<z.ZodString, "InstallationId">;
2047
+ definitionDigest: z.ZodBranded<z.ZodString, "Sha256Digest">;
2048
+ scopeAuthority: z.ZodReadonly<z.ZodObject<{
2049
+ organizationId: z.ZodString;
2050
+ tenant: z.ZodString;
2051
+ }, "strict", z.ZodTypeAny, {
2052
+ tenant: string;
2053
+ organizationId: string;
2054
+ }, {
2055
+ tenant: string;
2056
+ organizationId: string;
2057
+ }>>;
2058
+ sourceBindings: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
2059
+ sourceId: z.ZodBranded<z.ZodString, "SourceId">;
2060
+ sourceClass: z.ZodEnum<["document", "records", "activity_stream"]>;
2061
+ providerRef: z.ZodString;
2062
+ connectorRef: z.ZodOptional<z.ZodString>;
2063
+ authority: z.ZodEnum<["primary", "operational", "approved", "observed", "derived"]>;
2064
+ origin: z.ZodOptional<z.ZodEnum<["observed", "derived"]>>;
2065
+ permissionMode: z.ZodEnum<["live", "mirrored", "static", "unsupported"]>;
2066
+ operationIds: z.ZodReadonly<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
2067
+ }, "strict", z.ZodTypeAny, {
2068
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2069
+ sourceId: string & z.BRAND<"SourceId">;
2070
+ sourceClass: "document" | "records" | "activity_stream";
2071
+ providerRef: string;
2072
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2073
+ operationIds: readonly string[];
2074
+ connectorRef?: string | undefined;
2075
+ origin?: "observed" | "derived" | undefined;
2076
+ }, {
2077
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2078
+ sourceId: string;
2079
+ sourceClass: "document" | "records" | "activity_stream";
2080
+ providerRef: string;
2081
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2082
+ operationIds: readonly string[];
2083
+ connectorRef?: string | undefined;
2084
+ origin?: "observed" | "derived" | undefined;
2085
+ }>>, "many">>;
2086
+ state: z.ZodEnum<["mounted", "unmounted"]>;
2087
+ revision: z.ZodNumber;
2088
+ }, "strict", z.ZodTypeAny, {
2089
+ installationId: string & z.BRAND<"InstallationId">;
2090
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2091
+ scopeAuthority: Readonly<{
2092
+ tenant: string;
2093
+ organizationId: string;
2094
+ }>;
2095
+ revision: number;
2096
+ sourceBindings: readonly Readonly<{
2097
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2098
+ sourceId: string & z.BRAND<"SourceId">;
2099
+ sourceClass: "document" | "records" | "activity_stream";
2100
+ providerRef: string;
2101
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2102
+ operationIds: readonly string[];
2103
+ connectorRef?: string | undefined;
2104
+ origin?: "observed" | "derived" | undefined;
2105
+ }>[];
2106
+ state: "mounted" | "unmounted";
2107
+ }, {
2108
+ installationId: string;
2109
+ definitionDigest: string;
2110
+ scopeAuthority: Readonly<{
2111
+ tenant: string;
2112
+ organizationId: string;
2113
+ }>;
2114
+ revision: number;
2115
+ sourceBindings: readonly Readonly<{
2116
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2117
+ sourceId: string;
2118
+ sourceClass: "document" | "records" | "activity_stream";
2119
+ providerRef: string;
2120
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2121
+ operationIds: readonly string[];
2122
+ connectorRef?: string | undefined;
2123
+ origin?: "observed" | "derived" | undefined;
2124
+ }>[];
2125
+ state: "mounted" | "unmounted";
2126
+ }>, {
2127
+ installationId: string & z.BRAND<"InstallationId">;
2128
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2129
+ scopeAuthority: Readonly<{
2130
+ tenant: string;
2131
+ organizationId: string;
2132
+ }>;
2133
+ revision: number;
2134
+ sourceBindings: readonly Readonly<{
2135
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2136
+ sourceId: string & z.BRAND<"SourceId">;
2137
+ sourceClass: "document" | "records" | "activity_stream";
2138
+ providerRef: string;
2139
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2140
+ operationIds: readonly string[];
2141
+ connectorRef?: string | undefined;
2142
+ origin?: "observed" | "derived" | undefined;
2143
+ }>[];
2144
+ state: "mounted" | "unmounted";
2145
+ }, {
2146
+ installationId: string;
2147
+ definitionDigest: string;
2148
+ scopeAuthority: Readonly<{
2149
+ tenant: string;
2150
+ organizationId: string;
2151
+ }>;
2152
+ revision: number;
2153
+ sourceBindings: readonly Readonly<{
2154
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2155
+ sourceId: string;
2156
+ sourceClass: "document" | "records" | "activity_stream";
2157
+ providerRef: string;
2158
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2159
+ operationIds: readonly string[];
2160
+ connectorRef?: string | undefined;
2161
+ origin?: "observed" | "derived" | undefined;
2162
+ }>[];
2163
+ state: "mounted" | "unmounted";
2164
+ }>>;
2165
+ }, "strict", z.ZodTypeAny, {
2166
+ files: Readonly<Record<string, JsonValue>>;
2167
+ definition: Readonly<{
2168
+ packId: string & z.BRAND<"PackId">;
2169
+ version: string & z.BRAND<"SemanticVersion">;
2170
+ responsibility: string;
2171
+ scope: Readonly<{
2172
+ root: "tenant";
2173
+ descendants: readonly ["namespace", "subject", "session"];
2174
+ }>;
2175
+ capabilities: readonly Readonly<{
2176
+ operationId: string;
2177
+ provider: Readonly<{
2178
+ kind: "records_operation";
2179
+ operationId: string;
2180
+ }> | Readonly<{
2181
+ kind: "open_connector_action";
2182
+ actionId: string;
2183
+ connectorRef: string;
2184
+ }> | Readonly<{
2185
+ kind: "schift_search";
2186
+ indexRef: string;
2187
+ }> | Readonly<{
2188
+ kind: "web_search";
2189
+ provider: "customer" | "schift";
2190
+ }>;
2191
+ inputSchemaRef: string;
2192
+ resultSchemaRef: string;
2193
+ allowedFilters?: readonly string[] | undefined;
2194
+ limits?: Readonly<{
2195
+ maxRows?: number | undefined;
2196
+ maxResultBytes?: number | undefined;
2197
+ }> | undefined;
2198
+ freshness?: Readonly<{
2199
+ maxAgeSeconds: number;
2200
+ }> | undefined;
2201
+ requiredProviderScopes?: readonly string[] | undefined;
2202
+ }>[];
2203
+ contextPolicy: Readonly<{
2204
+ mustConsider: readonly Readonly<{
2205
+ id: string;
2206
+ selector: Readonly<{
2207
+ sourceIds?: readonly string[] | undefined;
2208
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2209
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2210
+ origins?: readonly ("observed" | "derived")[] | undefined;
2211
+ }>;
2212
+ minEvidence: number;
2213
+ maxAgeSeconds?: number | undefined;
2214
+ }>[];
2215
+ mustNotUse: readonly Readonly<{
2216
+ id: string;
2217
+ selector: Readonly<{
2218
+ sourceIds?: readonly string[] | undefined;
2219
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2220
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2221
+ origins?: readonly ("observed" | "derived")[] | undefined;
2222
+ }>;
2223
+ }>[];
2224
+ mayConsider?: readonly Readonly<{
2225
+ id: string;
2226
+ selector: Readonly<{
2227
+ sourceIds?: readonly string[] | undefined;
2228
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2229
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2230
+ origins?: readonly ("observed" | "derived")[] | undefined;
2231
+ }>;
2232
+ minEvidence: number;
2233
+ maxAgeSeconds?: number | undefined;
2234
+ }>[] | undefined;
2235
+ }>;
2236
+ authority: Readonly<{
2237
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
2238
+ allowed: readonly ("read" | "draft")[];
2239
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
2240
+ }>;
2241
+ evidence: Readonly<{
2242
+ freshness: Readonly<{
2243
+ defaultMaxAgeSeconds: number;
2244
+ }>;
2245
+ requireCitation: boolean;
2246
+ coverageAssertions: readonly string[];
2247
+ }>;
2248
+ }>;
2249
+ lock: Readonly<{
2250
+ packId: string & z.BRAND<"PackId">;
2251
+ version: string & z.BRAND<"SemanticVersion">;
2252
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2253
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2254
+ files: readonly Readonly<{
2255
+ path: string;
2256
+ digest: string & z.BRAND<"Sha256Digest">;
2257
+ }>[];
2258
+ lockDigest: string & z.BRAND<"Sha256Digest">;
2259
+ }>;
2260
+ mount: Readonly<{
2261
+ installationId: string & z.BRAND<"InstallationId">;
2262
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2263
+ scopeAuthority: Readonly<{
2264
+ tenant: string;
2265
+ organizationId: string;
2266
+ }>;
2267
+ revision: number;
2268
+ sourceBindings: readonly Readonly<{
2269
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2270
+ sourceId: string & z.BRAND<"SourceId">;
2271
+ sourceClass: "document" | "records" | "activity_stream";
2272
+ providerRef: string;
2273
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2274
+ operationIds: readonly string[];
2275
+ connectorRef?: string | undefined;
2276
+ origin?: "observed" | "derived" | undefined;
2277
+ }>[];
2278
+ state: "mounted" | "unmounted";
2279
+ }>;
2280
+ }, {
2281
+ files: Readonly<Record<string, JsonValue>>;
2282
+ definition: Readonly<{
2283
+ packId: string;
2284
+ version: string;
2285
+ responsibility: string;
2286
+ scope: Readonly<{
2287
+ root: "tenant";
2288
+ descendants: readonly ["namespace", "subject", "session"];
2289
+ }>;
2290
+ capabilities: readonly Readonly<{
2291
+ operationId: string;
2292
+ provider: Readonly<{
2293
+ kind: "records_operation";
2294
+ operationId: string;
2295
+ }> | Readonly<{
2296
+ kind: "open_connector_action";
2297
+ actionId: string;
2298
+ connectorRef: string;
2299
+ }> | Readonly<{
2300
+ kind: "schift_search";
2301
+ indexRef: string;
2302
+ }> | Readonly<{
2303
+ kind: "web_search";
2304
+ provider: "customer" | "schift";
2305
+ }>;
2306
+ inputSchemaRef: string;
2307
+ resultSchemaRef: string;
2308
+ allowedFilters?: readonly string[] | undefined;
2309
+ limits?: Readonly<{
2310
+ maxRows?: number | undefined;
2311
+ maxResultBytes?: number | undefined;
2312
+ }> | undefined;
2313
+ freshness?: Readonly<{
2314
+ maxAgeSeconds: number;
2315
+ }> | undefined;
2316
+ requiredProviderScopes?: readonly string[] | undefined;
2317
+ }>[];
2318
+ contextPolicy: Readonly<{
2319
+ mustConsider: readonly Readonly<{
2320
+ id: string;
2321
+ selector: Readonly<{
2322
+ sourceIds?: readonly string[] | undefined;
2323
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2324
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2325
+ origins?: readonly ("observed" | "derived")[] | undefined;
2326
+ }>;
2327
+ minEvidence: number;
2328
+ maxAgeSeconds?: number | undefined;
2329
+ }>[];
2330
+ mustNotUse: readonly Readonly<{
2331
+ id: string;
2332
+ selector: Readonly<{
2333
+ sourceIds?: readonly string[] | undefined;
2334
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2335
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2336
+ origins?: readonly ("observed" | "derived")[] | undefined;
2337
+ }>;
2338
+ }>[];
2339
+ mayConsider?: readonly Readonly<{
2340
+ id: string;
2341
+ selector: Readonly<{
2342
+ sourceIds?: readonly string[] | undefined;
2343
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2344
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2345
+ origins?: readonly ("observed" | "derived")[] | undefined;
2346
+ }>;
2347
+ minEvidence: number;
2348
+ maxAgeSeconds?: number | undefined;
2349
+ }>[] | undefined;
2350
+ }>;
2351
+ authority: Readonly<{
2352
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
2353
+ allowed: readonly ("read" | "draft")[];
2354
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
2355
+ }>;
2356
+ evidence: Readonly<{
2357
+ freshness: Readonly<{
2358
+ defaultMaxAgeSeconds: number;
2359
+ }>;
2360
+ requireCitation: boolean;
2361
+ coverageAssertions: readonly string[];
2362
+ }>;
2363
+ }>;
2364
+ lock: Readonly<{
2365
+ packId: string;
2366
+ version: string;
2367
+ definitionDigest: string;
2368
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2369
+ files: readonly Readonly<{
2370
+ path: string;
2371
+ digest: string;
2372
+ }>[];
2373
+ lockDigest: string;
2374
+ }>;
2375
+ mount: Readonly<{
2376
+ installationId: string;
2377
+ definitionDigest: string;
2378
+ scopeAuthority: Readonly<{
2379
+ tenant: string;
2380
+ organizationId: string;
2381
+ }>;
2382
+ revision: number;
2383
+ sourceBindings: readonly Readonly<{
2384
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2385
+ sourceId: string;
2386
+ sourceClass: "document" | "records" | "activity_stream";
2387
+ providerRef: string;
2388
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2389
+ operationIds: readonly string[];
2390
+ connectorRef?: string | undefined;
2391
+ origin?: "observed" | "derived" | undefined;
2392
+ }>[];
2393
+ state: "mounted" | "unmounted";
2394
+ }>;
2395
+ }>>, "many">, Readonly<{
2396
+ files: Readonly<Record<string, JsonValue>>;
2397
+ definition: Readonly<{
2398
+ packId: string & z.BRAND<"PackId">;
2399
+ version: string & z.BRAND<"SemanticVersion">;
2400
+ responsibility: string;
2401
+ scope: Readonly<{
2402
+ root: "tenant";
2403
+ descendants: readonly ["namespace", "subject", "session"];
2404
+ }>;
2405
+ capabilities: readonly Readonly<{
2406
+ operationId: string;
2407
+ provider: Readonly<{
2408
+ kind: "records_operation";
2409
+ operationId: string;
2410
+ }> | Readonly<{
2411
+ kind: "open_connector_action";
2412
+ actionId: string;
2413
+ connectorRef: string;
2414
+ }> | Readonly<{
2415
+ kind: "schift_search";
2416
+ indexRef: string;
2417
+ }> | Readonly<{
2418
+ kind: "web_search";
2419
+ provider: "customer" | "schift";
2420
+ }>;
2421
+ inputSchemaRef: string;
2422
+ resultSchemaRef: string;
2423
+ allowedFilters?: readonly string[] | undefined;
2424
+ limits?: Readonly<{
2425
+ maxRows?: number | undefined;
2426
+ maxResultBytes?: number | undefined;
2427
+ }> | undefined;
2428
+ freshness?: Readonly<{
2429
+ maxAgeSeconds: number;
2430
+ }> | undefined;
2431
+ requiredProviderScopes?: readonly string[] | undefined;
2432
+ }>[];
2433
+ contextPolicy: Readonly<{
2434
+ mustConsider: readonly Readonly<{
2435
+ id: string;
2436
+ selector: Readonly<{
2437
+ sourceIds?: readonly string[] | undefined;
2438
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2439
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2440
+ origins?: readonly ("observed" | "derived")[] | undefined;
2441
+ }>;
2442
+ minEvidence: number;
2443
+ maxAgeSeconds?: number | undefined;
2444
+ }>[];
2445
+ mustNotUse: readonly Readonly<{
2446
+ id: string;
2447
+ selector: Readonly<{
2448
+ sourceIds?: readonly string[] | undefined;
2449
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2450
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2451
+ origins?: readonly ("observed" | "derived")[] | undefined;
2452
+ }>;
2453
+ }>[];
2454
+ mayConsider?: readonly Readonly<{
2455
+ id: string;
2456
+ selector: Readonly<{
2457
+ sourceIds?: readonly string[] | undefined;
2458
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2459
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2460
+ origins?: readonly ("observed" | "derived")[] | undefined;
2461
+ }>;
2462
+ minEvidence: number;
2463
+ maxAgeSeconds?: number | undefined;
2464
+ }>[] | undefined;
2465
+ }>;
2466
+ authority: Readonly<{
2467
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
2468
+ allowed: readonly ("read" | "draft")[];
2469
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
2470
+ }>;
2471
+ evidence: Readonly<{
2472
+ freshness: Readonly<{
2473
+ defaultMaxAgeSeconds: number;
2474
+ }>;
2475
+ requireCitation: boolean;
2476
+ coverageAssertions: readonly string[];
2477
+ }>;
2478
+ }>;
2479
+ lock: Readonly<{
2480
+ packId: string & z.BRAND<"PackId">;
2481
+ version: string & z.BRAND<"SemanticVersion">;
2482
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2483
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2484
+ files: readonly Readonly<{
2485
+ path: string;
2486
+ digest: string & z.BRAND<"Sha256Digest">;
2487
+ }>[];
2488
+ lockDigest: string & z.BRAND<"Sha256Digest">;
2489
+ }>;
2490
+ mount: Readonly<{
2491
+ installationId: string & z.BRAND<"InstallationId">;
2492
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2493
+ scopeAuthority: Readonly<{
2494
+ tenant: string;
2495
+ organizationId: string;
2496
+ }>;
2497
+ revision: number;
2498
+ sourceBindings: readonly Readonly<{
2499
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2500
+ sourceId: string & z.BRAND<"SourceId">;
2501
+ sourceClass: "document" | "records" | "activity_stream";
2502
+ providerRef: string;
2503
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2504
+ operationIds: readonly string[];
2505
+ connectorRef?: string | undefined;
2506
+ origin?: "observed" | "derived" | undefined;
2507
+ }>[];
2508
+ state: "mounted" | "unmounted";
2509
+ }>;
2510
+ }>[], Readonly<{
2511
+ files: Readonly<Record<string, JsonValue>>;
2512
+ definition: Readonly<{
2513
+ packId: string;
2514
+ version: string;
2515
+ responsibility: string;
2516
+ scope: Readonly<{
2517
+ root: "tenant";
2518
+ descendants: readonly ["namespace", "subject", "session"];
2519
+ }>;
2520
+ capabilities: readonly Readonly<{
2521
+ operationId: string;
2522
+ provider: Readonly<{
2523
+ kind: "records_operation";
2524
+ operationId: string;
2525
+ }> | Readonly<{
2526
+ kind: "open_connector_action";
2527
+ actionId: string;
2528
+ connectorRef: string;
2529
+ }> | Readonly<{
2530
+ kind: "schift_search";
2531
+ indexRef: string;
2532
+ }> | Readonly<{
2533
+ kind: "web_search";
2534
+ provider: "customer" | "schift";
2535
+ }>;
2536
+ inputSchemaRef: string;
2537
+ resultSchemaRef: string;
2538
+ allowedFilters?: readonly string[] | undefined;
2539
+ limits?: Readonly<{
2540
+ maxRows?: number | undefined;
2541
+ maxResultBytes?: number | undefined;
2542
+ }> | undefined;
2543
+ freshness?: Readonly<{
2544
+ maxAgeSeconds: number;
2545
+ }> | undefined;
2546
+ requiredProviderScopes?: readonly string[] | undefined;
2547
+ }>[];
2548
+ contextPolicy: Readonly<{
2549
+ mustConsider: readonly Readonly<{
2550
+ id: string;
2551
+ selector: Readonly<{
2552
+ sourceIds?: readonly string[] | undefined;
2553
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2554
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2555
+ origins?: readonly ("observed" | "derived")[] | undefined;
2556
+ }>;
2557
+ minEvidence: number;
2558
+ maxAgeSeconds?: number | undefined;
2559
+ }>[];
2560
+ mustNotUse: readonly Readonly<{
2561
+ id: string;
2562
+ selector: Readonly<{
2563
+ sourceIds?: readonly string[] | undefined;
2564
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2565
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2566
+ origins?: readonly ("observed" | "derived")[] | undefined;
2567
+ }>;
2568
+ }>[];
2569
+ mayConsider?: readonly Readonly<{
2570
+ id: string;
2571
+ selector: Readonly<{
2572
+ sourceIds?: readonly string[] | undefined;
2573
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2574
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2575
+ origins?: readonly ("observed" | "derived")[] | undefined;
2576
+ }>;
2577
+ minEvidence: number;
2578
+ maxAgeSeconds?: number | undefined;
2579
+ }>[] | undefined;
2580
+ }>;
2581
+ authority: Readonly<{
2582
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
2583
+ allowed: readonly ("read" | "draft")[];
2584
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
2585
+ }>;
2586
+ evidence: Readonly<{
2587
+ freshness: Readonly<{
2588
+ defaultMaxAgeSeconds: number;
2589
+ }>;
2590
+ requireCitation: boolean;
2591
+ coverageAssertions: readonly string[];
2592
+ }>;
2593
+ }>;
2594
+ lock: Readonly<{
2595
+ packId: string;
2596
+ version: string;
2597
+ definitionDigest: string;
2598
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2599
+ files: readonly Readonly<{
2600
+ path: string;
2601
+ digest: string;
2602
+ }>[];
2603
+ lockDigest: string;
2604
+ }>;
2605
+ mount: Readonly<{
2606
+ installationId: string;
2607
+ definitionDigest: string;
2608
+ scopeAuthority: Readonly<{
2609
+ tenant: string;
2610
+ organizationId: string;
2611
+ }>;
2612
+ revision: number;
2613
+ sourceBindings: readonly Readonly<{
2614
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2615
+ sourceId: string;
2616
+ sourceClass: "document" | "records" | "activity_stream";
2617
+ providerRef: string;
2618
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2619
+ operationIds: readonly string[];
2620
+ connectorRef?: string | undefined;
2621
+ origin?: "observed" | "derived" | undefined;
2622
+ }>[];
2623
+ state: "mounted" | "unmounted";
2624
+ }>;
2625
+ }>[]>>;
2626
+ }, "strict", z.ZodTypeAny, {
2627
+ revision: number;
2628
+ schemaVersion: "knowledge-scope-state.schift.dev/v0.1";
2629
+ installations: readonly Readonly<{
2630
+ files: Readonly<Record<string, JsonValue>>;
2631
+ definition: Readonly<{
2632
+ packId: string & z.BRAND<"PackId">;
2633
+ version: string & z.BRAND<"SemanticVersion">;
2634
+ responsibility: string;
2635
+ scope: Readonly<{
2636
+ root: "tenant";
2637
+ descendants: readonly ["namespace", "subject", "session"];
2638
+ }>;
2639
+ capabilities: readonly Readonly<{
2640
+ operationId: string;
2641
+ provider: Readonly<{
2642
+ kind: "records_operation";
2643
+ operationId: string;
2644
+ }> | Readonly<{
2645
+ kind: "open_connector_action";
2646
+ actionId: string;
2647
+ connectorRef: string;
2648
+ }> | Readonly<{
2649
+ kind: "schift_search";
2650
+ indexRef: string;
2651
+ }> | Readonly<{
2652
+ kind: "web_search";
2653
+ provider: "customer" | "schift";
2654
+ }>;
2655
+ inputSchemaRef: string;
2656
+ resultSchemaRef: string;
2657
+ allowedFilters?: readonly string[] | undefined;
2658
+ limits?: Readonly<{
2659
+ maxRows?: number | undefined;
2660
+ maxResultBytes?: number | undefined;
2661
+ }> | undefined;
2662
+ freshness?: Readonly<{
2663
+ maxAgeSeconds: number;
2664
+ }> | undefined;
2665
+ requiredProviderScopes?: readonly string[] | undefined;
2666
+ }>[];
2667
+ contextPolicy: Readonly<{
2668
+ mustConsider: readonly Readonly<{
2669
+ id: string;
2670
+ selector: Readonly<{
2671
+ sourceIds?: readonly string[] | undefined;
2672
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2673
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2674
+ origins?: readonly ("observed" | "derived")[] | undefined;
2675
+ }>;
2676
+ minEvidence: number;
2677
+ maxAgeSeconds?: number | undefined;
2678
+ }>[];
2679
+ mustNotUse: readonly Readonly<{
2680
+ id: string;
2681
+ selector: Readonly<{
2682
+ sourceIds?: readonly string[] | undefined;
2683
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2684
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2685
+ origins?: readonly ("observed" | "derived")[] | undefined;
2686
+ }>;
2687
+ }>[];
2688
+ mayConsider?: readonly Readonly<{
2689
+ id: string;
2690
+ selector: Readonly<{
2691
+ sourceIds?: readonly string[] | undefined;
2692
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2693
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2694
+ origins?: readonly ("observed" | "derived")[] | undefined;
2695
+ }>;
2696
+ minEvidence: number;
2697
+ maxAgeSeconds?: number | undefined;
2698
+ }>[] | undefined;
2699
+ }>;
2700
+ authority: Readonly<{
2701
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
2702
+ allowed: readonly ("read" | "draft")[];
2703
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
2704
+ }>;
2705
+ evidence: Readonly<{
2706
+ freshness: Readonly<{
2707
+ defaultMaxAgeSeconds: number;
2708
+ }>;
2709
+ requireCitation: boolean;
2710
+ coverageAssertions: readonly string[];
2711
+ }>;
2712
+ }>;
2713
+ lock: Readonly<{
2714
+ packId: string & z.BRAND<"PackId">;
2715
+ version: string & z.BRAND<"SemanticVersion">;
2716
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2717
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2718
+ files: readonly Readonly<{
2719
+ path: string;
2720
+ digest: string & z.BRAND<"Sha256Digest">;
2721
+ }>[];
2722
+ lockDigest: string & z.BRAND<"Sha256Digest">;
2723
+ }>;
2724
+ mount: Readonly<{
2725
+ installationId: string & z.BRAND<"InstallationId">;
2726
+ definitionDigest: string & z.BRAND<"Sha256Digest">;
2727
+ scopeAuthority: Readonly<{
2728
+ tenant: string;
2729
+ organizationId: string;
2730
+ }>;
2731
+ revision: number;
2732
+ sourceBindings: readonly Readonly<{
2733
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2734
+ sourceId: string & z.BRAND<"SourceId">;
2735
+ sourceClass: "document" | "records" | "activity_stream";
2736
+ providerRef: string;
2737
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2738
+ operationIds: readonly string[];
2739
+ connectorRef?: string | undefined;
2740
+ origin?: "observed" | "derived" | undefined;
2741
+ }>[];
2742
+ state: "mounted" | "unmounted";
2743
+ }>;
2744
+ }>[];
2745
+ }, {
2746
+ revision: number;
2747
+ schemaVersion: "knowledge-scope-state.schift.dev/v0.1";
2748
+ installations: readonly Readonly<{
2749
+ files: Readonly<Record<string, JsonValue>>;
2750
+ definition: Readonly<{
2751
+ packId: string;
2752
+ version: string;
2753
+ responsibility: string;
2754
+ scope: Readonly<{
2755
+ root: "tenant";
2756
+ descendants: readonly ["namespace", "subject", "session"];
2757
+ }>;
2758
+ capabilities: readonly Readonly<{
2759
+ operationId: string;
2760
+ provider: Readonly<{
2761
+ kind: "records_operation";
2762
+ operationId: string;
2763
+ }> | Readonly<{
2764
+ kind: "open_connector_action";
2765
+ actionId: string;
2766
+ connectorRef: string;
2767
+ }> | Readonly<{
2768
+ kind: "schift_search";
2769
+ indexRef: string;
2770
+ }> | Readonly<{
2771
+ kind: "web_search";
2772
+ provider: "customer" | "schift";
2773
+ }>;
2774
+ inputSchemaRef: string;
2775
+ resultSchemaRef: string;
2776
+ allowedFilters?: readonly string[] | undefined;
2777
+ limits?: Readonly<{
2778
+ maxRows?: number | undefined;
2779
+ maxResultBytes?: number | undefined;
2780
+ }> | undefined;
2781
+ freshness?: Readonly<{
2782
+ maxAgeSeconds: number;
2783
+ }> | undefined;
2784
+ requiredProviderScopes?: readonly string[] | undefined;
2785
+ }>[];
2786
+ contextPolicy: Readonly<{
2787
+ mustConsider: readonly Readonly<{
2788
+ id: string;
2789
+ selector: Readonly<{
2790
+ sourceIds?: readonly string[] | undefined;
2791
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2792
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2793
+ origins?: readonly ("observed" | "derived")[] | undefined;
2794
+ }>;
2795
+ minEvidence: number;
2796
+ maxAgeSeconds?: number | undefined;
2797
+ }>[];
2798
+ mustNotUse: readonly Readonly<{
2799
+ id: string;
2800
+ selector: Readonly<{
2801
+ sourceIds?: readonly string[] | undefined;
2802
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2803
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2804
+ origins?: readonly ("observed" | "derived")[] | undefined;
2805
+ }>;
2806
+ }>[];
2807
+ mayConsider?: readonly Readonly<{
2808
+ id: string;
2809
+ selector: Readonly<{
2810
+ sourceIds?: readonly string[] | undefined;
2811
+ sourceClasses?: readonly ("document" | "records" | "activity_stream")[] | undefined;
2812
+ authorities?: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[] | undefined;
2813
+ origins?: readonly ("observed" | "derived")[] | undefined;
2814
+ }>;
2815
+ minEvidence: number;
2816
+ maxAgeSeconds?: number | undefined;
2817
+ }>[] | undefined;
2818
+ }>;
2819
+ authority: Readonly<{
2820
+ precedence: readonly ("primary" | "operational" | "approved" | "observed" | "derived")[];
2821
+ allowed: readonly ("read" | "draft")[];
2822
+ forbidden: readonly ["send", "approve", "mutate_source", "workflow"];
2823
+ }>;
2824
+ evidence: Readonly<{
2825
+ freshness: Readonly<{
2826
+ defaultMaxAgeSeconds: number;
2827
+ }>;
2828
+ requireCitation: boolean;
2829
+ coverageAssertions: readonly string[];
2830
+ }>;
2831
+ }>;
2832
+ lock: Readonly<{
2833
+ packId: string;
2834
+ version: string;
2835
+ definitionDigest: string;
2836
+ schemaVersion: "knowledge-scope-lock.schift.dev/v0.1";
2837
+ files: readonly Readonly<{
2838
+ path: string;
2839
+ digest: string;
2840
+ }>[];
2841
+ lockDigest: string;
2842
+ }>;
2843
+ mount: Readonly<{
2844
+ installationId: string;
2845
+ definitionDigest: string;
2846
+ scopeAuthority: Readonly<{
2847
+ tenant: string;
2848
+ organizationId: string;
2849
+ }>;
2850
+ revision: number;
2851
+ sourceBindings: readonly Readonly<{
2852
+ authority: "primary" | "operational" | "approved" | "observed" | "derived";
2853
+ sourceId: string;
2854
+ sourceClass: "document" | "records" | "activity_stream";
2855
+ providerRef: string;
2856
+ permissionMode: "live" | "mirrored" | "static" | "unsupported";
2857
+ operationIds: readonly string[];
2858
+ connectorRef?: string | undefined;
2859
+ origin?: "observed" | "derived" | undefined;
2860
+ }>[];
2861
+ state: "mounted" | "unmounted";
2862
+ }>;
2863
+ }>[];
2864
+ }>>;
2865
+ export type StoredKnowledgeScope = z.infer<typeof StoredKnowledgeScopeSchema>;
2866
+ export type KnowledgeScopeState = z.infer<typeof KnowledgeScopeStateSchema>;
2867
+ export declare const EMPTY_KNOWLEDGE_SCOPE_STATE: KnowledgeScopeState;