import type { DebugMetaAgent } from "../../capabilities/participant-agents.debug.facade.js"; /** * Intent payload and metadata loaded for network evaluation. * Loaded from the database before LLM-based assignment scoring. * * IND-546: canonical home — previously network/indexer/indexer.state.ts. */ export interface IntentForIndexing { id: string; payload: string; userId: string; sourceType: string | null; sourceId: string | null; } /** * Index and member prompts for a single network (user must be member with autoAssign). * Used by the evaluated assignment path in IntentNetworkGraphFactory. * * IND-546: canonical home — previously network/indexer/indexer.state.ts. */ export interface IndexMemberContext { networkId: string; indexPrompt: string | null; memberPrompt: string | null; } /** * Result of executing an assignment decision. * Returned from the assign node as a structured output alongside mutationResult. * * IND-546: canonical home — previously network/indexer/indexer.state.ts. */ export interface AssignmentResult { networkId: string; assigned: boolean; success: boolean; error?: string; } /** * Intent Index Graph State. * Handles CRUD for the intent_indexes junction table (linking intents to networks). * * ## Signal assignment policy * * Two assignment paths, selected via `skipEvaluation`: * - `true` (direct / manual_override): writes the link immediately with a fixed * score of 1 and mode `manual_override`. No LLM call. * - `false` (automatic / evaluated): loads intent + network context, calls * IntentIndexer from the signals public facade, then applies * `buildNetworkAssignmentDecision` to produce the threshold / metadata. * A no-prompt fast path skips the LLM when both prompts are absent. * * The IntentIndexer is injected as a constructor argument — communities never * imports signals internals directly. * * Flow: * START → router → { * create: assignNode (direct or evaluated) → END * read: readNode → END * delete: unassignNode → END * } * * IND-546: canonical home — previously network/indexer/indexer.state.ts. * LangGraph state carries IntentIndexerOutput and DebugMetaAgent which are * cross-capability types; this file therefore belongs in the application layer. */ export declare const IntentNetworkGraphState: import("@langchain/langgraph").AnnotationRoot<{ /** User performing the action. Always required. */ userId: { (annotation: import("@langchain/langgraph").SingleReducer): import("@langchain/langgraph").BaseChannel, unknown>; (): import("@langchain/langgraph").LastValue; Root: (sd: S) => import("@langchain/langgraph").AnnotationRoot; }; /** Target network for assign/read-by-network. From ChatGraph or tool arg. */ networkId: import("@langchain/langgraph").BaseChannel | undefined, unknown>; /** Target intent for assign/read-by-intent. From tool arg. */ intentId: import("@langchain/langgraph").BaseChannel | undefined, unknown>; /** Operation mode. */ operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "create" | "read", "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read">, unknown>; /** * When true, skip LLM evaluation and assign directly (manual_override). * When false, run IntentIndexer evaluation (automatic mode). */ skipEvaluation: import("@langchain/langgraph").BaseChannel, unknown>; /** Intent payload and metadata. Null if intent not found. */ intent: import("@langchain/langgraph").BaseChannel | null, unknown>; /** Network + member context. Null if user not eligible. */ indexContext: import("@langchain/langgraph").BaseChannel | null, unknown>; /** LLM evaluation result from IntentIndexer. Null if evaluation was skipped. */ evaluation: import("@langchain/langgraph").BaseChannel<{ reasoning: string; indexScore: number; memberScore: number; } | null, { reasoning: string; indexScore: number; memberScore: number; } | import("@langchain/langgraph").OverwriteValue<{ reasoning: string; indexScore: number; memberScore: number; } | null> | null, unknown>; /** Final decision: should intent be in this network? */ shouldAssign: import("@langchain/langgraph").BaseChannel | undefined, unknown>; /** Final score used for decision (0–1). */ finalScore: import("@langchain/langgraph").BaseChannel | undefined, unknown>; /** Result of the assignment persistence operation. */ assignmentResult: import("@langchain/langgraph").BaseChannel | null, unknown>; /** For read-by-network: pass userId when listing one user's intents in a network. */ queryUserId: import("@langchain/langgraph").BaseChannel | undefined, unknown>; /** Output for read mode. */ readResult: import("@langchain/langgraph").BaseChannel<{ links: Array<{ intentId: string; networkId: string; intentTitle?: string; networkTitle?: string; userId?: string; userName?: string; createdAt?: Date; relevancyScore?: number | null; }>; count: number; mode: string; note?: string; } | undefined, { links: Array<{ intentId: string; networkId: string; intentTitle?: string; networkTitle?: string; userId?: string; userName?: string; createdAt?: Date; relevancyScore?: number | null; }>; count: number; mode: string; note?: string; } | import("@langchain/langgraph").OverwriteValue<{ links: Array<{ intentId: string; networkId: string; intentTitle?: string; networkTitle?: string; userId?: string; userName?: string; createdAt?: Date; relevancyScore?: number | null; }>; count: number; mode: string; note?: string; } | undefined> | undefined, unknown>; /** Output for create/delete modes. */ mutationResult: import("@langchain/langgraph").BaseChannel<{ success: boolean; message?: string; error?: string; } | undefined, { success: boolean; message?: string; error?: string; } | import("@langchain/langgraph").OverwriteValue<{ success: boolean; message?: string; error?: string; } | undefined> | undefined, unknown>; /** Error message. */ error: import("@langchain/langgraph").BaseChannel | null, unknown>; /** Timing records for each agent invocation within this graph run. */ agentTimings: import("@langchain/langgraph").BaseChannel, unknown>; }>;