// @dispatch/core — Agent runtime, LLM integration, tools

// Agent & LLM
export { Agent } from "./agent/agent.js";
export {
	deleteAgent,
	expandAgentToolNames,
	GLOBAL_AGENTS_DIR,
	getAgentDirPaths,
	getAgentDirs,
	getProjectAgentsDir,
	loadAgent,
	loadAgents,
	saveAgent,
} from "./agents/index.js";
// Chunk helpers
export {
	appendEventToChunks,
	applySystemEvent,
	type IdentifiedMessage,
	type SystemEventLike,
} from "./chunks/append.js";
// Config
export {
	configToRuleset,
	createConfigWatcher,
	loadConfig,
	validateConfig,
} from "./config/index.js";
// Credentials
export * from "./credentials/index.js";
export {
	appendChunks,
	clearChunksForTab,
	explodeTurn,
	explodeUserText,
	getChunksForTab,
	getMessagesForTab,
	getTotalChunkCount,
	getUsageStatsForTab,
	groupRowsToMessages,
	type MessageRow,
} from "./db/chunks.js";
// Database
export { closeDatabase, getDatabase, getDatabasePath } from "./db/index.js";
export { deleteSetting, getSetting, setSetting } from "./db/settings.js";
// Tabs & Messages
export {
	archiveTab,
	createTab,
	getTab,
	listOpenTabs,
	MIN_TAB_PREFIX_LENGTH,
	type ResolveTabPrefixResult,
	resolveTabPrefix,
	shortestUniquePrefix,
	type TabRow,
	updateTabModel,
	updateTabPositions,
	updateTabStatus,
	updateTabTitle,
} from "./db/tabs.js";
export {
	debugVerbosity,
	isDebugEnabled,
	logAgentLoop,
	logStepLifecycle,
	logStreamEvent,
} from "./llm/debug-logger.js";
export { createProvider } from "./llm/provider.js";
// Models
export {
	getModelsCatalog,
	ModelRegistry,
	resolveContextLimit,
} from "./models/index.js";
// Notifications (ntfy.sh)
export * from "./notifications/index.js";
export * from "./permission/index.js";
// Skills
export {
	createSkillsWatcher,
	getSkillByName,
	loadSkills,
	parseSkillFile,
	resolveSkillsForAgent,
} from "./skills/index.js";
export { prefix as bashArityPrefix } from "./tools/bash-arity.js";
// Tools
export { createListFilesTool } from "./tools/list-files.js";
export { createReadFileTool } from "./tools/read-file.js";
export { createReadFileSliceTool } from "./tools/read-file-slice.js";
export { createReadTabTool, type ReadTabCallbacks } from "./tools/read-tab.js";
export { createToolRegistry } from "./tools/registry.js";
export { createRetrieveTool, type RetrieveCallbacks } from "./tools/retrieve.js";
export { BackgroundShellStore, createRunShellTool } from "./tools/run-shell.js";
export { createSearchCodeTool } from "./tools/search-code.js";
export {
	createSendToTabTool,
	type ResolvedTabRef,
	type SendToTabCallbacks,
	type TabResolution,
} from "./tools/send-to-tab.js";
export { analyzeCommand } from "./tools/shell-analyze.js";
export {
	type AvailableAgent,
	createSummonTool,
	type SummonCallbacks,
	toAvailableSubagents,
	toAvailableUserAgents,
} from "./tools/summon.js";
export { createTaskListTool, TaskList, TODO_DESCRIPTION } from "./tools/task-list.js";
export { clearSpillForTab } from "./tools/truncate.js";
export { createWebSearchTool } from "./tools/web-search.js";
export { createWriteFileTool } from "./tools/write-file.js";
export {
	BackgroundTranscriptStore,
	createYoutubeTranscribeTool,
} from "./tools/youtube-transcribe.js";
// Types & Permissions
export * from "./types/index.js";
