kestrel-feature-code 0.1.0__tar.gz → 0.2.0__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.
- kestrel_feature_code-0.2.0/.gitignore +6 -0
- {kestrel_feature_code-0.1.0 → kestrel_feature_code-0.2.0}/PKG-INFO +6 -4
- {kestrel_feature_code-0.1.0 → kestrel_feature_code-0.2.0}/README.md +4 -2
- kestrel_feature_code-0.2.0/kestrel_feature_code/__init__.py +61 -0
- kestrel_feature_code-0.2.0/kestrel_feature_code/feature.py +1234 -0
- {kestrel_feature_code-0.1.0 → kestrel_feature_code-0.2.0}/pyproject.toml +7 -3
- kestrel_feature_code-0.1.0/.gitignore +0 -2
- kestrel_feature_code-0.1.0/kestrel_feature_code/__init__.py +0 -36
- kestrel_feature_code-0.1.0/kestrel_feature_code/feature.py +0 -815
- {kestrel_feature_code-0.1.0 → kestrel_feature_code-0.2.0}/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kestrel-feature-code
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Codebase tooling feature for Kestrel Sovereign — read, search, edit, lint, test, commit, rollback with approval gates
|
|
5
5
|
Project-URL: Homepage, https://kestrelsovereign.com
|
|
6
6
|
Project-URL: Source, https://github.com/KestrelSovereignAI/kestrel-feature-code
|
|
@@ -23,7 +23,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
23
23
|
Classifier: Topic :: Software Development
|
|
24
24
|
Classifier: Topic :: Software Development :: Build Tools
|
|
25
25
|
Requires-Python: <3.14,>=3.11
|
|
26
|
-
Requires-Dist: kestrel-sovereign-sdk<1,>=0.
|
|
26
|
+
Requires-Dist: kestrel-sovereign-sdk<1,>=0.4
|
|
27
27
|
Provides-Extra: test
|
|
28
28
|
Requires-Dist: pytest-asyncio>=1.1.0; extra == 'test'
|
|
29
29
|
Requires-Dist: pytest>=8.0.0; extra == 'test'
|
|
@@ -39,7 +39,9 @@ Codebase tooling feature for Kestrel Sovereign agents — 10 tools spanning read
|
|
|
39
39
|
uv pip install kestrel-feature-code
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
The feature is auto-discovered by Kestrel Sovereign via the `kestrel_sovereign.features` entry point — install it alongside `kestrel-sovereign` and `
|
|
42
|
+
The feature is auto-discovered by Kestrel Sovereign via the `kestrel_sovereign.features` entry point — install it alongside `kestrel-sovereign` and `CodeFeature` registers itself at startup.
|
|
43
|
+
|
|
44
|
+
> **v0.2.0 rename:** `CodeEditFeature` → `CodeFeature`. The old name is kept as a deprecated alias through v0.2.x for entry-point and import cutover; importing it emits a `DeprecationWarning`. Removed in v0.3.0. All `@tool` methods now return `kestrel_sdk.tools.result.ToolResult` (was: `Dict[str, Any]`); see kestrel-sovereign #1042 for the honesty contract.
|
|
43
45
|
|
|
44
46
|
## Configuration
|
|
45
47
|
|
|
@@ -64,7 +66,7 @@ The feature is auto-discovered by Kestrel Sovereign via the `kestrel_sovereign.f
|
|
|
64
66
|
|
|
65
67
|
## Dependencies
|
|
66
68
|
|
|
67
|
-
- `kestrel-sovereign-sdk>=0.
|
|
69
|
+
- `kestrel-sovereign-sdk>=0.4,<1` — base `Feature`, `tool`, `ToolCategory`, `ToolResult`
|
|
68
70
|
|
|
69
71
|
No runtime dependency on `kestrel-sovereign` itself; the feature operates against any codebase via `KESTREL_CODE_ROOT`.
|
|
70
72
|
|
|
@@ -8,7 +8,9 @@ Codebase tooling feature for Kestrel Sovereign agents — 10 tools spanning read
|
|
|
8
8
|
uv pip install kestrel-feature-code
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The feature is auto-discovered by Kestrel Sovereign via the `kestrel_sovereign.features` entry point — install it alongside `kestrel-sovereign` and `
|
|
11
|
+
The feature is auto-discovered by Kestrel Sovereign via the `kestrel_sovereign.features` entry point — install it alongside `kestrel-sovereign` and `CodeFeature` registers itself at startup.
|
|
12
|
+
|
|
13
|
+
> **v0.2.0 rename:** `CodeEditFeature` → `CodeFeature`. The old name is kept as a deprecated alias through v0.2.x for entry-point and import cutover; importing it emits a `DeprecationWarning`. Removed in v0.3.0. All `@tool` methods now return `kestrel_sdk.tools.result.ToolResult` (was: `Dict[str, Any]`); see kestrel-sovereign #1042 for the honesty contract.
|
|
12
14
|
|
|
13
15
|
## Configuration
|
|
14
16
|
|
|
@@ -33,7 +35,7 @@ The feature is auto-discovered by Kestrel Sovereign via the `kestrel_sovereign.f
|
|
|
33
35
|
|
|
34
36
|
## Dependencies
|
|
35
37
|
|
|
36
|
-
- `kestrel-sovereign-sdk>=0.
|
|
38
|
+
- `kestrel-sovereign-sdk>=0.4,<1` — base `Feature`, `tool`, `ToolCategory`, `ToolResult`
|
|
37
39
|
|
|
38
40
|
No runtime dependency on `kestrel-sovereign` itself; the feature operates against any codebase via `KESTREL_CODE_ROOT`.
|
|
39
41
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Kestrel Feature Code — codebase tooling for Kestrel Sovereign agents.
|
|
3
|
+
|
|
4
|
+
Registers ``CodeFeature`` (renamed from ``CodeEditFeature`` in
|
|
5
|
+
v0.2.0) via the ``kestrel_sovereign.features`` entry-point group;
|
|
6
|
+
auto-discovered when installed alongside kestrel-sovereign.
|
|
7
|
+
|
|
8
|
+
The feature covers general codebase tooling — read, search, diff,
|
|
9
|
+
lint, logs, test — alongside the approval-gated mutation tools (edit,
|
|
10
|
+
commit, rollback, restart). All mutation requires explicit user
|
|
11
|
+
approval; read-only operations do not. Returns
|
|
12
|
+
``kestrel_sdk.tools.result.ToolResult`` from every @tool surface.
|
|
13
|
+
|
|
14
|
+
Tools:
|
|
15
|
+
!code-read <path> Read a source file
|
|
16
|
+
!code-search <pattern> Search for text in codebase
|
|
17
|
+
!code-edit <path> Edit a source file (requires approval)
|
|
18
|
+
!code-diff <path> Show uncommitted changes
|
|
19
|
+
!code-commit <message> Commit staged changes (requires approval)
|
|
20
|
+
!code-restart Signal server restart (requires approval)
|
|
21
|
+
!code-test [path] Run pytest tests
|
|
22
|
+
!code-lint [path] Run ruff linter
|
|
23
|
+
!code-logs View recent application logs
|
|
24
|
+
!code-rollback [commit] Rollback to previous commit (requires approval)
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
from importlib.metadata import PackageNotFoundError, version as _version
|
|
28
|
+
|
|
29
|
+
from .feature import CodeFeature
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
__version__ = _version("kestrel-feature-code")
|
|
33
|
+
except PackageNotFoundError:
|
|
34
|
+
__version__ = "0.0.0+local"
|
|
35
|
+
|
|
36
|
+
__all__ = ["CodeFeature", "__version__"]
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def __getattr__(name: str):
|
|
40
|
+
"""Lazy backward-compat for ``from kestrel_feature_code import
|
|
41
|
+
CodeEditFeature``. Removed in v0.3.0.
|
|
42
|
+
|
|
43
|
+
Emits the DeprecationWarning here directly (not via the
|
|
44
|
+
``feature`` submodule's __getattr__) so the stacklevel points at
|
|
45
|
+
the user's import site. Going through the submodule alias would
|
|
46
|
+
add an extra frame and attribute the warning to ``__init__.py``
|
|
47
|
+
instead of the user's code.
|
|
48
|
+
"""
|
|
49
|
+
if name == "CodeEditFeature":
|
|
50
|
+
import warnings
|
|
51
|
+
warnings.warn(
|
|
52
|
+
"CodeEditFeature is a deprecated alias for CodeFeature; "
|
|
53
|
+
"the alias will be removed in v0.3.0. Update imports to "
|
|
54
|
+
"``from kestrel_feature_code import CodeFeature``.",
|
|
55
|
+
DeprecationWarning,
|
|
56
|
+
stacklevel=2,
|
|
57
|
+
)
|
|
58
|
+
return CodeFeature
|
|
59
|
+
raise AttributeError(
|
|
60
|
+
f"module 'kestrel_feature_code' has no attribute {name!r}"
|
|
61
|
+
)
|