@blokjs/shared 2.0.1 → 2.2.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 (49) hide show
  1. package/dist/AgentSessionContracts.d.ts +316 -0
  2. package/dist/AgentSessionContracts.js +331 -0
  3. package/dist/BlokError.d.ts +55 -1
  4. package/dist/BlokError.js +99 -1
  5. package/dist/CapabilityContracts.d.ts +91 -0
  6. package/dist/CapabilityContracts.js +104 -0
  7. package/dist/CapabilityManifest.d.ts +67 -0
  8. package/dist/CapabilityManifest.js +172 -0
  9. package/dist/EnforcementContracts.d.ts +61 -0
  10. package/dist/EnforcementContracts.js +17 -0
  11. package/dist/EnforcementProfileContracts.d.ts +36 -0
  12. package/dist/EnforcementProfileContracts.js +55 -0
  13. package/dist/EvidenceContracts.d.ts +884 -0
  14. package/dist/EvidenceContracts.js +237 -0
  15. package/dist/GitCapabilityContracts.d.ts +103 -0
  16. package/dist/GitCapabilityContracts.js +222 -0
  17. package/dist/GlobalError.js +5 -1
  18. package/dist/GlobalLogger.d.ts +2 -0
  19. package/dist/GlobalLogger.js +4 -0
  20. package/dist/GraphContracts.d.ts +1643 -0
  21. package/dist/GraphContracts.js +333 -0
  22. package/dist/InteractionContracts.d.ts +76 -0
  23. package/dist/InteractionContracts.js +218 -0
  24. package/dist/JoinContracts.d.ts +593 -0
  25. package/dist/JoinContracts.js +329 -0
  26. package/dist/NodeBase.d.ts +20 -0
  27. package/dist/NodeBase.js +57 -6
  28. package/dist/PermissionAlgebra.d.ts +51 -0
  29. package/dist/PermissionAlgebra.js +125 -0
  30. package/dist/PolicyContracts.d.ts +184 -0
  31. package/dist/PolicyContracts.js +1 -0
  32. package/dist/ProcessCapabilityContracts.d.ts +146 -0
  33. package/dist/ProcessCapabilityContracts.js +263 -0
  34. package/dist/RuntimeContracts.d.ts +125 -0
  35. package/dist/RuntimeContracts.js +108 -0
  36. package/dist/SecretContracts.d.ts +43 -0
  37. package/dist/SecretContracts.js +1 -0
  38. package/dist/WasiComponentContracts.d.ts +582 -0
  39. package/dist/WasiComponentContracts.js +192 -0
  40. package/dist/WorkflowBindingContracts.d.ts +1062 -0
  41. package/dist/WorkflowBindingContracts.js +339 -0
  42. package/dist/index.d.ts +46 -15
  43. package/dist/index.js +26 -3
  44. package/dist/types/LoggerContext.d.ts +7 -0
  45. package/dist/utils/Mapper.d.ts +14 -0
  46. package/dist/utils/Mapper.js +32 -0
  47. package/dist/utils/lowerRefs.d.ts +25 -1
  48. package/dist/utils/lowerRefs.js +8 -3
  49. package/package.json +3 -2
@@ -0,0 +1,1643 @@
1
+ import { z } from "zod";
2
+ import type { RepositoryIdentity } from "./WorkflowBindingContracts.js";
3
+ /** Version of the provider-neutral graph contract. */
4
+ export declare const GRAPH_CONTRACT_VERSION: "1";
5
+ export declare const GRAPH_RESULT_STATES: readonly ["fresh", "stale", "missing", "truncated", "partial", "unsupported", "conflict"];
6
+ export declare const GRAPH_FRESHNESS_STATES: readonly ["fresh", "stale", "unknown"];
7
+ export declare const GRAPH_RELATION_KINDS: readonly ["defines", "contains", "calls", "imports", "exports", "references", "extends", "implements", "overrides", "tests"];
8
+ export declare const GRAPH_SYMBOL_KINDS: readonly ["file", "module", "namespace", "class", "interface", "enum", "function", "method", "property", "variable", "type", "unknown"];
9
+ export declare const GRAPH_SEARCH_KINDS: readonly ["symbol", "file", "module", "text"];
10
+ export declare const GRAPH_INDEX_SOURCES: readonly ["authoritative", "uncommitted-overlay", "provider"];
11
+ export declare const GRAPH_RELATION_DIRECTIONS: readonly ["inbound", "outbound", "both"];
12
+ export declare const GRAPH_MAX_STRING_LENGTH = 512;
13
+ export declare const GRAPH_MAX_PATH_LENGTH = 1024;
14
+ export declare const GRAPH_MAX_ITEMS = 500;
15
+ export declare const GRAPH_MAX_FILES_PER_INDEX = 500;
16
+ export declare const GRAPH_MAX_INDEX_BYTES: number;
17
+ export declare const GRAPH_MAX_RESPONSE_BYTES: number;
18
+ export declare const GRAPH_MAX_DEPTH = 32;
19
+ export type GraphResultState = (typeof GRAPH_RESULT_STATES)[number];
20
+ export type GraphFreshnessState = (typeof GRAPH_FRESHNESS_STATES)[number];
21
+ export type GraphRelationKind = (typeof GRAPH_RELATION_KINDS)[number];
22
+ export type GraphSymbolKind = (typeof GRAPH_SYMBOL_KINDS)[number];
23
+ export type GraphSearchKind = (typeof GRAPH_SEARCH_KINDS)[number];
24
+ export type GraphIndexSource = (typeof GRAPH_INDEX_SOURCES)[number];
25
+ export type GraphRelationDirection = (typeof GRAPH_RELATION_DIRECTIONS)[number];
26
+ /** Graph scope reuses the provider-neutral repository identity from bindings. */
27
+ export type GraphRepositoryIdentity = RepositoryIdentity;
28
+ export interface GraphWorktreeIdentity {
29
+ readonly id: string;
30
+ readonly branch?: string;
31
+ readonly commit?: string;
32
+ readonly dirty?: boolean;
33
+ readonly overlay?: "clean" | "uncommitted" | "unknown";
34
+ }
35
+ export interface GraphScope {
36
+ readonly repository: GraphRepositoryIdentity;
37
+ readonly worktree?: GraphWorktreeIdentity;
38
+ readonly commit?: string;
39
+ /** Known current hashes keyed by normalized repository-relative path. */
40
+ readonly contentHashes?: Readonly<Record<string, string>>;
41
+ }
42
+ export interface GraphRange {
43
+ readonly start: {
44
+ readonly line: number;
45
+ readonly column?: number;
46
+ };
47
+ readonly end?: {
48
+ readonly line: number;
49
+ readonly column?: number;
50
+ };
51
+ }
52
+ export interface GraphLocation {
53
+ readonly path: string;
54
+ readonly range?: GraphRange;
55
+ readonly language?: string;
56
+ readonly contentHash?: string;
57
+ }
58
+ /** Evidence that a response came from a particular derived index. */
59
+ export interface GraphProvenance {
60
+ readonly source: "derived-index";
61
+ readonly provider: string;
62
+ readonly providerVersion?: string;
63
+ readonly indexVersion: string;
64
+ readonly repository: GraphRepositoryIdentity;
65
+ readonly worktree?: GraphWorktreeIdentity;
66
+ readonly commit?: string;
67
+ readonly contentHash?: string;
68
+ readonly path?: string;
69
+ readonly range?: GraphRange;
70
+ readonly indexedAt?: string;
71
+ }
72
+ export interface GraphFreshness {
73
+ readonly state: GraphFreshnessState;
74
+ readonly indexedAt?: string;
75
+ readonly checkedAt: string;
76
+ readonly indexedCommit?: string;
77
+ readonly observedCommit?: string;
78
+ readonly indexedContentHash?: string;
79
+ readonly observedContentHash?: string;
80
+ readonly reason?: string;
81
+ }
82
+ export interface GraphResultStatus {
83
+ readonly primary: GraphResultState;
84
+ /** Multiple states are allowed, for example stale + truncated. */
85
+ readonly states: readonly GraphResultState[];
86
+ readonly complete: boolean;
87
+ }
88
+ export type GraphErrorCategory = "provider-unavailable" | "invalid-query" | "not-found" | "unsupported" | "stale" | "conflict" | "limit-exceeded" | "cancelled" | "index-failed" | "internal";
89
+ export interface GraphError {
90
+ readonly code: string;
91
+ readonly category: GraphErrorCategory;
92
+ readonly message: string;
93
+ readonly retryable: boolean;
94
+ readonly guidance: "reread-authoritative-source" | "retry" | "narrow-query" | "inspect-provider" | "none";
95
+ readonly path?: string;
96
+ }
97
+ export interface GraphSymbol {
98
+ readonly id: string;
99
+ readonly name: string;
100
+ readonly kind: GraphSymbolKind;
101
+ readonly location: GraphLocation;
102
+ readonly language?: string;
103
+ readonly signature?: string;
104
+ readonly containerId?: string;
105
+ readonly exported?: boolean;
106
+ }
107
+ export interface GraphRelation {
108
+ readonly id: string;
109
+ readonly from: string;
110
+ readonly to: string;
111
+ readonly kind: GraphRelationKind;
112
+ readonly location?: GraphLocation;
113
+ }
114
+ export interface GraphSearchHit {
115
+ readonly id: string;
116
+ readonly kind: GraphSearchKind;
117
+ readonly name: string;
118
+ readonly score: number;
119
+ readonly symbol?: GraphSymbol;
120
+ readonly location?: GraphLocation;
121
+ }
122
+ export interface GraphQueryResponse<T> {
123
+ readonly version: typeof GRAPH_CONTRACT_VERSION;
124
+ /** Graph data is navigation evidence only; it is never mutation authority. */
125
+ readonly authority: "navigation-only";
126
+ readonly items: readonly T[];
127
+ readonly status: GraphResultStatus;
128
+ readonly freshness: GraphFreshness;
129
+ readonly provenance?: GraphProvenance;
130
+ readonly errors: readonly GraphError[];
131
+ readonly nextCursor?: string;
132
+ }
133
+ export interface GraphSearchRequest {
134
+ readonly scope: GraphScope;
135
+ readonly query: string;
136
+ readonly kinds?: readonly GraphSearchKind[];
137
+ readonly pathPrefix?: string;
138
+ readonly limit?: number;
139
+ readonly cursor?: string;
140
+ }
141
+ export interface GraphSymbolRequest {
142
+ readonly scope: GraphScope;
143
+ readonly symbolId?: string;
144
+ readonly name?: string;
145
+ readonly path?: string;
146
+ readonly limit?: number;
147
+ }
148
+ export interface GraphRelationRequest {
149
+ readonly scope: GraphScope;
150
+ readonly symbolId: string;
151
+ readonly direction?: GraphRelationDirection;
152
+ readonly kinds?: readonly GraphRelationKind[];
153
+ readonly depth?: number;
154
+ readonly limit?: number;
155
+ }
156
+ export interface GraphImpactRequest {
157
+ readonly scope: GraphScope;
158
+ readonly symbolId: string;
159
+ readonly direction?: "inbound" | "outbound";
160
+ readonly relationKinds?: readonly GraphRelationKind[];
161
+ readonly maxDepth?: number;
162
+ readonly limit?: number;
163
+ }
164
+ export interface GraphFreshnessRequest {
165
+ readonly scope: GraphScope;
166
+ readonly paths?: readonly string[];
167
+ }
168
+ export interface GraphIndexFile {
169
+ readonly path: string;
170
+ readonly contentHash: string;
171
+ readonly source?: GraphIndexSource;
172
+ readonly language?: string;
173
+ readonly symbols: readonly GraphSymbol[];
174
+ readonly relations: readonly GraphRelation[];
175
+ }
176
+ export interface GraphIndexRequest {
177
+ readonly scope: GraphScope;
178
+ readonly files: readonly GraphIndexFile[];
179
+ readonly indexVersion?: string;
180
+ readonly reason?: "initial" | "changed-files" | "branch-switch" | "committed-patch" | "manual";
181
+ }
182
+ export interface GraphIndexResponse {
183
+ readonly version: typeof GRAPH_CONTRACT_VERSION;
184
+ readonly authority: "navigation-only";
185
+ readonly indexedFiles: readonly string[];
186
+ readonly skippedFiles: readonly string[];
187
+ readonly status: GraphResultStatus;
188
+ readonly freshness: GraphFreshness;
189
+ readonly provenance?: GraphProvenance;
190
+ readonly errors: readonly GraphError[];
191
+ }
192
+ export interface GraphQueryOptions {
193
+ readonly signal?: AbortSignal;
194
+ }
195
+ export interface GraphProvider {
196
+ readonly id: string;
197
+ readonly version: string;
198
+ search(request: GraphSearchRequest, options?: GraphQueryOptions): Promise<GraphQueryResponse<GraphSearchHit>>;
199
+ findSymbol(request: GraphSymbolRequest, options?: GraphQueryOptions): Promise<GraphQueryResponse<GraphSymbol>>;
200
+ relations(request: GraphRelationRequest, options?: GraphQueryOptions): Promise<GraphQueryResponse<GraphRelation>>;
201
+ impact(request: GraphImpactRequest, options?: GraphQueryOptions): Promise<GraphQueryResponse<GraphSymbol>>;
202
+ freshness(request: GraphFreshnessRequest, options?: GraphQueryOptions): Promise<GraphQueryResponse<GraphLocation>>;
203
+ index(request: GraphIndexRequest, options?: GraphQueryOptions): Promise<GraphIndexResponse>;
204
+ }
205
+ /**
206
+ * H3-03 deliberately exposes only a read interface for the authoritative
207
+ * source. #927 supplies the implementation. No graph provider receives a
208
+ * write method or a mutation-authorizing return type.
209
+ */
210
+ export interface AuthoritativeSourceReader {
211
+ read(request: AuthoritativeSourceReadRequest): Promise<AuthoritativeSourceSnapshot>;
212
+ }
213
+ export interface AuthoritativeSourceReadRequest {
214
+ readonly scope: GraphScope;
215
+ readonly path: string;
216
+ readonly expected?: {
217
+ readonly commit?: string;
218
+ readonly contentHash?: string;
219
+ };
220
+ readonly signal?: AbortSignal;
221
+ }
222
+ export interface AuthoritativeSourceSnapshot {
223
+ readonly scope: GraphScope;
224
+ readonly path: string;
225
+ readonly contentHash: string;
226
+ readonly commit?: string;
227
+ readonly bytes: number;
228
+ readonly content: string;
229
+ }
230
+ export declare class GraphContractError extends Error {
231
+ readonly errors: readonly string[];
232
+ constructor(errors: readonly string[]);
233
+ }
234
+ export declare const GraphRepositoryIdentitySchema: z.ZodObject<{
235
+ provider: z.ZodString;
236
+ id: z.ZodString;
237
+ revision: z.ZodOptional<z.ZodString>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ id: string;
240
+ provider: string;
241
+ revision?: string | undefined;
242
+ }, {
243
+ id: string;
244
+ provider: string;
245
+ revision?: string | undefined;
246
+ }>;
247
+ export declare const GraphWorktreeIdentitySchema: z.ZodObject<{
248
+ id: z.ZodString;
249
+ branch: z.ZodOptional<z.ZodString>;
250
+ commit: z.ZodOptional<z.ZodString>;
251
+ dirty: z.ZodOptional<z.ZodBoolean>;
252
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
253
+ }, "strip", z.ZodTypeAny, {
254
+ id: string;
255
+ dirty?: boolean | undefined;
256
+ commit?: string | undefined;
257
+ branch?: string | undefined;
258
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
259
+ }, {
260
+ id: string;
261
+ dirty?: boolean | undefined;
262
+ commit?: string | undefined;
263
+ branch?: string | undefined;
264
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
265
+ }>;
266
+ export declare const GraphScopeSchema: z.ZodObject<{
267
+ repository: z.ZodObject<{
268
+ provider: z.ZodString;
269
+ id: z.ZodString;
270
+ revision: z.ZodOptional<z.ZodString>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ id: string;
273
+ provider: string;
274
+ revision?: string | undefined;
275
+ }, {
276
+ id: string;
277
+ provider: string;
278
+ revision?: string | undefined;
279
+ }>;
280
+ worktree: z.ZodOptional<z.ZodObject<{
281
+ id: z.ZodString;
282
+ branch: z.ZodOptional<z.ZodString>;
283
+ commit: z.ZodOptional<z.ZodString>;
284
+ dirty: z.ZodOptional<z.ZodBoolean>;
285
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ id: string;
288
+ dirty?: boolean | undefined;
289
+ commit?: string | undefined;
290
+ branch?: string | undefined;
291
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
292
+ }, {
293
+ id: string;
294
+ dirty?: boolean | undefined;
295
+ commit?: string | undefined;
296
+ branch?: string | undefined;
297
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
298
+ }>>;
299
+ commit: z.ZodOptional<z.ZodString>;
300
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
301
+ }, "strip", z.ZodTypeAny, {
302
+ repository: {
303
+ id: string;
304
+ provider: string;
305
+ revision?: string | undefined;
306
+ };
307
+ commit?: string | undefined;
308
+ worktree?: {
309
+ id: string;
310
+ dirty?: boolean | undefined;
311
+ commit?: string | undefined;
312
+ branch?: string | undefined;
313
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
314
+ } | undefined;
315
+ contentHashes?: Record<string, string> | undefined;
316
+ }, {
317
+ repository: {
318
+ id: string;
319
+ provider: string;
320
+ revision?: string | undefined;
321
+ };
322
+ commit?: string | undefined;
323
+ worktree?: {
324
+ id: string;
325
+ dirty?: boolean | undefined;
326
+ commit?: string | undefined;
327
+ branch?: string | undefined;
328
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
329
+ } | undefined;
330
+ contentHashes?: Record<string, string> | undefined;
331
+ }>;
332
+ export declare const GraphRangeSchema: z.ZodObject<{
333
+ start: z.ZodObject<{
334
+ line: z.ZodNumber;
335
+ column: z.ZodOptional<z.ZodNumber>;
336
+ }, "strip", z.ZodTypeAny, {
337
+ line: number;
338
+ column?: number | undefined;
339
+ }, {
340
+ line: number;
341
+ column?: number | undefined;
342
+ }>;
343
+ end: z.ZodOptional<z.ZodObject<{
344
+ line: z.ZodNumber;
345
+ column: z.ZodOptional<z.ZodNumber>;
346
+ }, "strip", z.ZodTypeAny, {
347
+ line: number;
348
+ column?: number | undefined;
349
+ }, {
350
+ line: number;
351
+ column?: number | undefined;
352
+ }>>;
353
+ }, "strip", z.ZodTypeAny, {
354
+ start: {
355
+ line: number;
356
+ column?: number | undefined;
357
+ };
358
+ end?: {
359
+ line: number;
360
+ column?: number | undefined;
361
+ } | undefined;
362
+ }, {
363
+ start: {
364
+ line: number;
365
+ column?: number | undefined;
366
+ };
367
+ end?: {
368
+ line: number;
369
+ column?: number | undefined;
370
+ } | undefined;
371
+ }>;
372
+ export declare const GraphLocationSchema: z.ZodObject<{
373
+ path: z.ZodString;
374
+ range: z.ZodOptional<z.ZodObject<{
375
+ start: z.ZodObject<{
376
+ line: z.ZodNumber;
377
+ column: z.ZodOptional<z.ZodNumber>;
378
+ }, "strip", z.ZodTypeAny, {
379
+ line: number;
380
+ column?: number | undefined;
381
+ }, {
382
+ line: number;
383
+ column?: number | undefined;
384
+ }>;
385
+ end: z.ZodOptional<z.ZodObject<{
386
+ line: z.ZodNumber;
387
+ column: z.ZodOptional<z.ZodNumber>;
388
+ }, "strip", z.ZodTypeAny, {
389
+ line: number;
390
+ column?: number | undefined;
391
+ }, {
392
+ line: number;
393
+ column?: number | undefined;
394
+ }>>;
395
+ }, "strip", z.ZodTypeAny, {
396
+ start: {
397
+ line: number;
398
+ column?: number | undefined;
399
+ };
400
+ end?: {
401
+ line: number;
402
+ column?: number | undefined;
403
+ } | undefined;
404
+ }, {
405
+ start: {
406
+ line: number;
407
+ column?: number | undefined;
408
+ };
409
+ end?: {
410
+ line: number;
411
+ column?: number | undefined;
412
+ } | undefined;
413
+ }>>;
414
+ language: z.ZodOptional<z.ZodString>;
415
+ contentHash: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
416
+ }, "strip", z.ZodTypeAny, {
417
+ path: string;
418
+ contentHash?: string | undefined;
419
+ range?: {
420
+ start: {
421
+ line: number;
422
+ column?: number | undefined;
423
+ };
424
+ end?: {
425
+ line: number;
426
+ column?: number | undefined;
427
+ } | undefined;
428
+ } | undefined;
429
+ language?: string | undefined;
430
+ }, {
431
+ path: string;
432
+ contentHash?: string | undefined;
433
+ range?: {
434
+ start: {
435
+ line: number;
436
+ column?: number | undefined;
437
+ };
438
+ end?: {
439
+ line: number;
440
+ column?: number | undefined;
441
+ } | undefined;
442
+ } | undefined;
443
+ language?: string | undefined;
444
+ }>;
445
+ export declare const GraphProvenanceSchema: z.ZodObject<{
446
+ source: z.ZodLiteral<"derived-index">;
447
+ provider: z.ZodString;
448
+ providerVersion: z.ZodOptional<z.ZodString>;
449
+ indexVersion: z.ZodString;
450
+ repository: z.ZodObject<{
451
+ provider: z.ZodString;
452
+ id: z.ZodString;
453
+ revision: z.ZodOptional<z.ZodString>;
454
+ }, "strip", z.ZodTypeAny, {
455
+ id: string;
456
+ provider: string;
457
+ revision?: string | undefined;
458
+ }, {
459
+ id: string;
460
+ provider: string;
461
+ revision?: string | undefined;
462
+ }>;
463
+ worktree: z.ZodOptional<z.ZodObject<{
464
+ id: z.ZodString;
465
+ branch: z.ZodOptional<z.ZodString>;
466
+ commit: z.ZodOptional<z.ZodString>;
467
+ dirty: z.ZodOptional<z.ZodBoolean>;
468
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
469
+ }, "strip", z.ZodTypeAny, {
470
+ id: string;
471
+ dirty?: boolean | undefined;
472
+ commit?: string | undefined;
473
+ branch?: string | undefined;
474
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
475
+ }, {
476
+ id: string;
477
+ dirty?: boolean | undefined;
478
+ commit?: string | undefined;
479
+ branch?: string | undefined;
480
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
481
+ }>>;
482
+ commit: z.ZodOptional<z.ZodString>;
483
+ contentHash: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
484
+ path: z.ZodOptional<z.ZodString>;
485
+ range: z.ZodOptional<z.ZodObject<{
486
+ start: z.ZodObject<{
487
+ line: z.ZodNumber;
488
+ column: z.ZodOptional<z.ZodNumber>;
489
+ }, "strip", z.ZodTypeAny, {
490
+ line: number;
491
+ column?: number | undefined;
492
+ }, {
493
+ line: number;
494
+ column?: number | undefined;
495
+ }>;
496
+ end: z.ZodOptional<z.ZodObject<{
497
+ line: z.ZodNumber;
498
+ column: z.ZodOptional<z.ZodNumber>;
499
+ }, "strip", z.ZodTypeAny, {
500
+ line: number;
501
+ column?: number | undefined;
502
+ }, {
503
+ line: number;
504
+ column?: number | undefined;
505
+ }>>;
506
+ }, "strip", z.ZodTypeAny, {
507
+ start: {
508
+ line: number;
509
+ column?: number | undefined;
510
+ };
511
+ end?: {
512
+ line: number;
513
+ column?: number | undefined;
514
+ } | undefined;
515
+ }, {
516
+ start: {
517
+ line: number;
518
+ column?: number | undefined;
519
+ };
520
+ end?: {
521
+ line: number;
522
+ column?: number | undefined;
523
+ } | undefined;
524
+ }>>;
525
+ indexedAt: z.ZodOptional<z.ZodString>;
526
+ }, "strip", z.ZodTypeAny, {
527
+ repository: {
528
+ id: string;
529
+ provider: string;
530
+ revision?: string | undefined;
531
+ };
532
+ provider: string;
533
+ source: "derived-index";
534
+ indexVersion: string;
535
+ path?: string | undefined;
536
+ commit?: string | undefined;
537
+ contentHash?: string | undefined;
538
+ worktree?: {
539
+ id: string;
540
+ dirty?: boolean | undefined;
541
+ commit?: string | undefined;
542
+ branch?: string | undefined;
543
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
544
+ } | undefined;
545
+ range?: {
546
+ start: {
547
+ line: number;
548
+ column?: number | undefined;
549
+ };
550
+ end?: {
551
+ line: number;
552
+ column?: number | undefined;
553
+ } | undefined;
554
+ } | undefined;
555
+ providerVersion?: string | undefined;
556
+ indexedAt?: string | undefined;
557
+ }, {
558
+ repository: {
559
+ id: string;
560
+ provider: string;
561
+ revision?: string | undefined;
562
+ };
563
+ provider: string;
564
+ source: "derived-index";
565
+ indexVersion: string;
566
+ path?: string | undefined;
567
+ commit?: string | undefined;
568
+ contentHash?: string | undefined;
569
+ worktree?: {
570
+ id: string;
571
+ dirty?: boolean | undefined;
572
+ commit?: string | undefined;
573
+ branch?: string | undefined;
574
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
575
+ } | undefined;
576
+ range?: {
577
+ start: {
578
+ line: number;
579
+ column?: number | undefined;
580
+ };
581
+ end?: {
582
+ line: number;
583
+ column?: number | undefined;
584
+ } | undefined;
585
+ } | undefined;
586
+ providerVersion?: string | undefined;
587
+ indexedAt?: string | undefined;
588
+ }>;
589
+ export declare const GraphFreshnessSchema: z.ZodObject<{
590
+ state: z.ZodEnum<["fresh", "stale", "unknown"]>;
591
+ indexedAt: z.ZodOptional<z.ZodString>;
592
+ checkedAt: z.ZodString;
593
+ indexedCommit: z.ZodOptional<z.ZodString>;
594
+ observedCommit: z.ZodOptional<z.ZodString>;
595
+ indexedContentHash: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
596
+ observedContentHash: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
597
+ reason: z.ZodOptional<z.ZodString>;
598
+ }, "strip", z.ZodTypeAny, {
599
+ checkedAt: string;
600
+ state: "unknown" | "fresh" | "stale";
601
+ reason?: string | undefined;
602
+ indexedAt?: string | undefined;
603
+ indexedCommit?: string | undefined;
604
+ observedCommit?: string | undefined;
605
+ indexedContentHash?: string | undefined;
606
+ observedContentHash?: string | undefined;
607
+ }, {
608
+ checkedAt: string;
609
+ state: "unknown" | "fresh" | "stale";
610
+ reason?: string | undefined;
611
+ indexedAt?: string | undefined;
612
+ indexedCommit?: string | undefined;
613
+ observedCommit?: string | undefined;
614
+ indexedContentHash?: string | undefined;
615
+ observedContentHash?: string | undefined;
616
+ }>;
617
+ export declare const GraphResultStatusSchema: z.ZodEffects<z.ZodObject<{
618
+ primary: z.ZodEnum<["fresh", "stale", "missing", "truncated", "partial", "unsupported", "conflict"]>;
619
+ states: z.ZodArray<z.ZodEnum<["fresh", "stale", "missing", "truncated", "partial", "unsupported", "conflict"]>, "many">;
620
+ complete: z.ZodBoolean;
621
+ }, "strip", z.ZodTypeAny, {
622
+ primary: "missing" | "fresh" | "stale" | "truncated" | "partial" | "unsupported" | "conflict";
623
+ states: ("missing" | "fresh" | "stale" | "truncated" | "partial" | "unsupported" | "conflict")[];
624
+ complete: boolean;
625
+ }, {
626
+ primary: "missing" | "fresh" | "stale" | "truncated" | "partial" | "unsupported" | "conflict";
627
+ states: ("missing" | "fresh" | "stale" | "truncated" | "partial" | "unsupported" | "conflict")[];
628
+ complete: boolean;
629
+ }>, {
630
+ primary: "missing" | "fresh" | "stale" | "truncated" | "partial" | "unsupported" | "conflict";
631
+ states: ("missing" | "fresh" | "stale" | "truncated" | "partial" | "unsupported" | "conflict")[];
632
+ complete: boolean;
633
+ }, {
634
+ primary: "missing" | "fresh" | "stale" | "truncated" | "partial" | "unsupported" | "conflict";
635
+ states: ("missing" | "fresh" | "stale" | "truncated" | "partial" | "unsupported" | "conflict")[];
636
+ complete: boolean;
637
+ }>;
638
+ export declare const GraphErrorSchema: z.ZodObject<{
639
+ code: z.ZodString;
640
+ category: z.ZodEnum<["provider-unavailable", "invalid-query", "not-found", "unsupported", "stale", "conflict", "limit-exceeded", "cancelled", "index-failed", "internal"]>;
641
+ message: z.ZodString;
642
+ retryable: z.ZodBoolean;
643
+ guidance: z.ZodEnum<["reread-authoritative-source", "retry", "narrow-query", "inspect-provider", "none"]>;
644
+ path: z.ZodOptional<z.ZodString>;
645
+ }, "strip", z.ZodTypeAny, {
646
+ code: string;
647
+ message: string;
648
+ category: "cancelled" | "stale" | "unsupported" | "conflict" | "provider-unavailable" | "invalid-query" | "not-found" | "limit-exceeded" | "index-failed" | "internal";
649
+ retryable: boolean;
650
+ guidance: "reread-authoritative-source" | "retry" | "narrow-query" | "inspect-provider" | "none";
651
+ path?: string | undefined;
652
+ }, {
653
+ code: string;
654
+ message: string;
655
+ category: "cancelled" | "stale" | "unsupported" | "conflict" | "provider-unavailable" | "invalid-query" | "not-found" | "limit-exceeded" | "index-failed" | "internal";
656
+ retryable: boolean;
657
+ guidance: "reread-authoritative-source" | "retry" | "narrow-query" | "inspect-provider" | "none";
658
+ path?: string | undefined;
659
+ }>;
660
+ export declare const GraphSymbolSchema: z.ZodType<GraphSymbol, z.ZodTypeDef, GraphSymbol>;
661
+ export declare const GraphRelationSchema: z.ZodType<GraphRelation, z.ZodTypeDef, GraphRelation>;
662
+ export declare const GraphSearchHitSchema: z.ZodType<GraphSearchHit, z.ZodTypeDef, GraphSearchHit>;
663
+ export declare const GraphSearchRequestSchema: z.ZodObject<{
664
+ scope: z.ZodObject<{
665
+ repository: z.ZodObject<{
666
+ provider: z.ZodString;
667
+ id: z.ZodString;
668
+ revision: z.ZodOptional<z.ZodString>;
669
+ }, "strip", z.ZodTypeAny, {
670
+ id: string;
671
+ provider: string;
672
+ revision?: string | undefined;
673
+ }, {
674
+ id: string;
675
+ provider: string;
676
+ revision?: string | undefined;
677
+ }>;
678
+ worktree: z.ZodOptional<z.ZodObject<{
679
+ id: z.ZodString;
680
+ branch: z.ZodOptional<z.ZodString>;
681
+ commit: z.ZodOptional<z.ZodString>;
682
+ dirty: z.ZodOptional<z.ZodBoolean>;
683
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
684
+ }, "strip", z.ZodTypeAny, {
685
+ id: string;
686
+ dirty?: boolean | undefined;
687
+ commit?: string | undefined;
688
+ branch?: string | undefined;
689
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
690
+ }, {
691
+ id: string;
692
+ dirty?: boolean | undefined;
693
+ commit?: string | undefined;
694
+ branch?: string | undefined;
695
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
696
+ }>>;
697
+ commit: z.ZodOptional<z.ZodString>;
698
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
699
+ }, "strip", z.ZodTypeAny, {
700
+ repository: {
701
+ id: string;
702
+ provider: string;
703
+ revision?: string | undefined;
704
+ };
705
+ commit?: string | undefined;
706
+ worktree?: {
707
+ id: string;
708
+ dirty?: boolean | undefined;
709
+ commit?: string | undefined;
710
+ branch?: string | undefined;
711
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
712
+ } | undefined;
713
+ contentHashes?: Record<string, string> | undefined;
714
+ }, {
715
+ repository: {
716
+ id: string;
717
+ provider: string;
718
+ revision?: string | undefined;
719
+ };
720
+ commit?: string | undefined;
721
+ worktree?: {
722
+ id: string;
723
+ dirty?: boolean | undefined;
724
+ commit?: string | undefined;
725
+ branch?: string | undefined;
726
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
727
+ } | undefined;
728
+ contentHashes?: Record<string, string> | undefined;
729
+ }>;
730
+ query: z.ZodString;
731
+ kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["symbol", "file", "module", "text"]>, "many">>;
732
+ pathPrefix: z.ZodOptional<z.ZodString>;
733
+ limit: z.ZodOptional<z.ZodNumber>;
734
+ cursor: z.ZodOptional<z.ZodString>;
735
+ }, "strip", z.ZodTypeAny, {
736
+ scope: {
737
+ repository: {
738
+ id: string;
739
+ provider: string;
740
+ revision?: string | undefined;
741
+ };
742
+ commit?: string | undefined;
743
+ worktree?: {
744
+ id: string;
745
+ dirty?: boolean | undefined;
746
+ commit?: string | undefined;
747
+ branch?: string | undefined;
748
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
749
+ } | undefined;
750
+ contentHashes?: Record<string, string> | undefined;
751
+ };
752
+ query: string;
753
+ limit?: number | undefined;
754
+ kinds?: ("symbol" | "file" | "module" | "text")[] | undefined;
755
+ pathPrefix?: string | undefined;
756
+ cursor?: string | undefined;
757
+ }, {
758
+ scope: {
759
+ repository: {
760
+ id: string;
761
+ provider: string;
762
+ revision?: string | undefined;
763
+ };
764
+ commit?: string | undefined;
765
+ worktree?: {
766
+ id: string;
767
+ dirty?: boolean | undefined;
768
+ commit?: string | undefined;
769
+ branch?: string | undefined;
770
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
771
+ } | undefined;
772
+ contentHashes?: Record<string, string> | undefined;
773
+ };
774
+ query: string;
775
+ limit?: number | undefined;
776
+ kinds?: ("symbol" | "file" | "module" | "text")[] | undefined;
777
+ pathPrefix?: string | undefined;
778
+ cursor?: string | undefined;
779
+ }>;
780
+ export declare const GraphSymbolRequestSchema: z.ZodEffects<z.ZodObject<{
781
+ scope: z.ZodObject<{
782
+ repository: z.ZodObject<{
783
+ provider: z.ZodString;
784
+ id: z.ZodString;
785
+ revision: z.ZodOptional<z.ZodString>;
786
+ }, "strip", z.ZodTypeAny, {
787
+ id: string;
788
+ provider: string;
789
+ revision?: string | undefined;
790
+ }, {
791
+ id: string;
792
+ provider: string;
793
+ revision?: string | undefined;
794
+ }>;
795
+ worktree: z.ZodOptional<z.ZodObject<{
796
+ id: z.ZodString;
797
+ branch: z.ZodOptional<z.ZodString>;
798
+ commit: z.ZodOptional<z.ZodString>;
799
+ dirty: z.ZodOptional<z.ZodBoolean>;
800
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ id: string;
803
+ dirty?: boolean | undefined;
804
+ commit?: string | undefined;
805
+ branch?: string | undefined;
806
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
807
+ }, {
808
+ id: string;
809
+ dirty?: boolean | undefined;
810
+ commit?: string | undefined;
811
+ branch?: string | undefined;
812
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
813
+ }>>;
814
+ commit: z.ZodOptional<z.ZodString>;
815
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
816
+ }, "strip", z.ZodTypeAny, {
817
+ repository: {
818
+ id: string;
819
+ provider: string;
820
+ revision?: string | undefined;
821
+ };
822
+ commit?: string | undefined;
823
+ worktree?: {
824
+ id: string;
825
+ dirty?: boolean | undefined;
826
+ commit?: string | undefined;
827
+ branch?: string | undefined;
828
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
829
+ } | undefined;
830
+ contentHashes?: Record<string, string> | undefined;
831
+ }, {
832
+ repository: {
833
+ id: string;
834
+ provider: string;
835
+ revision?: string | undefined;
836
+ };
837
+ commit?: string | undefined;
838
+ worktree?: {
839
+ id: string;
840
+ dirty?: boolean | undefined;
841
+ commit?: string | undefined;
842
+ branch?: string | undefined;
843
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
844
+ } | undefined;
845
+ contentHashes?: Record<string, string> | undefined;
846
+ }>;
847
+ symbolId: z.ZodOptional<z.ZodString>;
848
+ name: z.ZodOptional<z.ZodString>;
849
+ path: z.ZodOptional<z.ZodString>;
850
+ limit: z.ZodOptional<z.ZodNumber>;
851
+ }, "strip", z.ZodTypeAny, {
852
+ scope: {
853
+ repository: {
854
+ id: string;
855
+ provider: string;
856
+ revision?: string | undefined;
857
+ };
858
+ commit?: string | undefined;
859
+ worktree?: {
860
+ id: string;
861
+ dirty?: boolean | undefined;
862
+ commit?: string | undefined;
863
+ branch?: string | undefined;
864
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
865
+ } | undefined;
866
+ contentHashes?: Record<string, string> | undefined;
867
+ };
868
+ path?: string | undefined;
869
+ limit?: number | undefined;
870
+ name?: string | undefined;
871
+ symbolId?: string | undefined;
872
+ }, {
873
+ scope: {
874
+ repository: {
875
+ id: string;
876
+ provider: string;
877
+ revision?: string | undefined;
878
+ };
879
+ commit?: string | undefined;
880
+ worktree?: {
881
+ id: string;
882
+ dirty?: boolean | undefined;
883
+ commit?: string | undefined;
884
+ branch?: string | undefined;
885
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
886
+ } | undefined;
887
+ contentHashes?: Record<string, string> | undefined;
888
+ };
889
+ path?: string | undefined;
890
+ limit?: number | undefined;
891
+ name?: string | undefined;
892
+ symbolId?: string | undefined;
893
+ }>, {
894
+ scope: {
895
+ repository: {
896
+ id: string;
897
+ provider: string;
898
+ revision?: string | undefined;
899
+ };
900
+ commit?: string | undefined;
901
+ worktree?: {
902
+ id: string;
903
+ dirty?: boolean | undefined;
904
+ commit?: string | undefined;
905
+ branch?: string | undefined;
906
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
907
+ } | undefined;
908
+ contentHashes?: Record<string, string> | undefined;
909
+ };
910
+ path?: string | undefined;
911
+ limit?: number | undefined;
912
+ name?: string | undefined;
913
+ symbolId?: string | undefined;
914
+ }, {
915
+ scope: {
916
+ repository: {
917
+ id: string;
918
+ provider: string;
919
+ revision?: string | undefined;
920
+ };
921
+ commit?: string | undefined;
922
+ worktree?: {
923
+ id: string;
924
+ dirty?: boolean | undefined;
925
+ commit?: string | undefined;
926
+ branch?: string | undefined;
927
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
928
+ } | undefined;
929
+ contentHashes?: Record<string, string> | undefined;
930
+ };
931
+ path?: string | undefined;
932
+ limit?: number | undefined;
933
+ name?: string | undefined;
934
+ symbolId?: string | undefined;
935
+ }>;
936
+ export declare const GraphRelationRequestSchema: z.ZodObject<{
937
+ scope: z.ZodObject<{
938
+ repository: z.ZodObject<{
939
+ provider: z.ZodString;
940
+ id: z.ZodString;
941
+ revision: z.ZodOptional<z.ZodString>;
942
+ }, "strip", z.ZodTypeAny, {
943
+ id: string;
944
+ provider: string;
945
+ revision?: string | undefined;
946
+ }, {
947
+ id: string;
948
+ provider: string;
949
+ revision?: string | undefined;
950
+ }>;
951
+ worktree: z.ZodOptional<z.ZodObject<{
952
+ id: z.ZodString;
953
+ branch: z.ZodOptional<z.ZodString>;
954
+ commit: z.ZodOptional<z.ZodString>;
955
+ dirty: z.ZodOptional<z.ZodBoolean>;
956
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
957
+ }, "strip", z.ZodTypeAny, {
958
+ id: string;
959
+ dirty?: boolean | undefined;
960
+ commit?: string | undefined;
961
+ branch?: string | undefined;
962
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
963
+ }, {
964
+ id: string;
965
+ dirty?: boolean | undefined;
966
+ commit?: string | undefined;
967
+ branch?: string | undefined;
968
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
969
+ }>>;
970
+ commit: z.ZodOptional<z.ZodString>;
971
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
972
+ }, "strip", z.ZodTypeAny, {
973
+ repository: {
974
+ id: string;
975
+ provider: string;
976
+ revision?: string | undefined;
977
+ };
978
+ commit?: string | undefined;
979
+ worktree?: {
980
+ id: string;
981
+ dirty?: boolean | undefined;
982
+ commit?: string | undefined;
983
+ branch?: string | undefined;
984
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
985
+ } | undefined;
986
+ contentHashes?: Record<string, string> | undefined;
987
+ }, {
988
+ repository: {
989
+ id: string;
990
+ provider: string;
991
+ revision?: string | undefined;
992
+ };
993
+ commit?: string | undefined;
994
+ worktree?: {
995
+ id: string;
996
+ dirty?: boolean | undefined;
997
+ commit?: string | undefined;
998
+ branch?: string | undefined;
999
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1000
+ } | undefined;
1001
+ contentHashes?: Record<string, string> | undefined;
1002
+ }>;
1003
+ symbolId: z.ZodString;
1004
+ direction: z.ZodOptional<z.ZodEnum<["inbound", "outbound", "both"]>>;
1005
+ kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["defines", "contains", "calls", "imports", "exports", "references", "extends", "implements", "overrides", "tests"]>, "many">>;
1006
+ depth: z.ZodOptional<z.ZodNumber>;
1007
+ limit: z.ZodOptional<z.ZodNumber>;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ scope: {
1010
+ repository: {
1011
+ id: string;
1012
+ provider: string;
1013
+ revision?: string | undefined;
1014
+ };
1015
+ commit?: string | undefined;
1016
+ worktree?: {
1017
+ id: string;
1018
+ dirty?: boolean | undefined;
1019
+ commit?: string | undefined;
1020
+ branch?: string | undefined;
1021
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1022
+ } | undefined;
1023
+ contentHashes?: Record<string, string> | undefined;
1024
+ };
1025
+ symbolId: string;
1026
+ limit?: number | undefined;
1027
+ depth?: number | undefined;
1028
+ kinds?: ("defines" | "contains" | "calls" | "imports" | "exports" | "references" | "extends" | "implements" | "overrides" | "tests")[] | undefined;
1029
+ direction?: "inbound" | "outbound" | "both" | undefined;
1030
+ }, {
1031
+ scope: {
1032
+ repository: {
1033
+ id: string;
1034
+ provider: string;
1035
+ revision?: string | undefined;
1036
+ };
1037
+ commit?: string | undefined;
1038
+ worktree?: {
1039
+ id: string;
1040
+ dirty?: boolean | undefined;
1041
+ commit?: string | undefined;
1042
+ branch?: string | undefined;
1043
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1044
+ } | undefined;
1045
+ contentHashes?: Record<string, string> | undefined;
1046
+ };
1047
+ symbolId: string;
1048
+ limit?: number | undefined;
1049
+ depth?: number | undefined;
1050
+ kinds?: ("defines" | "contains" | "calls" | "imports" | "exports" | "references" | "extends" | "implements" | "overrides" | "tests")[] | undefined;
1051
+ direction?: "inbound" | "outbound" | "both" | undefined;
1052
+ }>;
1053
+ export declare const GraphImpactRequestSchema: z.ZodObject<{
1054
+ scope: z.ZodObject<{
1055
+ repository: z.ZodObject<{
1056
+ provider: z.ZodString;
1057
+ id: z.ZodString;
1058
+ revision: z.ZodOptional<z.ZodString>;
1059
+ }, "strip", z.ZodTypeAny, {
1060
+ id: string;
1061
+ provider: string;
1062
+ revision?: string | undefined;
1063
+ }, {
1064
+ id: string;
1065
+ provider: string;
1066
+ revision?: string | undefined;
1067
+ }>;
1068
+ worktree: z.ZodOptional<z.ZodObject<{
1069
+ id: z.ZodString;
1070
+ branch: z.ZodOptional<z.ZodString>;
1071
+ commit: z.ZodOptional<z.ZodString>;
1072
+ dirty: z.ZodOptional<z.ZodBoolean>;
1073
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ id: string;
1076
+ dirty?: boolean | undefined;
1077
+ commit?: string | undefined;
1078
+ branch?: string | undefined;
1079
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1080
+ }, {
1081
+ id: string;
1082
+ dirty?: boolean | undefined;
1083
+ commit?: string | undefined;
1084
+ branch?: string | undefined;
1085
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1086
+ }>>;
1087
+ commit: z.ZodOptional<z.ZodString>;
1088
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
1089
+ }, "strip", z.ZodTypeAny, {
1090
+ repository: {
1091
+ id: string;
1092
+ provider: string;
1093
+ revision?: string | undefined;
1094
+ };
1095
+ commit?: string | undefined;
1096
+ worktree?: {
1097
+ id: string;
1098
+ dirty?: boolean | undefined;
1099
+ commit?: string | undefined;
1100
+ branch?: string | undefined;
1101
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1102
+ } | undefined;
1103
+ contentHashes?: Record<string, string> | undefined;
1104
+ }, {
1105
+ repository: {
1106
+ id: string;
1107
+ provider: string;
1108
+ revision?: string | undefined;
1109
+ };
1110
+ commit?: string | undefined;
1111
+ worktree?: {
1112
+ id: string;
1113
+ dirty?: boolean | undefined;
1114
+ commit?: string | undefined;
1115
+ branch?: string | undefined;
1116
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1117
+ } | undefined;
1118
+ contentHashes?: Record<string, string> | undefined;
1119
+ }>;
1120
+ symbolId: z.ZodString;
1121
+ direction: z.ZodOptional<z.ZodEnum<["inbound", "outbound"]>>;
1122
+ relationKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["defines", "contains", "calls", "imports", "exports", "references", "extends", "implements", "overrides", "tests"]>, "many">>;
1123
+ maxDepth: z.ZodOptional<z.ZodNumber>;
1124
+ limit: z.ZodOptional<z.ZodNumber>;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ scope: {
1127
+ repository: {
1128
+ id: string;
1129
+ provider: string;
1130
+ revision?: string | undefined;
1131
+ };
1132
+ commit?: string | undefined;
1133
+ worktree?: {
1134
+ id: string;
1135
+ dirty?: boolean | undefined;
1136
+ commit?: string | undefined;
1137
+ branch?: string | undefined;
1138
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1139
+ } | undefined;
1140
+ contentHashes?: Record<string, string> | undefined;
1141
+ };
1142
+ symbolId: string;
1143
+ limit?: number | undefined;
1144
+ direction?: "inbound" | "outbound" | undefined;
1145
+ relationKinds?: ("defines" | "contains" | "calls" | "imports" | "exports" | "references" | "extends" | "implements" | "overrides" | "tests")[] | undefined;
1146
+ maxDepth?: number | undefined;
1147
+ }, {
1148
+ scope: {
1149
+ repository: {
1150
+ id: string;
1151
+ provider: string;
1152
+ revision?: string | undefined;
1153
+ };
1154
+ commit?: string | undefined;
1155
+ worktree?: {
1156
+ id: string;
1157
+ dirty?: boolean | undefined;
1158
+ commit?: string | undefined;
1159
+ branch?: string | undefined;
1160
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1161
+ } | undefined;
1162
+ contentHashes?: Record<string, string> | undefined;
1163
+ };
1164
+ symbolId: string;
1165
+ limit?: number | undefined;
1166
+ direction?: "inbound" | "outbound" | undefined;
1167
+ relationKinds?: ("defines" | "contains" | "calls" | "imports" | "exports" | "references" | "extends" | "implements" | "overrides" | "tests")[] | undefined;
1168
+ maxDepth?: number | undefined;
1169
+ }>;
1170
+ export declare const GraphFreshnessRequestSchema: z.ZodObject<{
1171
+ scope: z.ZodObject<{
1172
+ repository: z.ZodObject<{
1173
+ provider: z.ZodString;
1174
+ id: z.ZodString;
1175
+ revision: z.ZodOptional<z.ZodString>;
1176
+ }, "strip", z.ZodTypeAny, {
1177
+ id: string;
1178
+ provider: string;
1179
+ revision?: string | undefined;
1180
+ }, {
1181
+ id: string;
1182
+ provider: string;
1183
+ revision?: string | undefined;
1184
+ }>;
1185
+ worktree: z.ZodOptional<z.ZodObject<{
1186
+ id: z.ZodString;
1187
+ branch: z.ZodOptional<z.ZodString>;
1188
+ commit: z.ZodOptional<z.ZodString>;
1189
+ dirty: z.ZodOptional<z.ZodBoolean>;
1190
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
1191
+ }, "strip", z.ZodTypeAny, {
1192
+ id: string;
1193
+ dirty?: boolean | undefined;
1194
+ commit?: string | undefined;
1195
+ branch?: string | undefined;
1196
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1197
+ }, {
1198
+ id: string;
1199
+ dirty?: boolean | undefined;
1200
+ commit?: string | undefined;
1201
+ branch?: string | undefined;
1202
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1203
+ }>>;
1204
+ commit: z.ZodOptional<z.ZodString>;
1205
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
1206
+ }, "strip", z.ZodTypeAny, {
1207
+ repository: {
1208
+ id: string;
1209
+ provider: string;
1210
+ revision?: string | undefined;
1211
+ };
1212
+ commit?: string | undefined;
1213
+ worktree?: {
1214
+ id: string;
1215
+ dirty?: boolean | undefined;
1216
+ commit?: string | undefined;
1217
+ branch?: string | undefined;
1218
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1219
+ } | undefined;
1220
+ contentHashes?: Record<string, string> | undefined;
1221
+ }, {
1222
+ repository: {
1223
+ id: string;
1224
+ provider: string;
1225
+ revision?: string | undefined;
1226
+ };
1227
+ commit?: string | undefined;
1228
+ worktree?: {
1229
+ id: string;
1230
+ dirty?: boolean | undefined;
1231
+ commit?: string | undefined;
1232
+ branch?: string | undefined;
1233
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1234
+ } | undefined;
1235
+ contentHashes?: Record<string, string> | undefined;
1236
+ }>;
1237
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1238
+ }, "strip", z.ZodTypeAny, {
1239
+ scope: {
1240
+ repository: {
1241
+ id: string;
1242
+ provider: string;
1243
+ revision?: string | undefined;
1244
+ };
1245
+ commit?: string | undefined;
1246
+ worktree?: {
1247
+ id: string;
1248
+ dirty?: boolean | undefined;
1249
+ commit?: string | undefined;
1250
+ branch?: string | undefined;
1251
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1252
+ } | undefined;
1253
+ contentHashes?: Record<string, string> | undefined;
1254
+ };
1255
+ paths?: string[] | undefined;
1256
+ }, {
1257
+ scope: {
1258
+ repository: {
1259
+ id: string;
1260
+ provider: string;
1261
+ revision?: string | undefined;
1262
+ };
1263
+ commit?: string | undefined;
1264
+ worktree?: {
1265
+ id: string;
1266
+ dirty?: boolean | undefined;
1267
+ commit?: string | undefined;
1268
+ branch?: string | undefined;
1269
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1270
+ } | undefined;
1271
+ contentHashes?: Record<string, string> | undefined;
1272
+ };
1273
+ paths?: string[] | undefined;
1274
+ }>;
1275
+ export declare const GraphIndexFileSchema: z.ZodType<GraphIndexFile>;
1276
+ export declare const GraphIndexRequestSchema: z.ZodObject<{
1277
+ scope: z.ZodObject<{
1278
+ repository: z.ZodObject<{
1279
+ provider: z.ZodString;
1280
+ id: z.ZodString;
1281
+ revision: z.ZodOptional<z.ZodString>;
1282
+ }, "strip", z.ZodTypeAny, {
1283
+ id: string;
1284
+ provider: string;
1285
+ revision?: string | undefined;
1286
+ }, {
1287
+ id: string;
1288
+ provider: string;
1289
+ revision?: string | undefined;
1290
+ }>;
1291
+ worktree: z.ZodOptional<z.ZodObject<{
1292
+ id: z.ZodString;
1293
+ branch: z.ZodOptional<z.ZodString>;
1294
+ commit: z.ZodOptional<z.ZodString>;
1295
+ dirty: z.ZodOptional<z.ZodBoolean>;
1296
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
1297
+ }, "strip", z.ZodTypeAny, {
1298
+ id: string;
1299
+ dirty?: boolean | undefined;
1300
+ commit?: string | undefined;
1301
+ branch?: string | undefined;
1302
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1303
+ }, {
1304
+ id: string;
1305
+ dirty?: boolean | undefined;
1306
+ commit?: string | undefined;
1307
+ branch?: string | undefined;
1308
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1309
+ }>>;
1310
+ commit: z.ZodOptional<z.ZodString>;
1311
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
1312
+ }, "strip", z.ZodTypeAny, {
1313
+ repository: {
1314
+ id: string;
1315
+ provider: string;
1316
+ revision?: string | undefined;
1317
+ };
1318
+ commit?: string | undefined;
1319
+ worktree?: {
1320
+ id: string;
1321
+ dirty?: boolean | undefined;
1322
+ commit?: string | undefined;
1323
+ branch?: string | undefined;
1324
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1325
+ } | undefined;
1326
+ contentHashes?: Record<string, string> | undefined;
1327
+ }, {
1328
+ repository: {
1329
+ id: string;
1330
+ provider: string;
1331
+ revision?: string | undefined;
1332
+ };
1333
+ commit?: string | undefined;
1334
+ worktree?: {
1335
+ id: string;
1336
+ dirty?: boolean | undefined;
1337
+ commit?: string | undefined;
1338
+ branch?: string | undefined;
1339
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1340
+ } | undefined;
1341
+ contentHashes?: Record<string, string> | undefined;
1342
+ }>;
1343
+ files: z.ZodArray<z.ZodType<GraphIndexFile, z.ZodTypeDef, GraphIndexFile>, "many">;
1344
+ indexVersion: z.ZodOptional<z.ZodString>;
1345
+ reason: z.ZodOptional<z.ZodEnum<["initial", "changed-files", "branch-switch", "committed-patch", "manual"]>>;
1346
+ }, "strip", z.ZodTypeAny, {
1347
+ scope: {
1348
+ repository: {
1349
+ id: string;
1350
+ provider: string;
1351
+ revision?: string | undefined;
1352
+ };
1353
+ commit?: string | undefined;
1354
+ worktree?: {
1355
+ id: string;
1356
+ dirty?: boolean | undefined;
1357
+ commit?: string | undefined;
1358
+ branch?: string | undefined;
1359
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1360
+ } | undefined;
1361
+ contentHashes?: Record<string, string> | undefined;
1362
+ };
1363
+ files: GraphIndexFile[];
1364
+ reason?: "initial" | "changed-files" | "branch-switch" | "committed-patch" | "manual" | undefined;
1365
+ indexVersion?: string | undefined;
1366
+ }, {
1367
+ scope: {
1368
+ repository: {
1369
+ id: string;
1370
+ provider: string;
1371
+ revision?: string | undefined;
1372
+ };
1373
+ commit?: string | undefined;
1374
+ worktree?: {
1375
+ id: string;
1376
+ dirty?: boolean | undefined;
1377
+ commit?: string | undefined;
1378
+ branch?: string | undefined;
1379
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1380
+ } | undefined;
1381
+ contentHashes?: Record<string, string> | undefined;
1382
+ };
1383
+ files: GraphIndexFile[];
1384
+ reason?: "initial" | "changed-files" | "branch-switch" | "committed-patch" | "manual" | undefined;
1385
+ indexVersion?: string | undefined;
1386
+ }>;
1387
+ export declare const AuthoritativeSourceReadRequestSchema: z.ZodObject<{
1388
+ scope: z.ZodObject<{
1389
+ repository: z.ZodObject<{
1390
+ provider: z.ZodString;
1391
+ id: z.ZodString;
1392
+ revision: z.ZodOptional<z.ZodString>;
1393
+ }, "strip", z.ZodTypeAny, {
1394
+ id: string;
1395
+ provider: string;
1396
+ revision?: string | undefined;
1397
+ }, {
1398
+ id: string;
1399
+ provider: string;
1400
+ revision?: string | undefined;
1401
+ }>;
1402
+ worktree: z.ZodOptional<z.ZodObject<{
1403
+ id: z.ZodString;
1404
+ branch: z.ZodOptional<z.ZodString>;
1405
+ commit: z.ZodOptional<z.ZodString>;
1406
+ dirty: z.ZodOptional<z.ZodBoolean>;
1407
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
1408
+ }, "strip", z.ZodTypeAny, {
1409
+ id: string;
1410
+ dirty?: boolean | undefined;
1411
+ commit?: string | undefined;
1412
+ branch?: string | undefined;
1413
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1414
+ }, {
1415
+ id: string;
1416
+ dirty?: boolean | undefined;
1417
+ commit?: string | undefined;
1418
+ branch?: string | undefined;
1419
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1420
+ }>>;
1421
+ commit: z.ZodOptional<z.ZodString>;
1422
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
1423
+ }, "strip", z.ZodTypeAny, {
1424
+ repository: {
1425
+ id: string;
1426
+ provider: string;
1427
+ revision?: string | undefined;
1428
+ };
1429
+ commit?: string | undefined;
1430
+ worktree?: {
1431
+ id: string;
1432
+ dirty?: boolean | undefined;
1433
+ commit?: string | undefined;
1434
+ branch?: string | undefined;
1435
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1436
+ } | undefined;
1437
+ contentHashes?: Record<string, string> | undefined;
1438
+ }, {
1439
+ repository: {
1440
+ id: string;
1441
+ provider: string;
1442
+ revision?: string | undefined;
1443
+ };
1444
+ commit?: string | undefined;
1445
+ worktree?: {
1446
+ id: string;
1447
+ dirty?: boolean | undefined;
1448
+ commit?: string | undefined;
1449
+ branch?: string | undefined;
1450
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1451
+ } | undefined;
1452
+ contentHashes?: Record<string, string> | undefined;
1453
+ }>;
1454
+ path: z.ZodString;
1455
+ expected: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1456
+ commit: z.ZodOptional<z.ZodString>;
1457
+ contentHash: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1458
+ }, "strip", z.ZodTypeAny, {
1459
+ commit?: string | undefined;
1460
+ contentHash?: string | undefined;
1461
+ }, {
1462
+ commit?: string | undefined;
1463
+ contentHash?: string | undefined;
1464
+ }>, {
1465
+ commit?: string | undefined;
1466
+ contentHash?: string | undefined;
1467
+ }, {
1468
+ commit?: string | undefined;
1469
+ contentHash?: string | undefined;
1470
+ }>>;
1471
+ }, "strip", z.ZodTypeAny, {
1472
+ path: string;
1473
+ scope: {
1474
+ repository: {
1475
+ id: string;
1476
+ provider: string;
1477
+ revision?: string | undefined;
1478
+ };
1479
+ commit?: string | undefined;
1480
+ worktree?: {
1481
+ id: string;
1482
+ dirty?: boolean | undefined;
1483
+ commit?: string | undefined;
1484
+ branch?: string | undefined;
1485
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1486
+ } | undefined;
1487
+ contentHashes?: Record<string, string> | undefined;
1488
+ };
1489
+ expected?: {
1490
+ commit?: string | undefined;
1491
+ contentHash?: string | undefined;
1492
+ } | undefined;
1493
+ }, {
1494
+ path: string;
1495
+ scope: {
1496
+ repository: {
1497
+ id: string;
1498
+ provider: string;
1499
+ revision?: string | undefined;
1500
+ };
1501
+ commit?: string | undefined;
1502
+ worktree?: {
1503
+ id: string;
1504
+ dirty?: boolean | undefined;
1505
+ commit?: string | undefined;
1506
+ branch?: string | undefined;
1507
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1508
+ } | undefined;
1509
+ contentHashes?: Record<string, string> | undefined;
1510
+ };
1511
+ expected?: {
1512
+ commit?: string | undefined;
1513
+ contentHash?: string | undefined;
1514
+ } | undefined;
1515
+ }>;
1516
+ export declare const AuthoritativeSourceSnapshotSchema: z.ZodObject<{
1517
+ scope: z.ZodObject<{
1518
+ repository: z.ZodObject<{
1519
+ provider: z.ZodString;
1520
+ id: z.ZodString;
1521
+ revision: z.ZodOptional<z.ZodString>;
1522
+ }, "strip", z.ZodTypeAny, {
1523
+ id: string;
1524
+ provider: string;
1525
+ revision?: string | undefined;
1526
+ }, {
1527
+ id: string;
1528
+ provider: string;
1529
+ revision?: string | undefined;
1530
+ }>;
1531
+ worktree: z.ZodOptional<z.ZodObject<{
1532
+ id: z.ZodString;
1533
+ branch: z.ZodOptional<z.ZodString>;
1534
+ commit: z.ZodOptional<z.ZodString>;
1535
+ dirty: z.ZodOptional<z.ZodBoolean>;
1536
+ overlay: z.ZodOptional<z.ZodEnum<["clean", "uncommitted", "unknown"]>>;
1537
+ }, "strip", z.ZodTypeAny, {
1538
+ id: string;
1539
+ dirty?: boolean | undefined;
1540
+ commit?: string | undefined;
1541
+ branch?: string | undefined;
1542
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1543
+ }, {
1544
+ id: string;
1545
+ dirty?: boolean | undefined;
1546
+ commit?: string | undefined;
1547
+ branch?: string | undefined;
1548
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1549
+ }>>;
1550
+ commit: z.ZodOptional<z.ZodString>;
1551
+ contentHashes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
1552
+ }, "strip", z.ZodTypeAny, {
1553
+ repository: {
1554
+ id: string;
1555
+ provider: string;
1556
+ revision?: string | undefined;
1557
+ };
1558
+ commit?: string | undefined;
1559
+ worktree?: {
1560
+ id: string;
1561
+ dirty?: boolean | undefined;
1562
+ commit?: string | undefined;
1563
+ branch?: string | undefined;
1564
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1565
+ } | undefined;
1566
+ contentHashes?: Record<string, string> | undefined;
1567
+ }, {
1568
+ repository: {
1569
+ id: string;
1570
+ provider: string;
1571
+ revision?: string | undefined;
1572
+ };
1573
+ commit?: string | undefined;
1574
+ worktree?: {
1575
+ id: string;
1576
+ dirty?: boolean | undefined;
1577
+ commit?: string | undefined;
1578
+ branch?: string | undefined;
1579
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1580
+ } | undefined;
1581
+ contentHashes?: Record<string, string> | undefined;
1582
+ }>;
1583
+ path: z.ZodString;
1584
+ contentHash: z.ZodEffects<z.ZodString, string, string>;
1585
+ commit: z.ZodOptional<z.ZodString>;
1586
+ bytes: z.ZodNumber;
1587
+ content: z.ZodString;
1588
+ }, "strip", z.ZodTypeAny, {
1589
+ path: string;
1590
+ scope: {
1591
+ repository: {
1592
+ id: string;
1593
+ provider: string;
1594
+ revision?: string | undefined;
1595
+ };
1596
+ commit?: string | undefined;
1597
+ worktree?: {
1598
+ id: string;
1599
+ dirty?: boolean | undefined;
1600
+ commit?: string | undefined;
1601
+ branch?: string | undefined;
1602
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1603
+ } | undefined;
1604
+ contentHashes?: Record<string, string> | undefined;
1605
+ };
1606
+ contentHash: string;
1607
+ bytes: number;
1608
+ content: string;
1609
+ commit?: string | undefined;
1610
+ }, {
1611
+ path: string;
1612
+ scope: {
1613
+ repository: {
1614
+ id: string;
1615
+ provider: string;
1616
+ revision?: string | undefined;
1617
+ };
1618
+ commit?: string | undefined;
1619
+ worktree?: {
1620
+ id: string;
1621
+ dirty?: boolean | undefined;
1622
+ commit?: string | undefined;
1623
+ branch?: string | undefined;
1624
+ overlay?: "unknown" | "clean" | "uncommitted" | undefined;
1625
+ } | undefined;
1626
+ contentHashes?: Record<string, string> | undefined;
1627
+ };
1628
+ contentHash: string;
1629
+ bytes: number;
1630
+ content: string;
1631
+ commit?: string | undefined;
1632
+ }>;
1633
+ export declare function parseGraphScope(value: unknown): GraphScope;
1634
+ export declare function parseGraphSearchRequest(value: unknown): GraphSearchRequest;
1635
+ export declare function parseGraphSymbolRequest(value: unknown): GraphSymbolRequest;
1636
+ export declare function parseGraphRelationRequest(value: unknown): GraphRelationRequest;
1637
+ export declare function parseGraphImpactRequest(value: unknown): GraphImpactRequest;
1638
+ export declare function parseGraphFreshnessRequest(value: unknown): GraphFreshnessRequest;
1639
+ export declare function parseGraphIndexRequest(value: unknown): GraphIndexRequest;
1640
+ export declare function parseAuthoritativeSourceReadRequest(value: unknown): AuthoritativeSourceReadRequest;
1641
+ export declare function parseGraphQueryResponse<T>(itemSchema: z.ZodType<T>, value: unknown): GraphQueryResponse<T>;
1642
+ export declare function parseGraphIndexResponse(value: unknown): GraphIndexResponse;
1643
+ export declare function serializeGraphContract(value: unknown): string;