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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sgar-0.1.5.tar.gz
  • Upload date:
  • Size: 878.9 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.5.tar.gz
Algorithm Hash digest
SHA256 d3fda89154d11faa482a62df8eeddbb697d4d1e5992fa67c19c5264f306c1e48
MD5 cca4d7c83b23e122d46ca85543d19ae3
BLAKE2b-256 67ea1ad9ae8fd8898538ca07212e6e3e0a7b73adea32a155389c61ae912c3417

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sgar-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3c319ac9577dbe53fe6ab94c874bda3e0836d084e866795879dcffc9f9465057
MD5 22594ca3e32f8d68cfed0ac78b64661b
BLAKE2b-256 f88c13fa7516bdcb651b070d8c0b7c5c1d9a5d8eb00b8935e59299a9e5039e4e

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