@indexnetwork/protocol 14.3.2-rc.477.1 → 16.1.1-rc.478.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.
- package/CHANGELOG.md +107 -0
- package/IMPLEMENTATION.md +50 -52
- package/STABILITY.md +3 -3
- package/dist/chat/chat.agent.js +2 -2
- package/dist/chat/chat.graph.d.ts +41 -1
- package/dist/chat/chat.graph.js +108 -127
- package/dist/discovery/hyde.frame.d.ts +4 -4
- package/dist/discovery/hyde.graph.d.ts +71 -12
- package/dist/discovery/hyde.graph.js +337 -335
- package/dist/discovery/lens.inferrer.d.ts +6 -6
- package/dist/enrichment/enrichment.graph.d.ts +127 -9
- package/dist/enrichment/enrichment.graph.js +633 -655
- package/dist/enrichment/enrichment.state.d.ts +1 -1
- package/dist/enrichment/enrichment.tools.context-read.d.ts +10 -0
- package/dist/enrichment/enrichment.tools.context-read.js +353 -0
- package/dist/enrichment/enrichment.tools.context-write.d.ts +9 -0
- package/dist/enrichment/enrichment.tools.context-write.js +417 -0
- package/dist/enrichment/enrichment.tools.d.ts +11 -1
- package/dist/enrichment/enrichment.tools.helpers.d.ts +139 -0
- package/dist/enrichment/enrichment.tools.helpers.js +234 -0
- package/dist/enrichment/enrichment.tools.js +16 -975
- package/dist/index.d.ts +27 -48
- package/dist/index.js +17 -27
- package/dist/intents/application/intent.graph.d.ts +71 -67
- package/dist/intents/application/intent.graph.execute.d.ts +59 -0
- package/dist/intents/application/intent.graph.execute.js +301 -0
- package/dist/intents/application/intent.graph.infer.d.ts +44 -0
- package/dist/intents/application/intent.graph.infer.js +97 -0
- package/dist/intents/application/intent.graph.js +96 -888
- package/dist/intents/application/intent.graph.reconcile.d.ts +71 -0
- package/dist/intents/application/intent.graph.reconcile.js +274 -0
- package/dist/intents/application/intent.graph.shared.d.ts +70 -0
- package/dist/intents/application/intent.graph.shared.js +153 -0
- package/dist/intents/domain/intent.state.d.ts +1 -1
- package/dist/maintenance/maintenance.graph.d.ts +66 -3
- package/dist/maintenance/maintenance.graph.js +155 -156
- package/dist/mcp/mcp.authorization-policy.d.ts +24 -28
- package/dist/mcp/mcp.authorization-policy.js +14 -34
- package/dist/mcp/mcp.server.d.ts +3 -3
- package/dist/mcp/mcp.server.js +12 -16
- package/dist/negotiations/application/negotiation.candidates.d.ts +83 -0
- package/dist/negotiations/application/negotiation.candidates.js +162 -0
- package/dist/negotiations/application/negotiation.graph.d.ts +91 -157
- package/dist/negotiations/application/negotiation.graph.finalize.d.ts +5 -0
- package/dist/negotiations/application/negotiation.graph.finalize.js +280 -0
- package/dist/negotiations/application/negotiation.graph.init.d.ts +54 -0
- package/dist/negotiations/application/negotiation.graph.init.js +227 -0
- package/dist/negotiations/application/negotiation.graph.js +69 -1388
- package/dist/negotiations/application/negotiation.graph.screen.d.ts +23 -0
- package/dist/negotiations/application/negotiation.graph.screen.js +108 -0
- package/dist/negotiations/application/negotiation.graph.shared.d.ts +75 -0
- package/dist/negotiations/application/negotiation.graph.shared.js +125 -0
- package/dist/negotiations/application/negotiation.graph.turn.d.ts +105 -0
- package/dist/negotiations/application/negotiation.graph.turn.js +484 -0
- package/dist/negotiations/domain/negotiation.state.d.ts +1 -1
- package/dist/negotiations/domain/negotiation.state.js +0 -1
- package/dist/networks/application/indexer.graph.d.ts +165 -7
- package/dist/networks/application/indexer.graph.js +339 -388
- package/dist/networks/application/indexer.state.d.ts +1 -1
- package/dist/networks/application/membership.graph.d.ts +83 -5
- package/dist/networks/application/membership.graph.js +177 -207
- package/dist/networks/application/network.graph.d.ts +148 -5
- package/dist/networks/application/network.graph.js +249 -278
- package/dist/networks/domain/membership.state.d.ts +1 -1
- package/dist/networks/domain/network.state.d.ts +1 -1
- package/dist/opportunities/application/delivery-card.cache.d.ts +1 -1
- package/dist/opportunities/application/delivery-card.cache.js +2 -2
- package/dist/opportunities/application/index.d.ts +2 -2
- package/dist/opportunities/application/index.js +2 -2
- package/dist/opportunities/application/opportunity.evaluator.js +1 -1
- package/dist/opportunities/application/opportunity.graph.d.ts +686 -473
- package/dist/opportunities/application/opportunity.graph.discovery-strategies.d.ts +109 -0
- package/dist/opportunities/application/opportunity.graph.discovery-strategies.js +451 -0
- package/dist/opportunities/application/opportunity.graph.discovery.d.ts +69 -0
- package/dist/opportunities/application/opportunity.graph.discovery.js +397 -0
- package/dist/opportunities/application/opportunity.graph.evaluation.d.ts +82 -0
- package/dist/opportunities/application/opportunity.graph.evaluation.js +608 -0
- package/dist/opportunities/application/opportunity.graph.js +120 -3690
- package/dist/opportunities/application/opportunity.graph.modes.d.ts +538 -0
- package/dist/opportunities/application/opportunity.graph.modes.js +538 -0
- package/dist/opportunities/application/opportunity.graph.negotiate.d.ts +109 -0
- package/dist/opportunities/application/opportunity.graph.negotiate.js +392 -0
- package/dist/opportunities/application/opportunity.graph.persist-node.d.ts +93 -0
- package/dist/opportunities/application/opportunity.graph.persist-node.js +765 -0
- package/dist/opportunities/application/opportunity.graph.prep.d.ts +150 -0
- package/dist/opportunities/application/opportunity.graph.prep.js +381 -0
- package/dist/opportunities/application/opportunity.graph.shared.d.ts +173 -0
- package/dist/opportunities/application/opportunity.graph.shared.js +199 -0
- package/dist/opportunities/application/opportunity.presentation.d.ts +399 -0
- package/dist/opportunities/application/{opportunity.presenter.js → opportunity.presentation.js} +735 -9
- package/dist/opportunities/application/opportunity.tools.cards.d.ts +152 -0
- package/dist/opportunities/application/opportunity.tools.cards.js +235 -0
- package/dist/opportunities/application/opportunity.tools.d.ts +8 -114
- package/dist/opportunities/application/opportunity.tools.js +28 -711
- package/dist/opportunities/application/opportunity.tools.list.d.ts +10 -0
- package/dist/opportunities/application/opportunity.tools.list.js +493 -0
- package/dist/opportunities/domain/index.d.ts +3 -3
- package/dist/opportunities/domain/index.js +3 -3
- package/dist/opportunities/domain/opportunity.state.d.ts +19 -19
- package/dist/opportunities/index.d.ts +6 -6
- package/dist/opportunities/index.js +4 -4
- package/dist/opportunities/ports/opportunity.tools.port.d.ts +1 -1
- package/dist/opportunities/radar/radar.graph.d.ts +57 -13
- package/dist/opportunities/radar/radar.graph.js +470 -471
- package/dist/premises/premise.graph.d.ts +88 -20
- package/dist/premises/premise.graph.js +207 -218
- package/dist/questions/domain/question.schema.d.ts +40 -40
- package/dist/shared/agent/tool.helpers.d.ts +21 -0
- package/dist/shared/agent/tool.registry.d.ts +4 -3
- package/dist/shared/agent/tool.registry.js +1 -1
- package/dist/shared/interfaces/database.capabilities.d.ts +100 -0
- package/dist/shared/interfaces/database.capabilities.js +7 -0
- package/dist/shared/interfaces/database.entities.d.ts +533 -0
- package/dist/shared/interfaces/database.entities.js +10 -0
- package/dist/shared/interfaces/database.identity-queries.d.ts +294 -0
- package/dist/shared/interfaces/database.identity-queries.js +4 -0
- package/dist/shared/interfaces/database.interface.d.ts +15 -2277
- package/dist/shared/interfaces/database.interface.js +8 -0
- package/dist/shared/interfaces/database.member-queries.d.ts +228 -0
- package/dist/shared/interfaces/database.member-queries.js +4 -0
- package/dist/shared/interfaces/database.negotiation.d.ts +305 -0
- package/dist/shared/interfaces/database.negotiation.js +26 -0
- package/dist/shared/interfaces/database.network-queries.d.ts +277 -0
- package/dist/shared/interfaces/database.network-queries.js +4 -0
- package/dist/shared/interfaces/database.opportunity-queries.d.ts +285 -0
- package/dist/shared/interfaces/database.opportunity-queries.js +4 -0
- package/dist/shared/interfaces/database.port.d.ts +322 -0
- package/dist/shared/interfaces/database.port.js +29 -0
- package/dist/shared/schemas/discovery-question.schema.d.ts +14 -14
- package/dist/shared/schemas/negotiation-digest.schema.d.ts +2 -2
- package/package.json +2 -15
- package/dist/opportunities/application/opportunity.card-presentation.d.ts +0 -44
- package/dist/opportunities/application/opportunity.card-presentation.js +0 -93
- package/dist/opportunities/application/opportunity.presenter.d.ts +0 -156
- package/dist/opportunities/domain/opportunity.presentation-cache.d.ts +0 -5
- package/dist/opportunities/domain/opportunity.presentation-cache.js +0 -11
- package/dist/opportunities/domain/opportunity.presentation.d.ts +0 -76
- package/dist/opportunities/domain/opportunity.presentation.js +0 -516
- package/dist/opportunities/domain/opportunity.safe-presentation.d.ts +0 -104
- package/dist/opportunities/domain/opportunity.safe-presentation.js +0 -102
|
@@ -75,11 +75,11 @@ export declare const FrameResponseSchema: z.ZodObject<{
|
|
|
75
75
|
evidence: z.ZodString;
|
|
76
76
|
}, "strip", z.ZodTypeAny, {
|
|
77
77
|
name: string;
|
|
78
|
-
type: "location" | "
|
|
78
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
79
79
|
evidence: string;
|
|
80
80
|
}, {
|
|
81
81
|
name: string;
|
|
82
|
-
type: "location" | "
|
|
82
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
83
83
|
evidence: string;
|
|
84
84
|
}>, "many">;
|
|
85
85
|
domainVocabulary: z.ZodArray<z.ZodObject<{
|
|
@@ -108,7 +108,7 @@ export declare const FrameResponseSchema: z.ZodObject<{
|
|
|
108
108
|
}[];
|
|
109
109
|
namedEntities: {
|
|
110
110
|
name: string;
|
|
111
|
-
type: "location" | "
|
|
111
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
112
112
|
evidence: string;
|
|
113
113
|
}[];
|
|
114
114
|
domainVocabulary: {
|
|
@@ -131,7 +131,7 @@ export declare const FrameResponseSchema: z.ZodObject<{
|
|
|
131
131
|
}[];
|
|
132
132
|
namedEntities: {
|
|
133
133
|
name: string;
|
|
134
|
-
type: "location" | "
|
|
134
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
135
135
|
evidence: string;
|
|
136
136
|
}[];
|
|
137
137
|
domainVocabulary: {
|
|
@@ -156,7 +156,7 @@ export declare const FrameResponseSchema: z.ZodObject<{
|
|
|
156
156
|
}[];
|
|
157
157
|
namedEntities: {
|
|
158
158
|
name: string;
|
|
159
|
-
type: "location" | "
|
|
159
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
160
160
|
evidence: string;
|
|
161
161
|
}[];
|
|
162
162
|
domainVocabulary: {
|
|
@@ -181,7 +181,7 @@ export declare const FrameResponseSchema: z.ZodObject<{
|
|
|
181
181
|
}[];
|
|
182
182
|
namedEntities: {
|
|
183
183
|
name: string;
|
|
184
|
-
type: "location" | "
|
|
184
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
185
185
|
evidence: string;
|
|
186
186
|
}[];
|
|
187
187
|
domainVocabulary: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { EnrichmentGraphState } from "./enrichment.state.js";
|
|
1
2
|
import { EnrichmentGraphDatabase, PremiseProvenance } from "../shared/interfaces/database.interface.js";
|
|
2
3
|
import { Scraper } from "../shared/interfaces/scraper.interface.js";
|
|
3
4
|
import type { ProfileEnricher } from "../shared/interfaces/enrichment.interface.js";
|
|
4
5
|
import type { DebugMetaAgent } from "../agents/index.js";
|
|
6
|
+
import { PremiseDecomposer } from "../premises/premise.decomposer.js";
|
|
5
7
|
/**
|
|
6
8
|
* Compiled premise graph interface. Matches the invoke signature of a compiled LangGraph.
|
|
7
9
|
* Accepted as an optional dependency so write-mode input can be decomposed into premises.
|
|
@@ -46,15 +48,24 @@ export interface CompiledPremiseGraph {
|
|
|
46
48
|
* - Read/Write separation (query vs write)
|
|
47
49
|
* - Conditional generation (skip generation if profile already exists)
|
|
48
50
|
*/
|
|
51
|
+
/** The graph's channel state, as every node sees it. */
|
|
52
|
+
export type EnrichmentState = typeof EnrichmentGraphState.State;
|
|
53
|
+
/** Everything the enrichment nodes reach for. */
|
|
54
|
+
export interface EnrichmentGraphDeps {
|
|
55
|
+
database: EnrichmentGraphDatabase;
|
|
56
|
+
scraper: Scraper;
|
|
57
|
+
enricher?: ProfileEnricher;
|
|
58
|
+
premiseGraph?: CompiledPremiseGraph;
|
|
59
|
+
/** Splits enrichment prose into premises. */
|
|
60
|
+
premiseDecomposer: PremiseDecomposer;
|
|
61
|
+
}
|
|
49
62
|
export declare class EnrichmentGraphFactory {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
private premiseGraph?;
|
|
54
|
-
constructor(database: EnrichmentGraphDatabase, scraper: Scraper, enricher?: ProfileEnricher | undefined, premiseGraph?: CompiledPremiseGraph | undefined);
|
|
63
|
+
/** Resolved dependency bag shared by every node. */
|
|
64
|
+
readonly deps: EnrichmentGraphDeps;
|
|
65
|
+
constructor(database: EnrichmentGraphDatabase, scraper: Scraper, enricher?: ProfileEnricher, premiseGraph?: CompiledPremiseGraph);
|
|
55
66
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
56
67
|
userId: string;
|
|
57
|
-
operationMode: "query" | "
|
|
68
|
+
operationMode: "query" | "generate" | "write";
|
|
58
69
|
forceUpdate: boolean;
|
|
59
70
|
objective: string | undefined;
|
|
60
71
|
input: string | undefined;
|
|
@@ -91,7 +102,7 @@ export declare class EnrichmentGraphFactory {
|
|
|
91
102
|
} | undefined;
|
|
92
103
|
}, {
|
|
93
104
|
userId?: string | undefined;
|
|
94
|
-
operationMode?: "query" | "
|
|
105
|
+
operationMode?: "query" | "generate" | "write" | import("@langchain/langgraph").OverwriteValue<"query" | "generate" | "write"> | undefined;
|
|
95
106
|
forceUpdate?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
|
|
96
107
|
objective?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
97
108
|
input?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
@@ -154,7 +165,7 @@ export declare class EnrichmentGraphFactory {
|
|
|
154
165
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
155
166
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
156
167
|
};
|
|
157
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"query" | "
|
|
168
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"query" | "generate" | "write", "query" | "generate" | "write" | import("@langchain/langgraph").OverwriteValue<"query" | "generate" | "write">, unknown>;
|
|
158
169
|
forceUpdate: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
159
170
|
objective: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
160
171
|
input: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
@@ -239,7 +250,7 @@ export declare class EnrichmentGraphFactory {
|
|
|
239
250
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
240
251
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
241
252
|
};
|
|
242
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"query" | "
|
|
253
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"query" | "generate" | "write", "query" | "generate" | "write" | import("@langchain/langgraph").OverwriteValue<"query" | "generate" | "write">, unknown>;
|
|
243
254
|
forceUpdate: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
244
255
|
objective: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
245
256
|
input: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
@@ -424,3 +435,110 @@ export declare class EnrichmentGraphFactory {
|
|
|
424
435
|
};
|
|
425
436
|
}, unknown, unknown, []>;
|
|
426
437
|
}
|
|
438
|
+
export declare function checkStateNode(state: EnrichmentState, deps: EnrichmentGraphDeps): Promise<{
|
|
439
|
+
error: string;
|
|
440
|
+
profile?: undefined;
|
|
441
|
+
readResult?: undefined;
|
|
442
|
+
needsProfileGeneration?: undefined;
|
|
443
|
+
needsUserInfo?: undefined;
|
|
444
|
+
missingUserInfo?: undefined;
|
|
445
|
+
} | {
|
|
446
|
+
profile: any;
|
|
447
|
+
readResult: {
|
|
448
|
+
hasProfile: boolean;
|
|
449
|
+
profile: {
|
|
450
|
+
id: string | undefined;
|
|
451
|
+
name: any;
|
|
452
|
+
bio: any;
|
|
453
|
+
location: any;
|
|
454
|
+
};
|
|
455
|
+
message?: undefined;
|
|
456
|
+
} | {
|
|
457
|
+
hasProfile: boolean;
|
|
458
|
+
message: string;
|
|
459
|
+
profile?: undefined;
|
|
460
|
+
};
|
|
461
|
+
error?: undefined;
|
|
462
|
+
needsProfileGeneration?: undefined;
|
|
463
|
+
needsUserInfo?: undefined;
|
|
464
|
+
missingUserInfo?: undefined;
|
|
465
|
+
} | {
|
|
466
|
+
profile: any;
|
|
467
|
+
needsProfileGeneration: boolean;
|
|
468
|
+
needsUserInfo: boolean;
|
|
469
|
+
missingUserInfo: string[];
|
|
470
|
+
error?: undefined;
|
|
471
|
+
readResult?: undefined;
|
|
472
|
+
} | {
|
|
473
|
+
profile: undefined;
|
|
474
|
+
error: string;
|
|
475
|
+
readResult?: undefined;
|
|
476
|
+
needsProfileGeneration?: undefined;
|
|
477
|
+
needsUserInfo?: undefined;
|
|
478
|
+
missingUserInfo?: undefined;
|
|
479
|
+
}>;
|
|
480
|
+
export declare function scrapeNode(state: EnrichmentState, deps: EnrichmentGraphDeps): Promise<{
|
|
481
|
+
error?: undefined;
|
|
482
|
+
objective?: undefined;
|
|
483
|
+
input?: undefined;
|
|
484
|
+
activeSocialIds?: undefined;
|
|
485
|
+
operationsPerformed?: undefined;
|
|
486
|
+
} | {
|
|
487
|
+
error: string;
|
|
488
|
+
objective?: undefined;
|
|
489
|
+
input?: undefined;
|
|
490
|
+
activeSocialIds?: undefined;
|
|
491
|
+
operationsPerformed?: undefined;
|
|
492
|
+
} | {
|
|
493
|
+
objective: string;
|
|
494
|
+
input: string;
|
|
495
|
+
activeSocialIds: string[];
|
|
496
|
+
operationsPerformed: {
|
|
497
|
+
scraped: boolean;
|
|
498
|
+
};
|
|
499
|
+
error?: undefined;
|
|
500
|
+
}>;
|
|
501
|
+
export declare function autoGenerateNode(state: EnrichmentState, deps: EnrichmentGraphDeps): Promise<{
|
|
502
|
+
error: string;
|
|
503
|
+
input?: undefined;
|
|
504
|
+
needsUserInfo?: undefined;
|
|
505
|
+
needsProfileGeneration?: undefined;
|
|
506
|
+
operationsPerformed?: undefined;
|
|
507
|
+
forceUpdate?: undefined;
|
|
508
|
+
activeSocialIds?: undefined;
|
|
509
|
+
} | {
|
|
510
|
+
input: string;
|
|
511
|
+
needsUserInfo: boolean;
|
|
512
|
+
needsProfileGeneration: boolean;
|
|
513
|
+
operationsPerformed: {
|
|
514
|
+
scraped: boolean;
|
|
515
|
+
};
|
|
516
|
+
error?: undefined;
|
|
517
|
+
forceUpdate?: undefined;
|
|
518
|
+
activeSocialIds?: undefined;
|
|
519
|
+
} | {
|
|
520
|
+
input: string;
|
|
521
|
+
needsUserInfo: boolean;
|
|
522
|
+
needsProfileGeneration: boolean;
|
|
523
|
+
forceUpdate: boolean;
|
|
524
|
+
activeSocialIds: string[];
|
|
525
|
+
operationsPerformed: {
|
|
526
|
+
scraped: boolean;
|
|
527
|
+
};
|
|
528
|
+
error?: undefined;
|
|
529
|
+
}>;
|
|
530
|
+
export declare function decomposePremisesNode(state: EnrichmentState, deps: EnrichmentGraphDeps): Promise<{
|
|
531
|
+
error: string;
|
|
532
|
+
} | {
|
|
533
|
+
error?: undefined;
|
|
534
|
+
} | {
|
|
535
|
+
operationsPerformed?: {
|
|
536
|
+
decomposedPremises: boolean;
|
|
537
|
+
} | undefined;
|
|
538
|
+
agentTimings: DebugMetaAgent[];
|
|
539
|
+
error?: undefined;
|
|
540
|
+
}>;
|
|
541
|
+
/**
|
|
542
|
+
* Route from check_state to next step based on operation mode and detected needs.
|
|
543
|
+
*/
|
|
544
|
+
export declare function checkStateCondition(state: EnrichmentState, deps: EnrichmentGraphDeps): string;
|