/** * Decision Trace Types * * Types for auto-captured agent decision traces. Decisions are first-class * entities in the EAV store, emitted automatically from MCP tool calls * and enrichable via pre/post hooks. */ export interface Decision { id: string; toolName: string; input?: Record; outputSummary?: string; context?: string; rationale?: string; alternatives?: string[]; confidence?: number; createdAt?: string; createdBy?: string; /** IDs of related entities (issues, files, milestones) affected by this decision */ relatedEntities: string[]; custom?: Record; } export interface DecisionInput { toolName: string; input?: Record; outputSummary?: string; context?: string; rationale?: string; alternatives?: string[]; confidence?: number; /** Entity IDs this decision relates to (e.g. "issue:TRL-5") */ relatedEntities?: string[]; custom?: Record; } export interface DecisionFilter { /** Filter by MCP tool name (glob-like, e.g. "trellis_issue_*") */ toolPattern?: string; /** Filter by agent ID */ agentId?: string; /** Only decisions after this ISO timestamp */ since?: string; /** Only decisions before this ISO timestamp */ until?: string; /** Only decisions referencing this entity */ entityId?: string; /** Max results */ limit?: number; } export interface DecisionContext { prompt?: string; conversationId?: string; agentModel?: string; custom?: Record; } export interface DecisionEnrichment { rationale?: string; alternatives?: string[]; confidence?: number; relatedEntities?: string[]; custom?: Record; } export interface DecisionPreHook { name: string; /** Which tools to intercept — string (glob) or RegExp */ toolPattern: string | RegExp; handler: (toolName: string, input: Record) => Promise; } export interface DecisionPostHook { name: string; toolPattern: string | RegExp; handler: (toolName: string, input: Record, output: unknown, preContext: DecisionContext) => Promise; } //# sourceMappingURL=types.d.ts.map