export declare const template = "import * as mod from {{{compiledModulePath:string}}};\nimport { discoverExports } from {{{discoveryPath:string}}};\nimport { createMcpHandler } from {{{mcpAdapterPath:string}}};\nimport { startMcpHttpServer } from {{{mcpHttpTransportPath:string}}};\nimport { PolicyStore } from {{{policyStorePath:string}}};\nimport { createLogger } from {{{loggerPath:string}}};\n\nconst exportedNodeNames = {{{exportedNodeNamesJson:string}}};\nconst interruptKindsByName = {{{interruptKindsByNameJson:string}}};\n\nconst exports = discoverExports({\n  toolRegistry: mod.__toolRegistry ?? {},\n  moduleExports: mod,\n  moduleId: {{{moduleId:string}}},\n  exportedNodeNames,\n  interruptKindsByName,\n});\n\nconst serverName = {{{serverName:string}}};\nconst policyStore = new PolicyStore(serverName);\n\nconst interruptHandlers = {\n  hasInterrupts: mod.hasInterrupts,\n  respondToInterrupts: async (interrupts, responses) => {\n    const wrapped = await mod.respondToInterrupts(interrupts, responses);\n    return wrapped.data;\n  },\n};\n\nconst handler = createMcpHandler({\n  serverName,\n  serverVersion: {{{serverVersion:string}}},\n  exports,\n  policyConfig: { policyStore, interruptHandlers },\n});\n\nconst rawPort = process.env.PORT ?? {{{defaultPort:string}}};\nconst port = parseInt(rawPort, 10);\nif (isNaN(port) || port < 1 || port > 65535) {\n  console.error(\"Invalid PORT: \" + rawPort + \". Must be an integer between 1 and 65535.\");\n  process.exit(1);\n}\nconst host = process.env.HOST ?? {{{defaultHost:string}}};\nconst mcpPath = process.env.MCP_PATH ?? {{{defaultPath:string}}};\nconst apiKey = process.env[{{{apiKeyEnv:string}}}];\n\ntry {\n  startMcpHttpServer({\n    handler,\n    port,\n    host,\n    path: mcpPath,\n    apiKey,\n    logger: createLogger(\"info\"),\n  });\n} catch (err) {\n  console.error(err instanceof Error ? err.message : String(err));\n  process.exit(1);\n}\n";
export type TemplateType = {
    compiledModulePath: string;
    discoveryPath: string;
    mcpAdapterPath: string;
    mcpHttpTransportPath: string;
    policyStorePath: string;
    loggerPath: string;
    exportedNodeNamesJson: string;
    interruptKindsByNameJson: string;
    moduleId: string;
    serverName: string;
    serverVersion: string;
    defaultPort: string;
    defaultHost: string;
    defaultPath: string;
    apiKeyEnv: string;
};
declare const render: (args: TemplateType) => string;
export default render;
