cluxion-agentplugin-supercoder 0.2.12__tar.gz → 0.2.14__tar.gz

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 (64) hide show
  1. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/PKG-INFO +1 -1
  2. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/plugin.yaml +1 -1
  3. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/pyproject.toml +1 -1
  4. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/hash_patch.py +8 -0
  5. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/plugin.py +13 -0
  6. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_hash_patch.py +27 -0
  7. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/uv.lock +1 -1
  8. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/.github/workflows/ci.yml +0 -0
  9. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/.github/workflows/publish.yml +0 -0
  10. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/.gitignore +0 -0
  11. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/ARCHITECTURE.md +0 -0
  12. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/Docs/README.md +0 -0
  13. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/Docs/agent-surfaces.md +0 -0
  14. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/Docs/architecture.md +0 -0
  15. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/Docs/capabilities.md +0 -0
  16. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/Docs/design.md +0 -0
  17. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/Docs/installation.md +0 -0
  18. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/Docs/rust-architecture.md +0 -0
  19. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/Docs/tools.md +0 -0
  20. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/LICENSE +0 -0
  21. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/README.md +0 -0
  22. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/__init__.py +0 -0
  23. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/adapters/claude/.claude-plugin/plugin.json +0 -0
  24. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/adapters/claude/skills/supercoder/SKILL.md +0 -0
  25. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/adapters/codex/config-snippet.toml +0 -0
  26. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/adapters/hermes/README.md +0 -0
  27. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/rust/supercoder_index/Cargo.lock +0 -0
  28. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/rust/supercoder_index/Cargo.toml +0 -0
  29. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/rust/supercoder_index/pyproject.toml +0 -0
  30. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/rust/supercoder_index/src/lib.rs +0 -0
  31. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/rust/supercoder_index/src/main.rs +0 -0
  32. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/rust/supercoder_index/src/outline.rs +0 -0
  33. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/rust/supercoder_index/src/syntax.rs +0 -0
  34. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/scripts/repack_native_wheel.py +0 -0
  35. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/__init__.py +0 -0
  36. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/cli.py +0 -0
  37. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/cursor.py +0 -0
  38. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/line_budget.py +0 -0
  39. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/lint_gate.py +0 -0
  40. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/queue.py +0 -0
  41. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/repo_map.py +0 -0
  42. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/retry_loop.py +0 -0
  43. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/safety.py +0 -0
  44. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/syntax_gate.py +0 -0
  45. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/core/test_gate.py +0 -0
  46. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/doctor/__init__.py +0 -0
  47. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/doctor/catalog.json +0 -0
  48. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/doctor/framework.py +0 -0
  49. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/doctor/probes.py +0 -0
  50. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/runner.py +0 -0
  51. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/rust_bridge.py +0 -0
  52. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/src/cluxion_agentplugin_supercoder/schemas.py +0 -0
  53. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_cursor.py +0 -0
  54. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_doctor.py +0 -0
  55. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_line_budget.py +0 -0
  56. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_lint_gate.py +0 -0
  57. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_plugin.py +0 -0
  58. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_queue.py +0 -0
  59. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_repo_map.py +0 -0
  60. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_retry_loop.py +0 -0
  61. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_rust_bridge.py +0 -0
  62. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_safety.py +0 -0
  63. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_syntax_gate.py +0 -0
  64. {cluxion_agentplugin_supercoder-0.2.12 → cluxion_agentplugin_supercoder-0.2.14}/tests/test_test_gate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cluxion-agentplugin-supercoder
3
- Version: 0.2.12
3
+ Version: 0.2.14
4
4
  Summary: Universal agent coding harness plugin: cursor logic, safe patch, line budget, Rust index, test gates.
5
5
  Project-URL: Homepage, https://github.com/cluxion/cluxion-Agentplugin-supercoder
6
6
  Project-URL: Repository, https://github.com/cluxion/cluxion-Agentplugin-supercoder
@@ -1,5 +1,5 @@
1
1
  name: cluxion-agentplugin-supercoder
2
- version: 0.2.12
2
+ version: 0.2.14
3
3
  description: "Universal agent coding harness: cursor, safe patch, line budget, Rust index."
4
4
  author: cluxion
5
5
  kind: standalone
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cluxion-agentplugin-supercoder"
7
- version = "0.2.12"
7
+ version = "0.2.14"
8
8
  description = "Universal agent coding harness plugin: cursor logic, safe patch, line budget, Rust index, test gates."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -77,6 +77,8 @@ def apply_patch(
77
77
  expected_file_hash: str = "",
78
78
  fuzzy_threshold: float = DEFAULT_FUZZY_THRESHOLD,
79
79
  ) -> PatchResult:
80
+ if not old_text:
81
+ return _failed(str(path), "empty_old_text", expected_file_hash, "old_text must be non-empty")
80
82
  if not path.exists():
81
83
  return _failed(str(path), "missing_file", expected_file_hash, "file not found")
82
84
  with _exclusive_lock(path):
@@ -120,6 +122,8 @@ def _normalize_hash(value: str) -> str:
120
122
 
121
123
 
122
124
  def _exact_spans(text: str, needle: str) -> list[tuple[int, int]]:
125
+ if not needle:
126
+ return []
123
127
  spans: list[tuple[int, int]] = []
124
128
  offset = 0
125
129
  while True:
@@ -131,6 +135,8 @@ def _exact_spans(text: str, needle: str) -> list[tuple[int, int]]:
131
135
 
132
136
 
133
137
  def _candidate_spans(text: str, reference: str, line_drift: int) -> list[tuple[int, int, str]]:
138
+ if not reference:
139
+ return []
134
140
  lines = text.splitlines(keepends=True)
135
141
  if not lines:
136
142
  return []
@@ -151,6 +157,8 @@ def _candidate_spans(text: str, reference: str, line_drift: int) -> list[tuple[i
151
157
 
152
158
 
153
159
  def _best_fuzzy_span(text: str, reference: str) -> tuple[int, int, str, float, bool] | None:
160
+ if not reference:
161
+ return None
154
162
  best: tuple[int, int, str, float] | None = None
155
163
  best_lines: tuple[int, int] | None = None
156
164
  ambiguous = False
@@ -113,6 +113,19 @@ def register(ctx: object) -> None:
113
113
  emoji="🩺",
114
114
  )
115
115
 
116
+ register_command = getattr(ctx, "register_command", None)
117
+ if callable(register_command):
118
+
119
+ def _slash_supercoder_doctor(raw_args: str) -> str:
120
+ del raw_args
121
+ return _handle_supercoder_doctor({})
122
+
123
+ register_command(
124
+ "supercoder-doctor",
125
+ _slash_supercoder_doctor,
126
+ description="Run supercoder plugin doctor checks",
127
+ )
128
+
116
129
 
117
130
  def _wrap(callback: Callable[[dict[str, object]], runner.ToolResult]) -> Callable[[dict[str, object]], str]:
118
131
  def handler(args: dict[str, object], **_: object) -> str:
@@ -16,6 +16,7 @@ from cluxion_agentplugin_supercoder.core.hash_patch import (
16
16
  MAX_LINE_DRIFT,
17
17
  _best_fuzzy_span,
18
18
  _candidate_spans,
19
+ _exact_spans,
19
20
  apply_patch,
20
21
  file_hash,
21
22
  )
@@ -112,6 +113,32 @@ def test_best_fuzzy_span_large_file_benchmark() -> None:
112
113
  assert optimized_elapsed < legacy_elapsed * 0.6
113
114
 
114
115
 
116
+ def test_exact_spans_empty_needle_returns_immediately() -> None:
117
+ assert _exact_spans("hello", "") == []
118
+
119
+
120
+ def test_apply_patch_empty_old_text_fails_fast(tmp_path: Path) -> None:
121
+ path = tmp_path / "a.py"
122
+ path.write_text("alpha\nbeta\ngamma\n", encoding="utf-8")
123
+ start = time.perf_counter()
124
+ result = apply_patch(path, old_text="", new_text="INSERT\n")
125
+ elapsed = time.perf_counter() - start
126
+ assert elapsed < 1.0
127
+ assert result.success is False
128
+ assert result.strategy == "empty_old_text"
129
+ assert "non-empty" in result.message
130
+ assert path.read_text(encoding="utf-8") == "alpha\nbeta\ngamma\n"
131
+
132
+
133
+ def test_empty_reference_does_not_hang_fuzzy_path() -> None:
134
+ text = "\n".join(f"line_{i} = {i}" for i in range(500)) + "\n"
135
+ start = time.perf_counter()
136
+ assert _candidate_spans(text, "", MAX_LINE_DRIFT) == []
137
+ assert _best_fuzzy_span(text, "") is None
138
+ elapsed = time.perf_counter() - start
139
+ assert elapsed < 1.0
140
+
141
+
115
142
  def test_exact_patch(tmp_path: Path) -> None:
116
143
  path = tmp_path / "a.py"
117
144
  path.write_text("alpha\nbeta\ngamma\n", encoding="utf-8")
@@ -160,7 +160,7 @@ wheels = [
160
160
 
161
161
  [[package]]
162
162
  name = "cluxion-agentplugin-supercoder"
163
- version = "0.2.12"
163
+ version = "0.2.14"
164
164
  source = { editable = "." }
165
165
  dependencies = [
166
166
  { name = "psutil" },