Metadata-Version: 2.4
Name: brewer-nash-dispatcher
Version: 0.1.1
Summary: Brewer-Nash session dispatcher + Doubao OpenAI compatible streaming API
Author-email: Rexllnia <328626536@qq.com>
License: MIT
Project-URL: Homepage, https://github.com/Rexllnia/brewer-nash-dispatcher
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.100
Requires-Dist: uvicorn>=0.20
Requires-Dist: httpx>=0.24
Requires-Dist: websockets>=12.0

# brewer-nash-dispatcher

A session-affinity dispatcher for AI workers, inspired by the dynamic access-history mechanism of the **Brewer-Nash (Chinese Wall)** security model.

一个面向 AI Worker 的会话亲和调度器，灵感来自 **Brewer-Nash（中国墙）** 安全模型的动态访问历史机制。

The core idea: **isolation is triggered only by information asymmetry.** Workers with identical history are interchangeable; a worker holding non-empty history is walled off from unrelated new tasks. Fresh tasks target the zero-information state, so only workers with empty history qualify.

核心思想：**只有信息不对称才触发隔离。** history 完全相同的 worker 可以互换；持有非空 history 的 worker 不能接不相关的新任务。新任务的目标状态是“零信息”，因此只有 `history=[]` 的全新 worker 才有资格。

---

## Install / 安装

### pip

```bash
pip install brewer-nash-dispatcher

