@indexnetwork/protocol 66.0.0-rc.618.1 → 66.0.0-rc.621.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.
@@ -71,8 +71,10 @@ export declare class Intents {
71
71
  conversationContext: import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined;
72
72
  targetIntentIds: string[] | undefined;
73
73
  archive: boolean;
74
- status: "ACTIVE" | "PAUSED" | undefined;
74
+ status: "active" | "paused" | undefined;
75
75
  expectedIntentFingerprint: string | undefined;
76
+ sourceType: string | null | undefined;
77
+ sourceId: string | null | undefined;
76
78
  networkId: string | undefined;
77
79
  networkIds: string[] | undefined;
78
80
  scopeType: import("../index.js").ScopeType | undefined;
@@ -121,8 +123,10 @@ export declare class Intents {
121
123
  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;
122
124
  targetIntentIds?: string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined;
123
125
  archive?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
124
- status?: "ACTIVE" | "PAUSED" | import("@langchain/langgraph").OverwriteValue<"ACTIVE" | "PAUSED" | undefined> | undefined;
126
+ status?: "active" | "paused" | import("@langchain/langgraph").OverwriteValue<"active" | "paused" | undefined> | undefined;
125
127
  expectedIntentFingerprint?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
128
+ sourceType?: string | null | undefined;
129
+ sourceId?: string | null | undefined;
126
130
  networkId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
127
131
  networkIds?: string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined;
128
132
  scopeType?: import("../index.js").ScopeType | import("@langchain/langgraph").OverwriteValue<import("../index.js").ScopeType | undefined> | undefined;
@@ -212,8 +216,18 @@ export declare class Intents {
212
216
  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>;
213
217
  targetIntentIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
214
218
  archive: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
215
- status: import("@langchain/langgraph").BaseChannel<"ACTIVE" | "PAUSED" | undefined, "ACTIVE" | "PAUSED" | import("@langchain/langgraph").OverwriteValue<"ACTIVE" | "PAUSED" | undefined> | undefined, unknown>;
219
+ status: import("@langchain/langgraph").BaseChannel<"active" | "paused" | undefined, "active" | "paused" | import("@langchain/langgraph").OverwriteValue<"active" | "paused" | undefined> | undefined, unknown>;
216
220
  expectedIntentFingerprint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
221
+ sourceType: {
222
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
223
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
224
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
225
+ };
226
+ sourceId: {
227
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
228
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
229
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
230
+ };
217
231
  networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
218
232
  networkIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
219
233
  scopeType: import("@langchain/langgraph").BaseChannel<import("../index.js").ScopeType | undefined, import("../index.js").ScopeType | import("@langchain/langgraph").OverwriteValue<import("../index.js").ScopeType | undefined> | undefined, unknown>;
@@ -324,8 +338,18 @@ export declare class Intents {
324
338
  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>;
325
339
  targetIntentIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
326
340
  archive: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
327
- status: import("@langchain/langgraph").BaseChannel<"ACTIVE" | "PAUSED" | undefined, "ACTIVE" | "PAUSED" | import("@langchain/langgraph").OverwriteValue<"ACTIVE" | "PAUSED" | undefined> | undefined, unknown>;
341
+ status: import("@langchain/langgraph").BaseChannel<"active" | "paused" | undefined, "active" | "paused" | import("@langchain/langgraph").OverwriteValue<"active" | "paused" | undefined> | undefined, unknown>;
328
342
  expectedIntentFingerprint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
343
+ sourceType: {
344
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
345
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
346
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
347
+ };
348
+ sourceId: {
349
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
350
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
351
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
352
+ };
329
353
  networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
330
354
  networkIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
331
355
  scopeType: import("@langchain/langgraph").BaseChannel<import("../index.js").ScopeType | undefined, import("../index.js").ScopeType | import("@langchain/langgraph").OverwriteValue<import("../index.js").ScopeType | undefined> | undefined, unknown>;
@@ -543,7 +567,7 @@ export declare class Intents {
543
567
  actions: {
544
568
  type: "transition";
545
569
  id: string;
546
- status: "ACTIVE" | "PAUSED";
570
+ status: "active" | "paused";
547
571
  }[];
548
572
  agentTimings: import("../index.js").DebugMetaAgent[];
549
573
  trace: {
@@ -29,8 +29,10 @@ export declare class IntentGraphFactory {
29
29
  conversationContext: import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>[] | undefined;
30
30
  targetIntentIds: string[] | undefined;
31
31
  archive: boolean;
32
- status: "ACTIVE" | "PAUSED" | undefined;
32
+ status: "active" | "paused" | undefined;
33
33
  expectedIntentFingerprint: string | undefined;
34
+ sourceType: string | null | undefined;
35
+ sourceId: string | null | undefined;
34
36
  networkId: string | undefined;
35
37
  networkIds: string[] | undefined;
36
38
  scopeType: import("../../../index.js").ScopeType | undefined;
@@ -79,8 +81,10 @@ export declare class IntentGraphFactory {
79
81
  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;
80
82
  targetIntentIds?: string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined;
81
83
  archive?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
82
- status?: "ACTIVE" | "PAUSED" | import("@langchain/langgraph").OverwriteValue<"ACTIVE" | "PAUSED" | undefined> | undefined;
84
+ status?: "active" | "paused" | import("@langchain/langgraph").OverwriteValue<"active" | "paused" | undefined> | undefined;
83
85
  expectedIntentFingerprint?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
86
+ sourceType?: string | null | undefined;
87
+ sourceId?: string | null | undefined;
84
88
  networkId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
85
89
  networkIds?: string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined;
86
90
  scopeType?: import("../../../index.js").ScopeType | import("@langchain/langgraph").OverwriteValue<import("../../../index.js").ScopeType | undefined> | undefined;
@@ -170,8 +174,18 @@ export declare class IntentGraphFactory {
170
174
  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>;
171
175
  targetIntentIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
172
176
  archive: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
173
- status: import("@langchain/langgraph").BaseChannel<"ACTIVE" | "PAUSED" | undefined, "ACTIVE" | "PAUSED" | import("@langchain/langgraph").OverwriteValue<"ACTIVE" | "PAUSED" | undefined> | undefined, unknown>;
177
+ status: import("@langchain/langgraph").BaseChannel<"active" | "paused" | undefined, "active" | "paused" | import("@langchain/langgraph").OverwriteValue<"active" | "paused" | undefined> | undefined, unknown>;
174
178
  expectedIntentFingerprint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
179
+ sourceType: {
180
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
181
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
182
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
183
+ };
184
+ sourceId: {
185
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
186
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
187
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
188
+ };
175
189
  networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
176
190
  networkIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
177
191
  scopeType: import("@langchain/langgraph").BaseChannel<import("../../../index.js").ScopeType | undefined, import("../../../index.js").ScopeType | import("@langchain/langgraph").OverwriteValue<import("../../../index.js").ScopeType | undefined> | undefined, unknown>;
@@ -282,8 +296,18 @@ export declare class IntentGraphFactory {
282
296
  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>;
283
297
  targetIntentIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
284
298
  archive: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
285
- status: import("@langchain/langgraph").BaseChannel<"ACTIVE" | "PAUSED" | undefined, "ACTIVE" | "PAUSED" | import("@langchain/langgraph").OverwriteValue<"ACTIVE" | "PAUSED" | undefined> | undefined, unknown>;
299
+ status: import("@langchain/langgraph").BaseChannel<"active" | "paused" | undefined, "active" | "paused" | import("@langchain/langgraph").OverwriteValue<"active" | "paused" | undefined> | undefined, unknown>;
286
300
  expectedIntentFingerprint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
301
+ sourceType: {
302
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
303
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
304
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
305
+ };
306
+ sourceId: {
307
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
308
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
309
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
310
+ };
287
311
  networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
288
312
  networkIds: import("@langchain/langgraph").BaseChannel<string[] | undefined, string[] | import("@langchain/langgraph").OverwriteValue<string[] | undefined> | undefined, unknown>;
289
313
  scopeType: import("@langchain/langgraph").BaseChannel<import("../../../index.js").ScopeType | undefined, import("../../../index.js").ScopeType | import("@langchain/langgraph").OverwriteValue<import("../../../index.js").ScopeType | undefined> | undefined, unknown>;
@@ -501,7 +525,7 @@ export declare class IntentGraphFactory {
501
525
  actions: {
502
526
  type: "transition";
503
527
  id: string;
504
- status: "ACTIVE" | "PAUSED";
528
+ status: "active" | "paused";
505
529
  }[];
506
530
  agentTimings: import("../../../index.js").DebugMetaAgent[];
507
531
  trace: {
@@ -39,7 +39,8 @@ export async function executorNode(state, deps) {
39
39
  payload,
40
40
  confidence: 1.0,
41
41
  inferenceType: 'explicit',
42
- sourceType: 'discovery_form',
42
+ sourceType: state.sourceType ?? null,
43
+ sourceId: state.sourceId ?? null,
43
44
  embedding: flatEmbedding,
44
45
  semanticEntropy: metadata?.semanticEntropy ?? null,
45
46
  referentialAnchor: metadata?.referentialAnchor ?? null,
@@ -88,6 +89,8 @@ export async function executorNode(state, deps) {
88
89
  felicityClarity: matchedVerifiedIntent?.verification?.felicity_scores.clarity ?? null,
89
90
  intentMode: updateAction.intentMode ?? null,
90
91
  speechActType: toSpeechActType(matchedVerifiedIntent?.verification?.classification),
92
+ ...(state.sourceType !== undefined ? { sourceType: state.sourceType } : {}),
93
+ ...(state.sourceId !== undefined ? { sourceId: state.sourceId } : {}),
91
94
  ...(state.expectedIntentFingerprint !== undefined ? {
92
95
  expectedIntentFingerprint: state.expectedIntentFingerprint,
93
96
  expectedIntentUserId: state.userId,
@@ -147,7 +150,7 @@ export async function executorNode(state, deps) {
147
150
  networkScopeId,
148
151
  });
149
152
  let outcome;
150
- if (dbResult.kind !== 'success' || dbResult.status === 'PAUSED') {
153
+ if (dbResult.kind !== 'success' || dbResult.status === 'paused') {
151
154
  outcome = dbResult;
152
155
  }
153
156
  else {
@@ -189,7 +192,7 @@ export async function executorNode(state, deps) {
189
192
  outcome = {
190
193
  kind: 'enqueue_failed',
191
194
  id: dbResult.id,
192
- status: (authoritative?.status ?? dbResult.status),
195
+ status: authoritative?.status ?? dbResult.status,
193
196
  lifecycleVersionMs: authoritative?.lifecycleVersionMs ?? dbResult.lifecycleVersionMs,
194
197
  };
195
198
  }
@@ -56,7 +56,7 @@ export declare function reconciliationNode(state: IntentState): Promise<{
56
56
  actions: {
57
57
  type: "transition";
58
58
  id: string;
59
- status: "ACTIVE" | "PAUSED";
59
+ status: "active" | "paused";
60
60
  }[];
61
61
  agentTimings: DebugMetaAgent[];
62
62
  trace: {
@@ -43,7 +43,7 @@ export interface ExecutionResult {
43
43
  export interface TransitionIntentAction {
44
44
  type: 'transition';
45
45
  id: string;
46
- status: 'ACTIVE' | 'PAUSED';
46
+ status: 'active' | 'paused';
47
47
  }
48
48
  /** Every action kind the executor can carry out. */
49
49
  export type IntentGraphAction = {
@@ -66,7 +66,7 @@ export type IntentGraphAction = {
66
66
  export type TransitionOutcome = {
67
67
  kind: 'success';
68
68
  id: string;
69
- status: 'ACTIVE' | 'PAUSED';
69
+ status: 'active' | 'paused';
70
70
  changed: boolean;
71
71
  lifecycleVersionMs: number;
72
72
  } | {
@@ -148,12 +148,24 @@ export declare const IntentGraphState: import("@langchain/langgraph").Annotation
148
148
  /** Archive route: expire every id in `targetIntentIds`. Requires `targetIntentIds`. */
149
149
  archive: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
150
150
  /** Transition route: pause/resume the single id in `targetIntentIds`. Requires `targetIntentIds`. */
151
- status: import("@langchain/langgraph").BaseChannel<"ACTIVE" | "PAUSED" | undefined, "ACTIVE" | "PAUSED" | import("@langchain/langgraph").OverwriteValue<"ACTIVE" | "PAUSED" | undefined> | undefined, unknown>;
151
+ status: import("@langchain/langgraph").BaseChannel<"active" | "paused" | undefined, "active" | "paused" | import("@langchain/langgraph").OverwriteValue<"active" | "paused" | undefined> | undefined, unknown>;
152
152
  /**
153
153
  * Optional material compare-and-set guard used only by recovery-answer
154
154
  * updates. The database rechecks it while holding the final intent row lock.
155
155
  */
156
156
  expectedIntentFingerprint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
157
+ /** Client-owned label written on create or update. Undefined leaves it; null clears it. */
158
+ sourceType: {
159
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
160
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
161
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
162
+ };
163
+ /** Client-owned reference written on create or update. Undefined leaves it; null clears it. */
164
+ sourceId: {
165
+ (annotation: import("@langchain/langgraph").SingleReducer<string | null | undefined, string | null | undefined>): import("@langchain/langgraph").BaseChannel<string | null | undefined, string | import("@langchain/langgraph").OverwriteValue<string | null | undefined> | null | undefined, unknown>;
166
+ (): import("@langchain/langgraph").LastValue<string | null | undefined>;
167
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
168
+ };
157
169
  /**
158
170
  * Optional network scope (network ID) for read operations. Prep always
159
171
  * fetches ALL user intents via getActiveIntents(userId) regardless of network
@@ -64,6 +64,10 @@ export const IntentGraphState = Annotation.Root({
64
64
  reducer: (curr, next) => next ?? curr,
65
65
  default: () => undefined,
66
66
  }),
67
+ /** Client-owned label written on create or update. Undefined leaves it; null clears it. */
68
+ sourceType: (Annotation),
69
+ /** Client-owned reference written on create or update. Undefined leaves it; null clears it. */
70
+ sourceId: (Annotation),
67
71
  /**
68
72
  * Optional network scope (network ID) for read operations. Prep always
69
73
  * fetches ALL user intents via getActiveIntents(userId) regardless of network
@@ -155,10 +155,10 @@ export interface CreateIntentData {
155
155
  isIncognito?: boolean;
156
156
  /** Network IDs to associate with (optional, uses dynamic scoping if empty) */
157
157
  networkIds?: string[];
158
- /** Source type for provenance tracking */
159
- sourceType?: 'integration' | 'discovery_form' | 'enrichment';
160
- /** Source ID for provenance tracking */
161
- sourceId?: string;
158
+ /** Client-owned label, stored and returned unchanged */
159
+ sourceType?: string | null;
160
+ /** Client-owned reference, stored and returned unchanged */
161
+ sourceId?: string | null;
162
162
  /** Confidence score from inference (0-1, required) */
163
163
  confidence: number;
164
164
  /** How the intent was inferred */
@@ -191,6 +191,10 @@ export interface UpdateIntentData {
191
191
  embedding?: number[];
192
192
  /** Updated incognito status */
193
193
  isIncognito?: boolean;
194
+ /** Client-owned label; null clears it */
195
+ sourceType?: string | null;
196
+ /** Client-owned reference; null clears it */
197
+ sourceId?: string | null;
194
198
  /** Updated network associations (replaces existing) */
195
199
  networkIds?: string[];
196
200
  /** Semantic entropy from verifier (0 specific -> 1 vague) */
@@ -244,12 +248,12 @@ export interface IntentRecord extends CreatedIntent {
244
248
  archivedAt: Date | null;
245
249
  /** Embedding vector (may be null) */
246
250
  embedding?: number[] | null;
247
- /** Source type for provenance */
251
+ /** Client-owned label */
248
252
  sourceType?: string | null;
249
- /** Source ID for provenance */
253
+ /** Client-owned reference */
250
254
  sourceId?: string | null;
251
- /** Lifecycle admission state; null is a legacy ACTIVE row. */
252
- status?: 'ACTIVE' | 'PAUSED' | 'FULFILLED' | 'EXPIRED' | null;
255
+ /** Lifecycle admission state; null is a legacy active row. */
256
+ status?: 'active' | 'paused' | null;
253
257
  }
254
258
  /**
255
259
  * Intent with similarity score from vector search.
@@ -267,15 +271,15 @@ export interface ArchiveResult {
267
271
  /** Error message if failed */
268
272
  error?: string;
269
273
  }
270
- /** An intent's admission lifecycle status; null/legacy rows are ACTIVE. */
271
- export type IntentLifecycleStatus = 'ACTIVE' | 'PAUSED' | 'FULFILLED' | 'EXPIRED';
274
+ /** An intent's admission lifecycle status; null/legacy rows are active. */
275
+ export type IntentLifecycleStatus = 'active' | 'paused';
272
276
  /**
273
- * Result of an atomic ACTIVE/PAUSED lifecycle transition.
277
+ * Result of an atomic active/paused lifecycle transition.
274
278
  */
275
279
  export type TransitionLifecycleResult = {
276
280
  kind: 'success';
277
281
  id: string;
278
- status: 'ACTIVE' | 'PAUSED';
282
+ status: 'active' | 'paused';
279
283
  changed: boolean;
280
284
  lifecycleVersionMs: number;
281
285
  } | {
@@ -85,7 +85,6 @@ export interface DatabaseIdentityQueries {
85
85
  * payload: action.payload,
86
86
  * confidence: action.score / 100,
87
87
  * inferenceType: 'explicit',
88
- * sourceType: 'discovery_form'
89
88
  * });
90
89
  * ```
91
90
  */
@@ -130,7 +129,7 @@ export interface DatabaseIdentityQueries {
130
129
  */
131
130
  archiveIntent(intentId: string): Promise<ArchiveResult>;
132
131
  /**
133
- * Atomically transition an owned intent between ACTIVE and PAUSED.
132
+ * Atomically transition an owned intent between active and paused.
134
133
  * Terminal/archived intents and out-of-scope requests are rejected.
135
134
  * Idempotent: re-requesting the current status reports `changed: false`.
136
135
  *
@@ -139,11 +138,11 @@ export interface DatabaseIdentityQueries {
139
138
  transitionIntentLifecycle(input: {
140
139
  intentId: string;
141
140
  userId: string;
142
- status: 'ACTIVE' | 'PAUSED';
141
+ status: 'active' | 'paused';
143
142
  networkScopeId?: string | null;
144
143
  }): Promise<TransitionLifecycleResult>;
145
144
  /**
146
- * Compare-and-set a resume back to PAUSED when its discovery-enqueue
145
+ * Compare-and-set a resume back to paused when its discovery-enqueue
147
146
  * acknowledgement failed. A concurrent lifecycle write is never overwritten.
148
147
  */
149
148
  compensateFailedResume(input: {
@@ -27,7 +27,7 @@ export interface IntentFollowUp {
27
27
  onIntentArchived(data: {
28
28
  intentId: string;
29
29
  }): Promise<unknown>;
30
- /** Start discovery for an intent resumed from PAUSED back to ACTIVE. */
30
+ /** Start discovery for an intent resumed from paused back to active. */
31
31
  onIntentResumed(data: {
32
32
  intentId: string;
33
33
  userId: string;
@@ -84,6 +84,10 @@ Identity is account/presentation metadata. Context is dynamic, scoped runtime st
84
84
  - Confidence (0-1, how well the inference captured the user's intent)
85
85
  - Inference type (explicit = user stated directly; implicit = system inferred)
86
86
  - Embedding (semantic vector for matching)
87
+ - Source type and source ID (optional client-owned strings, set on create or update, stored and returned unchanged)
88
+
89
+ ### Source Fields
90
+ Clients may set \`sourceType\` and \`sourceId\` to map their own records to a published signal. An agent that inferred an ambient intent can pass its local id as \`sourceId\` when the owner approves publishing it, then match the signal back by that value. Index does not interpret either field. Omit a field to leave it unchanged; null clears it.
87
91
 
88
92
  ### Signal Lifecycle
89
93
  1. User creates intent (explicit signal) or system infers from behavior (implicit)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "66.0.0-rc.618.1",
3
+ "version": "66.0.0-rc.621.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",