@indexnetwork/protocol 14.3.2-rc.477.1 → 17.0.0-rc.479.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 +141 -0
- package/IMPLEMENTATION.md +50 -52
- package/STABILITY.md +3 -3
- package/dist/chat/chat.agent.js +2 -3
- package/dist/chat/chat.graph.d.ts +41 -1
- package/dist/chat/chat.graph.js +108 -127
- package/dist/chat/negotiator.persona.d.ts +1 -1
- package/dist/chat/negotiator.persona.js +1 -4
- package/dist/chat/negotiator.prompt.js +1 -2
- package/dist/chat/onboarding.persona.js +0 -1
- package/dist/chat/reporter.persona.js +0 -1
- package/dist/chat/signal.persona.js +0 -1
- package/dist/contacts/application/contact.tools.d.ts +6 -9
- package/dist/contacts/application/contact.tools.js +11 -92
- package/dist/contacts/application/index.d.ts +2 -14
- package/dist/contacts/application/index.js +2 -13
- package/dist/contacts/domain/contact.types.d.ts +0 -23
- package/dist/contacts/domain/index.d.ts +2 -6
- package/dist/contacts/index.d.ts +1 -1
- package/dist/contacts/index.js +1 -1
- package/dist/contacts/ports/contact.repository.port.d.ts +5 -12
- package/dist/contacts/ports/contact.repository.port.js +4 -6
- package/dist/contacts/ports/contact.tools.port.d.ts +1 -3
- package/dist/contacts/ports/contact.tools.port.js +1 -2
- package/dist/contacts/ports/index.d.ts +1 -1
- package/dist/contacts/ports/index.js +1 -1
- 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 -50
- package/dist/index.js +17 -28
- 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 +14 -20
- 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.factory.js +0 -8
- package/dist/shared/agent/tool.helpers.d.ts +21 -45
- package/dist/shared/agent/tool.helpers.js +1 -2
- package/dist/shared/agent/tool.registry.d.ts +4 -3
- package/dist/shared/agent/tool.registry.js +2 -4
- package/dist/shared/agent/tool.runtime.js +0 -2
- package/dist/shared/agent/utility.tools.js +9 -13
- 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 +221 -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/contacts/application/contact.inviter.d.ts +0 -49
- package/dist/contacts/application/contact.inviter.js +0 -64
- package/dist/integrations/application/index.d.ts +0 -14
- package/dist/integrations/application/index.js +0 -14
- package/dist/integrations/application/integration.tools.d.ts +0 -27
- package/dist/integrations/application/integration.tools.js +0 -98
- package/dist/integrations/domain/index.d.ts +0 -16
- package/dist/integrations/domain/index.js +0 -1
- package/dist/integrations/domain/integration.types.d.ts +0 -51
- package/dist/integrations/domain/integration.types.js +0 -9
- package/dist/integrations/index.d.ts +0 -10
- package/dist/integrations/index.js +0 -8
- package/dist/integrations/ports/index.d.ts +0 -25
- package/dist/integrations/ports/index.js +0 -23
- package/dist/integrations/ports/integration.adapter.port.d.ts +0 -62
- package/dist/integrations/ports/integration.adapter.port.js +0 -15
- package/dist/integrations/ports/integration.importer.port.d.ts +0 -31
- package/dist/integrations/ports/integration.importer.port.js +0 -15
- package/dist/integrations/ports/integration.tools.port.d.ts +0 -25
- package/dist/integrations/ports/integration.tools.port.js +0 -18
- 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
|
@@ -4,25 +4,18 @@
|
|
|
4
4
|
* Injected boundary for contact management persistence. Implemented by
|
|
5
5
|
* the host application and passed into the protocol layer at the composition root.
|
|
6
6
|
*
|
|
7
|
-
* Retains participant reachability semantics:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* IND-549: extracted from shared/interfaces/contact.interface.ts into the
|
|
12
|
-
* contacts capability's dedicated ports layer.
|
|
7
|
+
* Retains participant reachability semantics: listContacts, removeContact,
|
|
8
|
+
* and searchContacts scope all operations to the owning user's personal
|
|
9
|
+
* network. Contact rows are created by the opportunity accept / start-chat
|
|
10
|
+
* flow, not through this port.
|
|
13
11
|
*/
|
|
14
|
-
import type {
|
|
12
|
+
import type { ContactEntry, ContactSearchResult } from "../domain/index.js";
|
|
15
13
|
/**
|
|
16
14
|
* Contact management operations used by chat tools.
|
|
17
15
|
* Consumers must provide a concrete implementation (e.g. backed by ContactService).
|
|
18
16
|
*/
|
|
19
17
|
export interface ContactServiceAdapter {
|
|
20
|
-
importContacts(ownerId: string, contacts: ContactInput[]): Promise<ContactImportResult>;
|
|
21
18
|
listContacts(ownerId: string): Promise<ContactEntry[]>;
|
|
22
|
-
addContact(ownerId: string, email: string, options?: {
|
|
23
|
-
name?: string;
|
|
24
|
-
restore?: boolean;
|
|
25
|
-
}): Promise<ContactResult>;
|
|
26
19
|
removeContact(ownerId: string, contactUserId: string): Promise<void>;
|
|
27
20
|
searchContacts(ownerId: string, q: string, limit?: number): Promise<ContactSearchResult[]>;
|
|
28
21
|
}
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
* Injected boundary for contact management persistence. Implemented by
|
|
5
5
|
* the host application and passed into the protocol layer at the composition root.
|
|
6
6
|
*
|
|
7
|
-
* Retains participant reachability semantics:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* IND-549: extracted from shared/interfaces/contact.interface.ts into the
|
|
12
|
-
* contacts capability's dedicated ports layer.
|
|
7
|
+
* Retains participant reachability semantics: listContacts, removeContact,
|
|
8
|
+
* and searchContacts scope all operations to the owning user's personal
|
|
9
|
+
* network. Contact rows are created by the opportunity accept / start-chat
|
|
10
|
+
* flow, not through this port.
|
|
13
11
|
*/
|
|
14
12
|
export {};
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* contacts/ports — ContactToolDeps tool host port.
|
|
3
3
|
*
|
|
4
4
|
* Narrow port type consumed by createContactTools. The host provides a
|
|
5
|
-
* ContactServiceAdapter
|
|
6
|
-
* write-path tools (import_contacts, add_contact).
|
|
5
|
+
* ContactServiceAdapter.
|
|
7
6
|
*
|
|
8
7
|
* NOTE: This type is intentionally defined inline rather than derived from
|
|
9
8
|
* ToolRegistryCompositionDeps, keeping the capability port independent from
|
|
@@ -19,5 +18,4 @@ import type { ContactServiceAdapter } from "./contact.repository.port.js";
|
|
|
19
18
|
/** Host capabilities consumed by contact tools. */
|
|
20
19
|
export type ContactToolDeps = {
|
|
21
20
|
contactService: ContactServiceAdapter;
|
|
22
|
-
contactsEnabled?: boolean;
|
|
23
21
|
};
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* contacts/ports — ContactToolDeps tool host port.
|
|
3
3
|
*
|
|
4
4
|
* Narrow port type consumed by createContactTools. The host provides a
|
|
5
|
-
* ContactServiceAdapter
|
|
6
|
-
* write-path tools (import_contacts, add_contact).
|
|
5
|
+
* ContactServiceAdapter.
|
|
7
6
|
*
|
|
8
7
|
* NOTE: This type is intentionally defined inline rather than derived from
|
|
9
8
|
* ToolRegistryCompositionDeps, keeping the capability port independent from
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* ## Port groups
|
|
9
9
|
*
|
|
10
10
|
* ### Persistence port
|
|
11
|
-
* - ContactServiceAdapter — contact
|
|
11
|
+
* - ContactServiceAdapter — contact reads and removal: list, remove, search.
|
|
12
12
|
*
|
|
13
13
|
* ### Tool host port
|
|
14
14
|
* - ContactToolDeps — host capabilities for contact management tools.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* ## Port groups
|
|
9
9
|
*
|
|
10
10
|
* ### Persistence port
|
|
11
|
-
* - ContactServiceAdapter — contact
|
|
11
|
+
* - ContactServiceAdapter — contact reads and removal: list, remove, search.
|
|
12
12
|
*
|
|
13
13
|
* ### Tool host port
|
|
14
14
|
* - ContactToolDeps — host capabilities for contact management tools.
|
|
@@ -78,11 +78,11 @@ export declare const HydeSourceFrameSchema: z.ZodObject<{
|
|
|
78
78
|
evidence: z.ZodString;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
80
|
name: string;
|
|
81
|
-
type: "location" | "
|
|
81
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
82
82
|
evidence: string;
|
|
83
83
|
}, {
|
|
84
84
|
name: string;
|
|
85
|
-
type: "location" | "
|
|
85
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
86
86
|
evidence: string;
|
|
87
87
|
}>, "many">;
|
|
88
88
|
domainVocabulary: z.ZodArray<z.ZodObject<{
|
|
@@ -111,7 +111,7 @@ export declare const HydeSourceFrameSchema: z.ZodObject<{
|
|
|
111
111
|
}[];
|
|
112
112
|
namedEntities: {
|
|
113
113
|
name: string;
|
|
114
|
-
type: "location" | "
|
|
114
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
115
115
|
evidence: string;
|
|
116
116
|
}[];
|
|
117
117
|
domainVocabulary: {
|
|
@@ -134,7 +134,7 @@ export declare const HydeSourceFrameSchema: z.ZodObject<{
|
|
|
134
134
|
}[];
|
|
135
135
|
namedEntities: {
|
|
136
136
|
name: string;
|
|
137
|
-
type: "location" | "
|
|
137
|
+
type: "location" | "event" | "organization" | "other" | "person" | "product";
|
|
138
138
|
evidence: string;
|
|
139
139
|
}[];
|
|
140
140
|
domainVocabulary: {
|
|
@@ -5,7 +5,7 @@ import type { EmbeddingGenerator } from '../shared/interfaces/embedder.interface
|
|
|
5
5
|
import { type HydeGenerationMode } from './hyde.env.js';
|
|
6
6
|
import { type HydeSourceFrame } from './hyde.frame.js';
|
|
7
7
|
import type { HydeGenerateInput, HydeGeneratorOutput } from './hyde.generator.js';
|
|
8
|
-
import { type HydeDocumentState } from './hyde.state.js';
|
|
8
|
+
import { HydeGraphState, type HydeDocumentState } from './hyde.state.js';
|
|
9
9
|
import type { LensInferenceInput, LensInferenceOutput } from './lens.inferrer.js';
|
|
10
10
|
import { type HydeValidationInput, type HydeValidationOutput } from './hyde.validator.js';
|
|
11
11
|
/** Narrow lens inferrer contract accepted by the graph. */
|
|
@@ -25,18 +25,29 @@ export interface HydeGraphOptions {
|
|
|
25
25
|
mode?: HydeGenerationMode;
|
|
26
26
|
validator?: HydeValidatorLike;
|
|
27
27
|
}
|
|
28
|
+
/** The graph's channel state, as every node sees it. */
|
|
29
|
+
export type HydeState = typeof HydeGraphState.State;
|
|
30
|
+
/** Everything the HyDE nodes reach for. */
|
|
31
|
+
export interface HydeGraphDeps {
|
|
32
|
+
database: HydeGraphDatabase;
|
|
33
|
+
embedder: EmbeddingGenerator;
|
|
34
|
+
cache: HydeCache;
|
|
35
|
+
inferrer: HydeLensInferrerLike;
|
|
36
|
+
generator: HydeGeneratorLike;
|
|
37
|
+
options: HydeGraphOptions;
|
|
38
|
+
/** Resolved generation mode; decides whether the validate stage runs. */
|
|
39
|
+
mode: HydeGenerationMode;
|
|
40
|
+
/** Present only in frame-generation mode. */
|
|
41
|
+
validator?: HydeValidatorLike;
|
|
42
|
+
}
|
|
28
43
|
/** Factory for the HyDE generation graph. Existing five-argument calls remain valid. */
|
|
29
44
|
export declare class HydeGraphFactory {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
private cache;
|
|
33
|
-
private inferrer;
|
|
34
|
-
private generator;
|
|
35
|
-
private options;
|
|
45
|
+
/** Resolved dependency bag shared by every node. */
|
|
46
|
+
readonly deps: HydeGraphDeps;
|
|
36
47
|
constructor(database: HydeGraphDatabase, embedder: EmbeddingGenerator, cache: HydeCache, inferrer: HydeLensInferrerLike, generator: HydeGeneratorLike, options?: HydeGraphOptions);
|
|
37
48
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
38
49
|
sourceType: "intent" | "context" | "query";
|
|
39
|
-
sourceId: import("../shared/interfaces/database.
|
|
50
|
+
sourceId: import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | undefined;
|
|
40
51
|
sourceText: string;
|
|
41
52
|
profileContext: string | undefined;
|
|
42
53
|
maxLenses: number;
|
|
@@ -52,7 +63,7 @@ export declare class HydeGraphFactory {
|
|
|
52
63
|
agentTimings: DebugMetaAgent[];
|
|
53
64
|
}, {
|
|
54
65
|
sourceType?: "intent" | "context" | "query" | undefined;
|
|
55
|
-
sourceId?: import("../shared/interfaces/database.
|
|
66
|
+
sourceId?: import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | undefined> | undefined;
|
|
56
67
|
sourceText?: string | undefined;
|
|
57
68
|
profileContext?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
58
69
|
maxLenses?: number | import("@langchain/langgraph").OverwriteValue<number> | undefined;
|
|
@@ -66,13 +77,13 @@ export declare class HydeGraphFactory {
|
|
|
66
77
|
hydeEmbeddings?: Record<string, number[]> | import("@langchain/langgraph").OverwriteValue<Record<string, number[]>> | undefined;
|
|
67
78
|
error?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
68
79
|
agentTimings?: DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]> | undefined;
|
|
69
|
-
}, "__start__" | "
|
|
80
|
+
}, "__start__" | "embed" | "infer_lenses" | "check_cache" | "generate_missing" | "cache_results", {
|
|
70
81
|
sourceType: {
|
|
71
82
|
(annotation: import("@langchain/langgraph").SingleReducer<"intent" | "context" | "query", "intent" | "context" | "query">): import("@langchain/langgraph").BaseChannel<"intent" | "context" | "query", "intent" | "context" | "query" | import("@langchain/langgraph").OverwriteValue<"intent" | "context" | "query">, unknown>;
|
|
72
83
|
(): import("@langchain/langgraph").LastValue<"intent" | "context" | "query">;
|
|
73
84
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
74
85
|
};
|
|
75
|
-
sourceId: import("@langchain/langgraph").BaseChannel<import("../shared/interfaces/database.
|
|
86
|
+
sourceId: import("@langchain/langgraph").BaseChannel<import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | undefined, import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | undefined> | undefined, unknown>;
|
|
76
87
|
sourceText: {
|
|
77
88
|
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
78
89
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
@@ -96,7 +107,7 @@ export declare class HydeGraphFactory {
|
|
|
96
107
|
(): import("@langchain/langgraph").LastValue<"intent" | "context" | "query">;
|
|
97
108
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
98
109
|
};
|
|
99
|
-
sourceId: import("@langchain/langgraph").BaseChannel<import("../shared/interfaces/database.
|
|
110
|
+
sourceId: import("@langchain/langgraph").BaseChannel<import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | undefined, import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("../shared/interfaces/database.entities.js").Id<"users"> | import("../shared/interfaces/database.entities.js").Id<"intents"> | undefined> | undefined, unknown>;
|
|
100
111
|
sourceText: {
|
|
101
112
|
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
102
113
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
@@ -148,3 +159,51 @@ export declare class HydeGraphFactory {
|
|
|
148
159
|
cache_results: {};
|
|
149
160
|
}, unknown, unknown, []>;
|
|
150
161
|
}
|
|
162
|
+
/** Node 1: Infer lenses from source text + optional profile context. */
|
|
163
|
+
export declare function inferLensesNode(state: HydeState, deps: HydeGraphDeps): Promise<{
|
|
164
|
+
lenses: import("./lens.inferrer.js").Lens[];
|
|
165
|
+
sourceFrame: HydeSourceFrame;
|
|
166
|
+
frameFingerprint: string;
|
|
167
|
+
sourceTextHash: string;
|
|
168
|
+
generatedAt: string;
|
|
169
|
+
agentTimings: DebugMetaAgent[];
|
|
170
|
+
} | {
|
|
171
|
+
lenses: import("./lens.inferrer.js").Lens[];
|
|
172
|
+
agentTimings: DebugMetaAgent[];
|
|
173
|
+
sourceFrame?: undefined;
|
|
174
|
+
frameFingerprint?: undefined;
|
|
175
|
+
sourceTextHash?: undefined;
|
|
176
|
+
generatedAt?: undefined;
|
|
177
|
+
}>;
|
|
178
|
+
/** Node 2: Check the mode-isolated cache/DB for matching documents. */
|
|
179
|
+
export declare function checkCacheNode(state: HydeState, deps: HydeGraphDeps): Promise<{
|
|
180
|
+
hydeDocuments: {
|
|
181
|
+
[k: string]: HydeDocumentState;
|
|
182
|
+
};
|
|
183
|
+
}>;
|
|
184
|
+
/** Node 3: Generate all missing documents and return a complete snapshot. */
|
|
185
|
+
export declare function generateMissingNode(state: HydeState, deps: HydeGraphDeps): Promise<{
|
|
186
|
+
hydeDocuments: {
|
|
187
|
+
[x: string]: HydeDocumentState;
|
|
188
|
+
};
|
|
189
|
+
agentTimings: DebugMetaAgent[];
|
|
190
|
+
}>;
|
|
191
|
+
/** Frame-v1 only: validate newly generated docs in one batch. */
|
|
192
|
+
export declare function validateGeneratedNode(state: HydeState, deps: HydeGraphDeps): Promise<{
|
|
193
|
+
hydeDocuments: Record<string, HydeDocumentState>;
|
|
194
|
+
agentTimings?: undefined;
|
|
195
|
+
} | {
|
|
196
|
+
hydeDocuments: {
|
|
197
|
+
[x: string]: HydeDocumentState;
|
|
198
|
+
};
|
|
199
|
+
agentTimings: DebugMetaAgent[];
|
|
200
|
+
}>;
|
|
201
|
+
/** Embed all accepted/cached documents that do not have embeddings. */
|
|
202
|
+
export declare function embedNode(state: HydeState, deps: HydeGraphDeps): Promise<{
|
|
203
|
+
hydeDocuments: Record<string, HydeDocumentState>;
|
|
204
|
+
hydeEmbeddings: Record<string, number[]>;
|
|
205
|
+
}>;
|
|
206
|
+
/** Cache/persist only legacy docs or successfully validated frame-v1 docs. */
|
|
207
|
+
export declare function cacheResultsNode(state: HydeState, deps: HydeGraphDeps): Promise<{}>;
|
|
208
|
+
/** After the cache check: generate the missing documents, or skip straight to embedding. */
|
|
209
|
+
export declare function shouldGenerate(state: HydeState): string;
|