/**
 * @singularity-forge/native — High-performance Rust modules exposed via N-API.
 *
 * Modules:
 * - clipboard: native clipboard access (text + image)
 * - grep: ripgrep-backed regex search (content + filesystem)
 * - ps: cross-platform process tree management
 * - glob: gitignore-respecting filesystem discovery with scan caching
 * - highlight: syntect-based syntax highlighting
 * - html: HTML to Markdown conversion
 * - text: ANSI-aware text measurement and slicing
 * - fd: fuzzy file path discovery
 * - image: decode, encode, and resize images
 for autocomplete and @-mention resolution
 */

export type {
	AstFindMatch,
	AstFindOptions,
	AstFindResult,
	AstReplaceChange,
	AstReplaceFileChange,
	AstReplaceOptions,
	AstReplaceResult,
} from "./ast/index.js";
export { astEdit, astGrep } from "./ast/index.js";
export type { ClipboardImage } from "./clipboard/index.js";
export {
	copyToClipboard,
	readImageFromClipboard,
	readTextFromClipboard,
} from "./clipboard/index.js";
export type { DiffResult, FuzzyMatchResult } from "./diff/index.js";
export {
	fuzzyFindText,
	generateDiff,
	normalizeForFuzzyMatch,
} from "./diff/index.js";
export type {
	ApplyEditsOptions,
	ApplyEditsResult,
	ApplyWorkspaceEditResult,
	InsertAroundSymbolOptions,
	InsertAroundSymbolResult,
	InsertPosition,
	Position,
	Range,
	ReplaceSymbolOptions,
	ReplaceSymbolResult,
	TextDocumentEdit,
	TextEdit,
	WatchEvent,
	WatchEventKind,
	WatchHandle,
	WatchOptions,
	WorkspaceEditLike,
} from "./edit/index.js";
export {
	applyEdits,
	applyWorkspaceEdit,
	insertAroundSymbol,
	replaceSymbol,
	watchTree,
} from "./edit/index.js";
export type {
	FuzzyFindMatch,
	FuzzyFindOptions,
	FuzzyFindResult,
} from "./fd/index.js";
export { fuzzyFind } from "./fd/index.js";
export type {
	BatchParseResult,
	FrontmatterResult,
	JsonlParseResult,
	NativeBoundaryMapEntry,
	NativeFileModified,
	NativePlan,
	NativeRoadmap,
	NativeRoadmapSlice,
	NativeSummary,
	NativeSummaryFrontmatter,
	NativeSummaryRequires,
	NativeTaskEntry,
	ParsedSfFile,
	SectionResult,
	SfTreeEntry,
} from "./forge-parser/index.js";
export {
	batchParseSfFiles,
	extractAllSections,
	extractSection,
	extractSection as nativeExtractSection,
	parseFrontmatter,
	parseJsonlTail,
	parsePlanFile,
	parseRoadmapFile,
	parseSummaryFile,
	scanSfTree,
} from "./forge-parser/index.js";
export type {
	FileType,
	GlobMatch,
	GlobOptions,
	GlobResult,
} from "./glob/index.js";
export { glob, invalidateFsScanCache } from "./glob/index.js";
export type {
	ContextLine,
	GrepMatch,
	GrepOptions,
	GrepResult,
	SearchMatch,
	SearchOptions,
	SearchResult,
} from "./grep/index.js";
export { grep, searchContent } from "./grep/index.js";
export type { HighlightColors } from "./highlight/index.js";
export {
	getSupportedLanguages,
	highlightCode,
	supportsLanguage,
} from "./highlight/index.js";
export type { HtmlToMarkdownOptions } from "./html/index.js";
export { htmlToMarkdown } from "./html/index.js";
export type { NativeImageHandle } from "./image/index.js";

export { ImageFormat, parseImage, SamplingFilter } from "./image/index.js";
export {
	parseJson,
	parsePartialJson,
	parseStreamingJson,
} from "./json-parse/index.js";
export {
	killProcessGroup,
	killTree,
	listDescendants,
	processGroupId,
} from "./ps/index.js";
export type { StreamChunkResult, StreamState } from "./stream-process/index.js";
export {
	processStreamChunk,
	sanitizeBinaryOutputNative,
	stripAnsiNative,
} from "./stream-process/index.js";
export type { ExtractSegmentsResult, SliceResult } from "./text/index.js";
export {
	EllipsisKind,
	extractSegments,
	sanitizeText,
	sliceWithWidth,
	truncateToWidth,
	visibleWidth,
	wrapTextWithAnsi,
} from "./text/index.js";
export type { TruncateOutputResult, TruncateResult } from "./truncate/index.js";
export {
	truncateHead,
	truncateOutput,
	truncateTail,
} from "./truncate/index.js";
export type { TtsrHandle, TtsrRuleInput } from "./ttsr/index.js";
export {
	ttsrCheckBuffer,
	ttsrCompileRules,
	ttsrFreeRules,
} from "./ttsr/index.js";
export { xxHash32, xxHash32Fallback } from "./xxhash/index.js";
