import * as Tp from 'thingpedia';
import { Type, SchemaRetriever, Syntax } from 'thingtalk';
import { Hashable } from '../utils/hashmap';
export interface RuleAttributes {
    weight?: number;
    priority?: number;
    repeat?: boolean;
    forConstant?: boolean;
    temporary?: boolean;
    identity?: boolean;
    expandchoice?: boolean;
}
export declare type DerivationKeyValue = string | number | boolean | null | Hashable<unknown>;
/**
 * A compound key used to efficiently index compatible keys.
 *
 * This is a record of index names and hashable keys.
 * The generation algorithm keeps track of an index (hash table) for
 * every known index name.
 */
export declare type DerivationKey = Record<string, DerivationKeyValue>;
export declare type SemanticAction<ArgType extends unknown[], ReturnType> = (...args: ArgType) => ReturnType | null;
export declare type KeyFunction<ValueType> = (value: ValueType) => DerivationKey;
export interface ContextPhrase {
    symbol: number;
    utterance: string;
    value: unknown;
    priority?: number;
    key: DerivationKey;
}
export declare type ContextTable = Record<string, number>;
export declare type ContextFunction<StateType> = (state: StateType | null, contextSymbols: ContextTable) => ContextPhrase[] | null;
export interface AgentReplyRecord<StateType> {
    state: StateType;
    context: any;
    contextPhrases: ContextPhrase[];
    expect: Type | null;
    end: boolean;
    raw: boolean;
    numResults: number;
}
export interface GrammarOptions {
    thingpediaClient: Tp.BaseClient;
    schemaRetriever?: SchemaRetriever;
    entityAllocator: Syntax.SequentialEntityAllocator;
    forSide: 'user' | 'agent';
    flags: {
        [key: string]: boolean;
    };
    onlyDevices?: string[];
    whiteList?: string;
    debug: number;
    timezone: string | undefined;
}
