@mrrlin-dev/mcp 0.4.144 → 0.4.145

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.
Files changed (2) hide show
  1. package/dist/bin.cjs +22 -5
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -63826,7 +63826,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
63826
63826
  }
63827
63827
 
63828
63828
  // src/_generated/version.ts
63829
- var PKG_VERSION = "0.4.144";
63829
+ var PKG_VERSION = "0.4.145";
63830
63830
 
63831
63831
  // src/bridge-allowed-origins.ts
63832
63832
  var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
@@ -67808,6 +67808,21 @@ async function resolveEffectiveRisk(deps, worktreePath, projectSlug, review) {
67808
67808
  }
67809
67809
  return { risk, reason };
67810
67810
  }
67811
+ var PREFLIGHT_REFUSAL_TOKENS = ["local_checkout_missing", "capability_not_routed", "task_blocked"];
67812
+ function judgementForRunPrompt(task, artifacts) {
67813
+ const judgement = task.latestJudgement;
67814
+ const filedByPreflight = (token2) => artifacts.some((artifact) => {
67815
+ if (artifact.kind !== "handoff_judgement") return false;
67816
+ const payload = artifact.payload;
67817
+ return payload?.reasonCode === token2 && payload?.reason === judgement;
67818
+ });
67819
+ const token = judgement && task.latestJudgementKind === "handoff" ? PREFLIGHT_REFUSAL_TOKENS.find((t) => judgement.startsWith(`${t}: run `) && filedByPreflight(t)) : void 0;
67820
+ if (!token) return { latestJudgement: task.latestJudgement, latestJudgementKind: task.latestJudgementKind };
67821
+ return {
67822
+ latestJudgement: `resolved \u2014 an earlier attempt stopped at the pre-flight check "${token}", and this run passed that check before it started, so the condition no longer holds. Do not ask about it again; continue the task.`,
67823
+ latestJudgementKind: task.latestJudgementKind
67824
+ };
67825
+ }
67811
67826
  async function gatherContext(client, projectSlug, task, openRunId, rawProjectInput) {
67812
67827
  let rawProject = rawProjectInput;
67813
67828
  if (!rawProject) {
@@ -67862,8 +67877,9 @@ async function gatherContext(client, projectSlug, task, openRunId, rawProjectInp
67862
67877
  notes: task.notes,
67863
67878
  autonomyLevel: task.autonomyLevel,
67864
67879
  autonomyReason: task.autonomyReason,
67865
- latestJudgement: task.latestJudgement,
67866
- latestJudgementKind: task.latestJudgementKind
67880
+ // From every artifact of the task, before the recency cap below can drop the one that proves
67881
+ // where the judgement came from.
67882
+ ...judgementForRunPrompt(task, allArtifacts)
67867
67883
  },
67868
67884
  specMarkdown,
67869
67885
  runs,
@@ -68587,8 +68603,9 @@ ${renderTaskStateSection(taskState)}`;
68587
68603
  task: {
68588
68604
  id: task.id,
68589
68605
  status: task.status,
68590
- latestJudgement: task.latestJudgement,
68591
- latestJudgementKind: task.latestJudgementKind
68606
+ // Already resolved by gatherContext from the uncapped artifacts; context.artifacts is capped.
68607
+ latestJudgement: context.task.latestJudgement,
68608
+ latestJudgementKind: context.task.latestJudgementKind
68592
68609
  },
68593
68610
  newlyFinishedRuns: [priorRun],
68594
68611
  newArtifacts,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.144",
3
+ "version": "0.4.145",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"