/** * @name tools/perpspad/perpspad-pipeline * @description Shared pipeline helpers for the PerpsPad tool family. Mirrors * the Backpack/Sunrise pipelines: compacted responses, structured errors. * * @module tools/perpspad/perpspad-pipeline */ import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; import type { SapMcpContext } from '../../../core/src/types.js'; import { type ToolExecutionPipelineResult } from '../tool-execution-pipeline.js'; export type PerpspadPipelineResult = ToolExecutionPipelineResult>; export interface PerpspadPipelineToolDefinition { readonly description: string; readonly inputSchema: unknown; } /** Narrows arbitrary payloads into a record for the pipeline envelope. */ export declare function toPerpspadRecord(payload: unknown): Record; /** Builds a structured success pipeline result with upstream compaction. */ export declare function perpspadPipelineOk(payload: unknown): PerpspadPipelineResult; /** Builds a structured error pipeline result. */ export declare function perpspadPipelineError(payload: Record): PerpspadPipelineResult; /** Maps an exception into a structured error envelope. */ export declare function perpspadPipelineException(error: string, err: unknown): PerpspadPipelineResult; /** * @name registerPerpspadPipelineTool * @description Registers a PerpsPad tool through the shared execution * pipeline (responseMode 'data', compacted results). */ export declare function registerPerpspadPipelineTool>(server: Server, context: SapMcpContext, name: string, definition: { readonly description: string; readonly inputSchema: unknown; }, handler: (args: TInput) => Promise): void; //# sourceMappingURL=perpspad-pipeline.d.ts.map