@indexnetwork/protocol 17.0.1-rc.480.1 → 18.0.0-rc.481.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 (58) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/IMPLEMENTATION.md +46 -3
  3. package/STABILITY.md +5 -1
  4. package/dist/index.d.ts +2 -9
  5. package/dist/index.js +4 -6
  6. package/dist/intents/{application → graph}/intent.graph.d.ts +26 -26
  7. package/dist/intents/{application → graph}/intent.graph.execute.d.ts +1 -1
  8. package/dist/intents/{application → graph}/intent.graph.execute.js +1 -1
  9. package/dist/intents/{application → graph}/intent.graph.js +4 -4
  10. package/dist/intents/{application → graph}/intent.graph.reconcile.d.ts +2 -2
  11. package/dist/intents/{application → graph}/intent.graph.shared.d.ts +5 -5
  12. package/dist/intents/{application → graph}/intent.graph.shared.js +1 -1
  13. package/dist/intents/{domain/intent.state.d.ts → graph/intent.graph.state.d.ts} +3 -3
  14. package/dist/intents/{application/intent.clarifier.js → intent.clarifier.js} +5 -5
  15. package/dist/intents/{application/intent.indexer.js → intent.indexer.js} +4 -4
  16. package/dist/intents/{application/intent.inferrer.js → intent.inferrer.js} +4 -4
  17. package/dist/intents/intent.module.d.ts +633 -0
  18. package/dist/intents/intent.module.js +103 -0
  19. package/dist/intents/{domain/intent.proposal.d.ts → intent.proposal.d.ts} +2 -0
  20. package/dist/intents/{domain/intent.proposal.js → intent.proposal.js} +2 -0
  21. package/dist/intents/{application/intent.reconciler.js → intent.reconciler.js} +4 -4
  22. package/dist/intents/{application/intent.tools.d.ts → intent.tools.d.ts} +6 -3
  23. package/dist/intents/{application/intent.tools.js → intent.tools.js} +6 -7
  24. package/dist/intents/{application/intent.verifier.js → intent.verifier.js} +4 -4
  25. package/dist/networks/application/indexer.graph.d.ts +7 -7
  26. package/dist/networks/application/indexer.graph.js +2 -2
  27. package/dist/networks/ports/index.d.ts +4 -2
  28. package/dist/networks/ports/index.js +1 -5
  29. package/dist/opportunities/application/opportunity.graph.prep.js +3 -3
  30. package/dist/shared/agent/tool.factory.js +10 -6
  31. package/dist/shared/agent/tool.helpers.d.ts +2 -2
  32. package/dist/shared/agent/tool.registry.js +2 -2
  33. package/package.json +1 -1
  34. package/dist/intents/application/index.d.ts +0 -21
  35. package/dist/intents/application/index.js +0 -26
  36. package/dist/intents/domain/index.d.ts +0 -9
  37. package/dist/intents/domain/index.js +0 -11
  38. package/dist/intents/domain/signal.specificity.d.ts +0 -2
  39. package/dist/intents/domain/signal.specificity.js +0 -2
  40. package/dist/intents/index.d.ts +0 -18
  41. package/dist/intents/index.js +0 -14
  42. package/dist/intents/ports/index.d.ts +0 -15
  43. package/dist/intents/ports/index.js +0 -13
  44. package/dist/intents/ports/signals.tools.port.d.ts +0 -5
  45. package/dist/intents/ports/signals.tools.port.js +0 -1
  46. /package/dist/intents/{application → graph}/intent.graph.infer.d.ts +0 -0
  47. /package/dist/intents/{application → graph}/intent.graph.infer.js +0 -0
  48. /package/dist/intents/{application → graph}/intent.graph.reconcile.js +0 -0
  49. /package/dist/intents/{domain/intent.state.js → graph/intent.graph.state.js} +0 -0
  50. /package/dist/intents/{application → intake}/intake.orchestrator.d.ts +0 -0
  51. /package/dist/intents/{application → intake}/intake.orchestrator.js +0 -0
  52. /package/dist/intents/{application → intake}/intake.pack.generator.d.ts +0 -0
  53. /package/dist/intents/{application → intake}/intake.pack.generator.js +0 -0
  54. /package/dist/intents/{application/intent.clarifier.d.ts → intent.clarifier.d.ts} +0 -0
  55. /package/dist/intents/{application/intent.indexer.d.ts → intent.indexer.d.ts} +0 -0
  56. /package/dist/intents/{application/intent.inferrer.d.ts → intent.inferrer.d.ts} +0 -0
  57. /package/dist/intents/{application/intent.reconciler.d.ts → intent.reconciler.d.ts} +0 -0
  58. /package/dist/intents/{application/intent.verifier.d.ts → intent.verifier.d.ts} +0 -0
@@ -0,0 +1,633 @@
1
+ /**
2
+ * intents — the capability's single public surface.
3
+ *
4
+ * Everything the rest of the package (and every host) may reach lives on the
5
+ * {@link Intents} class. The directories beside this file are private
6
+ * implementation, grouped by what they do rather than by layer:
7
+ *
8
+ * graph/ the lifecycle graph — prep, infer, verify, reconcile, execute
9
+ * intake/ the guided first-signal interview
10
+ * intent.inferrer an utterance into candidate signals
11
+ * intent.reconciler candidate signals into create/update/expire actions
12
+ * intent.verifier felicity and entropy verdicts
13
+ * intent.clarifier the clarification path when a signal is underspecified
14
+ * intent.indexer scoring one signal against one network
15
+ * intent.proposal the persisted proposal record and description normalization
16
+ * intent.tools the agent-facing tool definitions
17
+ *
18
+ * Only the two multi-file stages keep a directory. Nothing outside `intents/`
19
+ * imports any of it; the layout may change freely as long as this class keeps
20
+ * its shape.
21
+ */
22
+ import type { DefineTool } from "../shared/agent/tool.helpers.js";
23
+ import type { IntentGraphDatabase } from "../shared/interfaces/database.interface.js";
24
+ import type { EmbeddingGenerator } from "../shared/interfaces/embedder.interface.js";
25
+ import type { IntentGraphQueue } from "../shared/interfaces/queue.interface.js";
26
+ import type { QuestionerEnqueueFn } from "../questions/index.js";
27
+ import { ExplicitIntentInferrer } from "./intent.inferrer.js";
28
+ import { IntentReconciler } from "./intent.reconciler.js";
29
+ import { SemanticVerifier } from "./intent.verifier.js";
30
+ import type { IntentIndexerOutput } from "./intent.indexer.js";
31
+ import type { FollowUpPlan, FollowUpPlanInput, IntakeAnswer, IntakeRound, SynthesisInput, SynthesisResult } from "./intake/intake.orchestrator.js";
32
+ import type { IntakePack, IntakePackInput, IntakePackQuestion, IntakePackQuestionOption } from "./intake/intake.pack.generator.js";
33
+ import type { IntentToolDeps } from "./intent.tools.js";
34
+ export type { FollowUpPlan, FollowUpPlanInput, IntakeAnswer, IntakePack, IntakePackInput, IntakePackQuestion, IntakePackQuestionOption, IntakeRound, IntentIndexerOutput, IntentToolDeps, SynthesisInput, SynthesisResult, };
35
+ /**
36
+ * Host capabilities the intent lifecycle needs.
37
+ *
38
+ * Every field is optional: a host that only wants the model-backed helpers
39
+ * (verification, indexing, intake) can construct `new Intents()` with nothing.
40
+ * {@link Intents.createGraph} is the one method that requires `database`.
41
+ */
42
+ export interface IntentsDeps {
43
+ /** Signal persistence. Required by {@link Intents.createGraph}. */
44
+ database?: IntentGraphDatabase;
45
+ /** Embedding generator used to vectorize executed signals. */
46
+ embedder?: EmbeddingGenerator;
47
+ /** Queue that picks up post-execution work (network assignment, discovery). */
48
+ queue?: IntentGraphQueue;
49
+ /** Enqueues decision-question generation after a signal lands. */
50
+ questionerEnqueue?: QuestionerEnqueueFn;
51
+ /**
52
+ * Model-backed stages, injectable so tests can run the graph without a model.
53
+ * Omitted stages construct their canonical implementation on first use.
54
+ */
55
+ agents?: {
56
+ inferrer?: Pick<ExplicitIntentInferrer, "invoke">;
57
+ verifier?: Pick<SemanticVerifier, "invoke">;
58
+ reconciler?: Pick<IntentReconciler, "invoke">;
59
+ };
60
+ }
61
+ /**
62
+ * The intents capability.
63
+ *
64
+ * One instance is cheap: the model-backed collaborators behind each method are
65
+ * constructed on first use and then reused, so a host can hold a single
66
+ * `Intents` and call only the parts it needs without paying for the rest.
67
+ */
68
+ export declare class Intents {
69
+ private readonly deps;
70
+ private indexer?;
71
+ private verifier?;
72
+ private orchestrator?;
73
+ private packGenerator?;
74
+ constructor(deps?: IntentsDeps);
75
+ /**
76
+ * Build the intent lifecycle graph — load, infer, verify, reconcile, execute.
77
+ *
78
+ * @throws If the instance was constructed without a `database`.
79
+ */
80
+ createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
81
+ userId: string;
82
+ userProfile: string;
83
+ inputContent: string | undefined;
84
+ conversationContext: import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined;
85
+ operationMode: "update" | "propose" | "create" | "delete" | "read";
86
+ targetIntentIds: string[] | undefined;
87
+ expectedIntentFingerprint: string | undefined;
88
+ networkId: string | undefined;
89
+ scopeType: import("../index.js").ToolScopeType | undefined;
90
+ scopeId: string | undefined;
91
+ activeIntents: string;
92
+ activeIntentIds: string[];
93
+ inferredIntents: {
94
+ reasoning: string;
95
+ type: "goal" | "tombstone";
96
+ confidence: "low" | "medium" | "high";
97
+ description: string;
98
+ }[];
99
+ verifiedIntents: import("./graph/intent.graph.state.js").VerifiedIntent[];
100
+ validationFailures: import("./graph/intent.graph.state.js").IntentValidationFailure[];
101
+ actions: import("./intent.reconciler.js").NormalizedIntentAction[];
102
+ executionResults: import("./graph/intent.graph.state.js").ExecutionResult[];
103
+ error: string | undefined;
104
+ trace: {
105
+ node: string;
106
+ detail?: string;
107
+ data?: Record<string, unknown>;
108
+ }[];
109
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
110
+ indexScope: string[] | undefined;
111
+ queryUserId: string | undefined;
112
+ allUserIntents: boolean;
113
+ readResult: {
114
+ count: number;
115
+ intents: Array<{
116
+ id: string;
117
+ description: string;
118
+ summary: string | null;
119
+ createdAt: Date;
120
+ userId?: string;
121
+ userName?: string | null;
122
+ }>;
123
+ message?: string;
124
+ networkId?: string;
125
+ } | undefined;
126
+ }, {
127
+ userId?: string | undefined;
128
+ userProfile?: string | undefined;
129
+ inputContent?: string | undefined;
130
+ conversationContext?: import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | import("@langchain/langgraph").OverwriteValue<import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined> | undefined;
131
+ operationMode?: "update" | "propose" | "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"update" | "propose" | "create" | "delete" | "read"> | undefined;
132
+ targetIntentIds?: string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined;
133
+ expectedIntentFingerprint?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
134
+ networkId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
135
+ scopeType?: import("../index.js").ToolScopeType | import("@langchain/langgraph").OverwriteValue<import("../index.js").ToolScopeType | undefined> | undefined;
136
+ scopeId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
137
+ activeIntents?: string | import("@langchain/langgraph").OverwriteValue<string> | undefined;
138
+ activeIntentIds?: string[] | import("@langchain/langgraph").OverwriteValue<string[]> | undefined;
139
+ inferredIntents?: {
140
+ reasoning: string;
141
+ type: "goal" | "tombstone";
142
+ confidence: "low" | "medium" | "high";
143
+ description: string;
144
+ }[] | import("@langchain/langgraph").OverwriteValue<{
145
+ reasoning: string;
146
+ type: "goal" | "tombstone";
147
+ confidence: "low" | "medium" | "high";
148
+ description: string;
149
+ }[]> | undefined;
150
+ verifiedIntents?: import("./graph/intent.graph.state.js").VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").VerifiedIntent[]> | undefined;
151
+ validationFailures?: import("./graph/intent.graph.state.js").IntentValidationFailure[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").IntentValidationFailure[]> | undefined;
152
+ actions?: import("./intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("./intent.reconciler.js").NormalizedIntentAction[]> | undefined;
153
+ executionResults?: import("./graph/intent.graph.state.js").ExecutionResult[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").ExecutionResult[]> | undefined;
154
+ error?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
155
+ trace?: {
156
+ node: string;
157
+ detail?: string;
158
+ data?: Record<string, unknown>;
159
+ }[] | import("@langchain/langgraph").OverwriteValue<{
160
+ node: string;
161
+ detail?: string;
162
+ data?: Record<string, unknown>;
163
+ }[]> | undefined;
164
+ agentTimings?: import("../chat/chat-streaming.types.js").DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<import("../chat/chat-streaming.types.js").DebugMetaAgent[]> | undefined;
165
+ indexScope?: string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined;
166
+ queryUserId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
167
+ allUserIntents?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
168
+ readResult?: {
169
+ count: number;
170
+ intents: Array<{
171
+ id: string;
172
+ description: string;
173
+ summary: string | null;
174
+ createdAt: Date;
175
+ userId?: string;
176
+ userName?: string | null;
177
+ }>;
178
+ message?: string;
179
+ networkId?: string;
180
+ } | import("@langchain/langgraph").OverwriteValue<{
181
+ count: number;
182
+ intents: Array<{
183
+ id: string;
184
+ description: string;
185
+ summary: string | null;
186
+ createdAt: Date;
187
+ userId?: string;
188
+ userName?: string | null;
189
+ }>;
190
+ message?: string;
191
+ networkId?: string;
192
+ } | undefined> | undefined;
193
+ }, "query" | "__start__" | "prep" | "inference" | "verification" | "reconciler" | "executor", {
194
+ userId: {
195
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
196
+ (): import("@langchain/langgraph").LastValue<string>;
197
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
198
+ };
199
+ userProfile: {
200
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
201
+ (): import("@langchain/langgraph").LastValue<string>;
202
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
203
+ };
204
+ inputContent: {
205
+ (annotation: import("@langchain/langgraph").SingleReducer<string | undefined, string | undefined>): import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
206
+ (): import("@langchain/langgraph").LastValue<string | undefined>;
207
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
208
+ };
209
+ conversationContext: import("@langchain/langgraph").BaseChannel<import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined, import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | import("@langchain/langgraph").OverwriteValue<import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined> | undefined, unknown>;
210
+ operationMode: import("@langchain/langgraph").BaseChannel<"update" | "propose" | "create" | "delete" | "read", "update" | "propose" | "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"update" | "propose" | "create" | "delete" | "read">, unknown>;
211
+ targetIntentIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
212
+ expectedIntentFingerprint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
213
+ networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
214
+ scopeType: import("@langchain/langgraph").BaseChannel<import("../index.js").ToolScopeType | undefined, import("../index.js").ToolScopeType | import("@langchain/langgraph").OverwriteValue<import("../index.js").ToolScopeType | undefined> | undefined, unknown>;
215
+ scopeId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
216
+ activeIntents: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
217
+ activeIntentIds: import("@langchain/langgraph").BaseChannel<string[], string[] | import("@langchain/langgraph").OverwriteValue<string[]>, unknown>;
218
+ inferredIntents: import("@langchain/langgraph").BaseChannel<{
219
+ reasoning: string;
220
+ type: "goal" | "tombstone";
221
+ confidence: "low" | "medium" | "high";
222
+ description: string;
223
+ }[], {
224
+ reasoning: string;
225
+ type: "goal" | "tombstone";
226
+ confidence: "low" | "medium" | "high";
227
+ description: string;
228
+ }[] | import("@langchain/langgraph").OverwriteValue<{
229
+ reasoning: string;
230
+ type: "goal" | "tombstone";
231
+ confidence: "low" | "medium" | "high";
232
+ description: string;
233
+ }[]>, unknown>;
234
+ verifiedIntents: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").VerifiedIntent[], import("./graph/intent.graph.state.js").VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").VerifiedIntent[]>, unknown>;
235
+ validationFailures: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").IntentValidationFailure[], import("./graph/intent.graph.state.js").IntentValidationFailure[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").IntentValidationFailure[]>, unknown>;
236
+ actions: import("@langchain/langgraph").BaseChannel<import("./intent.reconciler.js").NormalizedIntentAction[], import("./intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("./intent.reconciler.js").NormalizedIntentAction[]>, unknown>;
237
+ executionResults: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").ExecutionResult[], import("./graph/intent.graph.state.js").ExecutionResult[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").ExecutionResult[]>, unknown>;
238
+ error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
239
+ trace: import("@langchain/langgraph").BaseChannel<{
240
+ node: string;
241
+ detail?: string;
242
+ data?: Record<string, unknown>;
243
+ }[], {
244
+ node: string;
245
+ detail?: string;
246
+ data?: Record<string, unknown>;
247
+ }[] | import("@langchain/langgraph").OverwriteValue<{
248
+ node: string;
249
+ detail?: string;
250
+ data?: Record<string, unknown>;
251
+ }[]>, unknown>;
252
+ 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>;
253
+ indexScope: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
254
+ queryUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
255
+ allUserIntents: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
256
+ readResult: import("@langchain/langgraph").BaseChannel<{
257
+ count: number;
258
+ intents: Array<{
259
+ id: string;
260
+ description: string;
261
+ summary: string | null;
262
+ createdAt: Date;
263
+ userId?: string;
264
+ userName?: string | null;
265
+ }>;
266
+ message?: string;
267
+ networkId?: string;
268
+ } | undefined, {
269
+ count: number;
270
+ intents: Array<{
271
+ id: string;
272
+ description: string;
273
+ summary: string | null;
274
+ createdAt: Date;
275
+ userId?: string;
276
+ userName?: string | null;
277
+ }>;
278
+ message?: string;
279
+ networkId?: string;
280
+ } | import("@langchain/langgraph").OverwriteValue<{
281
+ count: number;
282
+ intents: Array<{
283
+ id: string;
284
+ description: string;
285
+ summary: string | null;
286
+ createdAt: Date;
287
+ userId?: string;
288
+ userName?: string | null;
289
+ }>;
290
+ message?: string;
291
+ networkId?: string;
292
+ } | undefined> | undefined, unknown>;
293
+ }, {
294
+ userId: {
295
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
296
+ (): import("@langchain/langgraph").LastValue<string>;
297
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
298
+ };
299
+ userProfile: {
300
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
301
+ (): import("@langchain/langgraph").LastValue<string>;
302
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
303
+ };
304
+ inputContent: {
305
+ (annotation: import("@langchain/langgraph").SingleReducer<string | undefined, string | undefined>): import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
306
+ (): import("@langchain/langgraph").LastValue<string | undefined>;
307
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
308
+ };
309
+ conversationContext: import("@langchain/langgraph").BaseChannel<import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined, import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | import("@langchain/langgraph").OverwriteValue<import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined> | undefined, unknown>;
310
+ operationMode: import("@langchain/langgraph").BaseChannel<"update" | "propose" | "create" | "delete" | "read", "update" | "propose" | "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"update" | "propose" | "create" | "delete" | "read">, unknown>;
311
+ targetIntentIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
312
+ expectedIntentFingerprint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
313
+ networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
314
+ scopeType: import("@langchain/langgraph").BaseChannel<import("../index.js").ToolScopeType | undefined, import("../index.js").ToolScopeType | import("@langchain/langgraph").OverwriteValue<import("../index.js").ToolScopeType | undefined> | undefined, unknown>;
315
+ scopeId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
316
+ activeIntents: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
317
+ activeIntentIds: import("@langchain/langgraph").BaseChannel<string[], string[] | import("@langchain/langgraph").OverwriteValue<string[]>, unknown>;
318
+ inferredIntents: import("@langchain/langgraph").BaseChannel<{
319
+ reasoning: string;
320
+ type: "goal" | "tombstone";
321
+ confidence: "low" | "medium" | "high";
322
+ description: string;
323
+ }[], {
324
+ reasoning: string;
325
+ type: "goal" | "tombstone";
326
+ confidence: "low" | "medium" | "high";
327
+ description: string;
328
+ }[] | import("@langchain/langgraph").OverwriteValue<{
329
+ reasoning: string;
330
+ type: "goal" | "tombstone";
331
+ confidence: "low" | "medium" | "high";
332
+ description: string;
333
+ }[]>, unknown>;
334
+ verifiedIntents: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").VerifiedIntent[], import("./graph/intent.graph.state.js").VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").VerifiedIntent[]>, unknown>;
335
+ validationFailures: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").IntentValidationFailure[], import("./graph/intent.graph.state.js").IntentValidationFailure[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").IntentValidationFailure[]>, unknown>;
336
+ actions: import("@langchain/langgraph").BaseChannel<import("./intent.reconciler.js").NormalizedIntentAction[], import("./intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("./intent.reconciler.js").NormalizedIntentAction[]>, unknown>;
337
+ executionResults: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").ExecutionResult[], import("./graph/intent.graph.state.js").ExecutionResult[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").ExecutionResult[]>, unknown>;
338
+ error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
339
+ trace: import("@langchain/langgraph").BaseChannel<{
340
+ node: string;
341
+ detail?: string;
342
+ data?: Record<string, unknown>;
343
+ }[], {
344
+ node: string;
345
+ detail?: string;
346
+ data?: Record<string, unknown>;
347
+ }[] | import("@langchain/langgraph").OverwriteValue<{
348
+ node: string;
349
+ detail?: string;
350
+ data?: Record<string, unknown>;
351
+ }[]>, unknown>;
352
+ 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>;
353
+ indexScope: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
354
+ queryUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
355
+ allUserIntents: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
356
+ readResult: import("@langchain/langgraph").BaseChannel<{
357
+ count: number;
358
+ intents: Array<{
359
+ id: string;
360
+ description: string;
361
+ summary: string | null;
362
+ createdAt: Date;
363
+ userId?: string;
364
+ userName?: string | null;
365
+ }>;
366
+ message?: string;
367
+ networkId?: string;
368
+ } | undefined, {
369
+ count: number;
370
+ intents: Array<{
371
+ id: string;
372
+ description: string;
373
+ summary: string | null;
374
+ createdAt: Date;
375
+ userId?: string;
376
+ userName?: string | null;
377
+ }>;
378
+ message?: string;
379
+ networkId?: string;
380
+ } | import("@langchain/langgraph").OverwriteValue<{
381
+ count: number;
382
+ intents: Array<{
383
+ id: string;
384
+ description: string;
385
+ summary: string | null;
386
+ createdAt: Date;
387
+ userId?: string;
388
+ userName?: string | null;
389
+ }>;
390
+ message?: string;
391
+ networkId?: string;
392
+ } | undefined> | undefined, unknown>;
393
+ }, import("@langchain/langgraph").StateDefinition, {
394
+ prep: {
395
+ error: string;
396
+ activeIntents?: undefined;
397
+ activeIntentIds?: undefined;
398
+ trace?: undefined;
399
+ } | {
400
+ activeIntents: string;
401
+ activeIntentIds: string[];
402
+ trace: {
403
+ node: string;
404
+ detail: string;
405
+ }[];
406
+ error?: undefined;
407
+ };
408
+ query: {
409
+ readResult: {
410
+ count: number;
411
+ intents: never[];
412
+ message: string;
413
+ networkId?: undefined;
414
+ };
415
+ } | {
416
+ readResult: {
417
+ count: number;
418
+ intents: {
419
+ id: string;
420
+ description: string;
421
+ summary: string | null;
422
+ createdAt: Date;
423
+ }[];
424
+ message?: undefined;
425
+ networkId?: undefined;
426
+ };
427
+ } | {
428
+ readResult: {
429
+ count: number;
430
+ intents: never[];
431
+ message: string;
432
+ networkId: string;
433
+ };
434
+ } | {
435
+ readResult: {
436
+ count: number;
437
+ networkId: string;
438
+ intents: {
439
+ id: string;
440
+ description: string;
441
+ summary: string | null;
442
+ createdAt: Date;
443
+ userId: string;
444
+ userName: string | null;
445
+ }[];
446
+ message?: undefined;
447
+ };
448
+ };
449
+ inference: {
450
+ inferredIntents: {
451
+ reasoning: string;
452
+ type: "goal" | "tombstone";
453
+ confidence: "low" | "medium" | "high";
454
+ description: string;
455
+ }[];
456
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
457
+ trace: {
458
+ node: string;
459
+ detail: string;
460
+ }[];
461
+ };
462
+ verification: {
463
+ verifiedIntents: never[];
464
+ agentTimings: never[];
465
+ validationFailures?: undefined;
466
+ trace?: undefined;
467
+ } | {
468
+ verifiedIntents: import("./graph/intent.graph.state.js").VerifiedIntent[];
469
+ validationFailures: import("./graph/intent.graph.state.js").IntentValidationFailure[];
470
+ agentTimings: import("../chat/chat-streaming.types.js").DebugMetaAgent[];
471
+ trace: {
472
+ node: string;
473
+ detail: string;
474
+ data: {
475
+ clarity: number;
476
+ authority: number;
477
+ sincerity: number;
478
+ entropy: number | undefined;
479
+ referentialBreadth: "narrow" | "moderate" | "broad" | undefined;
480
+ missingSelectionalConstraints: ("location" | "role" | "outcome" | "timeframe" | "domain" | "concrete_need")[] | undefined;
481
+ specificityWarning: string | undefined;
482
+ classification: "COMMISSIVE" | "DIRECTIVE" | "ASSERTIVE" | "EXPRESSIVE" | "DECLARATION" | "UNKNOWN" | undefined;
483
+ score: number | undefined;
484
+ } | undefined;
485
+ }[];
486
+ };
487
+ reconciler: import("@langchain/langgraph").UpdateType<{
488
+ userId: {
489
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
490
+ (): import("@langchain/langgraph").LastValue<string>;
491
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
492
+ };
493
+ userProfile: {
494
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
495
+ (): import("@langchain/langgraph").LastValue<string>;
496
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
497
+ };
498
+ inputContent: {
499
+ (annotation: import("@langchain/langgraph").SingleReducer<string | undefined, string | undefined>): import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
500
+ (): import("@langchain/langgraph").LastValue<string | undefined>;
501
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
502
+ };
503
+ conversationContext: import("@langchain/langgraph").BaseChannel<import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined, import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | import("@langchain/langgraph").OverwriteValue<import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined> | undefined, unknown>;
504
+ operationMode: import("@langchain/langgraph").BaseChannel<"update" | "propose" | "create" | "delete" | "read", "update" | "propose" | "create" | "delete" | "read" | import("@langchain/langgraph").OverwriteValue<"update" | "propose" | "create" | "delete" | "read">, unknown>;
505
+ targetIntentIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
506
+ expectedIntentFingerprint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
507
+ networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
508
+ scopeType: import("@langchain/langgraph").BaseChannel<import("../index.js").ToolScopeType | undefined, import("../index.js").ToolScopeType | import("@langchain/langgraph").OverwriteValue<import("../index.js").ToolScopeType | undefined> | undefined, unknown>;
509
+ scopeId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
510
+ activeIntents: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
511
+ activeIntentIds: import("@langchain/langgraph").BaseChannel<string[], string[] | import("@langchain/langgraph").OverwriteValue<string[]>, unknown>;
512
+ inferredIntents: import("@langchain/langgraph").BaseChannel<{
513
+ reasoning: string;
514
+ type: "goal" | "tombstone";
515
+ confidence: "low" | "medium" | "high";
516
+ description: string;
517
+ }[], {
518
+ reasoning: string;
519
+ type: "goal" | "tombstone";
520
+ confidence: "low" | "medium" | "high";
521
+ description: string;
522
+ }[] | import("@langchain/langgraph").OverwriteValue<{
523
+ reasoning: string;
524
+ type: "goal" | "tombstone";
525
+ confidence: "low" | "medium" | "high";
526
+ description: string;
527
+ }[]>, unknown>;
528
+ verifiedIntents: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").VerifiedIntent[], import("./graph/intent.graph.state.js").VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").VerifiedIntent[]>, unknown>;
529
+ validationFailures: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").IntentValidationFailure[], import("./graph/intent.graph.state.js").IntentValidationFailure[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").IntentValidationFailure[]>, unknown>;
530
+ actions: import("@langchain/langgraph").BaseChannel<import("./intent.reconciler.js").NormalizedIntentAction[], import("./intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("./intent.reconciler.js").NormalizedIntentAction[]>, unknown>;
531
+ executionResults: import("@langchain/langgraph").BaseChannel<import("./graph/intent.graph.state.js").ExecutionResult[], import("./graph/intent.graph.state.js").ExecutionResult[] | import("@langchain/langgraph").OverwriteValue<import("./graph/intent.graph.state.js").ExecutionResult[]>, unknown>;
532
+ error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
533
+ trace: import("@langchain/langgraph").BaseChannel<{
534
+ node: string;
535
+ detail?: string;
536
+ data?: Record<string, unknown>;
537
+ }[], {
538
+ node: string;
539
+ detail?: string;
540
+ data?: Record<string, unknown>;
541
+ }[] | import("@langchain/langgraph").OverwriteValue<{
542
+ node: string;
543
+ detail?: string;
544
+ data?: Record<string, unknown>;
545
+ }[]>, unknown>;
546
+ 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>;
547
+ indexScope: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
548
+ queryUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
549
+ allUserIntents: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
550
+ readResult: import("@langchain/langgraph").BaseChannel<{
551
+ count: number;
552
+ intents: Array<{
553
+ id: string;
554
+ description: string;
555
+ summary: string | null;
556
+ createdAt: Date;
557
+ userId?: string;
558
+ userName?: string | null;
559
+ }>;
560
+ message?: string;
561
+ networkId?: string;
562
+ } | undefined, {
563
+ count: number;
564
+ intents: Array<{
565
+ id: string;
566
+ description: string;
567
+ summary: string | null;
568
+ createdAt: Date;
569
+ userId?: string;
570
+ userName?: string | null;
571
+ }>;
572
+ message?: string;
573
+ networkId?: string;
574
+ } | import("@langchain/langgraph").OverwriteValue<{
575
+ count: number;
576
+ intents: Array<{
577
+ id: string;
578
+ description: string;
579
+ summary: string | null;
580
+ createdAt: Date;
581
+ userId?: string;
582
+ userName?: string | null;
583
+ }>;
584
+ message?: string;
585
+ networkId?: string;
586
+ } | undefined> | undefined, unknown>;
587
+ }>;
588
+ executor: {
589
+ executionResults: import("./graph/intent.graph.state.js").ExecutionResult[];
590
+ };
591
+ }, unknown, unknown, []>;
592
+ /**
593
+ * Verify one utterance against the speaker's profile — felicity conditions,
594
+ * speech-act classification, semantic entropy, and specificity.
595
+ *
596
+ * @param content - The raw utterance.
597
+ * @param profileContext - The speaker's profile, serialized as JSON.
598
+ */
599
+ verifyIntent(content: string, profileContext: string): Promise<{
600
+ reasoning: string;
601
+ classification: "COMMISSIVE" | "DIRECTIVE" | "ASSERTIVE" | "EXPRESSIVE" | "DECLARATION" | "UNKNOWN";
602
+ felicity_scores: {
603
+ clarity: number;
604
+ authority: number;
605
+ sincerity: number;
606
+ };
607
+ semantic_entropy: number;
608
+ referential_anchor: string | null;
609
+ referential_breadth: "narrow" | "moderate" | "broad";
610
+ missing_selectional_constraints: ("location" | "role" | "outcome" | "timeframe" | "domain" | "concrete_need")[];
611
+ specificity_warning: string | null;
612
+ flags: string[];
613
+ }>;
614
+ /**
615
+ * Score how well one signal fits one network, from the network's purpose and
616
+ * the member's sharing preferences.
617
+ *
618
+ * @returns Scores and reasoning, or `null` when the model call fails.
619
+ */
620
+ indexIntent(intent: string, indexPrompt: string | null, memberPrompt: string | null, sourceName?: string | null, networkContext?: string | null): Promise<IntentIndexerOutput | null>;
621
+ /** Generate a participant's intake brief and round-1 question. */
622
+ generateIntakePack(input: IntakePackInput): Promise<IntakePack>;
623
+ /** Plan and write the next intake follow-up questions. */
624
+ generateIntakeFollowUps(input: FollowUpPlanInput): Promise<FollowUpPlan>;
625
+ /** Turn answered intake rounds into a signal description and card summary. */
626
+ synthesizeIntake(input: SynthesisInput): Promise<SynthesisResult>;
627
+ /** The static round-1 question used when pack generation is unavailable. */
628
+ static readonly FALLBACK_INTAKE_QUESTION: IntakePackQuestion;
629
+ /** Normalize a signal description to its persisted form. */
630
+ static normalizeDescription(description: string): string;
631
+ /** Register the agent-facing intent tools against a tool definer. */
632
+ static createTools(defineTool: DefineTool, deps: IntentToolDeps): readonly [any, any, any, any, any, any, any, any];
633
+ }