@hashgraphonline/conversational-agent
Version:
Hashgraph Online conversational AI agent implementing HCS-10 communication, HCS-2 registries, and content inscription on Hedera. https://hol.org
45 lines (43 loc) • 1.22 kB
TypeScript
import { ResolutionContext, EntityType } from '../context/resolution-context';
export interface DetectedEntity {
type: EntityType;
value: string;
originalText: string;
confidence: number;
position: number;
}
export interface ResolvedMessage {
message: string;
entities: DetectedEntity[];
conversions: Array<{
original: string;
converted: string;
}>;
context: ResolutionContext;
}
export interface ResolutionStage<TInput = unknown, TOutput = unknown> {
name: string;
process(input: TInput, context: ResolutionContext): Promise<TOutput>;
}
/**
* Multi-stage resolution pipeline that processes messages through configurable stages
*/
export declare class ResolutionPipeline {
private stages;
/**
* Add a stage to the pipeline
*/
addStage<TInput, TOutput>(stage: ResolutionStage<TInput, TOutput>): void;
/**
* Get all registered stages
*/
getStages(): ResolutionStage<unknown, unknown>[];
/**
* Clear all stages from the pipeline
*/
clear(): void;
/**
* Process a message through all pipeline stages
*/
process(message: string, context: ResolutionContext): Promise<ResolvedMessage>;
}