codeloop-mcp-server 0.1.84 → 0.1.86

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.
@@ -32,6 +32,29 @@ export interface LoopStateSnapshot {
32
32
  }
33
33
  export declare const GATE_ATTEMPT_CAP = 15;
34
34
  export declare const DIAGNOSE_ATTEMPT_CAP = 8;
35
+ /**
36
+ * 0.1.85 — staleness window for the loop counters.
37
+ *
38
+ * The counters exist to stop a RUNAWAY loop WITHIN one work session (an
39
+ * agent that diagnoses → "fixes" → re-verifies → diagnoses the same
40
+ * failure forever). They were NEVER meant to count "every diagnose this
41
+ * project has ever seen". But because they only reset on a passing gate
42
+ * (`ready_for_review`) or a manual `codeloop_doctor --reset-loop-state`,
43
+ * a project that never reaches green (e.g. WedCheese, with genuine
44
+ * pre-existing build failures) accumulated `diagnose_attempts` across
45
+ * days/sessions. The result: the FIRST `codeloop_diagnose` of a brand-new
46
+ * session immediately reported "9 attempts → escalate to the user", and
47
+ * that escalation directive let the agent HALT the whole workflow before
48
+ * it ever launched/drove the app (the WedCheese log-9 failure).
49
+ *
50
+ * Fix: treat the counters as STALE when the last loop activity is older
51
+ * than this window — an active auto-fix loop iterates in minutes, so a
52
+ * gap this large means the previous loop was abandoned and THIS is a new
53
+ * session that deserves a fresh count. A genuine runaway still trips the
54
+ * cap (8+ diagnoses happen well within the window). Same self-clean
55
+ * pattern as the audit-mode TTL.
56
+ */
57
+ export declare const LOOP_STATE_TTL_MS: number;
35
58
  export declare function readLoopState(projectDir: string): LoopStateSnapshot;
36
59
  export declare function incrementGateAttempts(projectDir: string): LoopStateSnapshot;
37
60
  export declare function incrementDiagnoseAttempts(projectDir: string): LoopStateSnapshot;
@@ -1 +1 @@
1
- {"version":3,"file":"loop_state.d.ts","sourceRoot":"","sources":["../../src/evidence/loop_state.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,iBAAiB;IAChC,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,CAAC;CAC3B;AASD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,iBAAiB,QAAqB,CAAC;AA2EpD,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAWnE;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAmB3E;AAED,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAmB/E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CASvD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,iBAAiB,GACvB,IAAI,CAWN;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAEpE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAExE;AAgBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAwBxE"}
@@ -3,6 +3,53 @@ import { homedir } from "os";
3
3
  import { join, resolve } from "path";
4
4
  export const GATE_ATTEMPT_CAP = 15;
5
5
  export const DIAGNOSE_ATTEMPT_CAP = 8;
6
+ /**
7
+ * 0.1.85 — staleness window for the loop counters.
8
+ *
9
+ * The counters exist to stop a RUNAWAY loop WITHIN one work session (an
10
+ * agent that diagnoses → "fixes" → re-verifies → diagnoses the same
11
+ * failure forever). They were NEVER meant to count "every diagnose this
12
+ * project has ever seen". But because they only reset on a passing gate
13
+ * (`ready_for_review`) or a manual `codeloop_doctor --reset-loop-state`,
14
+ * a project that never reaches green (e.g. WedCheese, with genuine
15
+ * pre-existing build failures) accumulated `diagnose_attempts` across
16
+ * days/sessions. The result: the FIRST `codeloop_diagnose` of a brand-new
17
+ * session immediately reported "9 attempts → escalate to the user", and
18
+ * that escalation directive let the agent HALT the whole workflow before
19
+ * it ever launched/drove the app (the WedCheese log-9 failure).
20
+ *
21
+ * Fix: treat the counters as STALE when the last loop activity is older
22
+ * than this window — an active auto-fix loop iterates in minutes, so a
23
+ * gap this large means the previous loop was abandoned and THIS is a new
24
+ * session that deserves a fresh count. A genuine runaway still trips the
25
+ * cap (8+ diagnoses happen well within the window). Same self-clean
26
+ * pattern as the audit-mode TTL.
27
+ */
28
+ export const LOOP_STATE_TTL_MS = 2 * 60 * 60 * 1000; // 2 hours
29
+ /**
30
+ * Return the snapshot as-is, OR a zeroed snapshot when its last activity
31
+ * is older than LOOP_STATE_TTL_MS (a new session, not a continuation of
32
+ * an old loop). Pure — callers decide whether to persist the reset.
33
+ */
34
+ function freshOrReset(snapshot, now = Date.now()) {
35
+ if (snapshot.gate_attempts === 0 && snapshot.diagnose_attempts === 0) {
36
+ return snapshot;
37
+ }
38
+ const lastDiagnose = snapshot.last_diagnose_at ? Date.parse(snapshot.last_diagnose_at) : NaN;
39
+ const lastGate = snapshot.last_gate_at ? Date.parse(snapshot.last_gate_at) : NaN;
40
+ const candidates = [lastDiagnose, lastGate].filter((t) => Number.isFinite(t));
41
+ // No usable timestamp on a non-zero counter = a legacy/partial entry we
42
+ // can't date — treat it as stale so it can't escalate forever.
43
+ const lastActivity = candidates.length > 0 ? Math.max(...candidates) : -Infinity;
44
+ if (now - lastActivity > LOOP_STATE_TTL_MS) {
45
+ return {
46
+ project_dir: snapshot.project_dir,
47
+ gate_attempts: 0,
48
+ diagnose_attempts: 0,
49
+ };
50
+ }
51
+ return snapshot;
52
+ }
6
53
  function homeStatePath() {
7
54
  // We expose a private override env var for tests so we don't have
8
55
  // to monkey-patch homedir() — see __tests__/loop_state.test.ts.
@@ -48,20 +95,23 @@ function writeAll(state) {
48
95
  export function readLoopState(projectDir) {
49
96
  const all = readAll();
50
97
  const key = projectKey(projectDir);
51
- return (all.projects[key] ?? {
98
+ const stored = all.projects[key] ?? {
52
99
  project_dir: key,
53
100
  gate_attempts: 0,
54
101
  diagnose_attempts: 0,
55
- });
102
+ };
103
+ // Apply the staleness window so a brand-new session never inherits an
104
+ // abandoned loop's counts (and never escalates on attempt #1).
105
+ return freshOrReset(stored);
56
106
  }
57
107
  export function incrementGateAttempts(projectDir) {
58
108
  const all = readAll();
59
109
  const key = projectKey(projectDir);
60
- const current = all.projects[key] ?? {
110
+ const current = freshOrReset(all.projects[key] ?? {
61
111
  project_dir: key,
62
112
  gate_attempts: 0,
63
113
  diagnose_attempts: 0,
64
- };
114
+ });
65
115
  const updated = {
66
116
  ...current,
67
117
  project_dir: key,
@@ -75,11 +125,11 @@ export function incrementGateAttempts(projectDir) {
75
125
  export function incrementDiagnoseAttempts(projectDir) {
76
126
  const all = readAll();
77
127
  const key = projectKey(projectDir);
78
- const current = all.projects[key] ?? {
128
+ const current = freshOrReset(all.projects[key] ?? {
79
129
  project_dir: key,
80
130
  gate_attempts: 0,
81
131
  diagnose_attempts: 0,
82
- };
132
+ });
83
133
  const updated = {
84
134
  ...current,
85
135
  project_dir: key,
@@ -125,6 +175,18 @@ export function shouldEscalateGate(state) {
125
175
  export function shouldEscalateDiagnose(state) {
126
176
  return state.diagnose_attempts >= DIAGNOSE_ATTEMPT_CAP;
127
177
  }
178
+ // 0.1.85 — escalation pauses the SOURCE-CODE fix loop only; it must not
179
+ // suppress the read-only evidence the user is actually waiting on. Driving the
180
+ // app (codeloop_run_journey: launch + screenshots) and completing a [CodeLoop
181
+ // AUTH] re-auth are verification, not code edits, so they still run once before
182
+ // you report. Without this carve-out the escalation directive became yet another
183
+ // "stop everything" off-ramp that let the agent skip launching the app entirely
184
+ // (WedCheese logs 7/8/9).
185
+ const ESCALATION_EVIDENCE_CARVEOUT = " This pauses the SOURCE-CODE auto-fix loop ONLY — it does NOT exempt the read-only evidence: " +
186
+ "if you have not driven the app this session, you MUST still call codeloop_run_journey ONCE " +
187
+ "(it launches + drives the app + screenshots — verification, not a code edit) and complete any " +
188
+ "[CodeLoop AUTH] re-auth the run flagged (e.g. run `firebase login --reauth` in an interactive " +
189
+ "terminal so the user can sign in), THEN present the report. Only the source edits + the re-verify loop stop.";
128
190
  export function escalationReason(state) {
129
191
  if (shouldEscalateGate(state)) {
130
192
  return (`gate_attempts=${state.gate_attempts} reached the 0.1.51 H7 cap of ` +
@@ -133,14 +195,16 @@ export function escalationReason(state) {
133
195
  `step they should take. Do NOT call codeloop_verify or ` +
134
196
  `codeloop_gate_check again until the user explicitly resets the ` +
135
197
  `loop counter (codeloop_doctor --reset-loop-state) or makes a ` +
136
- `targeted fix and asks you to retry.`);
198
+ `targeted fix and asks you to retry.` +
199
+ ESCALATION_EVIDENCE_CARVEOUT);
137
200
  }
138
201
  if (shouldEscalateDiagnose(state)) {
139
202
  return (`diagnose_attempts=${state.diagnose_attempts} reached the 0.1.51 ` +
140
203
  `H7 cap of ${DIAGNOSE_ATTEMPT_CAP}. The same class of failure has ` +
141
204
  `survived ${state.diagnose_attempts} fix attempts. Stop calling ` +
142
205
  `codeloop_diagnose and escalate to the user with the failing ` +
143
- `repair task and what you have already tried.`);
206
+ `repair task and what you have already tried.` +
207
+ ESCALATION_EVIDENCE_CARVEOUT);
144
208
  }
145
209
  return null;
146
210
  }
@@ -1 +1 @@
1
- {"version":3,"file":"loop_state.js","sourceRoot":"","sources":["../../src/evidence/loop_state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AA2CrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAEtC,SAAS,aAAa;IACpB,kEAAk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B,IAAI,oBAAoB,CAAC;AACzD,CAAC;AAED,wEAAwE;AACxE,+EAA+E;AAC/E,8EAA8E;AAC9E,gFAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAChF,0BAA0B;AAC1B,MAAM,4BAA4B,GAChC,+FAA+F;IAC/F,6FAA6F;IAC7F,gGAAgG;IAChG,gGAAgG;IAChG,8GAA8G,CAAC;AAEjH,MAAM,UAAU,gBAAgB,CAAC,KAAwB;IACvD,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,CACL,iBAAiB,KAAK,CAAC,aAAa,gCAAgC;YACpE,GAAG,gBAAgB,kDAAkD;YACrE,gEAAgE;YAChE,wDAAwD;YACxD,iEAAiE;YACjE,+DAA+D;YAC/D,qCAAqC;YACrC,4BAA4B,CAC7B,CAAC;IACJ,CAAC;IACD,IAAI,sBAAsB,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,OAAO,CACL,qBAAqB,KAAK,CAAC,iBAAiB,sBAAsB;YAClE,aAAa,oBAAoB,kCAAkC;YACnE,YAAY,KAAK,CAAC,iBAAiB,8BAA8B;YACjE,8DAA8D;YAC9D,8CAA8C;YAC9C,4BAA4B,CAC7B,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/dist/index.js CHANGED
@@ -654,7 +654,17 @@ Returns: structured report with pass/fail counts, artifact paths, and next-step
654
654
  tasks_completed: params.tasks_completed,
655
655
  skip_tests: params.skip_tests,
656
656
  };
657
- const output = await runVerify(input, cfg, cwd, onProgress);
657
+ // 0.1.86 enable the auto deep-E2E journey: a full verify on a UI project
658
+ // now LAUNCHES + drives the app itself (final phase) instead of only
659
+ // emitting a "call run_journey next" directive the agent kept skipping.
660
+ // Direct unit-test callers of runVerify don't pass this, so tests never
661
+ // boot a device. Resolve the agent mode (per-call → config → persisted) so
662
+ // the journey's build pre-flight remediation respects audit vs fix.
663
+ const journeyMode = resolveAgentMode({ cwd, paramMode: params.mode, configMode: cfg.agent_mode });
664
+ const output = await runVerify(input, cfg, cwd, onProgress, {
665
+ enableAutoJourney: true,
666
+ journeyMode,
667
+ });
658
668
  await trackUsage(apiKey, "verification_run");
659
669
  return output;
660
670
  }, { tool: "codeloop_verify", cwd, input: params });