Skip to main content

SGAR — ccx 治理化 agent 运行时(自 llm_dealer 导出的独立分发)

Project description

sgar

ccx 治理化 agent 运行时,从 llm_dealer 仓库中按 core/ccx 的依赖闭包自动导出的 独立、可 pip 安装项目。

本目录由 task/copy/ccx_out.py 生成:包含 321 个源文件、61 个运行期资源文件, 覆盖子包 core.cc, core.ccx, core.deepstack_v5, core.llms, core.utils

注意:分发名是 sgar,但可导入的顶层包是 core(保留原命名空间以免改写大量 import core.*)。

安装

pip install -e .
# 或
pip install .

需要 Python >=3.12。

配置

推荐直接使用 sgar config 写入用户级配置文件:

sgar config where
sgar config list
sgar config set --client SimpleDeepSeekClient --api-key YOUR_KEY --model deepseek-v4-pro

上述命令会把配置写入 ~/.sgar/setting.ini,默认同时设置:

[Default]
llm_api = SimpleDeepSeekClient
cc_default_llm_client = SimpleDeepSeekClient

sgar config list 会列出当前分发支持的 ClientName、对应 credential_keysmodel_keys 和一句命令示例。

如果某个 client 只有一个凭证键,可以直接用 --api-key。如果某个 client 需要多个 凭证或连接参数(例如某些云厂商 client),请改用可重复参数:

sgar config set --client SparkClient \
  --key xunfei_spark_api_key=YOUR_KEY \
  --key xunfei_spark_secret_key=YOUR_SECRET \
  --model 4.0Ultra

仍然可以手工编辑配置文件;core/utils/config_setting.py 会优先读取环境变量,其次读取 项目目录 setting.ini,再回退到用户目录 ~/.sgar/setting.ini

使用

sgar --help                 # 安装后提供的命令行入口
sgar config --help          # 管理用户级 LLM 配置
sgar config list            # 查看支持的 ClientName / key / model
python -m sgar --help
python -m core.ccx.sgar --help
from core.ccx.api import AgentRunRequest  # 程序化入口

自动发布

  • 每次 push 到 main 后,GitHub Actions 会自动将 pyproject.toml 的 patch 版本加 1
  • 版本 bump 成功后,会自动构建并发布到 PyPI。
  • 如需手动发布,可在 GitHub Actions 里运行 Publish sgar to PyPI,并选择 pypitestpypi
  • 正式发布使用 GitHub Repository Secret PYPI_API_TOKEN
  • 如需手动发布到 TestPyPI,请额外配置 TEST_PYPI_API_TOKEN

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sgar-0.1.6.tar.gz (879.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sgar-0.1.6-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file sgar-0.1.6.tar.gz.

File metadata

  • Download URL: sgar-0.1.6.tar.gz
  • Upload date:
  • Size: 879.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sgar-0.1.6.tar.gz
Algorithm Hash digest
SHA256 b3bf04b9904e05eb1c80bc633035fe10a86fe833c2c3d629ece6bcf07aa57574
MD5 3b62b48e315f8fb76eeacbb138026445
BLAKE2b-256 bc5ea1f93f6dea6b981879307e4fc218ea45e1414be759c783aad1bce43307a2

See more details on using hashes here.

File details

Details for the file sgar-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: sgar-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sgar-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6da1c6a89cb0965f925eb98bf3b496ddf2bde07f48728d6ac68f741752e31bab
MD5 7faf871145f127cd111b7a18fc1bee31
BLAKE2b-256 e597e6256f012d6a3a453d2a93ad5b9f2a14a9f99429589de384e6f85c96e405

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page