Metadata-Version: 2.4
Name: afs-core
Version: 1.0.0
Summary: agentic-fs core contracts, DTOs, key scheme, and conformance kits. Depends on pydantic only.
Project-URL: Homepage, https://github.com/vivekkhimani/agentic-fs
Project-URL: Repository, https://github.com/vivekkhimani/agentic-fs
Project-URL: Issues, https://github.com/vivekkhimani/agentic-fs/issues
Author-email: Vivek Khimani <vivekkhimani07@gmail.com>
License-Expression: Apache-2.0
Keywords: agentic-fs,agents,conformance,contracts,filesystem,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: pydantic>=2.7
Provides-Extra: testing
Requires-Dist: pytest-asyncio>=0.24; extra == 'testing'
Requires-Dist: pytest>=8; extra == 'testing'
Description-Content-Type: text/markdown

# afs-core

The **contracts** package for agentic-fs: `typing.Protocol` interfaces, pydantic
DTOs, the single key scheme, the closed error vocabulary, versioned event
contracts, and the conformance test kits. Depends on **pydantic only** — it
imports without the server, so connectors and adopters can build against it
without pulling in `afs-server`.

## Status

Foundations slice (M0, in progress):

- `afs_core.keys` — the **single** definition of the S3 key scheme: build, parse,
  validate, and `is_indexable()`. Nothing else concatenates a key.
- `afs_core.errors` — the closed `ErrorCode` vocabulary + the `AfsError`
  hierarchy (RFC 9457 `problem+json` shape).
- `afs_core.models` — core DTOs (`Page[T]`, `CatalogEntry`, `ExtractionState`, …)
  and control records (`TenantRecord`, `NamespaceRecord`, `PrincipalRecord`).

Coming next: `afs_core.contracts` (the async Protocols), `afs_core.testing`
(conformance kits + in-memory fakes), `afs_core.events`.

## Develop

```bash
uv sync
uv run pytest packages/afs-core
```
