@kernlang/agon 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,7 +98,7 @@ import {
98
98
  worktreeCreate,
99
99
  worktreeDiff,
100
100
  worktreeRemoveBestEffort
101
- } from "./chunk-GCXVT7RP.js";
101
+ } from "./chunk-7PMMOQZ7.js";
102
102
 
103
103
  // ../forge/src/generated/forge.ts
104
104
  import { randomUUID as randomUUID2 } from "crypto";
@@ -9354,7 +9354,7 @@ ${cleaned}`;
9354
9354
  }
9355
9355
  }
9356
9356
  if (name === "ExitPlanMode") {
9357
- const { handleExitPlanMode } = await import("./plan-mode-MWL3DAHY.js");
9357
+ const { handleExitPlanMode } = await import("./plan-mode-KBJY2FJN.js");
9358
9358
  return "[DELEGATION_BREAK] " + handleExitPlanMode(String(args.reason ?? ""), ctx.cesar?.planDispatch ?? null, ctx);
9359
9359
  }
9360
9360
  if (name === "ProposePlan") {
@@ -9377,7 +9377,7 @@ ${cleaned}`;
9377
9377
  }
9378
9378
  }
9379
9379
  }
9380
- const { handleProposePlan } = await import("./plan-mode-MWL3DAHY.js");
9380
+ const { handleProposePlan } = await import("./plan-mode-KBJY2FJN.js");
9381
9381
  const dispatch = ctx.cesar.planDispatch;
9382
9382
  if (!dispatch) {
9383
9383
  return "[PLAN_ERROR] Internal plan display dispatch unavailable. Retry the plan request so Agon can render the approval panel.";
@@ -10566,12 +10566,14 @@ ${enrichedInput}`;
10566
10566
  break;
10567
10567
  }
10568
10568
  dispatch({ type: "spinner-stop" });
10569
- const errBody = (chunk.content ?? "").toString().slice(0, 200) || "unknown stream error";
10570
- dispatch({ type: "warning", message: `Cesar (${cesarEngineId}) stream error before any output: ${errBody}. Try again or switch engine with /engine.` });
10569
+ const _errFull = (chunk.content ?? "").toString();
10570
+ const errBody = _errFull.slice(0, 200) || "unknown stream error";
10571
+ const _deterministic = /\b(?:400|401|403|404)\b|not found|unauthorized|invalid api key|authentication|no such (?:route|endpoint)/i.test(_errFull);
10572
+ dispatch({ type: "warning", message: `Cesar (${cesarEngineId}) stream error before any output: ${errBody}.${_deterministic ? " Looks like an engine config/auth issue \u2014 check the engine with /engines." : " Try again or switch engine with /engine."}` });
10571
10573
  clearInterval(heartbeat);
10572
10574
  processMcpSideChannel();
10573
10575
  if (mcpWatcherInterval) clearInterval(mcpWatcherInterval);
10574
- return { delegated: false, responded: false, decisionReason: "pre-stream-error" };
10576
+ return { delegated: false, responded: false, decisionReason: "pre-stream-error", deterministicFailure: _deterministic };
10575
10577
  }
10576
10578
  if (chunk.type === "done") break;
10577
10579
  if (chunk.type === "text") {
@@ -10857,7 +10859,7 @@ ${enrichedInput}`;
10857
10859
  });
10858
10860
  continue;
10859
10861
  }
10860
- const { handleProposePlan } = await import("./plan-mode-MWL3DAHY.js");
10862
+ const { handleProposePlan } = await import("./plan-mode-KBJY2FJN.js");
10861
10863
  const planDispatch = ctx.cesar.planDispatch ?? dispatch;
10862
10864
  if (planDispatch) {
10863
10865
  try {
@@ -10870,7 +10872,7 @@ ${enrichedInput}`;
10870
10872
  }
10871
10873
  } else if (signal.tool === "ExitPlanMode") {
10872
10874
  recordToolUse("ExitPlanMode", "mcp", JSON.stringify(signal.args ?? {}), "done");
10873
- const { handleExitPlanMode } = await import("./plan-mode-MWL3DAHY.js");
10875
+ const { handleExitPlanMode } = await import("./plan-mode-KBJY2FJN.js");
10874
10876
  const planDispatch = ctx.cesar.planDispatch ?? dispatch;
10875
10877
  try {
10876
10878
  const exitResult = handleExitPlanMode(String(signal.args?.reason ?? ""), planDispatch, ctx);
@@ -11086,7 +11088,7 @@ ${enrichedInput}`;
11086
11088
  output: "A Cesar plan is already active; nested plans are blocked. Resume or cancel the current plan before proposing another."
11087
11089
  });
11088
11090
  } else {
11089
- const { handleProposePlan } = await import("./plan-mode-MWL3DAHY.js");
11091
+ const { handleProposePlan } = await import("./plan-mode-KBJY2FJN.js");
11090
11092
  const planDispatch = ctx.cesar.planDispatch ?? dispatch;
11091
11093
  const plan = await handleProposePlan(ppArgs, planDispatch, ctx);
11092
11094
  if (ctx.setActivePlan) ctx.setActivePlan(plan);
@@ -11110,7 +11112,7 @@ ${enrichedInput}`;
11110
11112
  const epArgs = ctx.cesar._exitPlanModeArgs;
11111
11113
  delete ctx.cesar._exitPlanModeArgs;
11112
11114
  try {
11113
- const { handleExitPlanMode } = await import("./plan-mode-MWL3DAHY.js");
11115
+ const { handleExitPlanMode } = await import("./plan-mode-KBJY2FJN.js");
11114
11116
  const planDispatch = ctx.cesar.planDispatch ?? dispatch;
11115
11117
  const exitResult = handleExitPlanMode(String(epArgs?.reason ?? ""), planDispatch, ctx);
11116
11118
  dispatch({ type: "tool-call", engineId: cesarEngineId, tool: "ExitPlanMode", input: JSON.stringify(epArgs ?? {}), status: "done", output: exitResult });
@@ -11872,4 +11874,4 @@ export {
11872
11874
  ensureCesarSession,
11873
11875
  handleCesarBrain
11874
11876
  };
11875
- //# sourceMappingURL=chunk-4HY7J7LY.js.map
11877
+ //# sourceMappingURL=chunk-HVJTVOXT.js.map