/** * Schema Introspection for Jules Query Language * * Provides TypeScript type definitions and field metadata for LLM discoverability. * These schemas help LLMs understand the shape of Session, Activity, and related types * to translate natural language queries into proper JQL. */ /** * Field metadata for schema introspection */ export interface FieldMeta { /** Field name */ name: string; /** TypeScript type representation */ type: string; /** Human-readable description */ description: string; /** Whether field is optional */ optional?: boolean; /** Whether field is computed (not stored, derived at query time) */ computed?: boolean; /** Whether field can be filtered in where clause */ filterable?: boolean; /** Whether field can be used in select projection */ selectable?: boolean; /** Nested fields if this is an object or array type */ fields?: FieldMeta[]; } /** * Schema definition for a domain */ export interface DomainSchema { /** Domain name */ domain: 'sessions' | 'activities'; /** Human-readable description */ description: string; /** All fields in this domain */ fields: FieldMeta[]; /** Example queries for this domain */ examples: QueryExample[]; } /** * Example query for documentation */ export interface QueryExample { /** Natural language description */ description: string; /** JQL query */ query: Record; } /** * Schema for SessionResource */ export declare const SESSION_SCHEMA: DomainSchema; /** * Schema for Activity types */ export declare const ACTIVITY_SCHEMA: DomainSchema; /** * FilterOp schema for where clause operators */ export declare const FILTER_OP_SCHEMA: { description: string; operators: { name: string; description: string; example: string; }[]; dotNotation: { description: string; examples: string[]; }; }; /** * Projection schema for select clause */ export declare const PROJECTION_SCHEMA: { description: string; syntax: { name: string; description: string; example: string; }[]; defaults: { sessions: string[]; activities: string[]; }; }; /** * Get the full schema for a domain */ export declare function getSchema(domain: 'sessions' | 'activities'): DomainSchema; /** * Get all schemas with filter and projection documentation */ export declare function getAllSchemas(): { sessions: DomainSchema; activities: DomainSchema; filterOps: typeof FILTER_OP_SCHEMA; projection: typeof PROJECTION_SCHEMA; }; /** * Generate TypeScript type definition string for a domain */ export declare function generateTypeDefinition(domain: 'sessions' | 'activities'): string; /** * Generate markdown documentation for LLM consumption */ export declare function generateMarkdownDocs(): string;