@debugai/mcp 2.2.0 → 2.3.0

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.
package/dist/backend.d.ts CHANGED
@@ -44,6 +44,15 @@ export interface DebugResponse {
44
44
  memory_hit?: boolean;
45
45
  memory_times_seen?: number;
46
46
  memory_fix_confirmed?: boolean;
47
+ /**
48
+ * Four-valued: 'none' | 'confirmed' | 'unproven' | 'anti_pattern'. Sent by
49
+ * the engine since 2026-08-21. Absent from an older engine, where
50
+ * memory_fix_confirmed is the whole story — and that boolean now goes false
51
+ * on demotion, so the degraded reading is safe rather than wrong.
52
+ */
53
+ memory_fix_state?: string;
54
+ /** Times a live session watched the error stop after the fix. A click does not count. */
55
+ memory_verified_count?: number;
47
56
  }
48
57
  export interface OutcomeRequest {
49
58
  debug_log_id: string;
@@ -126,9 +126,53 @@ export function registerDebugError(server, config) {
126
126
  const seen = typeof result.memory_times_seen === 'number'
127
127
  ? `${result.memory_times_seen}x before in this project`
128
128
  : 'before in this project';
129
- sections.push(result.memory_fix_confirmed
130
- ? `\n## Seen before\nThis error has been seen ${seen}, and a fix was confirmed working. The confirmed fix led the analysis above.`
131
- : `\n## Seen before\nThis error has been seen ${seen}. No fix has been confirmed for it yet.`);
129
+ // Four states, not two. Until 2026-08-21 this said "a fix was
130
+ // confirmed working" on the strength of somebody clicking Apply,
131
+ // and a fix that had been tried and FAILED was indistinguishable
132
+ // from one nobody had ever tried — both fell into the else branch
133
+ // and read "no fix has been confirmed yet". An agent reading that
134
+ // will happily re-propose the fix that already did not work, which
135
+ // is the loop this whole change exists to break.
136
+ //
137
+ // memory_fix_state is what the engine sends now. When it is absent
138
+ // (older engine) the boolean still decides, exactly as before.
139
+ const state = typeof result.memory_fix_state === 'string'
140
+ ? result.memory_fix_state
141
+ : (result.memory_fix_confirmed ? 'confirmed' : 'none');
142
+ const verified = typeof result.memory_verified_count === 'number'
143
+ ? result.memory_verified_count
144
+ : 0;
145
+ let memoryBody;
146
+ if (state === 'confirmed' && verified > 0) {
147
+ memoryBody =
148
+ `This error has been seen ${seen}. A fix for it was VERIFIED BY ` +
149
+ `OBSERVATION ${verified}x: a live session watched the error stop ` +
150
+ `after that fix was applied. It led the analysis above.`;
151
+ }
152
+ else if (state === 'confirmed') {
153
+ memoryBody =
154
+ `This error has been seen ${seen}. A fix for it was applied and ` +
155
+ `accepted by a developer, though nothing has observed it working. ` +
156
+ `It led the analysis above. Treat it as a strong lead, not proof.`;
157
+ }
158
+ else if (state === 'unproven') {
159
+ memoryBody =
160
+ `This error has been seen ${seen}. A fix was applied for it and ` +
161
+ `THE ERROR HAS RECURRED ONCE SINCE, so that fix is unproven. The ` +
162
+ `analysis above was told not to lead with it.`;
163
+ }
164
+ else if (state === 'anti_pattern') {
165
+ memoryBody =
166
+ `This error has been seen ${seen}. A fix was applied for it and ` +
167
+ `THE ERROR KEPT HAPPENING. That fix did not work and the analysis ` +
168
+ `above was told not to propose it again. If you are about to ` +
169
+ `suggest something equivalent, the cause is somewhere it does not ` +
170
+ `touch.`;
171
+ }
172
+ else {
173
+ memoryBody = `This error has been seen ${seen}. No fix has been confirmed for it yet.`;
174
+ }
175
+ sections.push(`\n## Seen before\n${memoryBody}`);
132
176
  }
133
177
  const badges = [];
134
178
  // Named, not counted. "Read 2 files" is unverifiable; "read src/api.ts,
@@ -176,6 +220,7 @@ export function registerDebugError(server, config) {
176
220
  memory_hit: result.memory_hit ?? false,
177
221
  memory_times_seen: result.memory_times_seen ?? null,
178
222
  memory_fix_confirmed: result.memory_fix_confirmed ?? false,
223
+ memory_fix_state: result.memory_fix_state ?? null,
179
224
  // Which files this server read off disk, if any. Empty when the
180
225
  // agent supplied its own snippet or nothing resolved.
181
226
  local_files_read: resolved?.files.map((f) => f.label) ?? [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugai/mcp",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "mcpName": "io.github.1shizaan/debugai-mcp",
5
5
  "description": "DebugAI MCP server. One command sets it up in Claude Desktop, Claude Code, Cursor, Zed, Windsurf, Cline or any MCP client: browser sign-in, no key pasting, no config editing.",
6
6
  "license": "MIT",