@lucern/mcp 0.2.0-alpha.10 → 0.2.0-alpha.4

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.
package/dist/gateway.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import { GatewayAuthContext } from '@lucern/contracts';
2
- export { GatewayContextAuth, GatewayContextRequest, GatewayContextRouteDeps, createContextGatewayRoute } from '@lucern/server-core/http';
2
+ import { CompileContextPorts } from '@lucern/server-core/domain/context/ports';
3
3
 
4
4
  declare function handleBeliefCreate(args: {
5
5
  authContext: GatewayAuthContext;
6
6
  correlationId: string;
7
7
  policyTraceId: string;
8
8
  body: unknown;
9
- }): Promise<Response>;
9
+ }): Promise<NextResponse>;
10
10
  declare function handleBeliefGet(args: {
11
11
  authContext: GatewayAuthContext;
12
12
  correlationId: string;
13
13
  policyTraceId: string;
14
14
  beliefId: string;
15
- }): Promise<Response>;
15
+ }): Promise<NextResponse>;
16
16
  declare function handleBeliefList(args: {
17
17
  authContext: GatewayAuthContext;
18
18
  correlationId: string;
@@ -25,117 +25,144 @@ declare function handleBeliefList(args: {
25
25
  limit?: number;
26
26
  cursor?: string;
27
27
  };
28
- }): Promise<Response>;
28
+ }): Promise<NextResponse>;
29
29
  declare function handleBeliefRefine(args: {
30
30
  authContext: GatewayAuthContext;
31
31
  correlationId: string;
32
32
  policyTraceId: string;
33
33
  beliefId: string;
34
34
  body: unknown;
35
- }): Promise<Response>;
35
+ }): Promise<NextResponse>;
36
36
  declare function handleBeliefFork(args: {
37
37
  authContext: GatewayAuthContext;
38
38
  correlationId: string;
39
39
  policyTraceId: string;
40
40
  beliefId: string;
41
41
  body: unknown;
42
- }): Promise<Response>;
42
+ }): Promise<NextResponse>;
43
43
  declare function handleBeliefUpdateConfidence(args: {
44
44
  authContext: GatewayAuthContext;
45
45
  correlationId: string;
46
46
  policyTraceId: string;
47
47
  beliefId: string;
48
48
  body: unknown;
49
- }): Promise<Response>;
49
+ }): Promise<NextResponse>;
50
50
  declare function handleBeliefUpdateStatus(args: {
51
51
  authContext: GatewayAuthContext;
52
52
  correlationId: string;
53
53
  policyTraceId: string;
54
54
  body: unknown;
55
- }): Promise<Response>;
55
+ }): Promise<NextResponse>;
56
56
  declare function handleBeliefUpdateRationale(args: {
57
57
  authContext: GatewayAuthContext;
58
58
  correlationId: string;
59
59
  policyTraceId: string;
60
60
  body: unknown;
61
- }): Promise<Response>;
61
+ }): Promise<NextResponse>;
62
62
  declare function handleBeliefLink(args: {
63
63
  authContext: GatewayAuthContext;
64
64
  correlationId: string;
65
65
  policyTraceId: string;
66
66
  body: unknown;
67
- }): Promise<Response>;
67
+ }): Promise<NextResponse>;
68
68
  declare function handleBeliefUnlinkEvidence(args: {
69
69
  authContext: GatewayAuthContext;
70
70
  correlationId: string;
71
71
  policyTraceId: string;
72
72
  body: unknown;
73
- }): Promise<Response>;
73
+ }): Promise<NextResponse>;
74
74
  declare function handleBeliefUpdateCriticality(args: {
75
75
  authContext: GatewayAuthContext;
76
76
  correlationId: string;
77
77
  policyTraceId: string;
78
78
  body: unknown;
79
- }): Promise<Response>;
79
+ }): Promise<NextResponse>;
80
80
  declare function handleBeliefBatchUpdateCriticality(args: {
81
81
  authContext: GatewayAuthContext;
82
82
  correlationId: string;
83
83
  policyTraceId: string;
84
84
  body: unknown;
85
- }): Promise<Response>;
85
+ }): Promise<NextResponse>;
86
86
  declare function handleBeliefReassignTopic(args: {
87
87
  authContext: GatewayAuthContext;
88
88
  correlationId: string;
89
89
  policyTraceId: string;
90
90
  body: unknown;
91
- }): Promise<Response>;
91
+ }): Promise<NextResponse>;
92
92
  declare function handleBeliefArchive(args: {
93
93
  authContext: GatewayAuthContext;
94
94
  correlationId: string;
95
95
  policyTraceId: string;
96
96
  beliefId: string;
97
97
  body: unknown;
98
- }): Promise<Response>;
98
+ }): Promise<NextResponse>;
99
99
  declare function handleBeliefLineage(args: {
100
100
  authContext: GatewayAuthContext;
101
101
  correlationId: string;
102
102
  policyTraceId: string;
103
103
  beliefId: string;
104
- }): Promise<Response>;
104
+ }): Promise<NextResponse>;
105
105
  declare function handleBeliefConfidenceHistory(args: {
106
106
  authContext: GatewayAuthContext;
107
107
  correlationId: string;
108
108
  policyTraceId: string;
109
109
  beliefId: string;
110
- }): Promise<Response>;
110
+ }): Promise<NextResponse>;
111
111
  declare function handleBeliefRelationships(args: {
112
112
  authContext: GatewayAuthContext;
113
113
  correlationId: string;
114
114
  policyTraceId: string;
115
115
  beliefId: string;
116
116
  direction?: string;
117
- }): Promise<Response>;
117
+ }): Promise<NextResponse>;
118
118
  declare function handleBeliefCreateContract(args: {
119
119
  authContext: GatewayAuthContext;
120
120
  correlationId: string;
121
121
  policyTraceId: string;
122
122
  beliefId: string;
123
123
  body: unknown;
124
- }): Promise<Response>;
124
+ }): Promise<NextResponse>;
125
125
  declare function handleBeliefBisect(args: {
126
126
  authContext: GatewayAuthContext;
127
127
  correlationId: string;
128
128
  policyTraceId: string;
129
129
  beliefId: string;
130
130
  body: unknown;
131
- }): Promise<Response>;
131
+ }): Promise<NextResponse>;
132
+
133
+ type GatewayContextAuth = {
134
+ actorPrincipalId: string;
135
+ };
136
+ type GatewayContextRequest = {
137
+ body: Record<string, unknown>;
138
+ auth: GatewayContextAuth | null;
139
+ correlationId: string;
140
+ policyTraceId: string | null;
141
+ };
142
+ type GatewayContextRouteDeps = CompileContextPorts & {
143
+ successResponse: (data: unknown, meta: {
144
+ correlationId: string;
145
+ policyTraceId: string | null;
146
+ status?: number;
147
+ }) => Response;
148
+ errorResponse: (meta: {
149
+ code: string;
150
+ message: string;
151
+ status: number;
152
+ correlationId: string;
153
+ policyTraceId: string | null;
154
+ }) => Response;
155
+ };
156
+ declare function createContextGatewayRoute(deps: GatewayContextRouteDeps): {
157
+ post(request: GatewayContextRequest): Promise<Response>;
158
+ };
132
159
 
133
160
  declare function handleContradictionFlag(args: {
134
161
  authContext: GatewayAuthContext;
135
162
  correlationId: string;
136
163
  policyTraceId: string;
137
164
  body: unknown;
138
- }): Promise<Response>;
165
+ }): Promise<NextResponse>;
139
166
  declare function handleContradictionList(args: {
140
167
  authContext: GatewayAuthContext;
141
168
  correlationId: string;
@@ -146,20 +173,20 @@ declare function handleContradictionList(args: {
146
173
  limit?: number;
147
174
  cursor?: string;
148
175
  };
149
- }): Promise<Response>;
176
+ }): Promise<NextResponse>;
150
177
  declare function handleContradictionGet(args: {
151
178
  authContext: GatewayAuthContext;
152
179
  correlationId: string;
153
180
  policyTraceId: string;
154
181
  contradictionId: string;
155
- }): Promise<Response>;
182
+ }): Promise<NextResponse>;
156
183
 
157
184
  declare function handleEdgeCreate(args: {
158
185
  authContext: GatewayAuthContext;
159
186
  correlationId: string;
160
187
  policyTraceId: string;
161
188
  body: unknown;
162
- }): Promise<Response>;
189
+ }): Promise<NextResponse>;
163
190
  declare function handleEdgeList(args: {
164
191
  authContext: GatewayAuthContext;
165
192
  correlationId: string;
@@ -170,43 +197,43 @@ declare function handleEdgeList(args: {
170
197
  limit?: number;
171
198
  cursor?: string;
172
199
  };
173
- }): Promise<Response>;
200
+ }): Promise<NextResponse>;
174
201
  declare function handleEdgeTraverse(args: {
175
202
  authContext: GatewayAuthContext;
176
203
  correlationId: string;
177
204
  policyTraceId: string;
178
205
  body: unknown;
179
- }): Promise<Response>;
206
+ }): Promise<NextResponse>;
180
207
  declare function handleEdgeUpdate(args: {
181
208
  authContext: GatewayAuthContext;
182
209
  correlationId: string;
183
210
  policyTraceId: string;
184
211
  body: unknown;
185
- }): Promise<Response>;
212
+ }): Promise<NextResponse>;
186
213
  declare function handleEdgeRemove(args: {
187
214
  authContext: GatewayAuthContext;
188
215
  correlationId: string;
189
216
  policyTraceId: string;
190
217
  body: unknown;
191
- }): Promise<Response>;
218
+ }): Promise<NextResponse>;
192
219
  declare function handleEdgesRemoveBetween(args: {
193
220
  authContext: GatewayAuthContext;
194
221
  correlationId: string;
195
222
  policyTraceId: string;
196
223
  body: unknown;
197
- }): Promise<Response>;
224
+ }): Promise<NextResponse>;
198
225
  declare function handleEdgeBatchCreate(args: {
199
226
  authContext: GatewayAuthContext;
200
227
  correlationId: string;
201
228
  policyTraceId: string;
202
229
  body: unknown;
203
- }): Promise<Response>;
230
+ }): Promise<NextResponse>;
204
231
  declare function handleEdgeDelete(args: {
205
232
  authContext: GatewayAuthContext;
206
233
  correlationId: string;
207
234
  policyTraceId: string;
208
235
  body: unknown;
209
- }): Promise<Response>;
236
+ }): Promise<NextResponse>;
210
237
 
211
238
  declare function handleEventsList(args: {
212
239
  authContext: GatewayAuthContext;
@@ -220,7 +247,7 @@ declare function handleEventsList(args: {
220
247
  endTime?: number;
221
248
  limit?: number;
222
249
  };
223
- }): Promise<Response>;
250
+ }): Promise<NextResponse>;
224
251
  declare function handleEventsReplay(args: {
225
252
  authContext: GatewayAuthContext;
226
253
  correlationId: string;
@@ -234,20 +261,20 @@ declare function handleEventsReplay(args: {
234
261
  endTime?: number;
235
262
  limit?: number;
236
263
  };
237
- }): Promise<Response>;
264
+ }): Promise<NextResponse>;
238
265
 
239
266
  declare function handleEvidenceCreate(args: {
240
267
  authContext: GatewayAuthContext;
241
268
  correlationId: string;
242
269
  policyTraceId: string;
243
270
  body: unknown;
244
- }): Promise<Response>;
271
+ }): Promise<NextResponse>;
245
272
  declare function handleEvidenceGet(args: {
246
273
  authContext: GatewayAuthContext;
247
274
  correlationId: string;
248
275
  policyTraceId: string;
249
276
  evidenceId: string;
250
- }): Promise<Response>;
277
+ }): Promise<NextResponse>;
251
278
  declare function handleEvidenceList(args: {
252
279
  authContext: GatewayAuthContext;
253
280
  correlationId: string;
@@ -258,62 +285,50 @@ declare function handleEvidenceList(args: {
258
285
  limit?: number;
259
286
  cursor?: string;
260
287
  };
261
- }): Promise<Response>;
288
+ }): Promise<NextResponse>;
262
289
  declare function handleEvidenceLink(args: {
263
290
  authContext: GatewayAuthContext;
264
291
  correlationId: string;
265
292
  policyTraceId: string;
266
293
  evidenceId: string;
267
294
  body: unknown;
268
- }): Promise<Response>;
295
+ }): Promise<NextResponse>;
269
296
  declare function handleEvidenceSearch(args: {
270
297
  authContext: GatewayAuthContext;
271
298
  correlationId: string;
272
299
  policyTraceId: string;
273
300
  body: unknown;
274
- }): Promise<Response>;
275
- declare function handleEvidenceClassify(args: {
276
- authContext: GatewayAuthContext;
277
- correlationId: string;
278
- policyTraceId: string;
279
- body: unknown;
280
- }): Promise<Response>;
281
- declare function handleEvidenceClassifyBatch(args: {
282
- authContext: GatewayAuthContext;
283
- correlationId: string;
284
- policyTraceId: string;
285
- body: unknown;
286
- }): Promise<Response>;
301
+ }): Promise<NextResponse>;
287
302
  declare function handleEvidenceUpdateStatus(args: {
288
303
  authContext: GatewayAuthContext;
289
304
  correlationId: string;
290
305
  policyTraceId: string;
291
306
  body: unknown;
292
- }): Promise<Response>;
307
+ }): Promise<NextResponse>;
293
308
  declare function handleEvidenceUpdate(args: {
294
309
  authContext: GatewayAuthContext;
295
310
  correlationId: string;
296
311
  policyTraceId: string;
297
312
  body: unknown;
298
- }): Promise<Response>;
313
+ }): Promise<NextResponse>;
299
314
  declare function handleEvidenceFlagIncorrect(args: {
300
315
  authContext: GatewayAuthContext;
301
316
  correlationId: string;
302
317
  policyTraceId: string;
303
318
  body: unknown;
304
- }): Promise<Response>;
319
+ }): Promise<NextResponse>;
305
320
  declare function handleEvidenceRemove(args: {
306
321
  authContext: GatewayAuthContext;
307
322
  correlationId: string;
308
323
  policyTraceId: string;
309
324
  body: unknown;
310
- }): Promise<Response>;
325
+ }): Promise<NextResponse>;
311
326
  declare function handleEvidenceUpdateVerificationStatus(args: {
312
327
  authContext: GatewayAuthContext;
313
328
  correlationId: string;
314
329
  policyTraceId: string;
315
330
  body: unknown;
316
- }): Promise<Response>;
331
+ }): Promise<NextResponse>;
317
332
 
318
333
  declare function handleGraphNeighborhood(args: {
319
334
  authContext: GatewayAuthContext;
@@ -324,13 +339,13 @@ declare function handleGraphNeighborhood(args: {
324
339
  globalIds?: string[];
325
340
  maxDepth?: number;
326
341
  };
327
- }): Promise<Response>;
342
+ }): Promise<NextResponse>;
328
343
  declare function handleGraphTraverse(args: {
329
344
  authContext: GatewayAuthContext;
330
345
  correlationId: string;
331
346
  policyTraceId: string;
332
347
  body: unknown;
333
- }): Promise<Response>;
348
+ }): Promise<NextResponse>;
334
349
  declare function handleGraphAnalyze(args: {
335
350
  authContext: GatewayAuthContext;
336
351
  correlationId: string;
@@ -340,7 +355,7 @@ declare function handleGraphAnalyze(args: {
340
355
  metric?: string;
341
356
  limit?: number;
342
357
  };
343
- }): Promise<Response>;
358
+ }): Promise<NextResponse>;
344
359
  declare function handleGraphBias(args: {
345
360
  authContext: GatewayAuthContext;
346
361
  correlationId: string;
@@ -350,7 +365,7 @@ declare function handleGraphBias(args: {
350
365
  threshold?: number;
351
366
  limit?: number;
352
367
  };
353
- }): Promise<Response>;
368
+ }): Promise<NextResponse>;
354
369
  declare function handleGraphGaps(args: {
355
370
  authContext: GatewayAuthContext;
356
371
  correlationId: string;
@@ -359,19 +374,19 @@ declare function handleGraphGaps(args: {
359
374
  topicId?: string;
360
375
  minConfidence?: number;
361
376
  };
362
- }): Promise<Response>;
377
+ }): Promise<NextResponse>;
363
378
  declare function handleGraphFalsify(args: {
364
379
  authContext: GatewayAuthContext;
365
380
  correlationId: string;
366
381
  policyTraceId: string;
367
382
  body: unknown;
368
- }): Promise<Response>;
383
+ }): Promise<NextResponse>;
369
384
 
370
385
  declare function handleIdentityWhoami(args: {
371
386
  authContext: GatewayAuthContext;
372
387
  correlationId: string;
373
388
  policyTraceId: string;
374
- }): Promise<Response>;
389
+ }): Promise<NextResponse>;
375
390
 
376
391
  declare function handleOntologyList(args: {
377
392
  authContext: GatewayAuthContext;
@@ -382,46 +397,46 @@ declare function handleOntologyList(args: {
382
397
  tier?: string;
383
398
  status?: string;
384
399
  };
385
- }): Promise<Response>;
400
+ }): Promise<NextResponse>;
386
401
  declare function handleOntologyGet(args: {
387
402
  authContext: GatewayAuthContext;
388
403
  correlationId: string;
389
404
  policyTraceId: string;
390
405
  ontologyId: string;
391
- }): Promise<Response>;
406
+ }): Promise<NextResponse>;
392
407
  declare function handleOntologyBind(args: {
393
408
  authContext: GatewayAuthContext;
394
409
  correlationId: string;
395
410
  policyTraceId: string;
396
411
  ontologyId: string;
397
412
  body: unknown;
398
- }): Promise<Response>;
413
+ }): Promise<NextResponse>;
399
414
  declare function handleOntologyMatch(args: {
400
415
  authContext: GatewayAuthContext;
401
416
  correlationId: string;
402
417
  policyTraceId: string;
403
418
  body: unknown;
404
- }): Promise<Response>;
419
+ }): Promise<NextResponse>;
405
420
 
406
421
  declare function handleQuestionCreate(args: {
407
422
  authContext: GatewayAuthContext;
408
423
  correlationId: string;
409
424
  policyTraceId: string;
410
425
  body: unknown;
411
- }): Promise<Response>;
426
+ }): Promise<NextResponse>;
412
427
  declare function handleQuestionGet(args: {
413
428
  authContext: GatewayAuthContext;
414
429
  correlationId: string;
415
430
  policyTraceId: string;
416
431
  questionId: string;
417
- }): Promise<Response>;
432
+ }): Promise<NextResponse>;
418
433
  declare function handleQuestionArchive(args: {
419
434
  authContext: GatewayAuthContext;
420
435
  correlationId: string;
421
436
  policyTraceId: string;
422
437
  questionId: string;
423
438
  body: unknown;
424
- }): Promise<Response>;
439
+ }): Promise<NextResponse>;
425
440
  declare function handleQuestionList(args: {
426
441
  authContext: GatewayAuthContext;
427
442
  correlationId: string;
@@ -434,109 +449,96 @@ declare function handleQuestionList(args: {
434
449
  limit?: number;
435
450
  cursor?: string;
436
451
  };
437
- }): Promise<Response>;
452
+ }): Promise<NextResponse>;
438
453
  declare function handleQuestionAnswer(args: {
439
454
  authContext: GatewayAuthContext;
440
455
  correlationId: string;
441
456
  policyTraceId: string;
442
457
  questionId: string;
443
458
  body: unknown;
444
- }): Promise<Response>;
459
+ }): Promise<NextResponse>;
445
460
  declare function handleQuestionGetAnswer(args: {
446
461
  authContext: GatewayAuthContext;
447
462
  correlationId: string;
448
463
  policyTraceId: string;
449
464
  questionId: string;
450
- }): Promise<Response>;
465
+ }): Promise<NextResponse>;
451
466
  declare function handleQuestionRefine(args: {
452
467
  authContext: GatewayAuthContext;
453
468
  correlationId: string;
454
469
  policyTraceId: string;
455
470
  questionId: string;
456
471
  body: unknown;
457
- }): Promise<Response>;
472
+ }): Promise<NextResponse>;
458
473
  declare function handleQuestionUpdateStatus(args: {
459
474
  authContext: GatewayAuthContext;
460
475
  correlationId: string;
461
476
  policyTraceId: string;
462
477
  questionId: string;
463
478
  body: unknown;
464
- }): Promise<Response>;
479
+ }): Promise<NextResponse>;
465
480
  declare function handleQuestionBatchCreate(args: {
466
481
  authContext: GatewayAuthContext;
467
482
  correlationId: string;
468
483
  policyTraceId: string;
469
484
  body: unknown;
470
- }): Promise<Response>;
485
+ }): Promise<NextResponse>;
471
486
  declare function handleQuestionAdd(args: {
472
487
  authContext: GatewayAuthContext;
473
488
  correlationId: string;
474
489
  policyTraceId: string;
475
490
  body: unknown;
476
- }): Promise<Response>;
491
+ }): Promise<NextResponse>;
477
492
  declare function handleQuestionUpdatePriority(args: {
478
493
  authContext: GatewayAuthContext;
479
494
  correlationId: string;
480
495
  policyTraceId: string;
481
496
  body: unknown;
482
- }): Promise<Response>;
497
+ }): Promise<NextResponse>;
483
498
  declare function handleQuestionAdvanceToConviction(args: {
484
499
  authContext: GatewayAuthContext;
485
500
  correlationId: string;
486
501
  policyTraceId: string;
487
502
  body: unknown;
488
- }): Promise<Response>;
503
+ }): Promise<NextResponse>;
489
504
  declare function handleQuestionUpdateConviction(args: {
490
505
  authContext: GatewayAuthContext;
491
506
  correlationId: string;
492
507
  policyTraceId: string;
493
508
  body: unknown;
494
- }): Promise<Response>;
509
+ }): Promise<NextResponse>;
495
510
  declare function handleQuestionFinalizeConviction(args: {
496
511
  authContext: GatewayAuthContext;
497
512
  correlationId: string;
498
513
  policyTraceId: string;
499
514
  body: unknown;
500
- }): Promise<Response>;
515
+ }): Promise<NextResponse>;
501
516
  declare function handleQuestionUpdate(args: {
502
517
  authContext: GatewayAuthContext;
503
518
  correlationId: string;
504
519
  policyTraceId: string;
505
520
  body: unknown;
506
- }): Promise<Response>;
521
+ }): Promise<NextResponse>;
507
522
  declare function handleQuestionDelete(args: {
508
523
  authContext: GatewayAuthContext;
509
524
  correlationId: string;
510
525
  policyTraceId: string;
511
526
  body: unknown;
512
- }): Promise<Response>;
527
+ }): Promise<NextResponse>;
513
528
 
514
529
  declare function handleSearchResources(args: {
515
530
  authContext: GatewayAuthContext;
516
531
  correlationId: string;
517
532
  policyTraceId: string;
518
533
  body: unknown;
519
- }): Promise<Response>;
520
-
521
- declare function handleSourceUpsert(args: {
522
- authContext: GatewayAuthContext;
523
- correlationId: string;
524
- policyTraceId: string;
525
- body: unknown;
526
- }): Promise<Response>;
527
- declare function handleSourceGet(args: {
528
- authContext: GatewayAuthContext;
529
- correlationId: string;
530
- policyTraceId: string;
531
- sourceId: string;
532
- }): Promise<Response>;
534
+ }): Promise<NextResponse>;
533
535
 
534
536
  declare function handleTaskCreate(args: {
535
537
  authContext: GatewayAuthContext;
536
538
  correlationId: string;
537
539
  policyTraceId: string;
538
540
  body: unknown;
539
- }): Promise<Response>;
541
+ }): Promise<NextResponse>;
540
542
  declare function handleTaskList(args: {
541
543
  authContext: GatewayAuthContext;
542
544
  correlationId: string;
@@ -547,41 +549,41 @@ declare function handleTaskList(args: {
547
549
  status?: string;
548
550
  limit?: number;
549
551
  };
550
- }): Promise<Response>;
552
+ }): Promise<NextResponse>;
551
553
  declare function handleTaskUpdate(args: {
552
554
  authContext: GatewayAuthContext;
553
555
  correlationId: string;
554
556
  policyTraceId: string;
555
557
  taskId: string;
556
558
  body: unknown;
557
- }): Promise<Response>;
559
+ }): Promise<NextResponse>;
558
560
  declare function handleTaskComplete(args: {
559
561
  authContext: GatewayAuthContext;
560
562
  correlationId: string;
561
563
  policyTraceId: string;
562
564
  taskId: string;
563
565
  body: unknown;
564
- }): Promise<Response>;
566
+ }): Promise<NextResponse>;
565
567
 
566
568
  declare function handleTopicCreate(args: {
567
569
  authContext: GatewayAuthContext;
568
570
  correlationId: string;
569
571
  policyTraceId: string;
570
572
  body: unknown;
571
- }): Promise<Response>;
573
+ }): Promise<NextResponse>;
572
574
  declare function handleTopicUpdate(args: {
573
575
  authContext: GatewayAuthContext;
574
576
  correlationId: string;
575
577
  policyTraceId: string;
576
578
  topicId: string;
577
579
  body: unknown;
578
- }): Promise<Response>;
580
+ }): Promise<NextResponse>;
579
581
  declare function handleTopicGet(args: {
580
582
  authContext: GatewayAuthContext;
581
583
  correlationId: string;
582
584
  policyTraceId: string;
583
585
  topicId: string;
584
- }): Promise<Response>;
586
+ }): Promise<NextResponse>;
585
587
  declare function handleTopicList(args: {
586
588
  authContext: GatewayAuthContext;
587
589
  correlationId: string;
@@ -592,7 +594,7 @@ declare function handleTopicList(args: {
592
594
  status?: string;
593
595
  type?: string;
594
596
  };
595
- }): Promise<Response>;
597
+ }): Promise<NextResponse>;
596
598
  declare function handleTopicTree(args: {
597
599
  authContext: GatewayAuthContext;
598
600
  correlationId: string;
@@ -601,7 +603,7 @@ declare function handleTopicTree(args: {
601
603
  query: {
602
604
  maxDepth?: number;
603
605
  };
604
- }): Promise<Response>;
606
+ }): Promise<NextResponse>;
605
607
  declare function handleTopicCoverage(args: {
606
608
  authContext: GatewayAuthContext;
607
609
  correlationId: string;
@@ -611,26 +613,26 @@ declare function handleTopicCoverage(args: {
611
613
  includeDescendants?: boolean;
612
614
  maxDepth?: number;
613
615
  };
614
- }): Promise<Response>;
616
+ }): Promise<NextResponse>;
615
617
  declare function handleTopicRemove(args: {
616
618
  authContext: GatewayAuthContext;
617
619
  correlationId: string;
618
620
  policyTraceId: string;
619
621
  body: unknown;
620
- }): Promise<Response>;
622
+ }): Promise<NextResponse>;
621
623
  declare function handleTopicBulkCreate(args: {
622
624
  authContext: GatewayAuthContext;
623
625
  correlationId: string;
624
626
  policyTraceId: string;
625
627
  body: unknown;
626
- }): Promise<Response>;
628
+ }): Promise<NextResponse>;
627
629
 
628
630
  declare function handleWebhookCreate(args: {
629
631
  authContext: GatewayAuthContext;
630
632
  correlationId: string;
631
633
  policyTraceId: string;
632
634
  body: unknown;
633
- }): Promise<Response>;
635
+ }): Promise<NextResponse>;
634
636
  declare function handleWebhookList(args: {
635
637
  authContext: GatewayAuthContext;
636
638
  correlationId: string;
@@ -638,33 +640,33 @@ declare function handleWebhookList(args: {
638
640
  query: {
639
641
  topicId?: string;
640
642
  };
641
- }): Promise<Response>;
643
+ }): Promise<NextResponse>;
642
644
  declare function handleWebhookGet(args: {
643
645
  authContext: GatewayAuthContext;
644
646
  correlationId: string;
645
647
  policyTraceId: string;
646
648
  webhookId: string;
647
- }): Promise<Response>;
649
+ }): Promise<NextResponse>;
648
650
  declare function handleWebhookUpdate(args: {
649
651
  authContext: GatewayAuthContext;
650
652
  correlationId: string;
651
653
  policyTraceId: string;
652
654
  webhookId: string;
653
655
  body: unknown;
654
- }): Promise<Response>;
656
+ }): Promise<NextResponse>;
655
657
  declare function handleWebhookDelete(args: {
656
658
  authContext: GatewayAuthContext;
657
659
  correlationId: string;
658
660
  policyTraceId: string;
659
661
  webhookId: string;
660
- }): Promise<Response>;
662
+ }): Promise<NextResponse>;
661
663
  declare function handleWebhookTest(args: {
662
664
  authContext: GatewayAuthContext;
663
665
  correlationId: string;
664
666
  policyTraceId: string;
665
667
  webhookId: string;
666
668
  body: unknown;
667
- }): Promise<Response>;
669
+ }): Promise<NextResponse>;
668
670
  declare function handleWebhookDeliveries(args: {
669
671
  authContext: GatewayAuthContext;
670
672
  correlationId: string;
@@ -673,20 +675,20 @@ declare function handleWebhookDeliveries(args: {
673
675
  query: {
674
676
  limit?: number;
675
677
  };
676
- }): Promise<Response>;
678
+ }): Promise<NextResponse>;
677
679
  declare function handleWebhookHealth(args: {
678
680
  authContext: GatewayAuthContext;
679
681
  correlationId: string;
680
682
  policyTraceId: string;
681
683
  webhookId: string;
682
- }): Promise<Response>;
684
+ }): Promise<NextResponse>;
683
685
 
684
686
  declare function handleWorktreeCreate(args: {
685
687
  authContext: GatewayAuthContext;
686
688
  correlationId: string;
687
689
  policyTraceId: string;
688
690
  body: unknown;
689
- }): Promise<Response>;
691
+ }): Promise<NextResponse>;
690
692
  declare function handleWorktreeList(args: {
691
693
  authContext: GatewayAuthContext;
692
694
  correlationId: string;
@@ -696,7 +698,7 @@ declare function handleWorktreeList(args: {
696
698
  status?: string;
697
699
  limit?: number;
698
700
  };
699
- }): Promise<Response>;
701
+ }): Promise<NextResponse>;
700
702
  declare function handleWorktreeListAll(args: {
701
703
  authContext: GatewayAuthContext;
702
704
  correlationId: string;
@@ -707,63 +709,63 @@ declare function handleWorktreeListAll(args: {
707
709
  executionBand?: number;
708
710
  limit?: number;
709
711
  };
710
- }): Promise<Response>;
712
+ }): Promise<NextResponse>;
711
713
  declare function handleWorktreeActivate(args: {
712
714
  authContext: GatewayAuthContext;
713
715
  correlationId: string;
714
716
  policyTraceId: string;
715
717
  worktreeId: string;
716
- }): Promise<Response>;
718
+ }): Promise<NextResponse>;
717
719
  declare function handleWorktreeUpdate(args: {
718
720
  authContext: GatewayAuthContext;
719
721
  correlationId: string;
720
722
  policyTraceId: string;
721
723
  worktreeId: string;
722
724
  body: unknown;
723
- }): Promise<Response>;
725
+ }): Promise<NextResponse>;
724
726
  declare function handleWorktreeMerge(args: {
725
727
  authContext: GatewayAuthContext;
726
728
  correlationId: string;
727
729
  policyTraceId: string;
728
730
  worktreeId: string;
729
731
  body: unknown;
730
- }): Promise<Response>;
732
+ }): Promise<NextResponse>;
731
733
  declare function handleWorktreeUpdateTargets(args: {
732
734
  authContext: GatewayAuthContext;
733
735
  correlationId: string;
734
736
  policyTraceId: string;
735
737
  worktreeId: string;
736
738
  body: unknown;
737
- }): Promise<Response>;
739
+ }): Promise<NextResponse>;
738
740
  declare function handleWorktreeComplete(args: {
739
741
  authContext: GatewayAuthContext;
740
742
  correlationId: string;
741
743
  policyTraceId: string;
742
744
  body: unknown;
743
- }): Promise<Response>;
745
+ }): Promise<NextResponse>;
744
746
  declare function handleWorktreeAdvancePhase(args: {
745
747
  authContext: GatewayAuthContext;
746
748
  correlationId: string;
747
749
  policyTraceId: string;
748
750
  body: unknown;
749
- }): Promise<Response>;
751
+ }): Promise<NextResponse>;
750
752
  declare function handleWorktreeSetPhase(args: {
751
753
  authContext: GatewayAuthContext;
752
754
  correlationId: string;
753
755
  policyTraceId: string;
754
756
  body: unknown;
755
- }): Promise<Response>;
757
+ }): Promise<NextResponse>;
756
758
  declare function handleWorktreePatchState(args: {
757
759
  authContext: GatewayAuthContext;
758
760
  correlationId: string;
759
761
  policyTraceId: string;
760
762
  body: unknown;
761
- }): Promise<Response>;
763
+ }): Promise<NextResponse>;
762
764
  declare function handleWorktreeBulkCreate(args: {
763
765
  authContext: GatewayAuthContext;
764
766
  correlationId: string;
765
767
  policyTraceId: string;
766
768
  body: unknown;
767
- }): Promise<Response>;
769
+ }): Promise<NextResponse>;
768
770
 
769
- export { handleBeliefArchive, handleBeliefBatchUpdateCriticality, handleBeliefBisect, handleBeliefConfidenceHistory, handleBeliefCreate, handleBeliefCreateContract, handleBeliefFork, handleBeliefGet, handleBeliefLineage, handleBeliefLink, handleBeliefList, handleBeliefReassignTopic, handleBeliefRefine, handleBeliefRelationships, handleBeliefUnlinkEvidence, handleBeliefUpdateConfidence, handleBeliefUpdateCriticality, handleBeliefUpdateRationale, handleBeliefUpdateStatus, handleContradictionFlag, handleContradictionGet, handleContradictionList, handleEdgeBatchCreate, handleEdgeCreate, handleEdgeDelete, handleEdgeList, handleEdgeRemove, handleEdgeTraverse, handleEdgeUpdate, handleEdgesRemoveBetween, handleEventsList, handleEventsReplay, handleEvidenceClassify, handleEvidenceClassifyBatch, handleEvidenceCreate, handleEvidenceFlagIncorrect, handleEvidenceGet, handleEvidenceLink, handleEvidenceList, handleEvidenceRemove, handleEvidenceSearch, handleEvidenceUpdate, handleEvidenceUpdateStatus, handleEvidenceUpdateVerificationStatus, handleGraphAnalyze, handleGraphBias, handleGraphFalsify, handleGraphGaps, handleGraphNeighborhood, handleGraphTraverse, handleIdentityWhoami, handleOntologyBind, handleOntologyGet, handleOntologyList, handleOntologyMatch, handleQuestionAdd, handleQuestionAdvanceToConviction, handleQuestionAnswer, handleQuestionArchive, handleQuestionBatchCreate, handleQuestionCreate, handleQuestionDelete, handleQuestionFinalizeConviction, handleQuestionGet, handleQuestionGetAnswer, handleQuestionList, handleQuestionRefine, handleQuestionUpdate, handleQuestionUpdateConviction, handleQuestionUpdatePriority, handleQuestionUpdateStatus, handleSearchResources, handleSourceGet, handleSourceUpsert, handleTaskComplete, handleTaskCreate, handleTaskList, handleTaskUpdate, handleTopicBulkCreate, handleTopicCoverage, handleTopicCreate, handleTopicGet, handleTopicList, handleTopicRemove, handleTopicTree, handleTopicUpdate, handleWebhookCreate, handleWebhookDelete, handleWebhookDeliveries, handleWebhookGet, handleWebhookHealth, handleWebhookList, handleWebhookTest, handleWebhookUpdate, handleWorktreeActivate, handleWorktreeAdvancePhase, handleWorktreeBulkCreate, handleWorktreeComplete, handleWorktreeCreate, handleWorktreeList, handleWorktreeListAll, handleWorktreeMerge, handleWorktreePatchState, handleWorktreeSetPhase, handleWorktreeUpdate, handleWorktreeUpdateTargets };
771
+ export { type GatewayContextAuth, type GatewayContextRequest, type GatewayContextRouteDeps, createContextGatewayRoute, handleBeliefArchive, handleBeliefBatchUpdateCriticality, handleBeliefBisect, handleBeliefConfidenceHistory, handleBeliefCreate, handleBeliefCreateContract, handleBeliefFork, handleBeliefGet, handleBeliefLineage, handleBeliefLink, handleBeliefList, handleBeliefReassignTopic, handleBeliefRefine, handleBeliefRelationships, handleBeliefUnlinkEvidence, handleBeliefUpdateConfidence, handleBeliefUpdateCriticality, handleBeliefUpdateRationale, handleBeliefUpdateStatus, handleContradictionFlag, handleContradictionGet, handleContradictionList, handleEdgeBatchCreate, handleEdgeCreate, handleEdgeDelete, handleEdgeList, handleEdgeRemove, handleEdgeTraverse, handleEdgeUpdate, handleEdgesRemoveBetween, handleEventsList, handleEventsReplay, handleEvidenceCreate, handleEvidenceFlagIncorrect, handleEvidenceGet, handleEvidenceLink, handleEvidenceList, handleEvidenceRemove, handleEvidenceSearch, handleEvidenceUpdate, handleEvidenceUpdateStatus, handleEvidenceUpdateVerificationStatus, handleGraphAnalyze, handleGraphBias, handleGraphFalsify, handleGraphGaps, handleGraphNeighborhood, handleGraphTraverse, handleIdentityWhoami, handleOntologyBind, handleOntologyGet, handleOntologyList, handleOntologyMatch, handleQuestionAdd, handleQuestionAdvanceToConviction, handleQuestionAnswer, handleQuestionArchive, handleQuestionBatchCreate, handleQuestionCreate, handleQuestionDelete, handleQuestionFinalizeConviction, handleQuestionGet, handleQuestionGetAnswer, handleQuestionList, handleQuestionRefine, handleQuestionUpdate, handleQuestionUpdateConviction, handleQuestionUpdatePriority, handleQuestionUpdateStatus, handleSearchResources, handleTaskComplete, handleTaskCreate, handleTaskList, handleTaskUpdate, handleTopicBulkCreate, handleTopicCoverage, handleTopicCreate, handleTopicGet, handleTopicList, handleTopicRemove, handleTopicTree, handleTopicUpdate, handleWebhookCreate, handleWebhookDelete, handleWebhookDeliveries, handleWebhookGet, handleWebhookHealth, handleWebhookList, handleWebhookTest, handleWebhookUpdate, handleWorktreeActivate, handleWorktreeAdvancePhase, handleWorktreeBulkCreate, handleWorktreeComplete, handleWorktreeCreate, handleWorktreeList, handleWorktreeListAll, handleWorktreeMerge, handleWorktreePatchState, handleWorktreeSetPhase, handleWorktreeUpdate, handleWorktreeUpdateTargets };