import { b as CanonicalFiles, V as ValidatedConfig } from './schema-CzaoYJlG.js'; export { C as CanonicalAgent, a as CanonicalCommand, c as CanonicalRule, d as CanonicalSkill, H as HookEntry, e as Hooks, I as IgnorePatterns, M as McpConfig, f as McpServer, P as Permissions, S as SkillSupportingFile, g as StdioMcpServer, U as UrlMcpServer } from './schema-CzaoYJlG.js'; import 'zod'; interface UnrecognizedFormatsWarningOptions { /** * Extensions to exclude from the warning because another reader handles * them downstream (e.g. the gemini-cli command mapper parses `.toml` from * `.gemini/commands/`). Without this, the canonical reader's warning would * fire even when the alternate format is actually being installed. * * Lowercase, dot-prefixed (e.g. `'.toml'`). */ readonly handledByOtherReader?: ReadonlySet; } /** * Parse .agentsmesh/rules/*.md into CanonicalRule objects. */ interface ParseFrontmatterOptions extends UnrecognizedFormatsWarningOptions { /** * When supplied, frontmatter parse failures invoke the callback and the * offending file is skipped instead of aborting the whole parse. Used by * the install path to keep the run going through third-party content with * malformed YAML. Strict callers (`generate`/`lint`/`check`) leave it unset. */ onParseError?: (err: Error, filePath: string) => void; } /** * Load all canonical files from a canonical directory into CanonicalFiles. */ /** * Load all canonical files from a canonical directory or project root. * Missing directories/files yield empty arrays or null as per each parser. * * @param canonicalDirOrProjectRoot - Absolute path to canonical directory or project root * @param opts - Optional `onParseError` callback for lenient install-time loads. * Strict callers (`generate`/`lint`/`check`) leave it unset. * @returns CanonicalFiles with all parsed data */ declare function loadCanonicalFiles(canonicalDirOrProjectRoot: string, opts?: ParseFrontmatterOptions): Promise; /** * Public API — canonical loading (package.json "exports"."./canonical"). */ interface LoadCanonicalOptions { /** Preloaded config. Must be provided together with `configDir`. */ readonly config?: ValidatedConfig; /** Directory containing `agentsmesh.yaml`. Must be provided together with `config`. */ readonly configDir?: string; /** Override canonical directory; defaults to `/.agentsmesh`. */ readonly canonicalDir?: string; /** Defaults to true when config is available. Set false for local-only `.agentsmesh/`. */ readonly includeExtends?: boolean; /** Refresh remote extend cache before loading. */ readonly refreshRemoteCache?: boolean; } /** * Load canonical content for a project. When an `agentsmesh.yaml` can be found, * this mirrors CLI generation by merging extends and installed packs before * local `.agentsmesh/` content. Use `loadCanonicalFiles()` for local-only reads. */ declare function loadCanonical(projectRoot: string, options?: LoadCanonicalOptions): Promise; export { CanonicalFiles, type LoadCanonicalOptions, loadCanonical, loadCanonicalFiles };