Metadata-Version: 2.4
Name: sugarglider-sdk
Version: 0.1.0
Summary: SugarGlider command discovery and candidate draft client.
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: pydantic<3,>=2.11
Requires-Dist: scienith-business-actions-client==0.1.0
Requires-Dist: sugarglider-contract==0.9.0

# SugarGlider SDK

`sugarglider-sdk` 提供命令目录、参数 Schema、实时权限查询、候选草案创建和编辑。Python 客户端与 `sugarglider-commands` 使用同一组 SugarGlider Contract 生成模型。

在项目聊天运行环境中，`SugarGliderClient.from_environment()` 使用宿主配置的 `AGENT_CHAT_ACTION_API_SOCKET` 与 `AGENT_CHAT_ACTION_GRANT_FILE`。共享 Business Actions 传输层在每次请求前从授权文件读取当前凭据。

```python
from sugarglider_sdk import SugarGliderClient

client = SugarGliderClient.from_environment()
catalog = client.list_commands()
```

```bash
sugarglider-commands list
sugarglider-commands schema project.candidate.publish
sugarglider-commands availability project.candidate.publish \
  --execution-path approved_proposal --source-kind ai_batch_item --source-id "$SOURCE_ID"
```

使用当前回合的授权新建或编辑草案后，在 SugarGlider 浏览器会话打开返回的审阅链接，由业务用户确认。后端根据当前回合解析项目和权限。

本地开发在 SDK 目录显式运行 `uv sync --locked`，然后运行 `uv run --locked python -m unittest discover -s tests`。SDK 使用组织私有 PyPI 上固定版本的 Contract 和 Business Actions Client。SDK wheel 通过后端仓库的独立发布流程验证和交付。
