diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..f087b429e2f81a9f37b28a8308e2210f84df6c9b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..a3c5e24f8886792f28c4a5946c69c49ba23cd354 --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/zhouweitong3/euler-copilot-framework_rpm \ No newline at end of file diff --git a/euler-copilot-framework-0.10.1.tar.gz b/euler-copilot-framework-0.10.1.tar.gz deleted file mode 100644 index 2ed9fd6c75141fe4aa082e60141056bcf98cf7e9..0000000000000000000000000000000000000000 Binary files a/euler-copilot-framework-0.10.1.tar.gz and /dev/null differ diff --git a/euler-copilot-framework-2.0.0.tar.gz b/euler-copilot-framework-2.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bac8af662c43deb50a08b24cc1fea75c6434d887 --- /dev/null +++ b/euler-copilot-framework-2.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63cbded9602f792020aea66ed9b3dc296a46facd54af4fa961f8ebb63e291cd9 +size 115405071 diff --git a/euler-copilot-framework.spec b/euler-copilot-framework.spec index fc2658da4fc8574e54ffba5e022f184302031a81..59a7f798b6bfec77867a48336cd24364b7250a38 100644 --- a/euler-copilot-framework.spec +++ b/euler-copilot-framework.spec @@ -1,12 +1,37 @@ %define _python_bytecompile_skip 1 Name: euler-copilot-framework -Version: 0.10.1 -Release: 3 +Version: 2.0.0 +Release: 1 Summary: Intelligent framework Engine Based On LLM License: MulanPSL-2.0 URL: https://gitee.com/openeuler/euler-copilot-framework Source0: %{name}-%{version}.tar.gz +Requires: python3 +Requires: python3-pip +Requires: python3-aiofiles +Requires: python3-asyncer +Requires: python3-asyncpg +Requires: python3-cryptography +Requires: python3-fastapi +Requires: python3-httpx-sse +Requires: python3-jinja2 +Requires: python-jionlp +Requires: python3-jsonschema +Requires: python3-minio +Requires: python3-pandas +Requires: python3-pgvector +Requires: python3-pillow +Requires: python3-python-jsonpath +Requires: python3-magic +Requires: python3-python-multipart +Requires: python3-tiktoken +Requires: python3-toml +Requires: python3-uvicorn +Requires: python3-xmltodict +# MCP Center +Requires: python3-virtualenv + %description Intelligent framework engine based on LLM that supports calling traditional services using both low-level func_call and higher-order protocols such as MCP. @@ -21,41 +46,13 @@ Intelligent framework engine based on LLM that supports calling traditional serv %post packages=( - "aiofiles==24.1.0" - "asyncer==0.0.8" - "asyncpg==0.30.0" - "cryptography==44.0.2" - "fastapi==0.115.12" "httpx==0.28.1" - "httpx-sse==0.4.0" - "jinja2==3.1.6" - "jionlp==1.5.20" - "jsonschema==4.23.0" - "lancedb==0.21.2" - "mcp==1.9.4" - "minio==7.2.15" - "ollama==0.5.1" - "openai==1.91.0" - "pandas==2.2.3" - "pgvector==0.4.1" - "pillow==10.3.0" + "mcp==1.17.0" + "ollama==0.5.3" + "openai==2.3.0" "pydantic==2.11.7" - "pymongo==4.12.1" - "python-jsonpath==1.3.0" - "python-magic==0.4.27" - "python-multipart==0.0.20" - "pytz==2025.2" - "pyyaml==6.0.2" - "rich==13.9.4" - "sqids==0.5.1" + "rich==14.2.0" "sqlalchemy==2.0.41" - "tiktoken==0.9.0" - "toml==0.10.2" - "uvicorn==0.34.0" - "paramiko==4.0.0" - "langchain==0.3.7" - "langchain-openai==0.2.5" - "psutil==7.0.0" ) # 镜像源 @@ -67,7 +64,7 @@ failed_packages=() # 逐个安装包 for package in "${packages[@]}"; do echo "正在安装: $package" - if pip install "$package" -i "$mirror"; then + if pip install --no-cache-dir "$package" -i "$mirror"; then echo -e "\033[0;32m$package 安装成功\033[0m" else echo -e "\033[0;31m$package 安装失败\033[0m" @@ -78,36 +75,58 @@ done %install -mkdir -p -m 750 %{buildroot}%{_prefix}/lib/%{name} -mkdir -p -m 750 %{buildroot}%{_datadir}/doc/%{name} -mkdir -p -m 750 %{buildroot}%{_datadir}/licenses/%{name} -mkdir -p -m 750 %{buildroot}%{_sysconfdir}/%{name} - -cp -rf %{_builddir}/%{name}-%{version}/apps %{buildroot}%{_prefix}/lib/%{name} -cp -rf %{_builddir}/%{name}-%{version}/manual %{buildroot}%{_prefix}/lib/%{name} -cp -rf %{_builddir}/%{name}-%{version}/sample %{buildroot}%{_prefix}/lib/%{name} -cp -rf %{_builddir}/%{name}-%{version}/mcp_center %{buildroot}%{_prefix}/lib/%{name} -install -m 0440 %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}%{_datadir}/licenses/%{name} -install -m 0440 %{_builddir}/%{name}-%{version}/README.md %{buildroot}%{_datadir}/doc/%{name} -install -m 0640 %{_builddir}/%{name}-%{version}/assets/.config.example.toml %{buildroot}%{_sysconfdir}/%{name}/config.toml - -find %{buildroot}%{_prefix}/lib/%{name} -type d -exec chmod 750 {} \; -find %{buildroot}%{_prefix}/lib/%{name} -type f -exec chmod 640 {} \; +# 整体复制文件 +mkdir -p %{buildroot}%{_prefix}/lib/sysagent +cp -ar %{_builddir}/%{name}-%{version}/apps %{buildroot}%{_prefix}/lib/sysagent/ +cp -ar %{_builddir}/%{name}-%{version}/mcp_center %{buildroot}%{_prefix}/lib/sysagent/ +mkdir -p %{buildroot}%{_datadir}/doc/sysagent +cp -ar %{_builddir}/%{name}-%{version}/docs/* %{buildroot}%{_datadir}/doc/sysagent +mkdir -p %{buildroot}%{_sharedstatedir}/sysagent +cp -ar %{_builddir}/%{name}-%{version}/data/* %{buildroot}%{_sharedstatedir}/sysagent/ +# 从data_dir中移除不需要的文件 +rm -f %{buildroot}%{_sharedstatedir}/sysagent/config.example.toml +rm -f %{buildroot}%{_sharedstatedir}/sysagent/sysagent.service +# 单一文件复制到特定位置 +install -D -m 0444 %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}%{_datadir}/licenses/sysagent/LICENSE +install -D -m 0640 %{_builddir}/%{name}-%{version}/data/config.example.toml %{buildroot}%{_sysconfdir}/sysagent/config.toml +install -D -m 0644 %{_builddir}/%{name}-%{version}/data/sysagent.service %{buildroot}%{_sysconfdir}/systemd/system/sysagent.service +# 设置所有权 +find %{buildroot}%{_prefix}/lib/sysagent -type d -exec chmod 755 {} \; +find %{buildroot}%{_prefix}/lib/sysagent -type f -exec chmod 644 {} \; %files %defattr(-,root,root,-) -%dir %{_prefix}/lib/%{name} -%dir %{_datadir}/doc/%{name} -%dir %{_datadir}/licenses/%{name} -%dir %{_sysconfdir}/%{name} - -%{_prefix}/lib/%{name}/* -%doc %{_datadir}/licenses/%{name}/LICENSE -%doc %{_datadir}/doc/%{name}/README.md -%config(noreplace) %{_sysconfdir}/%{name}/config.toml +# 文档 +%dir %{_datadir}/doc/sysagent +%{_datadir}/doc/sysagent/* +# 代码 +%dir %{_prefix}/lib/sysagent +%{_prefix}/lib/sysagent/* +# 数据 +%dir %{_sharedstatedir}/sysagent +%{_sharedstatedir}/sysagent/* +# 协议 +%dir %{_datadir}/licenses/sysagent +%doc %{_datadir}/licenses/sysagent/LICENSE +# 配置 +%dir %{_sysconfdir}/sysagent +%config(noreplace) %{_sysconfdir}/sysagent/config.toml +# 服务 +%config(noreplace) %{_sysconfdir}/systemd/system/sysagent.service + + +%postun +# 在完全卸载时(不是升级)清理运行数据 +if [ $1 -eq 0 ]; then + rm -rf %{_sharedstatedir}/sysagent + rm -rf %{_prefix}/lib/sysagent +fi %changelog +* Thu Dec 4 2025 - 2.0.0-1 +- Add service files +- Upgradge source code to v2.0.0 * Fri Oct 24 2025 houxu - 0.10.1-3 - Upgradge source code * Fri Oct 17 2025 houxu - 0.10.1-2