cluxion-agentplugin-supercoder 0.2.3__tar.gz → 0.2.5__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.
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/PKG-INFO +1 -1
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/pyproject.toml +1 -2
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/__init__.py +1 -1
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/lint_gate.py +3 -1
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/doctor/probes.py +69 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/plugin.py +2 -1
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_doctor.py +21 -5
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_lint_gate.py +13 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_plugin.py +22 -10
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/uv.lock +1 -1
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/.github/workflows/ci.yml +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/.github/workflows/publish.yml +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/.gitignore +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/ARCHITECTURE.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/README.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/agent-surfaces.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/architecture.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/capabilities.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/design.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/installation.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/rust-architecture.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/tools.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/LICENSE +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/README.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/__init__.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/adapters/claude/.claude-plugin/plugin.json +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/adapters/claude/skills/supercoder/SKILL.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/adapters/codex/config-snippet.toml +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/adapters/hermes/README.md +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/plugin.yaml +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/rust/supercoder_index/Cargo.lock +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/rust/supercoder_index/Cargo.toml +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/rust/supercoder_index/pyproject.toml +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/rust/supercoder_index/src/lib.rs +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/rust/supercoder_index/src/main.rs +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/rust/supercoder_index/src/outline.rs +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/rust/supercoder_index/src/syntax.rs +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/scripts/repack_native_wheel.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/cli.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/cursor.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/hash_patch.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/line_budget.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/queue.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/repo_map.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/retry_loop.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/safety.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/syntax_gate.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/core/test_gate.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/doctor/__init__.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/doctor/catalog.json +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/doctor/framework.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/runner.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/rust_bridge.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/src/cluxion_agentplugin_supercoder/schemas.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_cursor.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_hash_patch.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_line_budget.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_queue.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_repo_map.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_retry_loop.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_rust_bridge.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_safety.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_syntax_gate.py +0 -0
- {cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/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.
|
|
3
|
+
Version: 0.2.5
|
|
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
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/pyproject.toml
RENAMED
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cluxion-agentplugin-supercoder"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.5"
|
|
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"
|
|
@@ -30,7 +30,6 @@ Issues = "https://github.com/cluxion/cluxion-Agentplugin-supercoder/issues"
|
|
|
30
30
|
[tool.hatch.build.targets.wheel]
|
|
31
31
|
packages = ["src/cluxion_agentplugin_supercoder"]
|
|
32
32
|
|
|
33
|
-
|
|
34
33
|
[tool.pytest.ini_options]
|
|
35
34
|
testpaths = ["tests"]
|
|
36
35
|
addopts = "-q"
|
|
@@ -46,7 +46,9 @@ def _discover_ruff() -> str | None:
|
|
|
46
46
|
|
|
47
47
|
def check_file(path: str | Path, *, cwd: str | Path | None = None) -> dict[str, Any]:
|
|
48
48
|
"""Lint one file and return structured advisory findings."""
|
|
49
|
-
target = Path(path)
|
|
49
|
+
target = Path(path).resolve()
|
|
50
|
+
if target.is_dir():
|
|
51
|
+
return {"ok": False, "error": "path is a directory"}
|
|
50
52
|
language = language_for_path(target)
|
|
51
53
|
if language not in LINTABLE_LANGUAGES:
|
|
52
54
|
return _unchecked(language or "", "no_linter")
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import importlib.metadata
|
|
6
|
+
import importlib.util
|
|
7
|
+
import json
|
|
8
|
+
import os
|
|
6
9
|
import shutil
|
|
7
10
|
from collections.abc import Callable
|
|
11
|
+
from pathlib import Path
|
|
8
12
|
|
|
9
13
|
from .framework import DoctorContext
|
|
10
14
|
|
|
@@ -115,4 +119,69 @@ def handler_exception_coverage(ctx: DoctorContext) -> tuple[str, str]:
|
|
|
115
119
|
return "skip", f"cannot invoke guard: {e}"
|
|
116
120
|
|
|
117
121
|
|
|
122
|
+
# NEW deterministic probes for previously-skipped catalog checks (import-avail, json-det, abi3/sqlite patterns adapted)
|
|
123
|
+
# hermes_requirements_installed (import availability using find_spec to satisfy linter)
|
|
124
|
+
@_register("hermes_requirements_installed")
|
|
125
|
+
def hermes_requirements_installed(ctx: DoctorContext) -> tuple[str, str]:
|
|
126
|
+
try:
|
|
127
|
+
if importlib.util.find_spec("psutil") and importlib.util.find_spec("yaml"):
|
|
128
|
+
return "pass", "psutil+PyYAML importable"
|
|
129
|
+
return "warn", "missing dep"
|
|
130
|
+
except Exception as e:
|
|
131
|
+
return "skip", f"import check error: {e}"
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
# repo_map_deterministic (json determinism + real call)
|
|
135
|
+
@_register("repo_map_deterministic")
|
|
136
|
+
def repo_map_deterministic(ctx: DoctorContext) -> tuple[str, str]:
|
|
137
|
+
try:
|
|
138
|
+
from cluxion_agentplugin_supercoder.core.repo_map import build_repo_map
|
|
139
|
+
m1 = build_repo_map(ctx.cwd, budget_chars=2000)
|
|
140
|
+
m2 = build_repo_map(ctx.cwd, budget_chars=2000)
|
|
141
|
+
def strip(d):
|
|
142
|
+
if isinstance(d, dict):
|
|
143
|
+
return {k: strip(v) for k, v in d.items() if k != "_stats"}
|
|
144
|
+
if isinstance(d, list):
|
|
145
|
+
return [strip(x) for x in d]
|
|
146
|
+
return d
|
|
147
|
+
if strip(m1) == strip(m2):
|
|
148
|
+
j1 = json.dumps(m1, sort_keys=True)
|
|
149
|
+
j2 = json.dumps(m2, sort_keys=True)
|
|
150
|
+
if j1 == j2:
|
|
151
|
+
return "pass", "deterministic + json roundtrip ok"
|
|
152
|
+
return "warn", "map match but json not"
|
|
153
|
+
return "fail", "non-deterministic"
|
|
154
|
+
except Exception as e:
|
|
155
|
+
return "skip", f"cannot run: {e}"
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
# ruff_binary_discoverable (real env/path probe)
|
|
159
|
+
@_register("ruff_binary_discoverable")
|
|
160
|
+
def ruff_binary_discoverable(ctx: DoctorContext) -> tuple[str, str]:
|
|
161
|
+
try:
|
|
162
|
+
envb = os.environ.get("CLUXION_SUPERCODER_RUFF_BIN")
|
|
163
|
+
if envb and Path(envb).is_file():
|
|
164
|
+
return "pass", envb
|
|
165
|
+
cands = [Path(ctx.cwd)/".venv/bin/ruff", shutil.which("ruff")]
|
|
166
|
+
for c in cands:
|
|
167
|
+
if c and Path(c).is_file():
|
|
168
|
+
return "pass", str(c)
|
|
169
|
+
return "warn", "no ruff binary (advisory)"
|
|
170
|
+
except Exception as e:
|
|
171
|
+
return "skip", f"probe error: {e}"
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
# file_hash_consistency (real check)
|
|
175
|
+
@_register("file_hash_consistency")
|
|
176
|
+
def file_hash_consistency(ctx: DoctorContext) -> tuple[str, str]:
|
|
177
|
+
try:
|
|
178
|
+
from cluxion_agentplugin_supercoder.core.hash_patch import _normalize_newlines, file_hash
|
|
179
|
+
c = 'a=1\r\nb=2'
|
|
180
|
+
if file_hash(c) == file_hash(_normalize_newlines(c)):
|
|
181
|
+
return "pass", "CRLF safe"
|
|
182
|
+
return "fail", "hash mismatch"
|
|
183
|
+
except Exception as e:
|
|
184
|
+
return "skip", f"hash error: {e}"
|
|
185
|
+
|
|
186
|
+
|
|
118
187
|
# note: other checks in catalog will be reported as skip (no probe)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
-
from collections.abc import Callable
|
|
4
|
+
from collections.abc import Callable, Mapping
|
|
5
5
|
|
|
6
6
|
from cluxion_agentplugin_supercoder import runner
|
|
7
7
|
from cluxion_agentplugin_supercoder.core.test_gate import suggest_test_commands
|
|
@@ -116,6 +116,7 @@ def register(ctx: object) -> None:
|
|
|
116
116
|
|
|
117
117
|
def _wrap(callback: Callable[[dict[str, object]], runner.ToolResult]) -> Callable[[dict[str, object]], str]:
|
|
118
118
|
def handler(args: dict[str, object], **_: object) -> str:
|
|
119
|
+
args = args if isinstance(args, Mapping) else {}
|
|
119
120
|
try:
|
|
120
121
|
return callback(args).to_json()
|
|
121
122
|
except (ValueError, TypeError, OSError) as exc:
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_doctor.py
RENAMED
|
@@ -24,7 +24,7 @@ def test_run_doctor_returns_result_and_deterministic():
|
|
|
24
24
|
catalog_path=cat,
|
|
25
25
|
probes=PROBES,
|
|
26
26
|
plugin="supercoder",
|
|
27
|
-
version="0.2.
|
|
27
|
+
version="0.2.4",
|
|
28
28
|
)
|
|
29
29
|
assert isinstance(r1, DoctorResult)
|
|
30
30
|
j1 = render_json(r1)
|
|
@@ -33,7 +33,7 @@ def test_run_doctor_returns_result_and_deterministic():
|
|
|
33
33
|
catalog_path=cat,
|
|
34
34
|
probes=PROBES,
|
|
35
35
|
plugin="supercoder",
|
|
36
|
-
version="0.2.
|
|
36
|
+
version="0.2.4",
|
|
37
37
|
)
|
|
38
38
|
j2 = render_json(r2)
|
|
39
39
|
assert j1 == j2 # byte identical
|
|
@@ -49,7 +49,7 @@ def test_cross_cutting_checks_present():
|
|
|
49
49
|
catalog_path=cat,
|
|
50
50
|
probes=PROBES,
|
|
51
51
|
plugin="supercoder",
|
|
52
|
-
version="0.2.
|
|
52
|
+
version="0.2.4",
|
|
53
53
|
)
|
|
54
54
|
statuses = {c.check_id: c.status for c in result.checks}
|
|
55
55
|
for key in ("hermes_on_path", "entry_point_registered", "toolset_valid"):
|
|
@@ -57,6 +57,22 @@ def test_cross_cutting_checks_present():
|
|
|
57
57
|
assert statuses[key] in ("pass", "warn", "fail", "skip")
|
|
58
58
|
|
|
59
59
|
|
|
60
|
+
def test_new_probes_non_skip():
|
|
61
|
+
cat = _catalog_path()
|
|
62
|
+
result = run_doctor(
|
|
63
|
+
cwd=Path.cwd(),
|
|
64
|
+
catalog_path=cat,
|
|
65
|
+
probes=PROBES,
|
|
66
|
+
plugin="supercoder",
|
|
67
|
+
version="0.2.4",
|
|
68
|
+
)
|
|
69
|
+
statuses = {c.check_id: c.status for c in result.checks}
|
|
70
|
+
# assert at least two newly implemented return non-skip
|
|
71
|
+
new_checks = ["hermes_requirements_installed", "repo_map_deterministic", "ruff_binary_discoverable", "file_hash_consistency"]
|
|
72
|
+
non_skip_count = sum(1 for k in new_checks if k in statuses and statuses[k] != "skip")
|
|
73
|
+
assert non_skip_count >= 2, f"only {non_skip_count} new probes non-skip"
|
|
74
|
+
|
|
75
|
+
|
|
60
76
|
def test_probe_exception_becomes_fail():
|
|
61
77
|
def bad_probe(ctx):
|
|
62
78
|
raise RuntimeError("boom")
|
|
@@ -66,7 +82,7 @@ def test_probe_exception_becomes_fail():
|
|
|
66
82
|
catalog_path=_catalog_path(),
|
|
67
83
|
probes={"hermes_on_path": bad_probe},
|
|
68
84
|
plugin="supercoder",
|
|
69
|
-
version="0.2.
|
|
85
|
+
version="0.2.4",
|
|
70
86
|
)
|
|
71
87
|
statuses = {c.check_id: c.status for c in result.checks}
|
|
72
88
|
assert statuses["hermes_on_path"] == "fail"
|
|
@@ -78,6 +94,6 @@ def test_warn_only_is_ok():
|
|
|
78
94
|
checks = (
|
|
79
95
|
CheckResult(check_id="x", category="c", severity="medium", status="warn", detail="w"),
|
|
80
96
|
)
|
|
81
|
-
r = DoctorResult(plugin="p", version="0.2.
|
|
97
|
+
r = DoctorResult(plugin="p", version="0.2.4", checks=checks)
|
|
82
98
|
assert r.ok is True
|
|
83
99
|
# exit would be 0
|
|
@@ -95,3 +95,16 @@ def test_lint_gate_tool(tmp_path: Path) -> None:
|
|
|
95
95
|
assert result.ok is True
|
|
96
96
|
assert result.payload["clean"] is False
|
|
97
97
|
assert result.payload["finding_count"] >= 1
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def test_lint_gate_rejects_directory(tmp_path: Path) -> None:
|
|
101
|
+
d = tmp_path / "emptydir"
|
|
102
|
+
d.mkdir()
|
|
103
|
+
result = lint_gate.check_file(d)
|
|
104
|
+
assert result.get("ok") is False
|
|
105
|
+
assert result.get("error") == "path is a directory"
|
|
106
|
+
|
|
107
|
+
# also via runner tool
|
|
108
|
+
res_tool = runner.lint_gate_tool({"cwd": str(tmp_path), "path": "emptydir"})
|
|
109
|
+
assert res_tool.ok is False
|
|
110
|
+
assert res_tool.payload.get("error") == "path is a directory"
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_plugin.py
RENAMED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"""Tests for plugin registration and _wrap error handling."""
|
|
2
|
+
|
|
1
3
|
from __future__ import annotations
|
|
2
4
|
|
|
3
5
|
import json
|
|
@@ -5,18 +7,15 @@ import json
|
|
|
5
7
|
from cluxion_agentplugin_supercoder import plugin, runner
|
|
6
8
|
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
self
|
|
11
|
-
|
|
12
|
-
def register_tool(
|
|
13
|
-
self, *, name: str, toolset: str, schema: dict[str, object], handler: object, emoji: str = ""
|
|
14
|
-
) -> None:
|
|
15
|
-
self.tools[name] = {"toolset": toolset, "schema": schema, "handler": handler, "emoji": emoji}
|
|
10
|
+
def test_register_exposes_all_tools() -> None:
|
|
11
|
+
class FakeCtx:
|
|
12
|
+
def __init__(self):
|
|
13
|
+
self.tools = {}
|
|
16
14
|
|
|
15
|
+
def register_tool(self, name, toolset=None, schema=None, handler=None, emoji=None):
|
|
16
|
+
self.tools[name] = {"toolset": toolset, "schema": schema}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
ctx = FakeContext()
|
|
18
|
+
ctx = FakeCtx()
|
|
20
19
|
plugin.register(ctx)
|
|
21
20
|
assert sorted(ctx.tools) == [
|
|
22
21
|
"supercoder_brief",
|
|
@@ -46,6 +45,19 @@ def test_wrap_catches_isadirectory_and_typeerror() -> None:
|
|
|
46
45
|
assert res_type == {"ok": False, "error": "bad int coercion"}
|
|
47
46
|
|
|
48
47
|
|
|
48
|
+
def test_wrap_coerces_none_args_to_clean_error() -> None:
|
|
49
|
+
def any_handler(args):
|
|
50
|
+
# if args was None, before fix: AttributeError on .get inside tools
|
|
51
|
+
# now coerced to {}, so callback runs and may raise ValueError for missing keys
|
|
52
|
+
if not args:
|
|
53
|
+
raise ValueError("args required after coercion")
|
|
54
|
+
return runner.ToolResult(True, {"echo": args})
|
|
55
|
+
|
|
56
|
+
wrapped = plugin._wrap(any_handler)
|
|
57
|
+
res = json.loads(wrapped(None))
|
|
58
|
+
assert res == {"ok": False, "error": "args required after coercion"}
|
|
59
|
+
|
|
60
|
+
|
|
49
61
|
def test_repo_map_deterministic(tmp_path) -> None:
|
|
50
62
|
# ensure deterministic output (no varying cache stats in payload)
|
|
51
63
|
from cluxion_agentplugin_supercoder.core import repo_map as rm
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/ARCHITECTURE.md
RENAMED
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/README.md
RENAMED
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/agent-surfaces.md
RENAMED
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/architecture.md
RENAMED
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/capabilities.md
RENAMED
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/design.md
RENAMED
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/Docs/installation.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_cursor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_queue.py
RENAMED
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_repo_map.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cluxion_agentplugin_supercoder-0.2.3 → cluxion_agentplugin_supercoder-0.2.5}/tests/test_safety.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|