import { TypedEventEmitter } from '../events/TypedEventEmitter'; import type { CrewxPlugin } from '../plugin'; import type { IFsAdapter } from '../platform/IFsAdapter'; import type { ChannelAdapterRegistration } from '../adapter/types'; import type { CrewxProjectConfig, AgentConfig, CrewxOptions, QueryOptions, QueryResult, ExecuteOptions, ExecuteResult } from '../types'; import type { TemplateContext } from '../template/types'; import type { CustomLayoutDefinition } from '../layout/types'; import type { TemplateMessage } from '../conversation/types'; import type { HandlerOptions, CrewxHandler } from '../server/handler'; import type { RemoteProviderConfig } from '../remote/types.js'; export interface ToolDefinition { name: string; description: string; parameters?: Record; execute?: (args: Record) => Promise; } export type LayoutSpec = string | { id: string; props?: Record; } | { template: string; }; export interface SkillEntry { metadata: { name: string; version: string; description: string; }; filePath: string; } export interface RenderAgentPromptOptions { layout?: LayoutSpec; session?: { mode?: string; platform?: string; options?: string[]; }; env?: Record; vars?: Record; skills?: SkillEntry[]; messages?: TemplateMessage[]; threadId?: string; } export declare class Crewx extends TypedEventEmitter { private readonly _agents; private readonly _templateEngine; private readonly _documentLoader; private readonly _layoutLoader; private readonly _layoutRenderer; private readonly _config?; private readonly _projectRoot; private readonly _workspaceId; private readonly _workspaceName; private readonly _plugins; private readonly _tools; private readonly _activeAdapters; private readonly _pendingThreads; private readonly _remoteFactory?; private readonly _remoteTargets; private constructor(); private resolveFileRemoteTarget; private static loadBuiltInConfig; private static mergeCrewxConfig; static loadYaml(path: string | undefined, options?: CrewxOptions, fsAdapter?: IFsAdapter): Promise; static fromConfig(config: CrewxProjectConfig, options?: CrewxOptions, projectRoot?: string, fsAdapter?: IFsAdapter): Promise; get agents(): ReadonlyMap; get config(): CrewxProjectConfig | undefined; get plugins(): readonly CrewxPlugin[]; get tools(): ReadonlyMap; get workspaceId(): string; get workspaceName(): string; getAgent(agentRef: string): AgentConfig | undefined; getRemoteProviderConfig(providerId: string): RemoteProviderConfig | undefined; private computeTaskLogPath; registerTool(name: string, definition: Omit): void; use(plugin: CrewxPlugin): Promise; handler(options: HandlerOptions): CrewxHandler; registerChannelAdapter(reg: ChannelAdapterRegistration): Promise; unregisterChannelAdapter(instanceId: string): Promise; stopAllAdapters(opts?: { timeoutMs?: number; }): Promise; close(): Promise; filterAgents(filters: { role?: string; team?: string; provider?: string; }): AgentConfig[]; renderAgentPrompt(agentId: string): string; renderPrompt(template: string, context?: TemplateContext): Promise; registerLayout(name: string, template: string | CustomLayoutDefinition): void; renderAgentPromptFull(agentId: string, options?: RenderAgentPromptOptions): Promise; private _filterToolsByMode; private _resolveLayoutSpec; private _extractLayoutId; private _extractLayoutProps; private _getConversationProvider; private _fetchHistoryMessages; private _resolveTimeout; private _lookupCliAdapter; private _resolveEffectiveCwd; private _buildFileRemoteOptions; private emitToolEvents; private emitTaskLogEntries; private tryParseJson; query(agentRef: string, message: string, options?: QueryOptions): Promise; continueQuery(threadId: string, toolResults: Array<{ toolCallId: string; result: unknown; }>): Promise; execute(agentRef: string, message: string, options?: ExecuteOptions): Promise; }