Metadata-Version: 2.5
Name: flameox
Version: 0.2.8
Summary: Runtime evidence that helps agents trace, profile, and burn down hotspots in application and native code, GPU kernels, and inference stacks.
Project-URL: Homepage, https://github.com/morluto/flameox
Project-URL: Repository, https://github.com/morluto/flameox
Project-URL: Issues, https://github.com/morluto/flameox/issues
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: anyio<5,>=4.9
Requires-Dist: coverage<8,>=7.14
Requires-Dist: defusedxml<0.8,>=0.7.1
Requires-Dist: duckdb<1.6,>=1.5.4
Requires-Dist: ijson<4,>=3.4
Requires-Dist: json5<1,>=0.12
Requires-Dist: jsonschema<5,>=4.20
Requires-Dist: mcp-types==2.3.0
Requires-Dist: mcp==2.3.0
Requires-Dist: packaging<27,>=24
Requires-Dist: psutil<8,>=7.0
Requires-Dist: pyarrow<26,>=20
Requires-Dist: pydantic<2.14,>=2.13.4
Requires-Dist: pyperf<2.11,>=2.10
Requires-Dist: pytz>=2024.2
Requires-Dist: questionary<3,>=2.1
Requires-Dist: rfc8785==0.1.4
Requires-Dist: tomlkit<1,>=0.13
Requires-Dist: typer<1,>=0.16
Provides-Extra: all
Requires-Dist: aiperf<0.13,>=0.12; extra == 'all'
Requires-Dist: memray>=1.17; extra == 'all'
Requires-Dist: opentelemetry-proto<1.45,>=1.44; extra == 'all'
Requires-Dist: perfetto<0.58,>=0.57; extra == 'all'
Requires-Dist: protobuf<7,>=5; extra == 'all'
Requires-Dist: py-spy<0.5,>=0.4.2; extra == 'all'
Requires-Dist: torch>=2.7; extra == 'all'
Provides-Extra: cpu
Requires-Dist: py-spy<0.5,>=0.4.2; extra == 'cpu'
Provides-Extra: dev
Requires-Dist: deptry>=0.23; extra == 'dev'
Requires-Dist: import-linter>=2.2; extra == 'dev'
Requires-Dist: mypy>=1.15; extra == 'dev'
Requires-Dist: pip-audit>=2.9; extra == 'dev'
Requires-Dist: pyarrow-stubs>=20.0.0.20260625; extra == 'dev'
Requires-Dist: pytest-cov>=6.1; extra == 'dev'
Requires-Dist: pytest-xdist<4,>=3.8; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.11; extra == 'dev'
Requires-Dist: types-jsonschema<5,>=4.20; extra == 'dev'
Requires-Dist: vulture>=2.14; extra == 'dev'
Provides-Extra: inference
Requires-Dist: aiperf<0.13,>=0.12; extra == 'inference'
Provides-Extra: memory
Requires-Dist: memray>=1.17; extra == 'memory'
Provides-Extra: test
Requires-Dist: pytest>=8.3; extra == 'test'
Provides-Extra: torch
Requires-Dist: torch>=2.7; extra == 'torch'
Provides-Extra: trace
Requires-Dist: opentelemetry-proto<1.45,>=1.44; extra == 'trace'
Requires-Dist: perfetto<0.58,>=0.57; extra == 'trace'
Requires-Dist: protobuf<7,>=5; extra == 'trace'
Description-Content-Type: text/markdown

<h1 align="center">flameox</h1>

<p align="center">
  <img
    src="docs/assets/flameox-mascot-flamegraph.png"
    width="420"
    alt="flameox mascot: an ox with a flame graph between its horns"
  >
</p>

<p align="center"><strong>Bounded local runtime evidence for coding agents.</strong></p>

<!-- mcp-name: io.github.morluto/flameox -->

Flameox coordinates profilers, benchmark tools, trace processors, and direct local targets. It
turns an explicit artifact or command into bounded evidence while keeping durable preservation
optional. The agent chooses hypotheses and experiments; Flameox records observed inputs,
execution provenance, typed evidence, coverage, and limitations.

There is no workspace to initialize or project configuration to maintain. Pass exact artifact
paths to analysis and an explicit argv plus absolute working directory to capture. Flameox does not
search parent directories, edit project files, or provide a hosted service.

## Quick start

Configure an MCP client with the global setup command:

```console
npx flameox@latest setup
```

Setup detects supported clients and asks which configurations to update. For automation, select
clients explicitly, for example `--client codex --yes` or `--all --yes`; `--dry-run` reports the
paths and actions without writing. Setup preserves unrelated client configuration and does not
change project files. See [the npm package guide](npm/README.md) for details.

For direct CLI use, pass exact artifact paths or an explicit command:

```console
uvx flameox analyze artifact.preview /absolute/path/to/artifact.json
uvx flameox capture --provider direct --cwd "$PWD" -- python benchmark.py
```

To launch the stdio MCP server manually:

```console
uvx flameox mcp serve
```

For local development, clone the repository, install its development dependencies, and inspect the
available tools:

```console
git clone https://github.com/morluto/flameox.git
cd flameox
uv sync --extra dev --extra memory --extra trace --extra cpu
uv run flameox mcp inspect
```

## Evidence and storage

Analysis and unpreserved capture use bounded session scratch. Session `analysis_id` values expire
when evicted or when the server stops. Explicit preservation creates the user-level Flameox data
directory and stores native bytes and a canonical evidence bundle by SHA-256. Set
`FLAMEOX_DATA_DIR` to choose another location. Preservation is optional; it does not imply full
console-output retention.

Flameox distinguishes observed, derived, and inferred claims. Profiles guide exploration but do
not establish causality or performance improvement. Confirmatory claims require representative
workloads, declared metrics and estimands, compatible identities, preserved samples, and a
semantic oracle.

## MCP

The MCP server has no workspace binding. It exposes named analysis and capture tools through the
same capability registry as the CLI. Analysis tools accept explicit sources; capture tools accept
a typed target and provider. Tool schemas expose capability-specific fields directly. Inspect the
catalog with `flameox mcp inspect`; use `--capability CAPABILITY_ID` or `--tool TOOL_NAME` for
focused schemas and examples. The complete contract and current tool catalog are in
[the interface guide](docs/interfaces.md).

Capture takes argv, not a shell string. A direct target supplies an absolute working directory and
bounded environment overrides. Results may include `next_page`; replay its named analysis tool
and arguments unchanged. Capture continuations read collected artifacts and do not rerun the
target. MCP work belongs to the live request, so cancellation applies directly and no detached job
survives a restart.

## Documentation

- [Architecture](docs/architecture.md) describes process and package boundaries.
- [Storage and evidence](docs/storage-and-evidence.md) defines preservation and provenance.
- [Investigations](docs/investigations.md) covers experiments, comparison, and evidence quality.
- [Adapters](docs/adapters.md) documents provider compatibility and integration policy.
- [Runtime safety](docs/runtime-safety.md) covers limits, recovery, integrity, and privacy.
- [Interfaces](docs/interfaces.md) defines CLI and MCP contracts.
- [Testing](docs/testing.md) describes test selections and known proof gaps.

## Development

Flameox requires Python 3.12 or newer and uses the committed `uv.lock`. See
[CONTRIBUTING.md](CONTRIBUTING.md) for development setup and contribution guidance.

```console
uv run ruff check src tests tools
uv run ruff format --check src tests tools
uv run mypy src tests tools
uv run pytest -q
```

Flameox is licensed under the MIT License.
