export declare const template = "// Resume path: check for a response by interruptId\nconst __response = getRuntimeContext().ctx.getInterruptResponse(__self.{{{interruptIdKey:string}}});\nif (__response) {\n  if (__response.type === \"approve\") {\n    if (__response.value !== undefined) {\n      {{{assignResolve}}};\n    } else {\n      {{{assignApprove}}};\n    }\n  } else if (__response.type === \"reject\") {\n    // reject for tool calls handled separately\n    {{#nodeContext}}\n    runner.halt({ messages: __threads(), data: failure(\"interrupt rejected\", { retryable: false }) });\n    {{/nodeContext}}\n    {{^nodeContext}}\n    runner.halt(failure(\"interrupt rejected\", { retryable: false, checkpoint: getRuntimeContext().ctx.getResultCheckpoint() }));\n    {{/nodeContext}}\n    return;\n  }\n} else {\n  // First run: call handlers, then propagate if unhandled\n  const __handlerResult = await interruptWithHandlers({{{kind}}}, {{{message}}}, {{{data}}}, {{{origin}}}, __ctx, __stateStack());\n  if (isRejected(__handlerResult)) {\n    {{#nodeContext}}\n    runner.halt({ messages: __threads(), data: failure(__handlerResult.value ?? \"interrupt rejected\", { retryable: false }) });\n    {{/nodeContext}}\n    {{^nodeContext}}\n    runner.halt(failure(__handlerResult.value ?? \"interrupt rejected\", { retryable: false, checkpoint: getRuntimeContext().ctx.checkpoints.get(__resultCheckpointId) }));\n    {{/nodeContext}}\n    return;\n  }\n  if (isApproved(__handlerResult)) {\n    {{{handlerApprove}}};\n  } else {\n    // No handler \u2014 propagate interrupt array to TypeScript caller\n    // Store interruptId on frame BEFORE checkpoint so it's captured in the snapshot\n    __self.{{{interruptIdKey:string}}} = __handlerResult[0].interruptId;\n    const __checkpointId = getRuntimeContext().ctx.checkpoints.create(__stateStack(), __ctx, { moduleId: {{{moduleId}}}, scopeName: {{{scopeName}}}, stepPath: {{{stepPath}}} });\n    __handlerResult[0].checkpointId = __checkpointId;\n    __handlerResult[0].checkpoint = getRuntimeContext().ctx.checkpoints.get(__checkpointId);\n    {{#nodeContext}}\n    runner.halt({ messages: __threads(), data: __handlerResult });\n    {{/nodeContext}}\n    {{^nodeContext}}\n    runner.halt(__handlerResult);\n    {{/nodeContext}}\n    return;\n  }\n}\n";
export type TemplateType = {
    interruptIdKey: string;
    assignResolve: string | boolean | number;
    assignApprove: string | boolean | number;
    nodeContext: boolean;
    kind: string | boolean | number;
    message: string | boolean | number;
    data: string | boolean | number;
    origin: string | boolean | number;
    handlerApprove: string | boolean | number;
    moduleId: string | boolean | number;
    scopeName: string | boolean | number;
    stepPath: string | boolean | number;
};
declare const render: (args: TemplateType) => string;
export default render;
