UNPKG

sfcc-dev-mcp

Version:

MCP server for Salesforce B2C Commerce Cloud development assistance including logs, debugging, and development tools

35 lines 1.57 kB
import { BaseToolHandler, GenericToolSpec, ToolExecutionContext, HandlerContext } from './base-handler.js'; import { SFCCLogClient } from '../../clients/logs/index.js'; import { ClientFactory } from './client-factory.js'; /** * Abstract base class for log-related tool handlers * Extends the generic config-driven handler with log-specific functionality */ export declare abstract class AbstractLogToolHandler<TToolName extends string = string> extends BaseToolHandler<TToolName> { protected logClient: SFCCLogClient | null; protected clientFactory: ClientFactory; constructor(context: HandlerContext, subLoggerName: string); protected onInitialize(): Promise<void>; protected onDispose(): Promise<void>; /** * Get the log client with proper error handling * Eliminates repetitive null checks in handlers */ protected getLogClient(): SFCCLogClient; /** * Create execution context for log tools * Provides access to log client and handler context */ protected createExecutionContext(): Promise<ToolExecutionContext>; /** * Abstract method to get tool configuration * Each concrete log handler implements this with their specific config */ protected abstract getToolConfig(): Record<TToolName, GenericToolSpec>; /** * Abstract method to get tool name set for O(1) lookup * Each concrete log handler implements this with their specific tool set */ protected abstract getToolNameSet(): Set<string>; } //# sourceMappingURL=abstract-log-tool-handler.d.ts.map