import type { Dirent } from "node:fs"; /** * Supported authored JavaScript and TypeScript module file extensions. */ export declare const SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS: readonly [".cts", ".mts", ".cjs", ".mjs", ".ts", ".js"]; /** * Files that mark a surrounding directory as an application root when paired * with a top-level `agent/` directory. */ export declare const PROJECT_MARKER_FILE_NAMES: readonly ["package.json", "vercel.json"]; /** * Filesystem entry type used by discovery classifiers. */ export type DirectoryEntryType = "directory" | "file" | "other"; /** * Classified root-level agent entry. */ export type AgentRootEntryKind = "agent-config-module" | "channels-directory" | "connections-directory" | "hooks-directory" | "instructions-directory" | "instructions-markdown" | "instructions-module" | "lib-directory" | "sandbox-directory" | "schedules-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory"; /** * Classified local-subagent root entry. */ export type LocalSubagentEntryKind = "agent-config-module" | "connections-directory" | "hooks-directory" | "instructions-directory" | "instructions-markdown" | "instructions-module" | "invalid-schedules-directory" | "lib-directory" | "sandbox-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory"; /** * Classified Agent Skills package entry. */ export type SkillPackageEntryKind = "skill-assets-directory" | "skill-markdown" | "skill-references-directory" | "skill-resource" | "skill-scripts-directory"; /** * Classified top-level entry inside `skills/`. */ export type SkillsDirectoryEntryKind = "flat-skill-markdown" | "flat-skill-module" | "skill-package-directory" | "unknown"; /** * Returns the normalized entry type for a Node filesystem dirent. */ export declare function getDirectoryEntryType(entry: Pick): DirectoryEntryType; /** * Returns whether an entry marks a directory as an app root for nested agents. */ export declare function isProjectMarkerEntry(name: string, entryType: DirectoryEntryType): boolean; /** * Classifies a top-level agent-root entry according to the spec-legal grammar. */ export declare function classifyAgentRootEntry(name: string, entryType: DirectoryEntryType): AgentRootEntryKind; /** * Classifies a local-subagent package root entry according to the spec-legal grammar. */ export declare function classifyLocalSubagentEntry(name: string, entryType: DirectoryEntryType): LocalSubagentEntryKind; /** * Classifies a file or directory inside an Agent Skills package. */ export declare function classifySkillPackageEntry(name: string, entryType: DirectoryEntryType): SkillPackageEntryKind; /** * Classifies one top-level entry inside the authored `skills/` directory. */ export declare function classifySkillsDirectoryEntry(name: string, entryType: DirectoryEntryType): SkillsDirectoryEntryKind; /** * Normalizes an agent-root-relative logical path to forward slashes. */ export declare function normalizeLogicalPath(input: string): string; /** * Returns the authored module basename when the file uses a supported module * extension. */ export declare function getSupportedModuleBaseName(name: string): string | null; /** * Returns whether the file name matches one supported authored module basename. */ export declare function matchesSupportedModuleBaseName(name: string, baseName: string): boolean; /** * Removes a final file extension from a logical path when present. */ export declare function stripLogicalPathExtension(input: string): string;