@indexnetwork/protocol 19.0.0-rc.482.1 → 20.0.0-rc.484.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/IMPLEMENTATION.md +27 -10
  3. package/dist/index.d.ts +2 -3
  4. package/dist/index.js +4 -3
  5. package/dist/networks/{application/indexer.graph.d.ts → indexer.graph.d.ts} +11 -7
  6. package/dist/networks/{application/indexer.graph.js → indexer.graph.js} +6 -6
  7. package/dist/networks/{application/indexer.state.d.ts → indexer.state.d.ts} +7 -17
  8. package/dist/networks/{application/indexer.state.js → indexer.state.js} +6 -10
  9. package/dist/networks/{application/membership.graph.d.ts → membership.graph.d.ts} +2 -4
  10. package/dist/networks/{application/membership.graph.js → membership.graph.js} +3 -3
  11. package/dist/networks/{domain/membership.state.d.ts → membership.state.d.ts} +0 -2
  12. package/dist/networks/{domain/membership.state.js → membership.state.js} +0 -2
  13. package/dist/networks/{application/network.graph.d.ts → network.graph.d.ts} +2 -4
  14. package/dist/networks/{application/network.graph.js → network.graph.js} +3 -3
  15. package/dist/networks/network.module.d.ts +1314 -0
  16. package/dist/networks/network.module.js +83 -0
  17. package/dist/networks/{application/network.recommender.d.ts → network.recommender.d.ts} +0 -2
  18. package/dist/networks/{application/network.recommender.js → network.recommender.js} +4 -6
  19. package/dist/networks/{domain/network.state.d.ts → network.state.d.ts} +0 -2
  20. package/dist/networks/{domain/network.state.js → network.state.js} +0 -2
  21. package/dist/networks/{application/network.tools.d.ts → network.tools.d.ts} +5 -4
  22. package/dist/networks/{application/network.tools.js → network.tools.js} +5 -7
  23. package/dist/shared/agent/tool.factory.js +6 -6
  24. package/dist/shared/agent/tool.registry.js +2 -2
  25. package/package.json +1 -1
  26. package/dist/networks/application/index.d.ts +0 -45
  27. package/dist/networks/application/index.js +0 -50
  28. package/dist/networks/domain/index.d.ts +0 -29
  29. package/dist/networks/domain/index.js +0 -31
  30. package/dist/networks/index.d.ts +0 -9
  31. package/dist/networks/index.js +0 -8
  32. package/dist/networks/ports/communities.tools.port.d.ts +0 -5
  33. package/dist/networks/ports/communities.tools.port.js +0 -1
  34. package/dist/networks/ports/index.d.ts +0 -27
  35. package/dist/networks/ports/index.js +0 -23
@@ -0,0 +1,1314 @@
1
+ /**
2
+ * networks — the capability's single public surface.
3
+ *
4
+ * Everything the rest of the package (and every host) may reach lives on the
5
+ * {@link Networks} class. The files beside this one are private implementation,
6
+ * named for what they do rather than for the layer they sit in:
7
+ *
8
+ * network.graph the community lifecycle graph — create, read, update, delete
9
+ * network.state that graph's channel state
10
+ * membership.graph the roster graph — add, list, remove members
11
+ * membership.state that graph's channel state
12
+ * indexer.graph signal↔community assignment, direct or model-evaluated
13
+ * indexer.state that graph's channel state
14
+ * network.recommender ranking public communities during onboarding
15
+ * network.tools the agent-facing tool definitions
16
+ *
17
+ * No directories: every stage here is one or two files, so a folder per stage
18
+ * would only add a hop. Nothing outside `networks/` imports any of it; the
19
+ * layout may change freely as long as this class keeps its shape.
20
+ */
21
+ import type { DefineTool } from "../shared/agent/tool.helpers.js";
22
+ import type { IntentNetworkGraphDatabase, NetworkGraphDatabase, NetworkMembershipGraphDatabase } from "../shared/interfaces/database.interface.js";
23
+ import type { IntentNetworkIndexer } from "./indexer.graph.js";
24
+ import type { NetworkToolDeps } from "./network.tools.js";
25
+ export type { IntentNetworkIndexer, NetworkToolDeps };
26
+ /**
27
+ * Host capabilities the community graphs need.
28
+ *
29
+ * Both fields are optional so a host can construct `new Networks()` and reach
30
+ * only {@link Networks.createTools}; each `create…Graph` method names the
31
+ * dependency it requires.
32
+ */
33
+ export interface NetworksDeps {
34
+ /**
35
+ * Community, roster, and assignment persistence. Required by every
36
+ * `create…Graph` method — hosts pass one adapter satisfying all three
37
+ * query sets.
38
+ */
39
+ database?: NetworkGraphDatabase & NetworkMembershipGraphDatabase & IntentNetworkGraphDatabase;
40
+ /**
41
+ * Scores a signal against a community. Required by
42
+ * {@link Networks.createAssignmentGraph}; an `Intents` instance satisfies it.
43
+ */
44
+ indexer?: IntentNetworkIndexer;
45
+ }
46
+ /**
47
+ * The networks capability.
48
+ *
49
+ * One instance is cheap: it holds its dependencies and compiles a graph only
50
+ * when asked, so a host can keep a single `Networks` and build just the graphs
51
+ * it serves.
52
+ */
53
+ export declare class Networks {
54
+ private readonly deps;
55
+ constructor(deps?: NetworksDeps);
56
+ /**
57
+ * Build the community lifecycle graph — create, read, update, delete.
58
+ *
59
+ * @throws If the instance was constructed without a `database`.
60
+ */
61
+ createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
62
+ userId: string;
63
+ networkId: string | undefined;
64
+ operationMode: "update" | "create" | "delete" | "read";
65
+ createInput: {
66
+ title: string;
67
+ prompt?: string;
68
+ imageUrl?: string | null;
69
+ joinPolicy?: "anyone" | "invite_only";
70
+ } | undefined;
71
+ updateInput: {
72
+ title?: string;
73
+ prompt?: string | null;
74
+ imageUrl?: string | null;
75
+ joinPolicy?: "anyone" | "invite_only";
76
+ } | undefined;
77
+ showAll: boolean;
78
+ readResult: {
79
+ memberOf: Array<{
80
+ networkId: string;
81
+ title: string;
82
+ prompt: string | null;
83
+ autoAssign: boolean;
84
+ isPersonal: boolean;
85
+ joinedAt: Date;
86
+ }>;
87
+ owns: Array<{
88
+ networkId: string;
89
+ title: string;
90
+ prompt: string | null;
91
+ memberCount: number;
92
+ intentCount: number;
93
+ joinPolicy: string;
94
+ }>;
95
+ publicNetworks?: Array<{
96
+ networkId: string;
97
+ title: string;
98
+ prompt: string | null;
99
+ memberCount: number;
100
+ owner: {
101
+ name: string;
102
+ avatar: string | null;
103
+ } | null;
104
+ }>;
105
+ stats: {
106
+ memberOfCount: number;
107
+ ownsCount: number;
108
+ publicNetworksCount?: number;
109
+ scopeNote?: string;
110
+ };
111
+ } | undefined;
112
+ mutationResult: {
113
+ success: boolean;
114
+ networkId?: string;
115
+ title?: string;
116
+ message?: string;
117
+ error?: string;
118
+ } | undefined;
119
+ error: string | null;
120
+ }, {
121
+ userId?: string | undefined;
122
+ networkId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
123
+ operationMode?: "update" | "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"update" | "create" | "delete" | "read"> | undefined;
124
+ createInput?: {
125
+ title: string;
126
+ prompt?: string;
127
+ imageUrl?: string | null;
128
+ joinPolicy?: "anyone" | "invite_only";
129
+ } | import("@langchain/langgraph").OverwriteValue<{
130
+ title: string;
131
+ prompt?: string;
132
+ imageUrl?: string | null;
133
+ joinPolicy?: "anyone" | "invite_only";
134
+ } | undefined> | undefined;
135
+ updateInput?: {
136
+ title?: string;
137
+ prompt?: string | null;
138
+ imageUrl?: string | null;
139
+ joinPolicy?: "anyone" | "invite_only";
140
+ } | import("@langchain/langgraph").OverwriteValue<{
141
+ title?: string;
142
+ prompt?: string | null;
143
+ imageUrl?: string | null;
144
+ joinPolicy?: "anyone" | "invite_only";
145
+ } | undefined> | undefined;
146
+ showAll?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
147
+ readResult?: {
148
+ memberOf: Array<{
149
+ networkId: string;
150
+ title: string;
151
+ prompt: string | null;
152
+ autoAssign: boolean;
153
+ isPersonal: boolean;
154
+ joinedAt: Date;
155
+ }>;
156
+ owns: Array<{
157
+ networkId: string;
158
+ title: string;
159
+ prompt: string | null;
160
+ memberCount: number;
161
+ intentCount: number;
162
+ joinPolicy: string;
163
+ }>;
164
+ publicNetworks?: Array<{
165
+ networkId: string;
166
+ title: string;
167
+ prompt: string | null;
168
+ memberCount: number;
169
+ owner: {
170
+ name: string;
171
+ avatar: string | null;
172
+ } | null;
173
+ }>;
174
+ stats: {
175
+ memberOfCount: number;
176
+ ownsCount: number;
177
+ publicNetworksCount?: number;
178
+ scopeNote?: string;
179
+ };
180
+ } | import("@langchain/langgraph").OverwriteValue<{
181
+ memberOf: Array<{
182
+ networkId: string;
183
+ title: string;
184
+ prompt: string | null;
185
+ autoAssign: boolean;
186
+ isPersonal: boolean;
187
+ joinedAt: Date;
188
+ }>;
189
+ owns: Array<{
190
+ networkId: string;
191
+ title: string;
192
+ prompt: string | null;
193
+ memberCount: number;
194
+ intentCount: number;
195
+ joinPolicy: string;
196
+ }>;
197
+ publicNetworks?: Array<{
198
+ networkId: string;
199
+ title: string;
200
+ prompt: string | null;
201
+ memberCount: number;
202
+ owner: {
203
+ name: string;
204
+ avatar: string | null;
205
+ } | null;
206
+ }>;
207
+ stats: {
208
+ memberOfCount: number;
209
+ ownsCount: number;
210
+ publicNetworksCount?: number;
211
+ scopeNote?: string;
212
+ };
213
+ } | undefined> | undefined;
214
+ mutationResult?: {
215
+ success: boolean;
216
+ networkId?: string;
217
+ title?: string;
218
+ message?: string;
219
+ error?: string;
220
+ } | import("@langchain/langgraph").OverwriteValue<{
221
+ success: boolean;
222
+ networkId?: string;
223
+ title?: string;
224
+ message?: string;
225
+ error?: string;
226
+ } | undefined> | undefined;
227
+ error?: string | import("@langchain/langgraph").OverwriteValue<string | null> | null | undefined;
228
+ }, "update" | "__start__" | "create" | "read" | "delete_idx", {
229
+ userId: {
230
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
231
+ (): import("@langchain/langgraph").LastValue<string>;
232
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
233
+ };
234
+ networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
235
+ operationMode: import("@langchain/langgraph").BaseChannel<"update" | "create" | "delete" | "read", "update" | "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"update" | "create" | "delete" | "read">, unknown>;
236
+ createInput: import("@langchain/langgraph").BaseChannel<{
237
+ title: string;
238
+ prompt?: string;
239
+ imageUrl?: string | null;
240
+ joinPolicy?: "anyone" | "invite_only";
241
+ } | undefined, {
242
+ title: string;
243
+ prompt?: string;
244
+ imageUrl?: string | null;
245
+ joinPolicy?: "anyone" | "invite_only";
246
+ } | import("@langchain/langgraph").OverwriteValue<{
247
+ title: string;
248
+ prompt?: string;
249
+ imageUrl?: string | null;
250
+ joinPolicy?: "anyone" | "invite_only";
251
+ } | undefined> | undefined, unknown>;
252
+ updateInput: import("@langchain/langgraph").BaseChannel<{
253
+ title?: string;
254
+ prompt?: string | null;
255
+ imageUrl?: string | null;
256
+ joinPolicy?: "anyone" | "invite_only";
257
+ } | undefined, {
258
+ title?: string;
259
+ prompt?: string | null;
260
+ imageUrl?: string | null;
261
+ joinPolicy?: "anyone" | "invite_only";
262
+ } | import("@langchain/langgraph").OverwriteValue<{
263
+ title?: string;
264
+ prompt?: string | null;
265
+ imageUrl?: string | null;
266
+ joinPolicy?: "anyone" | "invite_only";
267
+ } | undefined> | undefined, unknown>;
268
+ showAll: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
269
+ readResult: import("@langchain/langgraph").BaseChannel<{
270
+ memberOf: Array<{
271
+ networkId: string;
272
+ title: string;
273
+ prompt: string | null;
274
+ autoAssign: boolean;
275
+ isPersonal: boolean;
276
+ joinedAt: Date;
277
+ }>;
278
+ owns: Array<{
279
+ networkId: string;
280
+ title: string;
281
+ prompt: string | null;
282
+ memberCount: number;
283
+ intentCount: number;
284
+ joinPolicy: string;
285
+ }>;
286
+ publicNetworks?: Array<{
287
+ networkId: string;
288
+ title: string;
289
+ prompt: string | null;
290
+ memberCount: number;
291
+ owner: {
292
+ name: string;
293
+ avatar: string | null;
294
+ } | null;
295
+ }>;
296
+ stats: {
297
+ memberOfCount: number;
298
+ ownsCount: number;
299
+ publicNetworksCount?: number;
300
+ scopeNote?: string;
301
+ };
302
+ } | undefined, {
303
+ memberOf: Array<{
304
+ networkId: string;
305
+ title: string;
306
+ prompt: string | null;
307
+ autoAssign: boolean;
308
+ isPersonal: boolean;
309
+ joinedAt: Date;
310
+ }>;
311
+ owns: Array<{
312
+ networkId: string;
313
+ title: string;
314
+ prompt: string | null;
315
+ memberCount: number;
316
+ intentCount: number;
317
+ joinPolicy: string;
318
+ }>;
319
+ publicNetworks?: Array<{
320
+ networkId: string;
321
+ title: string;
322
+ prompt: string | null;
323
+ memberCount: number;
324
+ owner: {
325
+ name: string;
326
+ avatar: string | null;
327
+ } | null;
328
+ }>;
329
+ stats: {
330
+ memberOfCount: number;
331
+ ownsCount: number;
332
+ publicNetworksCount?: number;
333
+ scopeNote?: string;
334
+ };
335
+ } | import("@langchain/langgraph").OverwriteValue<{
336
+ memberOf: Array<{
337
+ networkId: string;
338
+ title: string;
339
+ prompt: string | null;
340
+ autoAssign: boolean;
341
+ isPersonal: boolean;
342
+ joinedAt: Date;
343
+ }>;
344
+ owns: Array<{
345
+ networkId: string;
346
+ title: string;
347
+ prompt: string | null;
348
+ memberCount: number;
349
+ intentCount: number;
350
+ joinPolicy: string;
351
+ }>;
352
+ publicNetworks?: Array<{
353
+ networkId: string;
354
+ title: string;
355
+ prompt: string | null;
356
+ memberCount: number;
357
+ owner: {
358
+ name: string;
359
+ avatar: string | null;
360
+ } | null;
361
+ }>;
362
+ stats: {
363
+ memberOfCount: number;
364
+ ownsCount: number;
365
+ publicNetworksCount?: number;
366
+ scopeNote?: string;
367
+ };
368
+ } | undefined> | undefined, unknown>;
369
+ mutationResult: import("@langchain/langgraph").BaseChannel<{
370
+ success: boolean;
371
+ networkId?: string;
372
+ title?: string;
373
+ message?: string;
374
+ error?: string;
375
+ } | undefined, {
376
+ success: boolean;
377
+ networkId?: string;
378
+ title?: string;
379
+ message?: string;
380
+ error?: string;
381
+ } | import("@langchain/langgraph").OverwriteValue<{
382
+ success: boolean;
383
+ networkId?: string;
384
+ title?: string;
385
+ message?: string;
386
+ error?: string;
387
+ } | undefined> | undefined, unknown>;
388
+ error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
389
+ }, {
390
+ userId: {
391
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
392
+ (): import("@langchain/langgraph").LastValue<string>;
393
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
394
+ };
395
+ networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
396
+ operationMode: import("@langchain/langgraph").BaseChannel<"update" | "create" | "delete" | "read", "update" | "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"update" | "create" | "delete" | "read">, unknown>;
397
+ createInput: import("@langchain/langgraph").BaseChannel<{
398
+ title: string;
399
+ prompt?: string;
400
+ imageUrl?: string | null;
401
+ joinPolicy?: "anyone" | "invite_only";
402
+ } | undefined, {
403
+ title: string;
404
+ prompt?: string;
405
+ imageUrl?: string | null;
406
+ joinPolicy?: "anyone" | "invite_only";
407
+ } | import("@langchain/langgraph").OverwriteValue<{
408
+ title: string;
409
+ prompt?: string;
410
+ imageUrl?: string | null;
411
+ joinPolicy?: "anyone" | "invite_only";
412
+ } | undefined> | undefined, unknown>;
413
+ updateInput: import("@langchain/langgraph").BaseChannel<{
414
+ title?: string;
415
+ prompt?: string | null;
416
+ imageUrl?: string | null;
417
+ joinPolicy?: "anyone" | "invite_only";
418
+ } | undefined, {
419
+ title?: string;
420
+ prompt?: string | null;
421
+ imageUrl?: string | null;
422
+ joinPolicy?: "anyone" | "invite_only";
423
+ } | import("@langchain/langgraph").OverwriteValue<{
424
+ title?: string;
425
+ prompt?: string | null;
426
+ imageUrl?: string | null;
427
+ joinPolicy?: "anyone" | "invite_only";
428
+ } | undefined> | undefined, unknown>;
429
+ showAll: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
430
+ readResult: import("@langchain/langgraph").BaseChannel<{
431
+ memberOf: Array<{
432
+ networkId: string;
433
+ title: string;
434
+ prompt: string | null;
435
+ autoAssign: boolean;
436
+ isPersonal: boolean;
437
+ joinedAt: Date;
438
+ }>;
439
+ owns: Array<{
440
+ networkId: string;
441
+ title: string;
442
+ prompt: string | null;
443
+ memberCount: number;
444
+ intentCount: number;
445
+ joinPolicy: string;
446
+ }>;
447
+ publicNetworks?: Array<{
448
+ networkId: string;
449
+ title: string;
450
+ prompt: string | null;
451
+ memberCount: number;
452
+ owner: {
453
+ name: string;
454
+ avatar: string | null;
455
+ } | null;
456
+ }>;
457
+ stats: {
458
+ memberOfCount: number;
459
+ ownsCount: number;
460
+ publicNetworksCount?: number;
461
+ scopeNote?: string;
462
+ };
463
+ } | undefined, {
464
+ memberOf: Array<{
465
+ networkId: string;
466
+ title: string;
467
+ prompt: string | null;
468
+ autoAssign: boolean;
469
+ isPersonal: boolean;
470
+ joinedAt: Date;
471
+ }>;
472
+ owns: Array<{
473
+ networkId: string;
474
+ title: string;
475
+ prompt: string | null;
476
+ memberCount: number;
477
+ intentCount: number;
478
+ joinPolicy: string;
479
+ }>;
480
+ publicNetworks?: Array<{
481
+ networkId: string;
482
+ title: string;
483
+ prompt: string | null;
484
+ memberCount: number;
485
+ owner: {
486
+ name: string;
487
+ avatar: string | null;
488
+ } | null;
489
+ }>;
490
+ stats: {
491
+ memberOfCount: number;
492
+ ownsCount: number;
493
+ publicNetworksCount?: number;
494
+ scopeNote?: string;
495
+ };
496
+ } | import("@langchain/langgraph").OverwriteValue<{
497
+ memberOf: Array<{
498
+ networkId: string;
499
+ title: string;
500
+ prompt: string | null;
501
+ autoAssign: boolean;
502
+ isPersonal: boolean;
503
+ joinedAt: Date;
504
+ }>;
505
+ owns: Array<{
506
+ networkId: string;
507
+ title: string;
508
+ prompt: string | null;
509
+ memberCount: number;
510
+ intentCount: number;
511
+ joinPolicy: string;
512
+ }>;
513
+ publicNetworks?: Array<{
514
+ networkId: string;
515
+ title: string;
516
+ prompt: string | null;
517
+ memberCount: number;
518
+ owner: {
519
+ name: string;
520
+ avatar: string | null;
521
+ } | null;
522
+ }>;
523
+ stats: {
524
+ memberOfCount: number;
525
+ ownsCount: number;
526
+ publicNetworksCount?: number;
527
+ scopeNote?: string;
528
+ };
529
+ } | undefined> | undefined, unknown>;
530
+ mutationResult: import("@langchain/langgraph").BaseChannel<{
531
+ success: boolean;
532
+ networkId?: string;
533
+ title?: string;
534
+ message?: string;
535
+ error?: string;
536
+ } | undefined, {
537
+ success: boolean;
538
+ networkId?: string;
539
+ title?: string;
540
+ message?: string;
541
+ error?: string;
542
+ } | import("@langchain/langgraph").OverwriteValue<{
543
+ success: boolean;
544
+ networkId?: string;
545
+ title?: string;
546
+ message?: string;
547
+ error?: string;
548
+ } | undefined> | undefined, unknown>;
549
+ error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
550
+ }, import("@langchain/langgraph").StateDefinition, {
551
+ read: {
552
+ readResult: {
553
+ memberOf: {
554
+ networkId: string;
555
+ title: string;
556
+ prompt: string | null;
557
+ autoAssign: boolean;
558
+ isPersonal: boolean;
559
+ joinedAt: Date;
560
+ }[];
561
+ owns: {
562
+ networkId: string;
563
+ title: string;
564
+ prompt: string | null;
565
+ memberCount: number;
566
+ intentCount: number;
567
+ joinPolicy: "anyone" | "invite_only";
568
+ }[];
569
+ stats: {
570
+ memberOfCount: number;
571
+ ownsCount: number;
572
+ scopeNote: string;
573
+ publicNetworksCount?: undefined;
574
+ };
575
+ publicNetworks?: undefined;
576
+ };
577
+ error?: undefined;
578
+ } | {
579
+ readResult: {
580
+ memberOf: {
581
+ networkId: string;
582
+ title: string;
583
+ prompt: string | null;
584
+ autoAssign: boolean;
585
+ isPersonal: boolean;
586
+ joinedAt: Date;
587
+ }[];
588
+ owns: {
589
+ networkId: string;
590
+ title: string;
591
+ prompt: string | null;
592
+ memberCount: number;
593
+ intentCount: number;
594
+ joinPolicy: "anyone" | "invite_only";
595
+ }[];
596
+ publicNetworks: {
597
+ networkId: string;
598
+ title: string;
599
+ prompt: string | null;
600
+ memberCount: number;
601
+ owner: {
602
+ id: string;
603
+ name: string;
604
+ avatar: string | null;
605
+ } | null;
606
+ }[];
607
+ stats: {
608
+ memberOfCount: number;
609
+ ownsCount: number;
610
+ publicNetworksCount: number;
611
+ scopeNote?: undefined;
612
+ };
613
+ };
614
+ error?: undefined;
615
+ } | {
616
+ error: string;
617
+ readResult?: undefined;
618
+ };
619
+ create: {
620
+ mutationResult: {
621
+ success: boolean;
622
+ error: string;
623
+ networkId?: undefined;
624
+ title?: undefined;
625
+ message?: undefined;
626
+ };
627
+ } | {
628
+ mutationResult: {
629
+ success: boolean;
630
+ networkId: string;
631
+ title: string;
632
+ message: string;
633
+ error?: undefined;
634
+ };
635
+ };
636
+ update: {
637
+ mutationResult: {
638
+ success: boolean;
639
+ error: string;
640
+ networkId?: undefined;
641
+ message?: undefined;
642
+ };
643
+ } | {
644
+ mutationResult: {
645
+ success: boolean;
646
+ networkId: string;
647
+ message: string;
648
+ error?: undefined;
649
+ };
650
+ };
651
+ delete_idx: {
652
+ mutationResult: {
653
+ success: boolean;
654
+ error: string;
655
+ networkId?: undefined;
656
+ message?: undefined;
657
+ };
658
+ } | {
659
+ mutationResult: {
660
+ success: boolean;
661
+ networkId: string;
662
+ message: string;
663
+ error?: undefined;
664
+ };
665
+ };
666
+ }, unknown, unknown, []>;
667
+ /**
668
+ * Build the membership graph — add, list, and remove members, under the
669
+ * community's join policy and owner authority.
670
+ *
671
+ * @throws If the instance was constructed without a `database`.
672
+ */
673
+ createMembershipGraph(): import("@langchain/langgraph").CompiledStateGraph<{
674
+ userId: string;
675
+ networkId: string;
676
+ operationMode: "create" | "delete" | "read";
677
+ targetUserId: string | undefined;
678
+ readResult: {
679
+ networkId: string;
680
+ count: number;
681
+ members: Array<{
682
+ userId: string;
683
+ name: string;
684
+ avatar: string | null;
685
+ permissions: string[];
686
+ intentCount: number;
687
+ joinedAt: Date;
688
+ }>;
689
+ } | undefined;
690
+ mutationResult: {
691
+ success: boolean;
692
+ message?: string;
693
+ error?: string;
694
+ } | undefined;
695
+ error: string | null;
696
+ }, {
697
+ userId?: string | undefined;
698
+ networkId?: string | undefined;
699
+ operationMode?: "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"create" | "delete" | "read"> | undefined;
700
+ targetUserId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
701
+ readResult?: {
702
+ networkId: string;
703
+ count: number;
704
+ members: Array<{
705
+ userId: string;
706
+ name: string;
707
+ avatar: string | null;
708
+ permissions: string[];
709
+ intentCount: number;
710
+ joinedAt: Date;
711
+ }>;
712
+ } | import("@langchain/langgraph").OverwriteValue<{
713
+ networkId: string;
714
+ count: number;
715
+ members: Array<{
716
+ userId: string;
717
+ name: string;
718
+ avatar: string | null;
719
+ permissions: string[];
720
+ intentCount: number;
721
+ joinedAt: Date;
722
+ }>;
723
+ } | undefined> | undefined;
724
+ mutationResult?: {
725
+ success: boolean;
726
+ message?: string;
727
+ error?: string;
728
+ } | import("@langchain/langgraph").OverwriteValue<{
729
+ success: boolean;
730
+ message?: string;
731
+ error?: string;
732
+ } | undefined> | undefined;
733
+ error?: string | import("@langchain/langgraph").OverwriteValue<string | null> | null | undefined;
734
+ }, "__start__" | "add_member" | "list_members" | "remove_member", {
735
+ userId: {
736
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
737
+ (): import("@langchain/langgraph").LastValue<string>;
738
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
739
+ };
740
+ networkId: {
741
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
742
+ (): import("@langchain/langgraph").LastValue<string>;
743
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
744
+ };
745
+ operationMode: import("@langchain/langgraph").BaseChannel<"create" | "delete" | "read", "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"create" | "delete" | "read">, unknown>;
746
+ targetUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
747
+ readResult: import("@langchain/langgraph").BaseChannel<{
748
+ networkId: string;
749
+ count: number;
750
+ members: Array<{
751
+ userId: string;
752
+ name: string;
753
+ avatar: string | null;
754
+ permissions: string[];
755
+ intentCount: number;
756
+ joinedAt: Date;
757
+ }>;
758
+ } | undefined, {
759
+ networkId: string;
760
+ count: number;
761
+ members: Array<{
762
+ userId: string;
763
+ name: string;
764
+ avatar: string | null;
765
+ permissions: string[];
766
+ intentCount: number;
767
+ joinedAt: Date;
768
+ }>;
769
+ } | import("@langchain/langgraph").OverwriteValue<{
770
+ networkId: string;
771
+ count: number;
772
+ members: Array<{
773
+ userId: string;
774
+ name: string;
775
+ avatar: string | null;
776
+ permissions: string[];
777
+ intentCount: number;
778
+ joinedAt: Date;
779
+ }>;
780
+ } | undefined> | undefined, unknown>;
781
+ mutationResult: import("@langchain/langgraph").BaseChannel<{
782
+ success: boolean;
783
+ message?: string;
784
+ error?: string;
785
+ } | undefined, {
786
+ success: boolean;
787
+ message?: string;
788
+ error?: string;
789
+ } | import("@langchain/langgraph").OverwriteValue<{
790
+ success: boolean;
791
+ message?: string;
792
+ error?: string;
793
+ } | undefined> | undefined, unknown>;
794
+ error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
795
+ }, {
796
+ userId: {
797
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
798
+ (): import("@langchain/langgraph").LastValue<string>;
799
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
800
+ };
801
+ networkId: {
802
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
803
+ (): import("@langchain/langgraph").LastValue<string>;
804
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
805
+ };
806
+ operationMode: import("@langchain/langgraph").BaseChannel<"create" | "delete" | "read", "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"create" | "delete" | "read">, unknown>;
807
+ targetUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
808
+ readResult: import("@langchain/langgraph").BaseChannel<{
809
+ networkId: string;
810
+ count: number;
811
+ members: Array<{
812
+ userId: string;
813
+ name: string;
814
+ avatar: string | null;
815
+ permissions: string[];
816
+ intentCount: number;
817
+ joinedAt: Date;
818
+ }>;
819
+ } | undefined, {
820
+ networkId: string;
821
+ count: number;
822
+ members: Array<{
823
+ userId: string;
824
+ name: string;
825
+ avatar: string | null;
826
+ permissions: string[];
827
+ intentCount: number;
828
+ joinedAt: Date;
829
+ }>;
830
+ } | import("@langchain/langgraph").OverwriteValue<{
831
+ networkId: string;
832
+ count: number;
833
+ members: Array<{
834
+ userId: string;
835
+ name: string;
836
+ avatar: string | null;
837
+ permissions: string[];
838
+ intentCount: number;
839
+ joinedAt: Date;
840
+ }>;
841
+ } | undefined> | undefined, unknown>;
842
+ mutationResult: import("@langchain/langgraph").BaseChannel<{
843
+ success: boolean;
844
+ message?: string;
845
+ error?: string;
846
+ } | undefined, {
847
+ success: boolean;
848
+ message?: string;
849
+ error?: string;
850
+ } | import("@langchain/langgraph").OverwriteValue<{
851
+ success: boolean;
852
+ message?: string;
853
+ error?: string;
854
+ } | undefined> | undefined, unknown>;
855
+ error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
856
+ }, import("@langchain/langgraph").StateDefinition, {
857
+ add_member: {
858
+ mutationResult: {
859
+ success: boolean;
860
+ error: string;
861
+ message?: undefined;
862
+ };
863
+ } | {
864
+ mutationResult: {
865
+ success: boolean;
866
+ message: string;
867
+ error?: undefined;
868
+ };
869
+ };
870
+ list_members: {
871
+ readResult: {
872
+ networkId: string;
873
+ count: number;
874
+ members: never[];
875
+ };
876
+ error: string;
877
+ } | {
878
+ readResult: {
879
+ networkId: string;
880
+ count: number;
881
+ members: {
882
+ userId: string;
883
+ name: string;
884
+ avatar: string | null;
885
+ permissions: string[];
886
+ intentCount: number;
887
+ joinedAt: Date;
888
+ }[];
889
+ };
890
+ error?: undefined;
891
+ } | {
892
+ error: string;
893
+ readResult?: undefined;
894
+ };
895
+ remove_member: {
896
+ mutationResult: {
897
+ success: boolean;
898
+ error: string;
899
+ message?: undefined;
900
+ };
901
+ } | {
902
+ mutationResult: {
903
+ success: boolean;
904
+ message: string;
905
+ error?: undefined;
906
+ };
907
+ };
908
+ }, unknown, unknown, []>;
909
+ /**
910
+ * Build the signal↔community assignment graph — link a signal to a community
911
+ * directly or after model evaluation, and unlink it.
912
+ *
913
+ * @throws If the instance was constructed without a `database` or an `indexer`.
914
+ */
915
+ createAssignmentGraph(): import("@langchain/langgraph").CompiledStateGraph<{
916
+ userId: string;
917
+ networkId: string | undefined;
918
+ intentId: string | undefined;
919
+ operationMode: "create" | "delete" | "read";
920
+ skipEvaluation: boolean;
921
+ intent: import("./indexer.state.js").IntentForIndexing | null;
922
+ indexContext: import("./indexer.state.js").IndexMemberContext | null;
923
+ evaluation: {
924
+ reasoning: string;
925
+ indexScore: number;
926
+ memberScore: number;
927
+ } | null;
928
+ shouldAssign: boolean | undefined;
929
+ finalScore: number | undefined;
930
+ assignmentResult: import("./indexer.state.js").AssignmentResult | null;
931
+ queryUserId: string | undefined;
932
+ readResult: {
933
+ links: Array<{
934
+ intentId: string;
935
+ networkId: string;
936
+ intentTitle?: string;
937
+ networkTitle?: string;
938
+ userId?: string;
939
+ userName?: string;
940
+ createdAt?: Date;
941
+ relevancyScore?: number | null;
942
+ }>;
943
+ count: number;
944
+ mode: string;
945
+ note?: string;
946
+ } | undefined;
947
+ mutationResult: {
948
+ success: boolean;
949
+ message?: string;
950
+ error?: string;
951
+ } | undefined;
952
+ error: string | null;
953
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
954
+ }, {
955
+ userId?: string | undefined;
956
+ networkId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
957
+ intentId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
958
+ operationMode?: "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"create" | "delete" | "read"> | undefined;
959
+ skipEvaluation?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
960
+ intent?: import("./indexer.state.js").IntentForIndexing | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IntentForIndexing | null> | null | undefined;
961
+ indexContext?: import("./indexer.state.js").IndexMemberContext | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IndexMemberContext | null> | null | undefined;
962
+ evaluation?: {
963
+ reasoning: string;
964
+ indexScore: number;
965
+ memberScore: number;
966
+ } | import("@langchain/langgraph").OverwriteValue<{
967
+ reasoning: string;
968
+ indexScore: number;
969
+ memberScore: number;
970
+ } | null> | null | undefined;
971
+ shouldAssign?: boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined;
972
+ finalScore?: number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined;
973
+ assignmentResult?: import("./indexer.state.js").AssignmentResult | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").AssignmentResult | null> | null | undefined;
974
+ queryUserId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
975
+ readResult?: {
976
+ links: Array<{
977
+ intentId: string;
978
+ networkId: string;
979
+ intentTitle?: string;
980
+ networkTitle?: string;
981
+ userId?: string;
982
+ userName?: string;
983
+ createdAt?: Date;
984
+ relevancyScore?: number | null;
985
+ }>;
986
+ count: number;
987
+ mode: string;
988
+ note?: string;
989
+ } | import("@langchain/langgraph").OverwriteValue<{
990
+ links: Array<{
991
+ intentId: string;
992
+ networkId: string;
993
+ intentTitle?: string;
994
+ networkTitle?: string;
995
+ userId?: string;
996
+ userName?: string;
997
+ createdAt?: Date;
998
+ relevancyScore?: number | null;
999
+ }>;
1000
+ count: number;
1001
+ mode: string;
1002
+ note?: string;
1003
+ } | undefined> | undefined;
1004
+ mutationResult?: {
1005
+ success: boolean;
1006
+ message?: string;
1007
+ error?: string;
1008
+ } | import("@langchain/langgraph").OverwriteValue<{
1009
+ success: boolean;
1010
+ message?: string;
1011
+ error?: string;
1012
+ } | undefined> | undefined;
1013
+ error?: string | import("@langchain/langgraph").OverwriteValue<string | null> | null | undefined;
1014
+ agentTimings?: import("../chat/chat-streaming.types.js").DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<import("../chat/chat-streaming.types.js").DebugMetaAgent[]> | undefined;
1015
+ }, "__start__" | "read" | "assign" | "unassign", {
1016
+ userId: {
1017
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
1018
+ (): import("@langchain/langgraph").LastValue<string>;
1019
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
1020
+ };
1021
+ networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
1022
+ intentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
1023
+ operationMode: import("@langchain/langgraph").BaseChannel<"create" | "delete" | "read", "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"create" | "delete" | "read">, unknown>;
1024
+ skipEvaluation: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
1025
+ intent: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").IntentForIndexing | null, import("./indexer.state.js").IntentForIndexing | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IntentForIndexing | null> | null, unknown>;
1026
+ indexContext: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").IndexMemberContext | null, import("./indexer.state.js").IndexMemberContext | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IndexMemberContext | null> | null, unknown>;
1027
+ evaluation: import("@langchain/langgraph").BaseChannel<{
1028
+ reasoning: string;
1029
+ indexScore: number;
1030
+ memberScore: number;
1031
+ } | null, {
1032
+ reasoning: string;
1033
+ indexScore: number;
1034
+ memberScore: number;
1035
+ } | import("@langchain/langgraph").OverwriteValue<{
1036
+ reasoning: string;
1037
+ indexScore: number;
1038
+ memberScore: number;
1039
+ } | null> | null, unknown>;
1040
+ shouldAssign: import("@langchain/langgraph").BaseChannel<boolean | undefined, boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined, unknown>;
1041
+ finalScore: import("@langchain/langgraph").BaseChannel<number | undefined, number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined, unknown>;
1042
+ assignmentResult: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").AssignmentResult | null, import("./indexer.state.js").AssignmentResult | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").AssignmentResult | null> | null, unknown>;
1043
+ queryUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
1044
+ readResult: import("@langchain/langgraph").BaseChannel<{
1045
+ links: Array<{
1046
+ intentId: string;
1047
+ networkId: string;
1048
+ intentTitle?: string;
1049
+ networkTitle?: string;
1050
+ userId?: string;
1051
+ userName?: string;
1052
+ createdAt?: Date;
1053
+ relevancyScore?: number | null;
1054
+ }>;
1055
+ count: number;
1056
+ mode: string;
1057
+ note?: string;
1058
+ } | undefined, {
1059
+ links: Array<{
1060
+ intentId: string;
1061
+ networkId: string;
1062
+ intentTitle?: string;
1063
+ networkTitle?: string;
1064
+ userId?: string;
1065
+ userName?: string;
1066
+ createdAt?: Date;
1067
+ relevancyScore?: number | null;
1068
+ }>;
1069
+ count: number;
1070
+ mode: string;
1071
+ note?: string;
1072
+ } | import("@langchain/langgraph").OverwriteValue<{
1073
+ links: Array<{
1074
+ intentId: string;
1075
+ networkId: string;
1076
+ intentTitle?: string;
1077
+ networkTitle?: string;
1078
+ userId?: string;
1079
+ userName?: string;
1080
+ createdAt?: Date;
1081
+ relevancyScore?: number | null;
1082
+ }>;
1083
+ count: number;
1084
+ mode: string;
1085
+ note?: string;
1086
+ } | undefined> | undefined, unknown>;
1087
+ mutationResult: import("@langchain/langgraph").BaseChannel<{
1088
+ success: boolean;
1089
+ message?: string;
1090
+ error?: string;
1091
+ } | undefined, {
1092
+ success: boolean;
1093
+ message?: string;
1094
+ error?: string;
1095
+ } | import("@langchain/langgraph").OverwriteValue<{
1096
+ success: boolean;
1097
+ message?: string;
1098
+ error?: string;
1099
+ } | undefined> | undefined, unknown>;
1100
+ error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
1101
+ agentTimings: import("@langchain/langgraph").BaseChannel<import("../chat/chat-streaming.types.js").DebugMetaAgent[], import("../chat/chat-streaming.types.js").DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<import("../chat/chat-streaming.types.js").DebugMetaAgent[]>, unknown>;
1102
+ }, {
1103
+ userId: {
1104
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
1105
+ (): import("@langchain/langgraph").LastValue<string>;
1106
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
1107
+ };
1108
+ networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
1109
+ intentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
1110
+ operationMode: import("@langchain/langgraph").BaseChannel<"create" | "delete" | "read", "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"create" | "delete" | "read">, unknown>;
1111
+ skipEvaluation: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
1112
+ intent: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").IntentForIndexing | null, import("./indexer.state.js").IntentForIndexing | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IntentForIndexing | null> | null, unknown>;
1113
+ indexContext: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").IndexMemberContext | null, import("./indexer.state.js").IndexMemberContext | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IndexMemberContext | null> | null, unknown>;
1114
+ evaluation: import("@langchain/langgraph").BaseChannel<{
1115
+ reasoning: string;
1116
+ indexScore: number;
1117
+ memberScore: number;
1118
+ } | null, {
1119
+ reasoning: string;
1120
+ indexScore: number;
1121
+ memberScore: number;
1122
+ } | import("@langchain/langgraph").OverwriteValue<{
1123
+ reasoning: string;
1124
+ indexScore: number;
1125
+ memberScore: number;
1126
+ } | null> | null, unknown>;
1127
+ shouldAssign: import("@langchain/langgraph").BaseChannel<boolean | undefined, boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined, unknown>;
1128
+ finalScore: import("@langchain/langgraph").BaseChannel<number | undefined, number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined, unknown>;
1129
+ assignmentResult: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").AssignmentResult | null, import("./indexer.state.js").AssignmentResult | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").AssignmentResult | null> | null, unknown>;
1130
+ queryUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
1131
+ readResult: import("@langchain/langgraph").BaseChannel<{
1132
+ links: Array<{
1133
+ intentId: string;
1134
+ networkId: string;
1135
+ intentTitle?: string;
1136
+ networkTitle?: string;
1137
+ userId?: string;
1138
+ userName?: string;
1139
+ createdAt?: Date;
1140
+ relevancyScore?: number | null;
1141
+ }>;
1142
+ count: number;
1143
+ mode: string;
1144
+ note?: string;
1145
+ } | undefined, {
1146
+ links: Array<{
1147
+ intentId: string;
1148
+ networkId: string;
1149
+ intentTitle?: string;
1150
+ networkTitle?: string;
1151
+ userId?: string;
1152
+ userName?: string;
1153
+ createdAt?: Date;
1154
+ relevancyScore?: number | null;
1155
+ }>;
1156
+ count: number;
1157
+ mode: string;
1158
+ note?: string;
1159
+ } | import("@langchain/langgraph").OverwriteValue<{
1160
+ links: Array<{
1161
+ intentId: string;
1162
+ networkId: string;
1163
+ intentTitle?: string;
1164
+ networkTitle?: string;
1165
+ userId?: string;
1166
+ userName?: string;
1167
+ createdAt?: Date;
1168
+ relevancyScore?: number | null;
1169
+ }>;
1170
+ count: number;
1171
+ mode: string;
1172
+ note?: string;
1173
+ } | undefined> | undefined, unknown>;
1174
+ mutationResult: import("@langchain/langgraph").BaseChannel<{
1175
+ success: boolean;
1176
+ message?: string;
1177
+ error?: string;
1178
+ } | undefined, {
1179
+ success: boolean;
1180
+ message?: string;
1181
+ error?: string;
1182
+ } | import("@langchain/langgraph").OverwriteValue<{
1183
+ success: boolean;
1184
+ message?: string;
1185
+ error?: string;
1186
+ } | undefined> | undefined, unknown>;
1187
+ error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
1188
+ agentTimings: import("@langchain/langgraph").BaseChannel<import("../chat/chat-streaming.types.js").DebugMetaAgent[], import("../chat/chat-streaming.types.js").DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<import("../chat/chat-streaming.types.js").DebugMetaAgent[]>, unknown>;
1189
+ }, import("@langchain/langgraph").StateDefinition, {
1190
+ assign: {
1191
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
1192
+ mutationResult: {
1193
+ success: boolean;
1194
+ error: string;
1195
+ message?: undefined;
1196
+ };
1197
+ evaluation?: undefined;
1198
+ shouldAssign?: undefined;
1199
+ finalScore?: undefined;
1200
+ } | {
1201
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
1202
+ mutationResult: {
1203
+ success: boolean;
1204
+ message: string;
1205
+ error?: undefined;
1206
+ };
1207
+ evaluation?: undefined;
1208
+ shouldAssign?: undefined;
1209
+ finalScore?: undefined;
1210
+ } | {
1211
+ assignmentResult: import("./indexer.state.js").AssignmentResult;
1212
+ mutationResult: {
1213
+ success: boolean;
1214
+ message: string;
1215
+ error?: undefined;
1216
+ };
1217
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
1218
+ evaluation?: undefined;
1219
+ shouldAssign?: undefined;
1220
+ finalScore?: undefined;
1221
+ } | {
1222
+ assignmentResult: import("./indexer.state.js").AssignmentResult;
1223
+ mutationResult: {
1224
+ success: boolean;
1225
+ error: string;
1226
+ message?: undefined;
1227
+ };
1228
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
1229
+ evaluation?: undefined;
1230
+ shouldAssign?: undefined;
1231
+ finalScore?: undefined;
1232
+ } | {
1233
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
1234
+ evaluation: null;
1235
+ shouldAssign: boolean;
1236
+ finalScore: number;
1237
+ mutationResult: {
1238
+ success: boolean;
1239
+ error: string;
1240
+ message?: undefined;
1241
+ };
1242
+ } | {
1243
+ assignmentResult: import("./indexer.state.js").AssignmentResult;
1244
+ mutationResult: {
1245
+ success: boolean;
1246
+ message: string;
1247
+ error?: undefined;
1248
+ };
1249
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
1250
+ evaluation: {
1251
+ reasoning: string;
1252
+ indexScore: number;
1253
+ memberScore: number;
1254
+ };
1255
+ shouldAssign: boolean;
1256
+ finalScore: number;
1257
+ } | {
1258
+ assignmentResult: import("./indexer.state.js").AssignmentResult;
1259
+ mutationResult: {
1260
+ success: boolean;
1261
+ error: string;
1262
+ message?: undefined;
1263
+ };
1264
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
1265
+ evaluation: {
1266
+ reasoning: string;
1267
+ indexScore: number;
1268
+ memberScore: number;
1269
+ };
1270
+ shouldAssign: boolean;
1271
+ finalScore: number;
1272
+ };
1273
+ read: {
1274
+ readResult: {
1275
+ links: never[];
1276
+ count: number;
1277
+ mode: string;
1278
+ note?: undefined;
1279
+ };
1280
+ error: string;
1281
+ } | {
1282
+ readResult: {
1283
+ links: {
1284
+ intentId: string;
1285
+ networkId: string;
1286
+ }[];
1287
+ count: number;
1288
+ mode: string;
1289
+ note: string;
1290
+ };
1291
+ error?: undefined;
1292
+ } | {
1293
+ error: string;
1294
+ readResult?: undefined;
1295
+ };
1296
+ unassign: {
1297
+ mutationResult: {
1298
+ success: boolean;
1299
+ error: string;
1300
+ message?: undefined;
1301
+ };
1302
+ } | {
1303
+ mutationResult: {
1304
+ success: boolean;
1305
+ message: string;
1306
+ error?: undefined;
1307
+ };
1308
+ };
1309
+ }, unknown, unknown, []>;
1310
+ /** Register the agent-facing community tools against a tool definer. */
1311
+ static createTools(defineTool: DefineTool, deps: NetworkToolDeps): readonly [any, any, any, any, any, any, any];
1312
+ /** The database, or the error naming the method that needed it. */
1313
+ private database;
1314
+ }