import type { RuleFilterContext } from "./rule-filter.js"; import type { DebugLog } from "./debug.js"; import { type DiscoverProjectFilesOptions } from "./project-file-scanner.js"; import type { RuleMetadata } from "./rule-metadata.js"; export interface BuildFilterContextOptions { contextFilePaths: string[]; userPrompt: string | undefined; availableToolIDs: string[]; modelID: string | undefined; agentType: string | undefined; /** * Optional DI seam for the project file scanner. * When contextFilePaths is empty, this function is called to discover * project files so glob rules can evaluate against real files. * Defaults to the built-in scanner from project-file-scanner.ts. */ discoverProjectFiles?: (opts: DiscoverProjectFilesOptions) => Promise; /** * Rule glob patterns from all active rules. * Used to derive the `extensions` filter for the project file scanner * so that extension-targeted rules fire when matching files exist in * the project, regardless of which file is currently edited. */ ruleGlobs?: string[]; /** Metadata from active rules, used for keyword-to-glob intent donation. */ ruleMetadata?: Array>; } /** * Detect if running in a CI environment by checking common CI environment variables. * * If process.env.CI is explicitly set, it is treated as authoritative: * - CI='false' or CI='0' or CI='' => return false (no provider var fallback) * - CI='true' or CI='1' or any truthy value => return true * * If process.env.CI is not set (undefined), fall back to provider-specific detection. */ export declare const detectCiEnvironment: () => boolean; /** * Resolve the active token budget from the OPENCODE_RULES_MAX_TOKENS env var. * Returns undefined when the env var is absent, empty, zero, negative, or non-finite. * Positive finite numbers enable budget enforcement. */ export declare const resolveMaxTokens: () => number | undefined; /** * Build the filter context object used for rule matching. * Assembles runtime information from various sources. */ export declare const buildFilterContext: (opts: BuildFilterContextOptions, projectDirectory: string, debugLog: DebugLog) => Promise; //# sourceMappingURL=runtime-context.d.ts.map