oxide-agent 0.1.1__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 (52) hide show
  1. oxide_agent-0.1.1/LICENSE +21 -0
  2. oxide_agent-0.1.1/PKG-INFO +144 -0
  3. oxide_agent-0.1.1/README.md +116 -0
  4. oxide_agent-0.1.1/pyproject.toml +109 -0
  5. oxide_agent-0.1.1/pyproject.toml.orig +100 -0
  6. oxide_agent-0.1.1/src/oxide/__init__.py +57 -0
  7. oxide_agent-0.1.1/src/oxide/__main__.py +3 -0
  8. oxide_agent-0.1.1/src/oxide/api.py +468 -0
  9. oxide_agent-0.1.1/src/oxide/capture.py +231 -0
  10. oxide_agent-0.1.1/src/oxide/cli.py +177 -0
  11. oxide_agent-0.1.1/src/oxide/core/__init__.py +1 -0
  12. oxide_agent-0.1.1/src/oxide/core/capsule.py +221 -0
  13. oxide_agent-0.1.1/src/oxide/core/indexing.py +262 -0
  14. oxide_agent-0.1.1/src/oxide/core/languages/__init__.py +0 -0
  15. oxide_agent-0.1.1/src/oxide/core/languages/c.py +372 -0
  16. oxide_agent-0.1.1/src/oxide/core/languages/c_resolve.py +170 -0
  17. oxide_agent-0.1.1/src/oxide/core/languages/cpp.py +474 -0
  18. oxide_agent-0.1.1/src/oxide/core/languages/cpp_facts.py +109 -0
  19. oxide_agent-0.1.1/src/oxide/core/languages/cpp_macros.py +92 -0
  20. oxide_agent-0.1.1/src/oxide/core/languages/cpp_resolve.py +312 -0
  21. oxide_agent-0.1.1/src/oxide/core/languages/go.py +375 -0
  22. oxide_agent-0.1.1/src/oxide/core/languages/go_resolve.py +239 -0
  23. oxide_agent-0.1.1/src/oxide/core/languages/java.py +392 -0
  24. oxide_agent-0.1.1/src/oxide/core/languages/java_facts.py +128 -0
  25. oxide_agent-0.1.1/src/oxide/core/languages/java_resolve.py +423 -0
  26. oxide_agent-0.1.1/src/oxide/core/languages/nesting.py +42 -0
  27. oxide_agent-0.1.1/src/oxide/core/languages/python.py +487 -0
  28. oxide_agent-0.1.1/src/oxide/core/languages/python_dispatch.py +173 -0
  29. oxide_agent-0.1.1/src/oxide/core/languages/python_resolve.py +484 -0
  30. oxide_agent-0.1.1/src/oxide/core/languages/rust.py +427 -0
  31. oxide_agent-0.1.1/src/oxide/core/languages/rust_cargo.py +325 -0
  32. oxide_agent-0.1.1/src/oxide/core/languages/rust_facts.py +251 -0
  33. oxide_agent-0.1.1/src/oxide/core/languages/rust_macros.py +74 -0
  34. oxide_agent-0.1.1/src/oxide/core/languages/rust_resolve.py +446 -0
  35. oxide_agent-0.1.1/src/oxide/core/languages/tsconfig.py +227 -0
  36. oxide_agent-0.1.1/src/oxide/core/languages/typescript.py +397 -0
  37. oxide_agent-0.1.1/src/oxide/core/languages/typescript_resolve.py +447 -0
  38. oxide_agent-0.1.1/src/oxide/core/languages/typescript_syntax.py +447 -0
  39. oxide_agent-0.1.1/src/oxide/core/navigation.py +130 -0
  40. oxide_agent-0.1.1/src/oxide/core/ordering.py +85 -0
  41. oxide_agent-0.1.1/src/oxide/core/packing.py +356 -0
  42. oxide_agent-0.1.1/src/oxide/core/retrieval.py +181 -0
  43. oxide_agent-0.1.1/src/oxide/core/routing.py +123 -0
  44. oxide_agent-0.1.1/src/oxide/core/structural.py +119 -0
  45. oxide_agent-0.1.1/src/oxide/jev.py +295 -0
  46. oxide_agent-0.1.1/src/oxide/mcp_server.py +230 -0
  47. oxide_agent-0.1.1/src/oxide/models.py +338 -0
  48. oxide_agent-0.1.1/src/oxide/py.typed +0 -0
  49. oxide_agent-0.1.1/src/oxide/storage/__init__.py +1 -0
  50. oxide_agent-0.1.1/src/oxide/storage/fts.py +107 -0
  51. oxide_agent-0.1.1/src/oxide/storage/ladybug.py +441 -0
  52. oxide_agent-0.1.1/src/oxide/storage/store.py +378 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kiy-K
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.4
2
+ Name: oxide-agent
3
+ Version: 0.1.1
4
+ Summary: OXIDE v2: a structural context engine for agents
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Requires-Dist: cryptography<49 ; platform_machine == 'x86_64' and sys_platform == 'darwin'
8
+ Requires-Dist: cryptography>=50 ; platform_machine != 'x86_64' or sys_platform != 'darwin'
9
+ Requires-Dist: fastmcp==4.1.1
10
+ Requires-Dist: ladybug==0.21.0
11
+ Requires-Dist: networkx>=3.4,<4
12
+ Requires-Dist: pathspec>=0.12
13
+ Requires-Dist: tree-sitter>=0.25,<0.27
14
+ Requires-Dist: tree-sitter-c==0.24.2
15
+ Requires-Dist: tree-sitter-cpp==0.23.4
16
+ Requires-Dist: tree-sitter-go==0.25.0
17
+ Requires-Dist: tree-sitter-java==0.23.5
18
+ Requires-Dist: tree-sitter-javascript==0.23.1
19
+ Requires-Dist: tree-sitter-python==0.25.0
20
+ Requires-Dist: tree-sitter-rust==0.24.2
21
+ Requires-Dist: tree-sitter-typescript==0.23.2
22
+ Requires-Dist: ast-grep-py==0.51.0 ; extra == 'structural'
23
+ Requires-Python: >=3.12, <3.15
24
+ Project-URL: Repository, https://github.com/Kiy-K/oxide
25
+ Project-URL: Documentation, https://github.com/Kiy-K/oxide/blob/main/docs/public-api.md
26
+ Provides-Extra: structural
27
+ Description-Content-Type: text/markdown
28
+
29
+ # OXIDE
30
+
31
+ A structural context engine for coding agents.
32
+
33
+ OXIDE captures a repository, derives a typed graph of its files, modules, symbols, and
34
+ relations, persists that graph in LadybugDB, and answers "what code matters for this
35
+ task?" with a bounded, source-backed context bundle. Retrieval is vectorless: BM25 over
36
+ code-aware terms plus structural seeds from typed hints, then TreeRouter and
37
+ deterministic selection and packing. No embeddings, model runners, or network access on
38
+ the query path.
39
+
40
+ Status: pre-release, on `main`. Python, TypeScript/TSX, JavaScript/JSX, Go, Rust,
41
+ Java, C and C++ have parser slices ([TypeScript](docs/typescript.md), [JavaScript](docs/javascript.md),
42
+ [Go](docs/go.md), [Rust](docs/rust.md), [Java](docs/java.md), [C](docs/c.md), [C++](docs/cpp.md)); other files are kept as
43
+ unsupported file evidence. The public Python API is the product boundary
44
+ ([docs/public-api.md](docs/public-api.md)). The legacy v1 implementation and its README
45
+ are pinned at commit
46
+ [`ac985b28`](https://github.com/Kiy-K/oxide/tree/ac985b28fcff7663aedadf2db5b40aa2dc325580);
47
+ the original documentation remains available in
48
+ [the pinned v1 README](https://github.com/Kiy-K/oxide/blob/ac985b28fcff7663aedadf2db5b40aa2dc325580/README.md).
49
+
50
+ ## Install
51
+
52
+ OXIDE needs CPython 3.12-3.14. Development uses [mise](https://mise.jdx.dev) and
53
+ [uv](https://docs.astral.sh/uv/):
54
+
55
+ ```bash
56
+ git clone https://github.com/Kiy-K/oxide && cd oxide
57
+ mise run bootstrap # uv sync --locked + `oxide prepare`
58
+ ```
59
+
60
+ Without mise, run `uv sync --locked`, then `uv run oxide prepare`. `oxide prepare` is
61
+ the only network access OXIDE makes. It downloads the pinned LadybugDB FTS extension for
62
+ your platform (Linux x86_64, macOS 15+ x86_64/arm64, Windows x86_64;
63
+ [docs/platforms.md](docs/platforms.md)) and checks its SHA-256. Without that extension,
64
+ the lexical channel reports `unavailable` and structural seeds and routing still work.
65
+
66
+ Outside the checkout, install the `oxide-agent` distribution (`pip install oxide-agent`
67
+ once it is published, or build it with `uv build` and `pip install dist/oxide_agent-*.whl`),
68
+ then run `oxide prepare`. That needs only Python and the native wheels. It does not need Rust,
69
+ Node.js, or a compiler. On Windows, LadybugDB also needs the OpenSSL 3 x64 DLLs in the
70
+ system directory. It opens only ASCII paths there, so with a non-ASCII user name, set
71
+ `OXIDE_DATA_DIR` and `OXIDE_FTS_EXTENSION` ([docs/platforms.md](docs/platforms.md)).
72
+
73
+ ## Use
74
+
75
+ ```bash
76
+ uv run oxide index path/to/repo # built | unchanged
77
+ uv run oxide search path/to/repo "where are failed requests retried" --limit 20
78
+ uv run oxide context path/to/repo "where are failed requests retried" --budget 1024 \
79
+ --symbol RetryPolicy --file src/http/client.py
80
+ ```
81
+
82
+ Every command takes `--json` (the typed result) and `--data-dir`. `context` prints
83
+ the payload on stdout and `used/budget units` on stderr. Errors print
84
+ `error[<code>]: <message>` and exit 2.
85
+
86
+ ```python
87
+ import oxide
88
+
89
+ with oxide.open_repository("path/to/repo") as repo: # owns the store until closed
90
+ repo.index()
91
+ hits = repo.search("where are failed requests retried")
92
+ bundle = repo.build_context("where are failed requests retried", budget=1024)
93
+ print(bundle.payload) # used <= budget
94
+ ```
95
+
96
+ ### MCP
97
+
98
+ `oxide mcp` serves one read-only tool, `oxide_search`, over stdio (FastMCP). Its
99
+ `mode` is `search` (ranked locations, the default) or `context` (a budgeted source
100
+ bundle); `oxide_context` was folded into it on 2026-10-18. It never indexes: run
101
+ `oxide index` first, and again whenever you want fresher results, even while the
102
+ server runs.
103
+
104
+ ```bash
105
+ uv run oxide mcp --repo path/to/repo # stdio, for a local agent
106
+ uv run oxide mcp --repo path/to/repo --http --port 8765 # stateless HTTP, loopback only
107
+ ```
108
+
109
+ For example, in Claude Code: `claude mcp add oxide -- uv run --directory /path/to/oxide
110
+ oxide mcp --repo /path/to/repo`. With `--repo` (repeatable) calls may only name those
111
+ repositories, and with exactly one they may omit `repository`.
112
+
113
+ The store lives under `--data-dir`, else `$OXIDE_DATA_DIR`, else
114
+ `$XDG_DATA_HOME/oxide/py` (`~/.local/share/oxide/py`). It is never captured, even
115
+ when it sits inside the repository.
116
+
117
+ ## Limits
118
+
119
+ - One owner per store, across processes. A `Repository` is not thread-safe.
120
+ - Indexing is a full rebuild per change, and capture holds the captured bytes in
121
+ memory (at most 1 GiB in scope, 1 MiB per file).
122
+ - Verified on Linux x86_64, macOS 15+ (x86_64, arm64) and Windows x86_64 by the
123
+ Platforms workflow. Windows needs the OpenSSL 3 DLLs and ASCII store paths; see
124
+ [docs/platforms.md](docs/platforms.md).
125
+
126
+ [docs/public-api.md](docs/public-api.md) has the full list, with errors, bounds and
127
+ recovery behavior.
128
+
129
+ ## Develop
130
+
131
+ ```bash
132
+ mise run verify # ruff, mypy --strict, pytest (CI runs exactly this)
133
+ uv run python scripts/bench.py path/to/corpus # latency and peak RSS, JSON report
134
+ ```
135
+
136
+ Architecture: [docs/spec/SPEC.md](docs/spec/SPEC.md), [docs/decisions.md](docs/decisions.md)
137
+ and the decisions in [docs/adr/](docs/adr/), in particular
138
+ [ADR-0011](docs/adr/0011-python-engine-vectorless.md) (Python engine, vectorless
139
+ retrieval). Contributor workflow: [docs/agents/workflow.md](docs/agents/workflow.md).
140
+ Documentation and historical evidence: [docs index](docs/README.md).
141
+
142
+ ## License
143
+
144
+ [MIT](LICENSE)
@@ -0,0 +1,116 @@
1
+ # OXIDE
2
+
3
+ A structural context engine for coding agents.
4
+
5
+ OXIDE captures a repository, derives a typed graph of its files, modules, symbols, and
6
+ relations, persists that graph in LadybugDB, and answers "what code matters for this
7
+ task?" with a bounded, source-backed context bundle. Retrieval is vectorless: BM25 over
8
+ code-aware terms plus structural seeds from typed hints, then TreeRouter and
9
+ deterministic selection and packing. No embeddings, model runners, or network access on
10
+ the query path.
11
+
12
+ Status: pre-release, on `main`. Python, TypeScript/TSX, JavaScript/JSX, Go, Rust,
13
+ Java, C and C++ have parser slices ([TypeScript](docs/typescript.md), [JavaScript](docs/javascript.md),
14
+ [Go](docs/go.md), [Rust](docs/rust.md), [Java](docs/java.md), [C](docs/c.md), [C++](docs/cpp.md)); other files are kept as
15
+ unsupported file evidence. The public Python API is the product boundary
16
+ ([docs/public-api.md](docs/public-api.md)). The legacy v1 implementation and its README
17
+ are pinned at commit
18
+ [`ac985b28`](https://github.com/Kiy-K/oxide/tree/ac985b28fcff7663aedadf2db5b40aa2dc325580);
19
+ the original documentation remains available in
20
+ [the pinned v1 README](https://github.com/Kiy-K/oxide/blob/ac985b28fcff7663aedadf2db5b40aa2dc325580/README.md).
21
+
22
+ ## Install
23
+
24
+ OXIDE needs CPython 3.12-3.14. Development uses [mise](https://mise.jdx.dev) and
25
+ [uv](https://docs.astral.sh/uv/):
26
+
27
+ ```bash
28
+ git clone https://github.com/Kiy-K/oxide && cd oxide
29
+ mise run bootstrap # uv sync --locked + `oxide prepare`
30
+ ```
31
+
32
+ Without mise, run `uv sync --locked`, then `uv run oxide prepare`. `oxide prepare` is
33
+ the only network access OXIDE makes. It downloads the pinned LadybugDB FTS extension for
34
+ your platform (Linux x86_64, macOS 15+ x86_64/arm64, Windows x86_64;
35
+ [docs/platforms.md](docs/platforms.md)) and checks its SHA-256. Without that extension,
36
+ the lexical channel reports `unavailable` and structural seeds and routing still work.
37
+
38
+ Outside the checkout, install the `oxide-agent` distribution (`pip install oxide-agent`
39
+ once it is published, or build it with `uv build` and `pip install dist/oxide_agent-*.whl`),
40
+ then run `oxide prepare`. That needs only Python and the native wheels. It does not need Rust,
41
+ Node.js, or a compiler. On Windows, LadybugDB also needs the OpenSSL 3 x64 DLLs in the
42
+ system directory. It opens only ASCII paths there, so with a non-ASCII user name, set
43
+ `OXIDE_DATA_DIR` and `OXIDE_FTS_EXTENSION` ([docs/platforms.md](docs/platforms.md)).
44
+
45
+ ## Use
46
+
47
+ ```bash
48
+ uv run oxide index path/to/repo # built | unchanged
49
+ uv run oxide search path/to/repo "where are failed requests retried" --limit 20
50
+ uv run oxide context path/to/repo "where are failed requests retried" --budget 1024 \
51
+ --symbol RetryPolicy --file src/http/client.py
52
+ ```
53
+
54
+ Every command takes `--json` (the typed result) and `--data-dir`. `context` prints
55
+ the payload on stdout and `used/budget units` on stderr. Errors print
56
+ `error[<code>]: <message>` and exit 2.
57
+
58
+ ```python
59
+ import oxide
60
+
61
+ with oxide.open_repository("path/to/repo") as repo: # owns the store until closed
62
+ repo.index()
63
+ hits = repo.search("where are failed requests retried")
64
+ bundle = repo.build_context("where are failed requests retried", budget=1024)
65
+ print(bundle.payload) # used <= budget
66
+ ```
67
+
68
+ ### MCP
69
+
70
+ `oxide mcp` serves one read-only tool, `oxide_search`, over stdio (FastMCP). Its
71
+ `mode` is `search` (ranked locations, the default) or `context` (a budgeted source
72
+ bundle); `oxide_context` was folded into it on 2026-10-18. It never indexes: run
73
+ `oxide index` first, and again whenever you want fresher results, even while the
74
+ server runs.
75
+
76
+ ```bash
77
+ uv run oxide mcp --repo path/to/repo # stdio, for a local agent
78
+ uv run oxide mcp --repo path/to/repo --http --port 8765 # stateless HTTP, loopback only
79
+ ```
80
+
81
+ For example, in Claude Code: `claude mcp add oxide -- uv run --directory /path/to/oxide
82
+ oxide mcp --repo /path/to/repo`. With `--repo` (repeatable) calls may only name those
83
+ repositories, and with exactly one they may omit `repository`.
84
+
85
+ The store lives under `--data-dir`, else `$OXIDE_DATA_DIR`, else
86
+ `$XDG_DATA_HOME/oxide/py` (`~/.local/share/oxide/py`). It is never captured, even
87
+ when it sits inside the repository.
88
+
89
+ ## Limits
90
+
91
+ - One owner per store, across processes. A `Repository` is not thread-safe.
92
+ - Indexing is a full rebuild per change, and capture holds the captured bytes in
93
+ memory (at most 1 GiB in scope, 1 MiB per file).
94
+ - Verified on Linux x86_64, macOS 15+ (x86_64, arm64) and Windows x86_64 by the
95
+ Platforms workflow. Windows needs the OpenSSL 3 DLLs and ASCII store paths; see
96
+ [docs/platforms.md](docs/platforms.md).
97
+
98
+ [docs/public-api.md](docs/public-api.md) has the full list, with errors, bounds and
99
+ recovery behavior.
100
+
101
+ ## Develop
102
+
103
+ ```bash
104
+ mise run verify # ruff, mypy --strict, pytest (CI runs exactly this)
105
+ uv run python scripts/bench.py path/to/corpus # latency and peak RSS, JSON report
106
+ ```
107
+
108
+ Architecture: [docs/spec/SPEC.md](docs/spec/SPEC.md), [docs/decisions.md](docs/decisions.md)
109
+ and the decisions in [docs/adr/](docs/adr/), in particular
110
+ [ADR-0011](docs/adr/0011-python-engine-vectorless.md) (Python engine, vectorless
111
+ retrieval). Contributor workflow: [docs/agents/workflow.md](docs/agents/workflow.md).
112
+ Documentation and historical evidence: [docs index](docs/README.md).
113
+
114
+ ## License
115
+
116
+ [MIT](LICENSE)
@@ -0,0 +1,109 @@
1
+ [project]
2
+ name = "oxide-agent"
3
+ version = "0.1.1"
4
+ description = "OXIDE v2: a structural context engine for agents"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.12,<3.15"
9
+ dependencies = [
10
+ "cryptography<49; sys_platform == 'darwin' and platform_machine == 'x86_64'",
11
+ "cryptography>=50; sys_platform != 'darwin' or platform_machine != 'x86_64'",
12
+ "fastmcp==4.1.1",
13
+ "ladybug==0.21.0",
14
+ "networkx>=3.4,<4",
15
+ "pathspec>=0.12",
16
+ "tree-sitter>=0.25,<0.27",
17
+ "tree-sitter-c==0.24.2",
18
+ "tree-sitter-cpp==0.23.4",
19
+ "tree-sitter-go==0.25.0",
20
+ "tree-sitter-java==0.23.5",
21
+ "tree-sitter-javascript==0.23.1",
22
+ "tree-sitter-python==0.25.0",
23
+ "tree-sitter-rust==0.24.2",
24
+ "tree-sitter-typescript==0.23.2",
25
+ ]
26
+
27
+ [project.urls]
28
+ Repository = "https://github.com/Kiy-K/oxide"
29
+ Documentation = "https://github.com/Kiy-K/oxide/blob/main/docs/public-api.md"
30
+
31
+ [project.scripts]
32
+ oxide = "oxide.cli:main"
33
+
34
+ [project.optional-dependencies]
35
+ structural = ["ast-grep-py==0.51.0"]
36
+
37
+ [tool.uv.build-backend]
38
+ module-name = "oxide"
39
+
40
+ [tool.ruff]
41
+ line-length = 100
42
+ src = [
43
+ "src",
44
+ "tests",
45
+ ]
46
+
47
+ [tool.ruff.lint]
48
+ select = [
49
+ "E",
50
+ "F",
51
+ "W",
52
+ "I",
53
+ "B",
54
+ "UP",
55
+ "SIM",
56
+ "RUF",
57
+ ]
58
+
59
+ [tool.mypy]
60
+ strict = true
61
+ files = [
62
+ "src",
63
+ "tests/python",
64
+ ]
65
+ mypy_path = [
66
+ "src",
67
+ "tests/python",
68
+ ]
69
+
70
+ [tool.pytest.ini_options]
71
+ testpaths = ["tests/python"]
72
+ addopts = "-ra --strict-markers"
73
+ markers = ["real_fsync: storage flushes for real (durability tests); others skip fsync"]
74
+
75
+ [tool.pyrefly]
76
+ project-includes = [
77
+ "src",
78
+ "tests/python",
79
+ ]
80
+ search-path = [
81
+ "src",
82
+ "tests/python",
83
+ ]
84
+ preset = "legacy"
85
+ check-unannotated-defs = true
86
+ infer-return-types = "never"
87
+
88
+ [tool.pyrefly.errors]
89
+ implicit-any = "error"
90
+ method-assign = "error"
91
+ unannotated-return = "error"
92
+ implicit-any-parameter = "error"
93
+ no-any-return = "error"
94
+ redundant-cast = "warn"
95
+
96
+ [dependency-groups]
97
+ dev = [
98
+ "ast-grep-py==0.51.0",
99
+ "mypy>=1.13",
100
+ "pyrefly>=1.4.0",
101
+ "pytest>=8.3",
102
+ "pytest-xdist>=3.8.0",
103
+ "ruff>=0.8",
104
+ "types-networkx>=3.6.1.20261024",
105
+ ]
106
+
107
+ [build-system]
108
+ requires = ["uv_build>=0.9,<0.13"]
109
+ build-backend = "uv_build"
@@ -0,0 +1,100 @@
1
+ # OXIDE v2: Python engine (ADR-0011). `mise run verify` is the one check.
2
+ [project]
3
+ # PyPI's "oxide" belongs to another project; the import package and CLI stay `oxide`.
4
+ name = "oxide-agent"
5
+ version = "0.1.1"
6
+ description = "OXIDE v2: a structural context engine for agents"
7
+ readme = "README.md"
8
+ license = "MIT"
9
+ license-files = ["LICENSE"]
10
+ # ladybug 0.21.0 ships wheels for CPython 3.10-3.14 only.
11
+ requires-python = ">=3.12,<3.15"
12
+ dependencies = [
13
+ # Not imported: fastmcp needs it, and 49+ ships no Intel macOS wheels (docs/platforms.md).
14
+ "cryptography<49; sys_platform == 'darwin' and platform_machine == 'x86_64'",
15
+ "cryptography>=50; sys_platform != 'darwin' or platform_machine != 'x86_64'",
16
+ "fastmcp==4.1.1",
17
+ "ladybug==0.21.0",
18
+ "networkx>=3.4,<4",
19
+ "pathspec>=0.12",
20
+ "tree-sitter>=0.25,<0.27",
21
+ "tree-sitter-c==0.24.2",
22
+ "tree-sitter-cpp==0.23.4",
23
+ "tree-sitter-go==0.25.0",
24
+ "tree-sitter-java==0.23.5",
25
+ "tree-sitter-javascript==0.23.1",
26
+ "tree-sitter-python==0.25.0",
27
+ "tree-sitter-rust==0.24.2",
28
+ "tree-sitter-typescript==0.23.2",
29
+ ]
30
+
31
+ [project.urls]
32
+ Repository = "https://github.com/Kiy-K/oxide"
33
+ Documentation = "https://github.com/Kiy-K/oxide/blob/main/docs/public-api.md"
34
+
35
+ [project.scripts]
36
+ oxide = "oxide.cli:main"
37
+
38
+ [tool.pyrefly.errors]
39
+ implicit-any = "error"
40
+ method-assign = "error"
41
+ unannotated-return = "error"
42
+ implicit-any-parameter = "error"
43
+ no-any-return = "error"
44
+ redundant-cast = "warn"
45
+
46
+ [project.optional-dependencies]
47
+ # Explicit structural search (Repository.structural_search). Optional: it adds 46 MB to a
48
+ # 94 MB install (docs/phase-6/astgrep-feasibility/ at 013e791).
49
+ # Pinned exactly: pre-1.0, own grammars.
50
+ structural = [
51
+ "ast-grep-py==0.51.0",
52
+ ]
53
+
54
+ [dependency-groups]
55
+ dev = [
56
+ "ast-grep-py==0.51.0",
57
+ "mypy>=1.13",
58
+ "pyrefly>=1.4.0",
59
+ "pytest>=8.3",
60
+ "pytest-xdist>=3.8.0",
61
+ "ruff>=0.8",
62
+ "types-networkx>=3.6.1.20261024",
63
+ ]
64
+
65
+ [build-system]
66
+ requires = ["uv_build>=0.9,<0.13"]
67
+ build-backend = "uv_build"
68
+
69
+ [tool.uv.build-backend]
70
+ module-name = "oxide"
71
+
72
+ [tool.ruff]
73
+ line-length = 100
74
+ src = ["src", "tests"]
75
+
76
+ [tool.ruff.lint]
77
+ select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF"]
78
+
79
+ [tool.mypy]
80
+ strict = true
81
+ files = ["src", "tests/python"]
82
+ mypy_path = ["src", "tests/python"]
83
+
84
+ [tool.pytest.ini_options]
85
+ testpaths = ["tests/python"]
86
+ addopts = "-ra --strict-markers"
87
+ markers = ["real_fsync: storage flushes for real (durability tests); others skip fsync"]
88
+
89
+ [tool.pyrefly]
90
+ project-includes = [
91
+ "src",
92
+ "tests/python",
93
+ ]
94
+ search-path = [
95
+ "src",
96
+ "tests/python",
97
+ ]
98
+ preset = "legacy"
99
+ check-unannotated-defs = true
100
+ infer-return-types = "never"
@@ -0,0 +1,57 @@
1
+ """OXIDE v2: a structural context engine for agents (docs/spec/SPEC.md, ADR-0011)."""
2
+
3
+ from oxide.api import Repository, index_repository, open_repository
4
+ from oxide.models import (
5
+ ChannelStatus,
6
+ ContextBundle,
7
+ ContextItem,
8
+ Entity,
9
+ EntryPoint,
10
+ FileInfo,
11
+ HintIssue,
12
+ Impact,
13
+ ImpactHop,
14
+ IndexReport,
15
+ ItemEntity,
16
+ JudgeStatus,
17
+ Omission,
18
+ OxideError,
19
+ Relation,
20
+ RouteSummary,
21
+ SearchResult,
22
+ Seed,
23
+ Skip,
24
+ Snapshot,
25
+ SourceRef,
26
+ StructuralMatch,
27
+ StructuralResult,
28
+ )
29
+
30
+ __all__ = [
31
+ "ChannelStatus",
32
+ "ContextBundle",
33
+ "ContextItem",
34
+ "Entity",
35
+ "EntryPoint",
36
+ "FileInfo",
37
+ "HintIssue",
38
+ "Impact",
39
+ "ImpactHop",
40
+ "IndexReport",
41
+ "ItemEntity",
42
+ "JudgeStatus",
43
+ "Omission",
44
+ "OxideError",
45
+ "Relation",
46
+ "Repository",
47
+ "RouteSummary",
48
+ "SearchResult",
49
+ "Seed",
50
+ "Skip",
51
+ "Snapshot",
52
+ "SourceRef",
53
+ "StructuralMatch",
54
+ "StructuralResult",
55
+ "index_repository",
56
+ "open_repository",
57
+ ]
@@ -0,0 +1,3 @@
1
+ from oxide.cli import main
2
+
3
+ raise SystemExit(main())