feat: add provider-neutral tracker automation

This commit is contained in:
2026-08-17 22:36:05 -04:00
parent f65a6ec812
commit dead6ca2bb
28 changed files with 1557 additions and 17 deletions
+30
View File
@@ -0,0 +1,30 @@
# Tracker automation
`tracker` is the provider-neutral execution seam for issue-tracker skills. It emits one JSON envelope on stdout and delegates authentication and repository work to `gh`, `glab`, or `tea`.
## Use
```sh
python -m tracker --provider gitea issue get 16
TRACKER_PROVIDER=github tracker issue list --state open --label ready-for-agent
tracker pr get 42 --diff
```
Provider precedence is `--provider`, `TRACKER_PROVIDER`, then the `origin` Git remote. Explicit resource commands (`issue` and `pr`) avoid shared-number ambiguity. Use `resolve-reference` only when intentional resolution of a bare number is required.
Stable failures are returned as:
```json
{"ok":false,"provider":"gitea","operation":"issue.get","error":{"code":"auth_required","message":"...","retryable":false,"provider":"gitea","operation":"issue.get","details":{}}}
```
The Python API is the same seam as the CLI:
```python
from tracker import Tracker
tracker = Tracker(provider="gitea")
result = tracker.add_label("issue", 16, "needs-review")
```
Inject `RecordingRunner` or another object with `run(argv, **kwargs)` for deterministic contract tests. Provider-specific capability gaps are explicit in `error.code` or `details`; credentials are never accepted or stored by this package.