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.9.tar.gz (884.5 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.9-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sgar-0.1.9.tar.gz
  • Upload date:
  • Size: 884.5 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.9.tar.gz
Algorithm Hash digest
SHA256 0a3913ba610225b548de6dad1eaed020ab5449740c6cb2f471def771b898bcd7
MD5 f8f670f9b2376f8809483807938a8664
BLAKE2b-256 3edcf3582473b622e08248e134292f7fc53443b408a5967f9fe1af6e9a95345f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sgar-0.1.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ee8834b3f9aa809a567aea5936b9255a7674d3d74f47817d8809cec10529005a
MD5 55823f4e13ade9382deb6ee02f6287a0
BLAKE2b-256 b8e4911c3781e10b479a12f2578a54379c8cf83b4301c5dbfd0a2120faf7455a

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