import { z } from "zod"; import type { MoodleClient } from "../moodle/client.js"; import type { MoodleCapabilities } from "../moodle/capabilities.js"; import type { LogFn } from "../server/factory.js"; import type { Course, Category } from "../tools/cache.js"; export type { ToolColumn, ToolContextBlock, ToolDataBlock, ToolEntity, ToolEntityAction, ToolEntityRef, ToolInteractionAction, ToolInteractionsBlock, ToolPresentation, ToolResponse, } from "../tools/response-types.js"; export declare const PluginManifestSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; version: z.ZodString; apiVersion: z.ZodLiteral<"1">; description: z.ZodDefault; requiredCapabilities: z.ZodDefault>; tools: z.ZodDefault>; }, "strip", z.ZodTypeAny, { apiVersion: "1"; id: string; name: string; version: string; description: string; requiredCapabilities: string[]; tools: string[]; }, { apiVersion: "1"; id: string; name: string; version: string; description?: string | undefined; requiredCapabilities?: string[] | undefined; tools?: string[] | undefined; }>; export type PluginManifest = z.infer; export type AgentCaptureTransform = "filterKey" | "filterValue" | "number"; export interface AgentArgCapture { kind: "arg"; name: string; group: string | number; transform?: AgentCaptureTransform; } export interface AgentFilterCapture { kind: "filter"; target: string; fieldGroup: string | number; valueGroup: string | number; fieldTransform?: AgentCaptureTransform; valueTransform?: AgentCaptureTransform; } export type AgentCapture = AgentArgCapture | AgentFilterCapture; export interface AgentIntentRoute { id: string; description?: string; match: string; flags?: string; tool: string; args?: Record; captures?: AgentCapture[]; exclude?: string[]; } export interface AgentToolRewrite { id: string; description?: string; whenTool: string; match: string; flags?: string; tool: string; args?: Record; captures?: AgentCapture[]; exclude?: string[]; } export interface AgentContinuationAction { tool: string; keywords: string[]; } export interface AgentRegistration { promptRules?: string[]; intentRoutes?: AgentIntentRoute[]; toolRewrites?: AgentToolRewrite[]; continuationActions?: AgentContinuationAction[]; } export interface PluginContextCache { getCourses(): Promise; getCategories(): Promise; } export interface PluginContext { moodleClient: MoodleClient; capabilities: MoodleCapabilities; log: LogFn; config: { serverName: string; serverVersion: string; }; cache: PluginContextCache; } export interface ToolModule { name: string; description: string; inputSchema: unknown; createHandler: (ctx: PluginContext) => (args: unknown) => Promise; } export interface MCPServerPlugin { manifest: PluginManifest; initialize?: (ctx: PluginContext) => Promise | void; shutdown?: (ctx: PluginContext) => Promise | void; agent?: AgentRegistration; tools: ToolModule[]; } export interface LoadedPlugin { manifest: PluginManifest; tools: ToolModule[]; agent?: AgentRegistration; shutdown?: () => Promise | void; } export interface PluginSearchPath { path: string; } //# sourceMappingURL=contracts.d.ts.map