Skip to main content

英文版 | 简体中文

ChatSite

ChatSite 是 ChatArch / Chat 系列的 Web 与 service 入口。根 Web 应用是功能 hub,各功能工作区通过共享的 ChatSite 登录/session 层调用具体的 Chat 工具模块;例如 Overleaf 编辑器由 ChatSite serve,并调用 ChatOL 作为 Overleaf 工具模块。后续新增站点能力时,必须同步 Python API、服务入口、文档和测试。

快速开始

pip install chatsite
chatsite --version
chatsite --tree
chatsite --tree-brief

开发环境:

pip install -e ".[dev,docs]"
python -m pytest -q
mkdocs build --strict
python -m build

CLI 树

chatsite
├── --help  # Show this message and exit.
├── --version  # Show the version and exit.
├── --tree  # Print the registered CLI tree and exit.
├── --tree-brief  # Print the registered CLI tree without parameter signatures and exit.
├── image  # ChatImg 文生图服务。
│   ├── check [--profile PROFILE] [--home HOME]  # 验证 Image 配置,不发起图片生成。
│   └── serve [--host HOST] [--port PORT] [--profile PROFILE] [--home HOME]  # 启动 ChatImg Web 服务。
└── todo  # 任务树工作台。
    ├── check [--profile PROFILE] [--home HOME]  # 验证配置及模型,会发送一次不修改任务的小请求。
    └── serve [--host HOST] [--port PORT] [--profile PROFILE] [--home HOME]  # 启动任务树 Web 服务。

当前公开接口包含 Todo 与 Image 服务命令;--tree 保留参数签名,--tree-brief 省略签名。

chatsite hello 不是公开 CLI;它属于脚手架示例残留,必须失败。

文档

开发说明

扩展命令前先阅读 DEVELOP.md 和 AGENTS.md,并保持 --tree、--tree-brief、README、MkDocs、测试与 changelog 同步。

Todo 任务树工作台

安装 "ChatSite[todo]>=0.1.5,<0.2.0" 后执行 chatsite todo serve。SimpleMindMap 提供原生导图交互,Ant Design X 提供对话界面,ChatTodo 保持节点、版本、回执和撤销的领域职责;登录页与会话由 ChatLogin 共享核心提供,任务数据仍由 ChatTodo/ChatSite Todo 保存。前端随 Python 包分发,运行服务不需要 Node;维护界面源码时在 frontend/todo/ 执行 npm ci --ignore-scripts、npm test 和 npm run build,并提交生成制品。

使用 chatsite todo serve 启动,chatsite todo check 验证配置和模型。配置由 ChatEnv 的 chatsite-todo provider 管理。模型支持 Responses/Chat Completions;使用 Plan 服务时应保留其 Plan 专属入口,不自动回退到按量计费。

Overleaf / Hub Web

安装 "ChatSite[overleaf]>=0.1.5,<0.2.0" 后可运行 chatsite-web。Hub 与 /overleaf 是标准库 HTTP 服务,使用 ChatLogin UI-only 登录页、/login/session 和登录静态资源;浏览器写操作携带共享 CSRF。原 chatsite.sqlite3 继续保存 Settings、Overleaf 凭据/session、OpenAI key、对话和消息;登录 session 改存独立 auth.sqlite3,旧本地 session cookie 需要重新登录。

ChatImg 文生图服务

安装 "ChatSite[image-web]>=0.1.5,<0.2.0" 后执行 chatsite image serve。根页面公开可用,访客可以继续按原 /api/generate、/generated/<filename>、/api/images/<filename> 路径生成、预览、下载和分享;登录是可选能力,登录后成功生成会写入当前账号自己的 SQLite 历史。历史接口只返回当前 Principal 的记录,访客不能枚举全局历史,也不会把旧匿名图片自动归到任意用户。若浏览器保留的 HttpOnly 登录 cookie 已失效,生图请求会先拒绝,用户需要点击“以访客继续”通过同源 POST /api/guest/reset 明确清除失效 cookie 后再匿名生成;有效登录会话仍必须走正常 CSRF 退出。

配置由 ChatEnv 的 chatsite-image provider 管理,运行数据默认在 ~/.chatarch/chatsite/image/。模型凭据仍由 ChatImg/OpenAI profile 读取,ChatSite 不复制 API key。公开生图限流使用 ASGI 服务器按受信代理规则归一化后的 request.client.host,不会信任浏览器直接提交的 X-Forwarded-For。可配置 CHATSITE_IMAGE_LEGACY_GENERATED_DIR 作为旧匿名图片的只读 URL 兼容入口;迁移计划是先挂载只读旧目录、核对访问日志和文件生命周期,再由运维另行授权复制或归档,默认服务不会移动、删除或改属旧文件。

Metadata

Release files for ChatSite 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ChatSite 0.1.5
File Size Uploaded
chatsite-0.1.5.tar.gz 9.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ChatSite 0.1.5
File Interpreter ABI Platform
chatsite-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 MB

Release files / chatsite-0.1.5.tar.gz

Download URL chatsite-0.1.5.tar.gz
Size 9.5 MB
Tags Source
SHA-256 checksum
How to use checksums
fbdbdf71d426ab63c228cd1861f0cec9c823d658c8530624cfd8209e5ea5d4af
BLAKE2b-256 checksum
How to use checksums
fbd2b9db72fb9563abe1923e8a629274d6829dffad89e19ef49d44120ddf6763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / chatsite-0.1.5-py3-none-any.whl

Download URL chatsite-0.1.5-py3-none-any.whl
Size 5.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a572b03df697200519a66e6c9dd844f46997fcbde83d87dddf6fb0d6b6963e0b
BLAKE2b-256 checksum
How to use checksums
792ea12666c8493e2449c6792d9055934600e82c4d16fff7be8e63420e4a2313
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page