@native-knowledge/knowledge-sdk 0.0.0-stage → 0.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +46 -2
  3. package/dist/index.js +6577 -0
  4. package/dist/types/contracts/artifact.d.ts +120 -0
  5. package/dist/types/contracts/collection-control.d.ts +160 -0
  6. package/dist/types/contracts/collection.d.ts +263 -0
  7. package/dist/types/contracts/common.d.ts +17 -0
  8. package/dist/types/contracts/currentness.d.ts +477 -0
  9. package/dist/types/contracts/event.d.ts +60 -0
  10. package/dist/types/contracts/evidence.d.ts +202 -0
  11. package/dist/types/contracts/index.d.ts +55 -0
  12. package/dist/types/contracts/material-capability.d.ts +88 -0
  13. package/dist/types/contracts/material-carrier.d.ts +104 -0
  14. package/dist/types/contracts/material-context.d.ts +28 -0
  15. package/dist/types/contracts/material-read.d.ts +152 -0
  16. package/dist/types/contracts/observation.d.ts +75 -0
  17. package/dist/types/contracts/persistence.d.ts +370 -0
  18. package/dist/types/contracts/project-intent.d.ts +218 -0
  19. package/dist/types/contracts/projection.d.ts +380 -0
  20. package/dist/types/contracts/public-reference.d.ts +237 -0
  21. package/dist/types/contracts/reference-record.d.ts +124 -0
  22. package/dist/types/contracts/remote-file.d.ts +128 -0
  23. package/dist/types/contracts/resource-scope.d.ts +40 -0
  24. package/dist/types/contracts/resource-transfer.d.ts +24 -0
  25. package/dist/types/contracts/review-packet.d.ts +274 -0
  26. package/dist/types/contracts/review-plane.d.ts +90 -0
  27. package/dist/types/contracts/rich-document.d.ts +641 -0
  28. package/dist/types/contracts/runtime-compatibility.d.ts +22 -0
  29. package/dist/types/contracts/runtime.d.ts +59 -0
  30. package/dist/types/contracts/scheduler.d.ts +348 -0
  31. package/dist/types/contracts/signal.d.ts +113 -0
  32. package/dist/types/contracts/source-governance.d.ts +375 -0
  33. package/dist/types/contracts/source.d.ts +62 -0
  34. package/dist/types/contracts/tenant-budget.d.ts +59 -0
  35. package/dist/types/contracts/tenant-collection-request.d.ts +209 -0
  36. package/dist/types/contracts/tenant-collection.d.ts +199 -0
  37. package/dist/types/contracts/tenant-currentness.d.ts +117 -0
  38. package/dist/types/contracts/tenant-management.d.ts +286 -0
  39. package/dist/types/contracts/tenant-material-api.d.ts +584 -0
  40. package/dist/types/contracts/tenant-pdf-text.d.ts +27 -0
  41. package/dist/types/contracts/tenant-project-control.d.ts +94 -0
  42. package/dist/types/contracts/tenant-public-reference.d.ts +179 -0
  43. package/dist/types/contracts/tenant-resource-api.d.ts +738 -0
  44. package/dist/types/contracts/tenant-resource.d.ts +298 -0
  45. package/dist/types/contracts/tenant-rich-document.d.ts +317 -0
  46. package/dist/types/contracts/tenant-source-binding.d.ts +44 -0
  47. package/dist/types/contracts/tenant-source-bridge.d.ts +70 -0
  48. package/dist/types/contracts/tenant-source-cutover.d.ts +226 -0
  49. package/dist/types/contracts/tenant-source-document.d.ts +163 -0
  50. package/dist/types/contracts/tenant-source-lease.d.ts +1 -0
  51. package/dist/types/contracts/tenant-source.d.ts +223 -0
  52. package/dist/types/contracts/tenant-web-collection.d.ts +287 -0
  53. package/dist/types/contracts/tenant-web-content-plan.d.ts +86 -0
  54. package/dist/types/contracts/tenant-web-content-result.d.ts +63 -0
  55. package/dist/types/contracts/tenant-web-content.d.ts +383 -0
  56. package/dist/types/contracts/tenant-web-crawl.d.ts +310 -0
  57. package/dist/types/contracts/tenant-web-dynamic.d.ts +698 -0
  58. package/dist/types/contracts/tenant-web-results.d.ts +66 -0
  59. package/dist/types/contracts/tenant-web-workflow.d.ts +494 -0
  60. package/dist/types/sdk/agent-entry.d.ts +291 -0
  61. package/dist/types/sdk/agent-guidance-error.d.ts +15 -0
  62. package/dist/types/sdk/index.d.ts +289 -0
  63. package/dist/types/sdk/material-stream.d.ts +18 -0
  64. package/dist/types/sdk/oauth.d.ts +268 -0
  65. package/dist/types/sdk/resource-integrity.d.ts +21 -0
  66. package/dist/types/sdk/resource.d.ts +88 -0
  67. package/dist/types/sdk/tenant-management.d.ts +240 -0
  68. package/dist/types/sdk/tenant-project.d.ts +57 -0
  69. package/dist/types/sdk/tenant-runtime.d.ts +174 -0
  70. package/dist/types/sdk/tenant-web-content.d.ts +44 -0
  71. package/dist/types/sdk/tenant-web-crawl.d.ts +42 -0
  72. package/dist/types/sdk/tenant-web-dynamic.d.ts +42 -0
  73. package/dist/types/sdk/tenant-web-workflow.d.ts +43 -0
  74. package/dist/types/sdk/tenant-web.d.ts +42 -0
  75. package/dist/types/sdk/tenant-workspace.d.ts +36 -0
  76. package/dist/types/sdk/transport.d.ts +16 -0
  77. package/dist/types/serving-contracts/agent-catalog.d.ts +70 -0
  78. package/dist/types/serving-contracts/agent-entry.d.ts +13148 -0
  79. package/dist/types/serving-contracts/agent-guidance-shapes.d.ts +263 -0
  80. package/dist/types/serving-contracts/agent-input-hints.d.ts +24 -0
  81. package/dist/types/serving-contracts/body-search.d.ts +231 -0
  82. package/dist/types/serving-contracts/consumer.d.ts +989 -0
  83. package/dist/types/serving-contracts/core.d.ts +333 -0
  84. package/dist/types/serving-contracts/http.d.ts +2874 -0
  85. package/dist/types/serving-contracts/index.d.ts +23 -0
  86. package/dist/types/serving-contracts/management.d.ts +424 -0
  87. package/dist/types/serving-contracts/material-capabilities.d.ts +508 -0
  88. package/dist/types/serving-contracts/material-index-status.d.ts +55 -0
  89. package/dist/types/serving-contracts/mcp.d.ts +2218 -0
  90. package/dist/types/serving-contracts/tenant-governance.d.ts +236 -0
  91. package/dist/types/serving-contracts/tenant-management.d.ts +6276 -0
  92. package/dist/types/serving-contracts/tenant-project.d.ts +7550 -0
  93. package/dist/types/serving-contracts/tenant-runtime.d.ts +9674 -0
  94. package/dist/types/serving-contracts/tenant-web-content.d.ts +4606 -0
  95. package/dist/types/serving-contracts/tenant-web-crawl.d.ts +2958 -0
  96. package/dist/types/serving-contracts/tenant-web-dynamic.d.ts +3902 -0
  97. package/dist/types/serving-contracts/tenant-web-workflow.d.ts +5750 -0
  98. package/dist/types/serving-contracts/tenant-web.d.ts +6418 -0
  99. package/dist/types/serving-contracts/tenant-workspace.d.ts +6451 -0
  100. package/dist/types/serving-contracts/workflow.d.ts +439 -0
  101. package/package.json +34 -4
@@ -0,0 +1,738 @@
1
+ /** Provider 16 的格式 2 资源读取合同;旧 Project/Tenant wire 保持其严格 schema。 */
2
+ import { z } from 'zod';
3
+ export declare const resourceOriginSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ type: z.ZodLiteral<"TENANT_AUTHOR">;
5
+ actor: z.ZodObject<{
6
+ tenantId: z.ZodString;
7
+ userId: z.ZodString;
8
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
9
+ }, z.core.$strict>;
10
+ submittedAt: z.ZodISODateTime;
11
+ }, z.core.$strict>, z.ZodObject<{
12
+ type: z.ZodLiteral<"TENANT_SOURCE">;
13
+ sourceId: z.ZodString;
14
+ sourceRef: z.ZodString;
15
+ sourceRevisionRef: z.ZodString;
16
+ collector: z.ZodObject<{
17
+ collectorId: z.ZodString;
18
+ version: z.ZodString;
19
+ }, z.core.$strict>;
20
+ runtimeNodeId: z.ZodString;
21
+ observedAt: z.ZodISODateTime;
22
+ }, z.core.$strict>], "type">, z.ZodObject<{
23
+ type: z.ZodLiteral<"LEGACY_PROJECT">;
24
+ projectKey: z.ZodString;
25
+ projectRef: z.ZodString;
26
+ }, z.core.$strict>]>;
27
+ export declare const resourceDirectoryItemSchema: z.ZodObject<{
28
+ ref: z.ZodString;
29
+ ownerTenantId: z.ZodString;
30
+ resourceType: z.ZodString;
31
+ origin: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
32
+ type: z.ZodLiteral<"TENANT_AUTHOR">;
33
+ actor: z.ZodObject<{
34
+ tenantId: z.ZodString;
35
+ userId: z.ZodString;
36
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
37
+ }, z.core.$strict>;
38
+ submittedAt: z.ZodISODateTime;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ type: z.ZodLiteral<"TENANT_SOURCE">;
41
+ sourceId: z.ZodString;
42
+ sourceRef: z.ZodString;
43
+ sourceRevisionRef: z.ZodString;
44
+ collector: z.ZodObject<{
45
+ collectorId: z.ZodString;
46
+ version: z.ZodString;
47
+ }, z.core.$strict>;
48
+ runtimeNodeId: z.ZodString;
49
+ observedAt: z.ZodISODateTime;
50
+ }, z.core.$strict>], "type">, z.ZodObject<{
51
+ type: z.ZodLiteral<"LEGACY_PROJECT">;
52
+ projectKey: z.ZodString;
53
+ projectRef: z.ZodString;
54
+ }, z.core.$strict>]>;
55
+ identityHash: z.ZodString;
56
+ identityKind: z.ZodEnum<{
57
+ CAS_BYTES: "CAS_BYTES";
58
+ REFERENCE_RECORD_DIGEST: "REFERENCE_RECORD_DIGEST";
59
+ }>;
60
+ kind: z.ZodString;
61
+ classification: z.ZodEnum<{
62
+ PUBLIC: "PUBLIC";
63
+ PUBLIC_METADATA: "PUBLIC_METADATA";
64
+ TENANT: "TENANT";
65
+ INTERNAL: "INTERNAL";
66
+ FDE_INTERNAL: "FDE_INTERNAL";
67
+ ACCESS_CONTROLLED: "ACCESS_CONTROLLED";
68
+ UNKNOWN: "UNKNOWN";
69
+ }>;
70
+ mediaType: z.ZodString;
71
+ title: z.ZodString;
72
+ summary: z.ZodString;
73
+ decision: z.ZodObject<{
74
+ schemaVersion: z.ZodLiteral<1>;
75
+ action: z.ZodEnum<{
76
+ ALLOW: "ALLOW";
77
+ DENY: "DENY";
78
+ }>;
79
+ reasonCodes: z.ZodArray<z.ZodEnum<{
80
+ UNAVAILABLE: "UNAVAILABLE";
81
+ NOT_FOUND: "NOT_FOUND";
82
+ CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
83
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
84
+ UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
85
+ }>>;
86
+ assessedAt: z.ZodISODateTime;
87
+ }, z.core.$strict>;
88
+ }, z.core.$strict>;
89
+ export type ResourceDirectoryItem = z.infer<typeof resourceDirectoryItemSchema>;
90
+ export declare const resourceToolSchemas: {
91
+ readonly knowledge_resource_list: z.ZodObject<{
92
+ resourceType: z.ZodOptional<z.ZodString>;
93
+ sourceProjectKey: z.ZodOptional<z.ZodString>;
94
+ refPrefix: z.ZodOptional<z.ZodString>;
95
+ after: z.ZodOptional<z.ZodString>;
96
+ limit: z.ZodOptional<z.ZodNumber>;
97
+ projectRef: z.ZodOptional<z.ZodString>;
98
+ }, z.core.$strict>;
99
+ readonly knowledge_resource_describe: z.ZodObject<{
100
+ ref: z.ZodString;
101
+ projectRef: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strict>;
103
+ readonly knowledge_resource_read: z.ZodObject<{
104
+ ref: z.ZodString;
105
+ projectRef: z.ZodOptional<z.ZodString>;
106
+ }, z.core.$strict>;
107
+ readonly knowledge_resource_capabilities: z.ZodObject<{
108
+ ref: z.ZodString;
109
+ projectRef: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strict>;
111
+ readonly knowledge_resource_search: z.ZodObject<{
112
+ query: z.ZodString;
113
+ resourceType: z.ZodOptional<z.ZodString>;
114
+ sourceProjectKey: z.ZodOptional<z.ZodString>;
115
+ refPrefix: z.ZodOptional<z.ZodString>;
116
+ after: z.ZodOptional<z.ZodString>;
117
+ limit: z.ZodOptional<z.ZodNumber>;
118
+ projectRef: z.ZodOptional<z.ZodString>;
119
+ }, z.core.$strict>;
120
+ readonly knowledge_resource_window: z.ZodObject<{
121
+ projectRef: z.ZodOptional<z.ZodString>;
122
+ }, z.core.$strict>;
123
+ readonly knowledge_resource_changes: z.ZodObject<{
124
+ after: z.ZodOptional<z.ZodString>;
125
+ limit: z.ZodOptional<z.ZodNumber>;
126
+ projectRef: z.ZodOptional<z.ZodString>;
127
+ }, z.core.$strict>;
128
+ readonly knowledge_resource_counts: z.ZodObject<{
129
+ after: z.ZodOptional<z.ZodString>;
130
+ limit: z.ZodOptional<z.ZodNumber>;
131
+ projectRef: z.ZodOptional<z.ZodString>;
132
+ }, z.core.$strict>;
133
+ readonly knowledge_resource_index_status: z.ZodObject<{
134
+ projectRef: z.ZodOptional<z.ZodString>;
135
+ }, z.core.$strict>;
136
+ readonly knowledge_resource_media: z.ZodObject<{
137
+ ref: z.ZodString;
138
+ projectRef: z.ZodOptional<z.ZodString>;
139
+ afterOrdinal: z.ZodOptional<z.ZodNumber>;
140
+ limit: z.ZodOptional<z.ZodNumber>;
141
+ documentRef: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strict>;
143
+ };
144
+ export type ResourceToolName = keyof typeof resourceToolSchemas;
145
+ export declare const resourceDataSchemas: {
146
+ readonly knowledge_resource_list: z.ZodObject<{
147
+ items: z.ZodArray<z.ZodObject<{
148
+ ref: z.ZodString;
149
+ ownerTenantId: z.ZodString;
150
+ resourceType: z.ZodString;
151
+ origin: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
152
+ type: z.ZodLiteral<"TENANT_AUTHOR">;
153
+ actor: z.ZodObject<{
154
+ tenantId: z.ZodString;
155
+ userId: z.ZodString;
156
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
157
+ }, z.core.$strict>;
158
+ submittedAt: z.ZodISODateTime;
159
+ }, z.core.$strict>, z.ZodObject<{
160
+ type: z.ZodLiteral<"TENANT_SOURCE">;
161
+ sourceId: z.ZodString;
162
+ sourceRef: z.ZodString;
163
+ sourceRevisionRef: z.ZodString;
164
+ collector: z.ZodObject<{
165
+ collectorId: z.ZodString;
166
+ version: z.ZodString;
167
+ }, z.core.$strict>;
168
+ runtimeNodeId: z.ZodString;
169
+ observedAt: z.ZodISODateTime;
170
+ }, z.core.$strict>], "type">, z.ZodObject<{
171
+ type: z.ZodLiteral<"LEGACY_PROJECT">;
172
+ projectKey: z.ZodString;
173
+ projectRef: z.ZodString;
174
+ }, z.core.$strict>]>;
175
+ identityHash: z.ZodString;
176
+ identityKind: z.ZodEnum<{
177
+ CAS_BYTES: "CAS_BYTES";
178
+ REFERENCE_RECORD_DIGEST: "REFERENCE_RECORD_DIGEST";
179
+ }>;
180
+ kind: z.ZodString;
181
+ classification: z.ZodEnum<{
182
+ PUBLIC: "PUBLIC";
183
+ PUBLIC_METADATA: "PUBLIC_METADATA";
184
+ TENANT: "TENANT";
185
+ INTERNAL: "INTERNAL";
186
+ FDE_INTERNAL: "FDE_INTERNAL";
187
+ ACCESS_CONTROLLED: "ACCESS_CONTROLLED";
188
+ UNKNOWN: "UNKNOWN";
189
+ }>;
190
+ mediaType: z.ZodString;
191
+ title: z.ZodString;
192
+ summary: z.ZodString;
193
+ decision: z.ZodObject<{
194
+ schemaVersion: z.ZodLiteral<1>;
195
+ action: z.ZodEnum<{
196
+ ALLOW: "ALLOW";
197
+ DENY: "DENY";
198
+ }>;
199
+ reasonCodes: z.ZodArray<z.ZodEnum<{
200
+ UNAVAILABLE: "UNAVAILABLE";
201
+ NOT_FOUND: "NOT_FOUND";
202
+ CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
203
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
204
+ UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
205
+ }>>;
206
+ assessedAt: z.ZodISODateTime;
207
+ }, z.core.$strict>;
208
+ }, z.core.$strict>>;
209
+ nextAfter: z.ZodNullable<z.ZodString>;
210
+ }, z.core.$strict>;
211
+ readonly knowledge_resource_describe: z.ZodObject<{
212
+ item: z.ZodNullable<z.ZodObject<{
213
+ ref: z.ZodString;
214
+ ownerTenantId: z.ZodString;
215
+ resourceType: z.ZodString;
216
+ origin: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
217
+ type: z.ZodLiteral<"TENANT_AUTHOR">;
218
+ actor: z.ZodObject<{
219
+ tenantId: z.ZodString;
220
+ userId: z.ZodString;
221
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
222
+ }, z.core.$strict>;
223
+ submittedAt: z.ZodISODateTime;
224
+ }, z.core.$strict>, z.ZodObject<{
225
+ type: z.ZodLiteral<"TENANT_SOURCE">;
226
+ sourceId: z.ZodString;
227
+ sourceRef: z.ZodString;
228
+ sourceRevisionRef: z.ZodString;
229
+ collector: z.ZodObject<{
230
+ collectorId: z.ZodString;
231
+ version: z.ZodString;
232
+ }, z.core.$strict>;
233
+ runtimeNodeId: z.ZodString;
234
+ observedAt: z.ZodISODateTime;
235
+ }, z.core.$strict>], "type">, z.ZodObject<{
236
+ type: z.ZodLiteral<"LEGACY_PROJECT">;
237
+ projectKey: z.ZodString;
238
+ projectRef: z.ZodString;
239
+ }, z.core.$strict>]>;
240
+ identityHash: z.ZodString;
241
+ identityKind: z.ZodEnum<{
242
+ CAS_BYTES: "CAS_BYTES";
243
+ REFERENCE_RECORD_DIGEST: "REFERENCE_RECORD_DIGEST";
244
+ }>;
245
+ kind: z.ZodString;
246
+ classification: z.ZodEnum<{
247
+ PUBLIC: "PUBLIC";
248
+ PUBLIC_METADATA: "PUBLIC_METADATA";
249
+ TENANT: "TENANT";
250
+ INTERNAL: "INTERNAL";
251
+ FDE_INTERNAL: "FDE_INTERNAL";
252
+ ACCESS_CONTROLLED: "ACCESS_CONTROLLED";
253
+ UNKNOWN: "UNKNOWN";
254
+ }>;
255
+ mediaType: z.ZodString;
256
+ title: z.ZodString;
257
+ summary: z.ZodString;
258
+ decision: z.ZodObject<{
259
+ schemaVersion: z.ZodLiteral<1>;
260
+ action: z.ZodEnum<{
261
+ ALLOW: "ALLOW";
262
+ DENY: "DENY";
263
+ }>;
264
+ reasonCodes: z.ZodArray<z.ZodEnum<{
265
+ UNAVAILABLE: "UNAVAILABLE";
266
+ NOT_FOUND: "NOT_FOUND";
267
+ CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
268
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
269
+ UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
270
+ }>>;
271
+ assessedAt: z.ZodISODateTime;
272
+ }, z.core.$strict>;
273
+ }, z.core.$strict>>;
274
+ byteLength: z.ZodNullable<z.ZodNumber>;
275
+ downloadUrl: z.ZodNullable<z.ZodString>;
276
+ }, z.core.$strict>;
277
+ readonly knowledge_resource_read: z.ZodObject<{
278
+ item: z.ZodNullable<z.ZodObject<{
279
+ ref: z.ZodString;
280
+ ownerTenantId: z.ZodString;
281
+ resourceType: z.ZodString;
282
+ origin: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
283
+ type: z.ZodLiteral<"TENANT_AUTHOR">;
284
+ actor: z.ZodObject<{
285
+ tenantId: z.ZodString;
286
+ userId: z.ZodString;
287
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
288
+ }, z.core.$strict>;
289
+ submittedAt: z.ZodISODateTime;
290
+ }, z.core.$strict>, z.ZodObject<{
291
+ type: z.ZodLiteral<"TENANT_SOURCE">;
292
+ sourceId: z.ZodString;
293
+ sourceRef: z.ZodString;
294
+ sourceRevisionRef: z.ZodString;
295
+ collector: z.ZodObject<{
296
+ collectorId: z.ZodString;
297
+ version: z.ZodString;
298
+ }, z.core.$strict>;
299
+ runtimeNodeId: z.ZodString;
300
+ observedAt: z.ZodISODateTime;
301
+ }, z.core.$strict>], "type">, z.ZodObject<{
302
+ type: z.ZodLiteral<"LEGACY_PROJECT">;
303
+ projectKey: z.ZodString;
304
+ projectRef: z.ZodString;
305
+ }, z.core.$strict>]>;
306
+ identityHash: z.ZodString;
307
+ identityKind: z.ZodEnum<{
308
+ CAS_BYTES: "CAS_BYTES";
309
+ REFERENCE_RECORD_DIGEST: "REFERENCE_RECORD_DIGEST";
310
+ }>;
311
+ kind: z.ZodString;
312
+ classification: z.ZodEnum<{
313
+ PUBLIC: "PUBLIC";
314
+ PUBLIC_METADATA: "PUBLIC_METADATA";
315
+ TENANT: "TENANT";
316
+ INTERNAL: "INTERNAL";
317
+ FDE_INTERNAL: "FDE_INTERNAL";
318
+ ACCESS_CONTROLLED: "ACCESS_CONTROLLED";
319
+ UNKNOWN: "UNKNOWN";
320
+ }>;
321
+ mediaType: z.ZodString;
322
+ title: z.ZodString;
323
+ summary: z.ZodString;
324
+ decision: z.ZodObject<{
325
+ schemaVersion: z.ZodLiteral<1>;
326
+ action: z.ZodEnum<{
327
+ ALLOW: "ALLOW";
328
+ DENY: "DENY";
329
+ }>;
330
+ reasonCodes: z.ZodArray<z.ZodEnum<{
331
+ UNAVAILABLE: "UNAVAILABLE";
332
+ NOT_FOUND: "NOT_FOUND";
333
+ CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
334
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
335
+ UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
336
+ }>>;
337
+ assessedAt: z.ZodISODateTime;
338
+ }, z.core.$strict>;
339
+ }, z.core.$strict>>;
340
+ byteLength: z.ZodNullable<z.ZodNumber>;
341
+ decision: z.ZodObject<{
342
+ schemaVersion: z.ZodLiteral<1>;
343
+ action: z.ZodEnum<{
344
+ ALLOW: "ALLOW";
345
+ DENY: "DENY";
346
+ }>;
347
+ reasonCodes: z.ZodArray<z.ZodEnum<{
348
+ UNAVAILABLE: "UNAVAILABLE";
349
+ NOT_FOUND: "NOT_FOUND";
350
+ CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
351
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
352
+ UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
353
+ }>>;
354
+ assessedAt: z.ZodISODateTime;
355
+ }, z.core.$strict>;
356
+ descriptor: z.ZodNullable<z.ZodObject<{
357
+ contentHash: z.ZodString;
358
+ mediaType: z.ZodString;
359
+ byteLength: z.ZodNumber;
360
+ }, z.core.$strict>>;
361
+ delivery: z.ZodEnum<{
362
+ UNAVAILABLE: "UNAVAILABLE";
363
+ INLINE_BASE64: "INLINE_BASE64";
364
+ DOWNLOAD: "DOWNLOAD";
365
+ }>;
366
+ contentBase64: z.ZodNullable<z.ZodString>;
367
+ downloadUrl: z.ZodNullable<z.ZodString>;
368
+ verification: z.ZodEnum<{
369
+ VERIFIED: "VERIFIED";
370
+ NOT_VERIFIED: "NOT_VERIFIED";
371
+ }>;
372
+ }, z.core.$strict>;
373
+ readonly knowledge_resource_capabilities: z.ZodObject<{
374
+ item: z.ZodNullable<z.ZodObject<{
375
+ ref: z.ZodString;
376
+ ownerTenantId: z.ZodString;
377
+ resourceType: z.ZodString;
378
+ origin: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
379
+ type: z.ZodLiteral<"TENANT_AUTHOR">;
380
+ actor: z.ZodObject<{
381
+ tenantId: z.ZodString;
382
+ userId: z.ZodString;
383
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
384
+ }, z.core.$strict>;
385
+ submittedAt: z.ZodISODateTime;
386
+ }, z.core.$strict>, z.ZodObject<{
387
+ type: z.ZodLiteral<"TENANT_SOURCE">;
388
+ sourceId: z.ZodString;
389
+ sourceRef: z.ZodString;
390
+ sourceRevisionRef: z.ZodString;
391
+ collector: z.ZodObject<{
392
+ collectorId: z.ZodString;
393
+ version: z.ZodString;
394
+ }, z.core.$strict>;
395
+ runtimeNodeId: z.ZodString;
396
+ observedAt: z.ZodISODateTime;
397
+ }, z.core.$strict>], "type">, z.ZodObject<{
398
+ type: z.ZodLiteral<"LEGACY_PROJECT">;
399
+ projectKey: z.ZodString;
400
+ projectRef: z.ZodString;
401
+ }, z.core.$strict>]>;
402
+ identityHash: z.ZodString;
403
+ identityKind: z.ZodEnum<{
404
+ CAS_BYTES: "CAS_BYTES";
405
+ REFERENCE_RECORD_DIGEST: "REFERENCE_RECORD_DIGEST";
406
+ }>;
407
+ kind: z.ZodString;
408
+ classification: z.ZodEnum<{
409
+ PUBLIC: "PUBLIC";
410
+ PUBLIC_METADATA: "PUBLIC_METADATA";
411
+ TENANT: "TENANT";
412
+ INTERNAL: "INTERNAL";
413
+ FDE_INTERNAL: "FDE_INTERNAL";
414
+ ACCESS_CONTROLLED: "ACCESS_CONTROLLED";
415
+ UNKNOWN: "UNKNOWN";
416
+ }>;
417
+ mediaType: z.ZodString;
418
+ title: z.ZodString;
419
+ summary: z.ZodString;
420
+ decision: z.ZodObject<{
421
+ schemaVersion: z.ZodLiteral<1>;
422
+ action: z.ZodEnum<{
423
+ ALLOW: "ALLOW";
424
+ DENY: "DENY";
425
+ }>;
426
+ reasonCodes: z.ZodArray<z.ZodEnum<{
427
+ UNAVAILABLE: "UNAVAILABLE";
428
+ NOT_FOUND: "NOT_FOUND";
429
+ CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
430
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
431
+ UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
432
+ }>>;
433
+ assessedAt: z.ZodISODateTime;
434
+ }, z.core.$strict>;
435
+ }, z.core.$strict>>;
436
+ materialAccess: z.ZodObject<{
437
+ schemaVersion: z.ZodLiteral<1>;
438
+ action: z.ZodEnum<{
439
+ ALLOW: "ALLOW";
440
+ DENY: "DENY";
441
+ }>;
442
+ reasonCodes: z.ZodArray<z.ZodEnum<{
443
+ UNAVAILABLE: "UNAVAILABLE";
444
+ NOT_FOUND: "NOT_FOUND";
445
+ CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
446
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
447
+ UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
448
+ }>>;
449
+ assessedAt: z.ZodISODateTime;
450
+ }, z.core.$strict>;
451
+ representation: z.ZodNullable<z.ZodObject<{
452
+ state: z.ZodEnum<{
453
+ MISSING: "MISSING";
454
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
455
+ READY: "READY";
456
+ UNSUPPORTED: "UNSUPPORTED";
457
+ DENIED: "DENIED";
458
+ }>;
459
+ format: z.ZodEnum<{
460
+ BYTES: "BYTES";
461
+ JSON: "JSON";
462
+ }>;
463
+ transfer: z.ZodEnum<{
464
+ UNSUPPORTED: "UNSUPPORTED";
465
+ VERIFIED_STREAM: "VERIFIED_STREAM";
466
+ BUFFERED_JSON: "BUFFERED_JSON";
467
+ }>;
468
+ contentHash: z.ZodNullable<z.ZodString>;
469
+ mediaType: z.ZodString;
470
+ byteLength: z.ZodNullable<z.ZodNumber>;
471
+ methods: z.ZodArray<z.ZodEnum<{
472
+ POST: "POST";
473
+ GET: "GET";
474
+ HEAD: "HEAD";
475
+ }>>;
476
+ range: z.ZodEnum<{
477
+ NONE: "NONE";
478
+ SINGLE: "SINGLE";
479
+ }>;
480
+ verification: z.ZodLiteral<"ON_READ">;
481
+ verificationChunkBytes: z.ZodNullable<z.ZodNumber>;
482
+ }, z.core.$strict>>;
483
+ }, z.core.$strict>;
484
+ readonly knowledge_resource_search: z.ZodObject<{
485
+ items: z.ZodArray<z.ZodObject<{
486
+ ref: z.ZodString;
487
+ ownerTenantId: z.ZodString;
488
+ resourceType: z.ZodString;
489
+ origin: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
490
+ type: z.ZodLiteral<"TENANT_AUTHOR">;
491
+ actor: z.ZodObject<{
492
+ tenantId: z.ZodString;
493
+ userId: z.ZodString;
494
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
495
+ }, z.core.$strict>;
496
+ submittedAt: z.ZodISODateTime;
497
+ }, z.core.$strict>, z.ZodObject<{
498
+ type: z.ZodLiteral<"TENANT_SOURCE">;
499
+ sourceId: z.ZodString;
500
+ sourceRef: z.ZodString;
501
+ sourceRevisionRef: z.ZodString;
502
+ collector: z.ZodObject<{
503
+ collectorId: z.ZodString;
504
+ version: z.ZodString;
505
+ }, z.core.$strict>;
506
+ runtimeNodeId: z.ZodString;
507
+ observedAt: z.ZodISODateTime;
508
+ }, z.core.$strict>], "type">, z.ZodObject<{
509
+ type: z.ZodLiteral<"LEGACY_PROJECT">;
510
+ projectKey: z.ZodString;
511
+ projectRef: z.ZodString;
512
+ }, z.core.$strict>]>;
513
+ identityHash: z.ZodString;
514
+ identityKind: z.ZodEnum<{
515
+ CAS_BYTES: "CAS_BYTES";
516
+ REFERENCE_RECORD_DIGEST: "REFERENCE_RECORD_DIGEST";
517
+ }>;
518
+ kind: z.ZodString;
519
+ classification: z.ZodEnum<{
520
+ PUBLIC: "PUBLIC";
521
+ PUBLIC_METADATA: "PUBLIC_METADATA";
522
+ TENANT: "TENANT";
523
+ INTERNAL: "INTERNAL";
524
+ FDE_INTERNAL: "FDE_INTERNAL";
525
+ ACCESS_CONTROLLED: "ACCESS_CONTROLLED";
526
+ UNKNOWN: "UNKNOWN";
527
+ }>;
528
+ mediaType: z.ZodString;
529
+ title: z.ZodString;
530
+ summary: z.ZodString;
531
+ decision: z.ZodObject<{
532
+ schemaVersion: z.ZodLiteral<1>;
533
+ action: z.ZodEnum<{
534
+ ALLOW: "ALLOW";
535
+ DENY: "DENY";
536
+ }>;
537
+ reasonCodes: z.ZodArray<z.ZodEnum<{
538
+ UNAVAILABLE: "UNAVAILABLE";
539
+ NOT_FOUND: "NOT_FOUND";
540
+ CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
541
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
542
+ UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
543
+ }>>;
544
+ assessedAt: z.ZodISODateTime;
545
+ }, z.core.$strict>;
546
+ }, z.core.$strict>>;
547
+ nextAfter: z.ZodNullable<z.ZodString>;
548
+ coverage: z.ZodLiteral<"INDEXED_DESCRIPTIONS_ONLY">;
549
+ }, z.core.$strict>;
550
+ readonly knowledge_resource_window: z.ZodObject<{
551
+ headSeq: z.ZodNumber;
552
+ retainedThroughSeq: z.ZodNumber;
553
+ headCursor: z.ZodString;
554
+ retentionCursor: z.ZodString;
555
+ epoch: z.ZodLiteral<"TENANT_RESOURCE_V1">;
556
+ }, z.core.$strict>;
557
+ readonly knowledge_resource_changes: z.ZodObject<{
558
+ items: z.ZodArray<z.ZodObject<{
559
+ seq: z.ZodNumber;
560
+ eventType: z.ZodString;
561
+ artifactRef: z.ZodNullable<z.ZodString>;
562
+ contentHash: z.ZodNullable<z.ZodString>;
563
+ routeId: z.ZodNullable<z.ZodString>;
564
+ createdAt: z.ZodString;
565
+ }, z.core.$strict>>;
566
+ nextAfter: z.ZodNullable<z.ZodString>;
567
+ }, z.core.$strict>;
568
+ readonly knowledge_resource_counts: z.ZodObject<{
569
+ owned: z.ZodNumber;
570
+ granted: z.ZodNumber;
571
+ available: z.ZodNumber;
572
+ resourceTypes: z.ZodArray<z.ZodObject<{
573
+ resourceType: z.ZodString;
574
+ total: z.ZodNumber;
575
+ }, z.core.$strict>>;
576
+ nextAfter: z.ZodNullable<z.ZodString>;
577
+ coverage: z.ZodLiteral<"CURRENT_AUTHORIZED_DIRECTORY">;
578
+ }, z.core.$strict>;
579
+ readonly knowledge_resource_index_status: z.ZodObject<{
580
+ registered: z.ZodNumber;
581
+ indexed: z.ZodNumber;
582
+ unindexed: z.ZodNumber;
583
+ state: z.ZodEnum<{
584
+ PARTIAL_BACKFILL: "PARTIAL_BACKFILL";
585
+ SYNCED_AS_OF_LAST_OBSERVATION: "SYNCED_AS_OF_LAST_OBSERVATION";
586
+ }>;
587
+ canonicalInventory: z.ZodLiteral<"NOT_SCANNED">;
588
+ coverage: z.ZodLiteral<"CURRENT_AUTHORIZED_DIRECTORY">;
589
+ }, z.core.$strict>;
590
+ readonly knowledge_resource_media: z.ZodNullable<z.ZodObject<{
591
+ ref: z.ZodString;
592
+ sourceContentHash: z.ZodString;
593
+ documentRef: z.ZodNullable<z.ZodString>;
594
+ documentContentHash: z.ZodNullable<z.ZodString>;
595
+ state: z.ZodEnum<{
596
+ MISSING: "MISSING";
597
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
598
+ READY: "READY";
599
+ UNSUPPORTED: "UNSUPPORTED";
600
+ DENIED: "DENIED";
601
+ }>;
602
+ items: z.ZodArray<z.ZodObject<{
603
+ ordinal: z.ZodNumber;
604
+ kind: z.ZodEnum<{
605
+ IMAGE: "IMAGE";
606
+ AUDIO: "AUDIO";
607
+ VIDEO: "VIDEO";
608
+ }>;
609
+ sourceUrl: z.ZodString;
610
+ canonicalUrl: z.ZodNullable<z.ZodString>;
611
+ availability: z.ZodEnum<{
612
+ MIRRORED: "MIRRORED";
613
+ REMOTE_ONLY: "REMOTE_ONLY";
614
+ UNAVAILABLE: "UNAVAILABLE";
615
+ }>;
616
+ mediaRef: z.ZodNullable<z.ZodString>;
617
+ contentHash: z.ZodNullable<z.ZodString>;
618
+ mediaType: z.ZodNullable<z.ZodString>;
619
+ byteLength: z.ZodNullable<z.ZodNumber>;
620
+ state: z.ZodEnum<{
621
+ MISSING: "MISSING";
622
+ REMOTE_ONLY: "REMOTE_ONLY";
623
+ UNAVAILABLE: "UNAVAILABLE";
624
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
625
+ READY: "READY";
626
+ DENIED: "DENIED";
627
+ }>;
628
+ representation: z.ZodNullable<z.ZodObject<{
629
+ state: z.ZodEnum<{
630
+ MISSING: "MISSING";
631
+ INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
632
+ READY: "READY";
633
+ UNSUPPORTED: "UNSUPPORTED";
634
+ DENIED: "DENIED";
635
+ }>;
636
+ format: z.ZodEnum<{
637
+ BYTES: "BYTES";
638
+ JSON: "JSON";
639
+ }>;
640
+ transfer: z.ZodEnum<{
641
+ UNSUPPORTED: "UNSUPPORTED";
642
+ VERIFIED_STREAM: "VERIFIED_STREAM";
643
+ BUFFERED_JSON: "BUFFERED_JSON";
644
+ }>;
645
+ contentHash: z.ZodNullable<z.ZodString>;
646
+ mediaType: z.ZodString;
647
+ byteLength: z.ZodNullable<z.ZodNumber>;
648
+ methods: z.ZodArray<z.ZodEnum<{
649
+ GET: "GET";
650
+ HEAD: "HEAD";
651
+ }>>;
652
+ range: z.ZodEnum<{
653
+ NONE: "NONE";
654
+ SINGLE: "SINGLE";
655
+ }>;
656
+ verification: z.ZodLiteral<"ON_READ">;
657
+ verificationChunkBytes: z.ZodNullable<z.ZodNumber>;
658
+ }, z.core.$strict>>;
659
+ }, z.core.$strict>>;
660
+ nextAfterOrdinal: z.ZodNullable<z.ZodNumber>;
661
+ }, z.core.$strict>>;
662
+ };
663
+ export declare const resourceEnvelopeSchema: z.ZodObject<{
664
+ schemaVersion: z.ZodLiteral<2>;
665
+ context: z.ZodDiscriminatedUnion<[z.ZodObject<{
666
+ type: z.ZodLiteral<"TENANT">;
667
+ tenantId: z.ZodString;
668
+ tenantRef: z.ZodString;
669
+ }, z.core.$strict>, z.ZodObject<{
670
+ type: z.ZodLiteral<"PROJECT">;
671
+ tenantId: z.ZodString;
672
+ projectKey: z.ZodString;
673
+ projectRef: z.ZodString;
674
+ }, z.core.$strict>], "type">;
675
+ policy: z.ZodEnum<{
676
+ LEGACY_PROJECT: "LEGACY_PROJECT";
677
+ TENANT_NATIVE: "TENANT_NATIVE";
678
+ TENANT_PROJECT_SCOPE: "TENANT_PROJECT_SCOPE";
679
+ }>;
680
+ data: z.ZodUnknown;
681
+ }, z.core.$strict>;
682
+ export declare const resourceToolInputSchemas: Record<ResourceToolName, Record<string, unknown>>;
683
+ export declare const resourceToolOutputSchemas: Record<ResourceToolName, Record<string, unknown>>;
684
+ export declare const tenantResourceProviderSchema: z.ZodObject<{
685
+ provider: z.ZodLiteral<"knowledge-v2">;
686
+ codeRevision: z.ZodString;
687
+ context: z.ZodLiteral<"TENANT_DEFAULT_PROJECT_EXPLICIT">;
688
+ scope: z.ZodLiteral<"knowledge.material.read">;
689
+ mcpEndpoint: z.ZodString;
690
+ resource: z.ZodString;
691
+ issuer: z.ZodString;
692
+ tokenEndpoint: z.ZodString;
693
+ revocationEndpoint: z.ZodString;
694
+ protocols: z.ZodArray<z.ZodString>;
695
+ tenantReadEnabled: z.ZodBoolean;
696
+ projectScopeEnabled: z.ZodBoolean;
697
+ externalTenantParameter: z.ZodLiteral<"external_tenant_id">;
698
+ materialEndpoint: z.ZodString;
699
+ authorizationEndpoint: z.ZodString;
700
+ authorizationContextParameters: z.ZodTuple<[z.ZodLiteral<"tenant_ref">, z.ZodLiteral<"project_ref">], null>;
701
+ tools: z.ZodArray<z.ZodString>;
702
+ projectScopeManagement: z.ZodLiteral<"knowledge.material.scope">;
703
+ inlineMaxBytes: z.ZodLiteral<32768>;
704
+ rawUsagePolicy: z.ZodLiteral<"CONSUMER_DECIDES">;
705
+ referenceReadMaxBytes: z.ZodLiteral<16777216>;
706
+ schemaVersion: z.ZodLiteral<16>;
707
+ materialSchemaVersion: z.ZodLiteral<2>;
708
+ capabilities: z.ZodTuple<[z.ZodLiteral<"TENANT_RESOURCE_V1">, z.ZodLiteral<"TENANT_AUTHORITY_V1">], null>;
709
+ legacyProviderEndpoint: z.ZodString;
710
+ }, z.core.$strict>;
711
+ export declare const resourceHttpContractSchema: z.ZodObject<{
712
+ schemaVersion: z.ZodLiteral<2>;
713
+ context: z.ZodDiscriminatedUnion<[z.ZodObject<{
714
+ type: z.ZodLiteral<"TENANT">;
715
+ tenantId: z.ZodString;
716
+ tenantRef: z.ZodString;
717
+ }, z.core.$strict>, z.ZodObject<{
718
+ type: z.ZodLiteral<"PROJECT">;
719
+ tenantId: z.ZodString;
720
+ projectKey: z.ZodString;
721
+ projectRef: z.ZodString;
722
+ }, z.core.$strict>], "type">;
723
+ policy: z.ZodEnum<{
724
+ LEGACY_PROJECT: "LEGACY_PROJECT";
725
+ TENANT_NATIVE: "TENANT_NATIVE";
726
+ TENANT_PROJECT_SCOPE: "TENANT_PROJECT_SCOPE";
727
+ }>;
728
+ capabilities: z.ZodTuple<[z.ZodLiteral<"TENANT_RESOURCE_V1">, z.ZodLiteral<"TENANT_AUTHORITY_V1">], null>;
729
+ callEndpoint: z.ZodString;
730
+ fileEndpoint: z.ZodString;
731
+ tools: z.ZodArray<z.ZodString>;
732
+ inlineMaxBytes: z.ZodLiteral<32768>;
733
+ readBufferMaxBytes: z.ZodLiteral<16777216>;
734
+ fileMethods: z.ZodTuple<[z.ZodLiteral<"GET">, z.ZodLiteral<"HEAD">, z.ZodLiteral<"POST">], null>;
735
+ verificationChunkBytes: z.ZodLiteral<65536>;
736
+ requestMaxBytes: z.ZodLiteral<131072>;
737
+ resultMaxBytes: z.ZodLiteral<524288>;
738
+ }, z.core.$strict>;