1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
"""newt-agent: small, fast, local-first agentic coder.
Submodules
----------
- ``newt_agent.core`` Tier router, config, session/model ids, errors
- ``newt_agent.data`` load_csv_to_sqlite / query / summarize (SQLite EDA)
- ``newt_agent.tools`` read / edit / search / apply_patch / apply_whole_files
- ``newt_agent.coder`` prompt builder + emission normalizer
- ``newt_agent.eval`` TestCase + evaluators + scorecard
- ``newt_agent.inference`` ChatRequest/ChatReply + LocalOllamaBackend (async)
- ``newt_agent.acp_worker`` TaskReply + Session data types
- ``newt_agent.mcp`` McpServer dispatch shell + handler registry
- ``newt_agent.frame`` Admitted units, canonical identities, byte verification
- ``newt_agent.harness`` Durable sessions, projections, classification records
Install: ``pip install newt-agent-py``
The PyPI distribution name has a ``-py`` suffix because PyPI's similarity
check may block the bare ``newt-agent`` against the existing ``newt``
package. The Python import path is unaffected — it stays
``newt_agent``.
A short library example::
from newt_agent.core import Router, Tier
router = Router()
print(router.classify("rename foo to bar")) # Tier.Fast
detailed = router.classify_detailed("review this PR")
print(detailed.tier, detailed.confidence, detailed.reasons)
For the ``newt`` CLI binary, install separately::
git clone https://github.com/Gilamonster-Foundation/newt-agent
cargo install --path newt-agent/newt-cli
newt --help
(A ``pip``-installable Python CLI script is planned as a follow-up.)
"""
# The native PyO3 extension module ships as `_newt_agent` next to this
# package. It registers the submodules below as attributes of the
# parent module.
# type: ignore[attr-defined]
# Re-export the native submodules as plain Python attributes and stitch
# them into ``sys.modules`` so ``import newt_agent.core`` works (Python's
# import system needs the submodule entries to resolve dotted imports).
=
=
=
=
= # noqa: A001 — shadows builtin `eval`; deliberate parity
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=