@rama_nigg/open-cursor 2.3.9 → 2.3.11

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/index.js CHANGED
@@ -13331,7 +13331,15 @@ class DeltaTracker {
13331
13331
  if (current.startsWith(previous)) {
13332
13332
  return current.slice(previous.length);
13333
13333
  }
13334
- return current;
13334
+ if (previous.startsWith(current)) {
13335
+ return "";
13336
+ }
13337
+ let i = 0;
13338
+ const minLen = Math.min(previous.length, current.length);
13339
+ while (i < minLen && previous[i] === current[i]) {
13340
+ i++;
13341
+ }
13342
+ return current.slice(i);
13335
13343
  }
13336
13344
  }
13337
13345
 
@@ -17830,7 +17838,8 @@ var init_tool_loop_guard = __esm(() => {
17830
17838
  "stat",
17831
17839
  "semsearch",
17832
17840
  "bash",
17833
- "shell"
17841
+ "shell",
17842
+ "webfetch"
17834
17843
  ]);
17835
17844
  });
17836
17845
 
@@ -13331,7 +13331,15 @@ class DeltaTracker {
13331
13331
  if (current.startsWith(previous)) {
13332
13332
  return current.slice(previous.length);
13333
13333
  }
13334
- return current;
13334
+ if (previous.startsWith(current)) {
13335
+ return "";
13336
+ }
13337
+ let i = 0;
13338
+ const minLen = Math.min(previous.length, current.length);
13339
+ while (i < minLen && previous[i] === current[i]) {
13340
+ i++;
13341
+ }
13342
+ return current.slice(i);
13335
13343
  }
13336
13344
  }
13337
13345
 
@@ -17830,7 +17838,8 @@ var init_tool_loop_guard = __esm(() => {
17830
17838
  "stat",
17831
17839
  "semsearch",
17832
17840
  "bash",
17833
- "shell"
17841
+ "shell",
17842
+ "webfetch"
17834
17843
  ]);
17835
17844
  });
17836
17845
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rama_nigg/open-cursor",
3
- "version": "2.3.9",
3
+ "version": "2.3.11",
4
4
  "description": "No prompt limits. No broken streams. Full thinking + tool support. Your Cursor subscription, properly integrated.",
5
5
  "type": "module",
6
6
  "main": "dist/plugin-entry.js",
@@ -43,6 +43,7 @@ const EXPLORATION_TOOLS = new Set([
43
43
  "semsearch",
44
44
  "bash",
45
45
  "shell",
46
+ "webfetch",
46
47
  ]);
47
48
 
48
49
  export interface ToolLoopGuardDecision {
@@ -24,10 +24,24 @@ export class DeltaTracker {
24
24
  return current;
25
25
  }
26
26
 
27
+ // Happy path: accumulated text grows with exact prefix match
27
28
  if (current.startsWith(previous)) {
28
29
  return current.slice(previous.length);
29
30
  }
30
31
 
31
- return current;
32
+ // Accumulated text was already fully emitted (e.g. duplicate or trimmed event)
33
+ if (previous.startsWith(current)) {
34
+ return "";
35
+ }
36
+
37
+ // Prefix mismatch (formatting drift, unicode normalization, whitespace changes):
38
+ // find longest common prefix and emit only the new suffix.
39
+ // This prevents re-emitting the entire accumulated text as a "delta".
40
+ let i = 0;
41
+ const minLen = Math.min(previous.length, current.length);
42
+ while (i < minLen && previous[i] === current[i]) {
43
+ i++;
44
+ }
45
+ return current.slice(i);
32
46
  }
33
47
  }