mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 23:32:12 +03:00
Validated in local merge-train (devbox-vm-06-dev002) @ combined-tip (FAST gates: typecheck/complexity/cognitive/changelog/vitest — only pre-existing audit.test.ts flake). Evidence: /home/diegosouzapw/dev/proxys/OmniRoute/.claude/worktrees/merge-train-20260805-222248-suite.log
45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
/**
|
|
* Query specificity / complexity detection types for Manifest routing integration.
|
|
*/
|
|
|
|
export interface SpecificityResult {
|
|
score: number;
|
|
breakdown: SpecificityBreakdown;
|
|
rulesTriggered: string[];
|
|
inputTokens: number;
|
|
confidence: number;
|
|
}
|
|
|
|
export interface SpecificityBreakdown {
|
|
codeComplexity: number;
|
|
mathComplexity: number;
|
|
reasoningDepth: number;
|
|
contextSize: number;
|
|
toolCalling: number;
|
|
domainSpecificity: number;
|
|
}
|
|
|
|
export interface SpecificityRule {
|
|
name: string;
|
|
category: keyof SpecificityBreakdown;
|
|
weight: number;
|
|
detect(input: RuleInput): RuleMatch | null;
|
|
}
|
|
|
|
export interface RuleInput {
|
|
messages: Array<{ role?: string; content?: string | unknown }>;
|
|
systemPrompt?: string;
|
|
tools?: Array<{
|
|
type?: string;
|
|
function?: { name: string; description?: string; parameters?: unknown };
|
|
}>;
|
|
model?: string;
|
|
}
|
|
|
|
export interface RuleMatch {
|
|
score: number;
|
|
evidence: string;
|
|
}
|
|
|
|
export type SpecificityLevel = "trivial" | "simple" | "moderate" | "complex" | "expert";
|