@gguf/claw
Version:
Multi-channel AI gateway with extensible messaging integrations
63 lines (62 loc) • 2.02 kB
TypeScript
import type { OpenClawConfig } from "../../config/config.js";
import type { ExecAsk, ExecHost, ExecSecurity } from "../../infra/exec-approvals.js";
import type { MsgContext } from "../templating.js";
import type { ElevatedLevel, ReasoningLevel, ThinkLevel, VerboseLevel } from "./directives.js";
import type { QueueDropPolicy, QueueMode } from "./queue.js";
export type InlineDirectives = {
cleaned: string;
hasThinkDirective: boolean;
thinkLevel?: ThinkLevel;
rawThinkLevel?: string;
hasVerboseDirective: boolean;
verboseLevel?: VerboseLevel;
rawVerboseLevel?: string;
hasReasoningDirective: boolean;
reasoningLevel?: ReasoningLevel;
rawReasoningLevel?: string;
hasElevatedDirective: boolean;
elevatedLevel?: ElevatedLevel;
rawElevatedLevel?: string;
hasExecDirective: boolean;
execHost?: ExecHost;
execSecurity?: ExecSecurity;
execAsk?: ExecAsk;
execNode?: string;
rawExecHost?: string;
rawExecSecurity?: string;
rawExecAsk?: string;
rawExecNode?: string;
hasExecOptions: boolean;
invalidExecHost: boolean;
invalidExecSecurity: boolean;
invalidExecAsk: boolean;
invalidExecNode: boolean;
hasStatusDirective: boolean;
hasModelDirective: boolean;
rawModelDirective?: string;
rawModelProfile?: string;
hasQueueDirective: boolean;
queueMode?: QueueMode;
queueReset: boolean;
rawQueueMode?: string;
debounceMs?: number;
cap?: number;
dropPolicy?: QueueDropPolicy;
rawDebounce?: string;
rawCap?: string;
rawDrop?: string;
hasQueueOptions: boolean;
};
export declare function parseInlineDirectives(body: string, options?: {
modelAliases?: string[];
disableElevated?: boolean;
allowStatusDirective?: boolean;
}): InlineDirectives;
export declare function isDirectiveOnly(params: {
directives: InlineDirectives;
cleanedBody: string;
ctx: MsgContext;
cfg: OpenClawConfig;
agentId?: string;
isGroup: boolean;
}): boolean;