/** * Core Module - Curated Public API * * Features: * - Essential world/agent/chat management functions for client applications * - Event-driven messaging with clean subscription interface * - Category-based logging system * - Core types and utility functions * * Architecture: * - Public API limited to client-facing functionality (~25 exports vs previous 60+) * - Internal implementation details kept private * - Clear separation between public and private interfaces * - Tests can import from internal modules directly * * Public API Categories: * - World Management: createWorld, getWorld, updateWorld, deleteWorld, listWorlds, getWorldConfig, exportWorldToMarkdown * - Agent Management: getAgent, updateAgent, deleteAgent, listAgents, clearAgentMemory * - Chat Management: createChatData, getChatData, restoreWorldChat * - Event System: publishMessage, enableStreaming, disableStreaming * - Core Types: World, Agent, AgentMessage, ChatData, WorldInfo, LLMProvider, LoggerConfig, LogLevel * - Utilities: logger, createCategoryLogger, loggers, generateId, toKebabCase * - Subscription System: subscribeWorld, ClientConnection (for server API) * * Private APIs (not exported): * - Internal agent functions: createAgent (via world instance), updateAgentMemory, loadAgentsIntoWorld, syncWorldAgents, etc. * - Internal chat functions: createChat, getChat, createWorldChat * - Internal event functions: subscribeAgentToMessages, processAgentMessage, SSE functions * - Parameter types: CreateAgentParams, UpdateAgentParams, etc. * - Storage implementation: StorageAPI, storage factory functions * - Internal utilities: initializeLogger, getCategoryLogLevel * * Recent Changes: * - 2026-03-10: Renamed queue-backed ingress to `enqueueAndProcessUserTurn` and exported explicit `dispatchImmediateChatMessage` for non-user sends. * - 2026-02-20: Enforced options-only HITL exports by removing input-mode helpers from public core surface. * - 2026-02-14: Exported generic HITL option request/response APIs for world-scoped user approval flows. * - 2026-02-14: Exported `waitForInitialSkillSync` to allow callers to await startup skill-registry auto-sync completion. * - 2026-02-13: Exported chat-scoped stop-message processing controls for Electron IPC stop action. * - 2026-02-08: Exported LLM provider configuration helpers for npm core library consumers * * Version: 3.1.0 */ export { createWorld, getWorld, updateWorld, setWorldVariablesText, getWorldVariablesText, getWorldEnvMap, getWorldEnvValue, deleteWorld, listWorlds, getMemory, migrateMessageIds, removeMessagesFrom, editUserMessage, logEditError, getEditErrors, addToQueue, enqueueAndProcessUserTurn, dispatchImmediateChatMessage, recoverQueueSendingMessages, getQueueMessages, removeFromQueue, pauseChatQueue, resumeChatQueue, stopChatQueue, clearChatQueue, retryQueueMessage } from './managers.js'; export { exportWorldToMarkdown, exportChatToMarkdown, } from './export.js'; export { createAgent, getAgent, updateAgent, deleteAgent, listAgents, clearAgentMemory, } from './managers.js'; export { clearToolsCache } from './mcp-server-registry.js'; export { skillRegistry, syncSkills, waitForInitialSkillSync, getSkills, getSkillsForSystemPrompt, getSkill, getSkillSourceScope, getSkillSourcePath, clearSkillsForTests, type SkillRegistryEntry, type SkillSourceScope, type SkillScopeFilterOptions, type SyncSkillsOptions, type SyncSkillsResult, } from './skill-registry.js'; export { requestWorldOption, replayPendingHitlRequests, listPendingHitlPromptEvents, listPendingHitlPromptEventsFromMessages, submitWorldHitlResponse, submitWorldOptionResponse, clearHitlStateForTests, type HitlOption, type HitlOptionRequest, type HitlOptionResolution, type HitlResponseResolution, } from './hitl.js'; export { executeShellCommand, getExecutionHistory, clearExecutionHistory, stopShellCommandsForChat, getProcessExecution, listProcessExecutions, cancelProcessExecution, deleteProcessExecution, subscribeProcessExecutionStatus, clearProcessExecutionStateForTests, type CommandExecutionResult } from './shell-cmd-tool.js'; export { stopMessageProcessing, type StopMessageProcessingResult } from './message-processing-control.js'; export { isValidCronExpression, startHeartbeat, stopHeartbeat, type HeartbeatHandle, } from './heartbeat.js'; export { GitHubWorldImportError, stageGitHubWorldFromShorthand, type GitHubWorldImportErrorCode, type ResolvedGitHubWorldSource, type StagedGitHubWorldResult, } from './storage/github-world-import.js'; export { newChat, branchChatFromMessage, listChats, updateChat, deleteChat, restoreChat, activateChatWithSnapshot } from './managers.js'; export { enableStreaming, disableStreaming, publishMessage, publishMessageWithId, } from './events/index.js'; export { beginWorldActivity, trackWorldActivity, getActiveProcessingChatIds, getActiveAgentNames, isChatProcessing, type WorldActivityEventPayload, type WorldActivityEventType, } from './activity-tracker.js'; export { type World, type Agent, type Chat, type AgentMessage, type RemovalResult, type EditErrorLog, type QueuedMessage, type QueueMessageStatus, LLMProvider, EventType, type LLMResponse } from './types.js'; export { configureLLMProvider, validateProviderConfig, isProviderConfigured, getConfiguredProviders, clearAllConfiguration, getConfigurationStatus, type BaseLLMConfig, type OpenAIConfig, type AnthropicConfig, type GoogleConfig, type AzureConfig, type XAIConfig, type OpenAICompatibleConfig, type OllamaConfig, type ProviderConfigMap, type ProviderConfig, } from './llm-config.js'; export { type LoggerConfig, type LogLevel, logger, createCategoryLogger, loggers, addLogStreamCallback } from './logger.js'; export { type ClientConnection, subscribeWorld } from './subscription.js'; export { createWorldRuntimeKey, startWorldRuntime, getWorldRuntime, releaseWorldRuntime, getWorldRuntimeByKey, listWorldRuntimeSnapshots, stopWorldRuntime, stopWorldRuntimesByWorldId, stopAllWorldRuntimes, type StartedWorldRuntime, type WorldRuntimeSnapshot, type WorldRuntimeStorageContext, } from './world-registry.js'; export { getDefaultRootPath } from './storage/storage-factory.js'; export { runMigrations, getMigrationStatus, needsMigration, type MigrationContext, type MigrationFile } from './storage/migration-runner.js'; export declare const VERSION = "0.5.0";