import { print, printJSON, parseJSON, input, sleep, round, read, write, readImage, notify, range, mostCommon, keys, values, entries, emit, callback } from "agency-lang/stdlib/index.js";
import { exec } from "agency-lang/stdlib/shell.js";
import { args } from "agency-lang/stdlib/system.js";
import { systemMessage } from "agency-lang/stdlib/thread.js";
import { fileURLToPath } from "url";
import __process from "process";
import { z } from "agency-lang/zod";
import { goToNode, nanoid } from "agency-lang";
import path from "path";
import {
  RuntimeContext,
  ThreadStore,
  Runner,
  setupNode,
  runNode,
  runPrompt,
  callHook,
  checkpoint as __checkpoint_impl,
  getCheckpoint as __getCheckpoint_impl,
  restore as __restore_impl,
  _run as __runtime_run_impl,
  interrupt,
  isInterrupt,
  hasInterrupts,
  isDebugger,
  respondToInterrupts as _respondToInterrupts,
  rewindFrom as _rewindFrom,
  RestoreSignal,
  GuardExceededError,
  __registerGlobalsInit,
  failure,
  AgencyFunction as __AgencyFunction,
  __call,
  __threads,
  __stateStack,
  getRuntimeContext,
  agencyStore,
  functionRefReviver as __functionRefReviver,
  DeterministicClient as __DeterministicClient,
  createLogger as __createLogger
} from "agency-lang/runtime";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const __cwd = __process.cwd();
const getDirname = () => __dirname;
const __globalCtx = new RuntimeContext({
  statelogConfig: {
    host: "https://statelog.adit.io",
    apiKey: __process.env["STATELOG_API_KEY"] || "",
    projectId: "agency-lang",
    debugMode: false,
    observability: true,
    logFile: "statelog.log"
  },
  smoltalkDefaults: {
    openAiApiKey: __process.env["OPENAI_API_KEY"] || "",
    googleApiKey: __process.env["GEMINI_API_KEY"] || "",
    model: "gpt-4o-mini",
    logLevel: "warn",
    statelog: {
      host: "https://statelog.adit.io",
      projectId: "smoltalk",
      apiKey: __process.env["STATELOG_SMOLTALK_API_KEY"] || "",
      traceId: nanoid()
    }
  },
  dirname: __dirname,
  logLevel: "info",
  traceConfig: {
    program: "dist/lib/agents/review/agent.agency"
  }
});
const graph = __globalCtx.graph;
function approve(value) {
  return { type: "approve", value };
}
function reject(value) {
  return { type: "reject", value };
}
function propagate() {
  return { type: "propagate" };
}
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, registerTopLevelCallbacks: __registerTopLevelCallbacks, moduleDir: __dirname });
const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata, registerTopLevelCallbacks: __registerTopLevelCallbacks, moduleDir: __dirname });
const __setDebugger = (dbg) => {
  __globalCtx.debuggerState = dbg;
};
const __setTraceFile = (filePath) => {
  __globalCtx.traceConfig.traceFile = filePath;
};
const __setLLMClient = (client) => {
  __globalCtx.setLLMClient(client);
};
const __getCheckpoints = () => __globalCtx.checkpoints;
if (__process.env.AGENCY_LLM_MOCKS) {
  __globalCtx.setLLMClient(
    new __DeterministicClient(JSON.parse(__process.env.AGENCY_LLM_MOCKS))
  );
}
const __toolRegistry = __functionRefReviver.registry ??= {};
function __registerTool(value, _aliasName) {
  if (__AgencyFunction.isAgencyFunction(value)) {
    __toolRegistry[`${value.module}:${value.name}`] = value;
  }
}
const checkpoint = __AgencyFunction.create({ name: "checkpoint", module: "__runtime", fn: __checkpoint_impl, params: [], toolDefinition: null }, __toolRegistry);
const getCheckpoint = __AgencyFunction.create({ name: "getCheckpoint", module: "__runtime", fn: __getCheckpoint_impl, params: [{ name: "checkpointId", hasDefault: false, defaultValue: void 0, variadic: false }], toolDefinition: null }, __toolRegistry);
const restore = __AgencyFunction.create({ name: "restore", module: "__runtime", fn: __restore_impl, params: [{ name: "checkpointIdOrCheckpoint", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "options", hasDefault: false, defaultValue: void 0, variadic: false }], toolDefinition: null }, __toolRegistry);
const _run = __AgencyFunction.create({ name: "_run", module: "__runtime", fn: __runtime_run_impl, params: [{ name: "compiled", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "node", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "args", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "wallClock", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "memory", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "ipcPayload", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "stdout", hasDefault: false, defaultValue: void 0, variadic: false }], toolDefinition: null }, __toolRegistry);
function setLLMClient(client) {
  __globalCtx.setLLMClient(client);
}
function registerTools(tools) {
  for (const tool of tools) {
    if (__AgencyFunction.isAgencyFunction(tool)) {
      __toolRegistry[`${tool.module}:${tool.name}`] = tool;
    }
  }
}
__registerTool(print);
__registerTool(printJSON);
__registerTool(parseJSON);
__registerTool(input);
__registerTool(sleep);
__registerTool(round);
__registerTool(read);
__registerTool(write);
__registerTool(readImage);
__registerTool(notify);
__registerTool(range);
__registerTool(mostCommon);
__registerTool(keys);
__registerTool(values);
__registerTool(entries);
__registerTool(emit);
__registerTool(callback);
__registerTool(exec);
__registerTool(args);
__registerTool(systemMessage);
async function __initializeGlobals(__ctx) {
  if (__ctx.globals.isInitialized("dist/lib/agents/review/agent.agency")) {
    return;
  }
  __ctx.globals.markInitialized("dist/lib/agents/review/agent.agency");
  __ctx.globals.set("dist/lib/agents/review/agent.agency", "systemPrompt", await __call(read, {
    type: "positional",
    args: [`./prompts/system.md`]
  }));
}
__registerGlobalsInit("dist/lib/agents/review/agent.agency", __initializeGlobals);
async function __registerTopLevelCallbacks(__ctx) {
  __ctx.topLevelCallbacks = [];
}
__functionRefReviver.registry = __toolRegistry;
const Severity = z.union([z.literal("critical"), z.literal("warning"), z.literal("suggestion")]);
const Issue = z.object({ "severity": Severity, "line": z.union([z.number(), z.null()]), "message": z.string(), "suggestion": z.union([z.string(), z.null()]) });
const ReviewResult = z.object({ "summary": z.string(), "issues": z.array(Issue), "strengths": z.array(z.string()) });
graph.node("main", async (__state) => {
  const __setupData = setupNode({
    state: __state
  });
  const __stack = __setupData.stack;
  const __step = __setupData.step;
  const __self = __setupData.self;
  const __ctx = getRuntimeContext().ctx;
  let __forked;
  let __functionCompleted = false;
  const runner = new Runner(__ctx, __stack, { nodeContext: true, state: __stack, moduleId: "dist/lib/agents/review/agent.agency", scopeName: "main", threads: __setupData.threads });
  try {
    await agencyStore.run({
      ...getRuntimeContext(),
      ctx: __ctx,
      stack: __ctx.stateStack,
      threads: __setupData.threads
    }, async () => {
      await runner.hook(0, async () => {
        await callHook({
          name: "onNodeStart",
          data: {
            nodeName: "main"
          }
        });
      });
      await runner.step(1, async (runner2) => {
        __stack.locals.cliArgs = await __call(args, {
          type: "positional",
          args: []
        });
        if (hasInterrupts(__stack.locals.cliArgs)) {
          await getRuntimeContext().ctx.pendingPromises.awaitAll();
          runner2.halt({
            ...__state,
            data: __stack.locals.cliArgs
          });
          return;
        }
      });
      await runner.ifElse(2, [
        {
          condition: async () => __stack.locals.cliArgs.length < 2,
          body: async (runner2) => {
            await runner2.step(0, async (runner3) => {
              const __funcResult = await __call(print, {
                type: "positional",
                args: [`Usage: agency review <file.agency>`]
              });
              if (hasInterrupts(__funcResult)) {
                await getRuntimeContext().ctx.pendingPromises.awaitAll();
                runner3.halt({
                  ...__state,
                  data: __funcResult
                });
                return;
              }
            });
            await runner2.step(1, async (runner3) => {
              __stateStack()?.pop();
              __functionCompleted = true;
              runner3.halt(goToNode("end", {
                messages: __threads(),
                ctx: getRuntimeContext().ctx,
                data: {}
              }));
              return;
            });
          }
        }
      ]);
      await runner.step(3, async (runner2) => {
        __stack.locals.agencyScript = __stack.locals.cliArgs[0];
      });
      await runner.step(4, async (runner2) => {
        __stack.locals.filePath = __stack.locals.cliArgs[1];
      });
      await runner.step(5, async (runner2) => {
        __self.__retryable = false;
        __stack.locals.code = await __call(read, {
          type: "positional",
          args: [__stack.locals.filePath]
        });
        if (hasInterrupts(__stack.locals.code)) {
          await getRuntimeContext().ctx.pendingPromises.awaitAll();
          runner2.halt({
            ...__state,
            data: __stack.locals.code
          });
          return;
        }
      });
      await runner.step(6, async (runner2) => {
        const __funcResult = await __call(print, {
          type: "positional",
          args: [`Reviewing: ${__stack.locals.filePath}
`]
        });
        if (hasInterrupts(__funcResult)) {
          await getRuntimeContext().ctx.pendingPromises.awaitAll();
          runner2.halt({
            ...__state,
            data: __funcResult
          });
          return;
        }
      });
      await runner.step(7, async (runner2) => {
        const __funcResult = await __call(print, {
          type: "positional",
          args: [`Running type checker...`]
        });
        if (hasInterrupts(__funcResult)) {
          await getRuntimeContext().ctx.pendingPromises.awaitAll();
          runner2.halt({
            ...__state,
            data: __funcResult
          });
          return;
        }
      });
      await runner.step(8, async (runner2) => {
        __self.__retryable = false;
        __stack.locals.typeCheckResult = await __call(exec, {
          type: "positional",
          args: [`node`, [__stack.locals.agencyScript, `typecheck`, __stack.locals.filePath]]
        });
        if (hasInterrupts(__stack.locals.typeCheckResult)) {
          await getRuntimeContext().ctx.pendingPromises.awaitAll();
          runner2.halt({
            ...__state,
            data: __stack.locals.typeCheckResult
          });
          return;
        }
      });
      await runner.step(9, async (runner2) => {
        __stack.locals.typeErrors = ``;
      });
      await runner.ifElse(10, [
        {
          condition: async () => __stack.locals.typeCheckResult.exitCode !== 0,
          body: async (runner2) => {
            await runner2.step(0, async (runner3) => {
              __stack.locals.typeErrors = __stack.locals.typeCheckResult.stderr + __stack.locals.typeCheckResult.stdout;
            });
            await runner2.step(1, async (runner3) => {
              const __funcResult = await __call(print, {
                type: "positional",
                args: [`Type checker found issues:
${__stack.locals.typeErrors}
`]
              });
              if (hasInterrupts(__funcResult)) {
                await getRuntimeContext().ctx.pendingPromises.awaitAll();
                runner3.halt({
                  ...__state,
                  data: __funcResult
                });
                return;
              }
            });
          }
        }
      ], async (runner2) => {
        await runner2.step(2, async (runner3) => {
          const __funcResult = await __call(print, {
            type: "positional",
            args: [`Type checker passed.
`]
          });
          if (hasInterrupts(__funcResult)) {
            await getRuntimeContext().ctx.pendingPromises.awaitAll();
            runner3.halt({
              ...__state,
              data: __funcResult
            });
            return;
          }
        });
      });
      await runner.step(11, async (runner2) => {
      });
      await runner.thread(12, "create", {}, async (runner2) => {
        await runner2.step(0, async (runner3) => {
          __self.__retryable = false;
          const __funcResult = await __call(systemMessage, {
            type: "positional",
            args: [getRuntimeContext().ctx.globals.get("dist/lib/agents/review/agent.agency", "systemPrompt")]
          });
          if (hasInterrupts(__funcResult)) {
            await getRuntimeContext().ctx.pendingPromises.awaitAll();
            runner3.halt({
              ...__state,
              data: __funcResult
            });
            return;
          }
        });
        await runner2.step(1, async (runner3) => {
          __stack.locals.typeErrorMessage = `The type checker found no errors.`;
        });
        await runner2.ifElse(2, [
          {
            condition: async () => __stack.locals.typeErrors !== ``,
            body: async (runner3) => {
              await runner3.step(0, async (runner4) => {
                __stack.locals.typeErrorMessage = `The type checker reported the following errors:
${__stack.locals.typeErrors}`;
              });
            }
          }
        ]);
        await runner2.step(3, async (runner3) => {
          __stack.locals.reviewPrompt = `
              Please review the following Agency code.

              File: ${__stack.locals.filePath}

              ---CODE START---
              ${__stack.locals.code}
              ---CODE END---

              ${__stack.locals.typeErrorMessage}

              Provide a structured review with a summary, list of issues (with severity, line number if applicable, message, and suggested fix), and a list of strengths.
            `;
        });
        await runner2.step(4, async (runner3) => {
          __self.__removedTools = __self.__removedTools || [];
          __stack.locals.review = await runPrompt({
            prompt: __stack.locals.reviewPrompt,
            messages: __threads().getOrCreateActive(),
            responseFormat: z.object({
              response: ReviewResult
            }),
            clientConfig: {},
            maxToolCallRounds: 10,
            removedTools: __self.__removedTools,
            checkpointInfo: runner3.getCheckpointInfo()
          });
          if (hasInterrupts(__stack.locals.review)) {
            await getRuntimeContext().ctx.pendingPromises.awaitAll();
            runner3.halt({
              messages: __threads(),
              data: __stack.locals.review
            });
            return;
          }
        });
      });
      await runner.step(13, async (runner2) => {
        __self.__retryable = false;
      });
      await runner.step(14, async (runner2) => {
        const __funcResult = await __call(print, {
          type: "positional",
          args: [`
--- Review Summary ---`]
        });
        if (hasInterrupts(__funcResult)) {
          await getRuntimeContext().ctx.pendingPromises.awaitAll();
          runner2.halt({
            ...__state,
            data: __funcResult
          });
          return;
        }
      });
      await runner.step(15, async (runner2) => {
        const __funcResult = await __call(print, {
          type: "positional",
          args: [__stack.locals.review.summary]
        });
        if (hasInterrupts(__funcResult)) {
          await getRuntimeContext().ctx.pendingPromises.awaitAll();
          runner2.halt({
            ...__state,
            data: __funcResult
          });
          return;
        }
      });
      await runner.ifElse(16, [
        {
          condition: async () => __stack.locals.review.strengths.length > 0,
          body: async (runner2) => {
            await runner2.step(0, async (runner3) => {
              const __funcResult = await __call(print, {
                type: "positional",
                args: [`
--- Strengths ---`]
              });
              if (hasInterrupts(__funcResult)) {
                await getRuntimeContext().ctx.pendingPromises.awaitAll();
                runner3.halt({
                  ...__state,
                  data: __funcResult
                });
                return;
              }
            });
            await runner2.loop(1, __stack.locals.review.strengths, async (strength, _, runner3) => {
              await runner3.step(0, async (runner4) => {
                const __funcResult = await __call(print, {
                  type: "positional",
                  args: [`  + ${strength}`]
                });
                if (hasInterrupts(__funcResult)) {
                  await getRuntimeContext().ctx.pendingPromises.awaitAll();
                  runner4.halt({
                    ...__state,
                    data: __funcResult
                  });
                  return;
                }
              });
            });
          }
        }
      ]);
      await runner.ifElse(17, [
        {
          condition: async () => __stack.locals.review.issues.length > 0,
          body: async (runner2) => {
            await runner2.step(0, async (runner3) => {
              const __funcResult = await __call(print, {
                type: "positional",
                args: [`
--- Issues ---`]
              });
              if (hasInterrupts(__funcResult)) {
                await getRuntimeContext().ctx.pendingPromises.awaitAll();
                runner3.halt({
                  ...__state,
                  data: __funcResult
                });
                return;
              }
            });
            await runner2.loop(1, __stack.locals.review.issues, async (issue, _, runner3) => {
              await runner3.step(0, async (runner4) => {
                __stack.locals.prefix = `[${issue.severity}]`;
              });
              await runner3.step(1, async (runner4) => {
                __stack.locals.lineInfo = ``;
              });
              await runner3.ifElse(2, [
                {
                  condition: async () => issue.line !== null,
                  body: async (runner4) => {
                    await runner4.step(0, async (runner5) => {
                      __stack.locals.lineInfo = ` (line ${issue.line})`;
                    });
                  }
                }
              ]);
              await runner3.step(3, async (runner4) => {
                const __funcResult = await __call(print, {
                  type: "positional",
                  args: [`  ${__stack.locals.prefix}${__stack.locals.lineInfo} ${issue.message}`]
                });
                if (hasInterrupts(__funcResult)) {
                  await getRuntimeContext().ctx.pendingPromises.awaitAll();
                  runner4.halt({
                    ...__state,
                    data: __funcResult
                  });
                  return;
                }
              });
              await runner3.ifElse(4, [
                {
                  condition: async () => issue.suggestion !== null,
                  body: async (runner4) => {
                    await runner4.step(0, async (runner5) => {
                      const __funcResult = await __call(print, {
                        type: "positional",
                        args: [`    Fix: ${issue.suggestion}`]
                      });
                      if (hasInterrupts(__funcResult)) {
                        await getRuntimeContext().ctx.pendingPromises.awaitAll();
                        runner5.halt({
                          ...__state,
                          data: __funcResult
                        });
                        return;
                      }
                    });
                  }
                }
              ]);
            });
          }
        }
      ], async (runner2) => {
        await runner2.step(2, async (runner3) => {
          const __funcResult = await __call(print, {
            type: "positional",
            args: [`
No issues found. Code looks good!`]
          });
          if (hasInterrupts(__funcResult)) {
            await getRuntimeContext().ctx.pendingPromises.awaitAll();
            runner3.halt({
              ...__state,
              data: __funcResult
            });
            return;
          }
        });
      });
      await runner.step(18, async (runner2) => {
        __stateStack()?.pop();
        __functionCompleted = true;
        runner2.halt(goToNode("end", {
          messages: __threads(),
          ctx: getRuntimeContext().ctx,
          data: {}
        }));
        return;
      });
    });
    if (runner.halted) return runner.haltResult;
    await runner.hook(19, async () => {
      await callHook({
        name: "onNodeEnd",
        data: {
          nodeName: "main",
          data: void 0
        }
      });
    });
    return {
      messages: __threads(),
      data: void 0
    };
  } catch (__error) {
    if (__error instanceof RestoreSignal) {
      throw __error;
    }
    if (__error instanceof GuardExceededError) {
      throw __error;
    }
    {
      const __errMsg = __error instanceof Error ? __error.message : String(__error);
      const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
      const __log = __createLogger(__ctx.logLevel);
      __log.error(`Node main crashed: ${__errMsg}`);
      if (__errStack) __log.error(__errStack);
      __ctx.statelogClient?.error?.({
        errorType: "runtimeError",
        message: __errMsg,
        functionName: "main"
      });
    }
    return {
      messages: __threads(),
      data: failure(__error instanceof Error ? __error.message : String(__error), { functionName: "main" })
    };
  }
});
graph.node("end", async (__state) => {
  const __setupData = setupNode({
    state: __state
  });
  const __stack = __setupData.stack;
  const __step = __setupData.step;
  const __self = __setupData.self;
  const __ctx = getRuntimeContext().ctx;
  let __forked;
  let __functionCompleted = false;
  const runner = new Runner(__ctx, __stack, { nodeContext: true, state: __stack, moduleId: "dist/lib/agents/review/agent.agency", scopeName: "end", threads: __setupData.threads });
  try {
    await agencyStore.run({
      ...getRuntimeContext(),
      ctx: __ctx,
      stack: __ctx.stateStack,
      threads: __setupData.threads
    }, async () => {
      await runner.hook(0, async () => {
        await callHook({
          name: "onNodeStart",
          data: {
            nodeName: "end"
          }
        });
      });
    });
    if (runner.halted) return runner.haltResult;
    await runner.hook(1, async () => {
      await callHook({
        name: "onNodeEnd",
        data: {
          nodeName: "end",
          data: void 0
        }
      });
    });
    return {
      messages: __threads(),
      data: void 0
    };
  } catch (__error) {
    if (__error instanceof RestoreSignal) {
      throw __error;
    }
    if (__error instanceof GuardExceededError) {
      throw __error;
    }
    {
      const __errMsg = __error instanceof Error ? __error.message : String(__error);
      const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
      const __log = __createLogger(__ctx.logLevel);
      __log.error(`Node end crashed: ${__errMsg}`);
      if (__errStack) __log.error(__errStack);
      __ctx.statelogClient?.error?.({
        errorType: "runtimeError",
        message: __errMsg,
        functionName: "end"
      });
    }
    return {
      messages: __threads(),
      data: failure(__error instanceof Error ? __error.message : String(__error), { functionName: "end" })
    };
  }
});
graph.conditionalEdge("main", ["end", "end"]);
async function main({ messages, callbacks } = {}) {
  return runNode({
    ctx: __globalCtx,
    nodeName: "main",
    data: {},
    messages,
    callbacks,
    initializeGlobals: __initializeGlobals,
    registerTopLevelCallbacks: __registerTopLevelCallbacks,
    moduleDir: __dirname
  });
}
const __mainNodeParams = [];
async function end({ messages, callbacks } = {}) {
  return runNode({
    ctx: __globalCtx,
    nodeName: "end",
    data: {},
    messages,
    callbacks,
    initializeGlobals: __initializeGlobals,
    registerTopLevelCallbacks: __registerTopLevelCallbacks,
    moduleDir: __dirname
  });
}
const __endNodeParams = [];
if (__process.argv[1] === fileURLToPath(import.meta.url)) {
  try {
    const initialState = {
      messages: new ThreadStore(),
      data: {}
    };
    await main(initialState);
  } catch (__error) {
    console.error(`
Agent crashed: ${__error.message}`);
    throw __error;
  }
}
var stdin_default = graph;
const __sourceMap = { "dist/lib/agents/review/agent.agency:main": { "1": { "line": 21, "col": 2 }, "2": { "line": 22, "col": 2 }, "3": { "line": 26, "col": 2 }, "4": { "line": 27, "col": 2 }, "5": { "line": 28, "col": 2 }, "6": { "line": 29, "col": 2 }, "7": { "line": 30, "col": 2 }, "8": { "line": 31, "col": 2 }, "9": { "line": 32, "col": 2 }, "10": { "line": 33, "col": 2 }, "12": { "line": 40, "col": 2 }, "14": { "line": 62, "col": 2 }, "15": { "line": 63, "col": 2 }, "16": { "line": 64, "col": 2 }, "17": { "line": 70, "col": 2 }, "18": { "line": 86, "col": 2 }, "2.0": { "line": 23, "col": 4 }, "2.1": { "line": 24, "col": 4 }, "10.0": { "line": 34, "col": 4 }, "10.1": { "line": 35, "col": 4 }, "10.2": { "line": 37, "col": 4 }, "12.0": { "line": 41, "col": 4 }, "12.1": { "line": 42, "col": 4 }, "12.2.0": { "line": 44, "col": 6 }, "12.2": { "line": 43, "col": 4 }, "12.3": { "line": 46, "col": 4 }, "12.4": { "line": 59, "col": 4 }, "16.0": { "line": 65, "col": 4 }, "16.1.0": { "line": 67, "col": 6 }, "16.1": { "line": 66, "col": 4 }, "17.0": { "line": 71, "col": 4 }, "17.1.0": { "line": 73, "col": 6 }, "17.1.1": { "line": 74, "col": 6 }, "17.1.2.0": { "line": 76, "col": 8 }, "17.1.2": { "line": 75, "col": 6 }, "17.1.3": { "line": 78, "col": 6 }, "17.1.4.0": { "line": 80, "col": 8 }, "17.1.4": { "line": 79, "col": 6 }, "17.1": { "line": 72, "col": 4 }, "17.2": { "line": 84, "col": 4 } }, "dist/lib/agents/review/agent.agency:end": {} };
export {
  __endNodeParams,
  __getCheckpoints,
  __mainNodeParams,
  __setDebugger,
  __setLLMClient,
  __setTraceFile,
  __sourceMap,
  __toolRegistry,
  approve,
  stdin_default as default,
  end,
  hasInterrupts,
  interrupt,
  isDebugger,
  isInterrupt,
  main,
  reject,
  respondToInterrupts,
  rewindFrom
};
