Metadata-Version: 2.5
Name: kedi-decisions
Version: 0.1.0
Summary: Typed decision contracts and model integrations
Project-URL: Repository, https://github.com/kedi-lang/kedi-decisions
Project-URL: Issues, https://github.com/kedi-lang/kedi-decisions/issues
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: jsonschema<5,>=4.26
Requires-Dist: pydantic<3,>=2.12
Provides-Extra: langchain
Requires-Dist: langchain==1.4.3; extra == 'langchain'
Provides-Extra: laya
Requires-Dist: kedi-laya[pydantic,torch]==0.1.0; extra == 'laya'
Provides-Extra: laya-mlx
Requires-Dist: kedi-laya[mlx,pydantic]==0.1.0; extra == 'laya-mlx'
Provides-Extra: pydantic
Requires-Dist: pydantic-ai-slim==2.54.0; extra == 'pydantic'
Provides-Extra: typesafe
Requires-Dist: kedi-typesafe==0.3.0; extra == 'typesafe'
Description-Content-Type: text/markdown

# Kedi Decisions

Provider-neutral typed decisions, with independent Jev and Laya integrations.

The root `kedi-decisions` package contains schema planning, criteria, validation,
decision evidence and optional framework bridges. It imports neither TypeSafe
SDK nor MLX/PyTorch. Provider packages live in `packages/` and can be installed
independently. Kedi itself is not required to use them.

| Install | Includes |
| --- | --- |
| `kedi-decisions` | Shared contracts and validation only |
| `kedi-decisions[typesafe]` | Jev and its native Pydantic AI integration |
| `kedi-decisions[laya]` | Laya, upstream PyTorch runtime, Pydantic AI |
| `kedi-decisions[laya-mlx]` | Laya, Apple Silicon MLX runtime, Pydantic AI |
| `kedi-decisions[langchain]` | Optional shared LangChain integration |

Jev's LangChain transport is installed with `kedi-typesafe[langchain]`.
The shared `langchain` extra alone does not install provider-specific SDKs.

These package versions are not yet published to PyPI. Clone the monorepo to
work from source:

```sh
git clone https://github.com/kedi-lang/kedi-decisions.git
cd kedi-decisions
uv sync --locked --group dev
```

Add `--extra laya-mlx` or `--extra laya` only on a host where that runtime is
needed. Installation does not download model weights.

## Layout

- `src/kedi_decisions/`: shared contract, schema, evidence and integrations.
- `packages/kedi-typesafe/`: TypeSafe SDK conversion and Jev transport.
- `packages/kedi-laya/`: local inference, MLX/Torch loading and model wrappers.
- `tests/`: package isolation and cross-provider contracts.

Kedi programs import the shared criteria with `> import: decisions`; Python
callers embedded in Kedi use `kedi.decisions`. These replace the former
provider-specific Kedi type-import modules. Neither surface selects a model,
loads weights, or imports a provider SDK. Standalone Python callers can import
directly from `kedi_decisions`. Provider packages retain their public API.

## Compatibility

`kedi_typesafe` retains its public exports, evaluator/client ownership rules,
strict default boolean threshold of 0.85, SDK-native question plans and metadata
envelope. Criteria are aliases of the shared objects, not duplicate classes.
Existing serialized `x-typesafe` schema annotations and route identifiers are
retained for compatibility; they do not imply a dependency on the TypeSafe SDK.

Jev and Laya can return similar decision shapes without having interchangeable
confidence calibration. A finite-choice interface is not free-form extraction.
Unsupported schema types fail before model invocation.

## Checks

`make check`, `make tests` and `make build` validate the workspace. Live validation
programs reside with their provider packages and are excluded from normal CI.
`make coverage` enforces a 98% combined line/branch coverage floor.
