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 4d456a65d5d75c24610209d71b4ba1e73c5b317f..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..96888c2df97eb9fe9d66cde4931330cd0442c40b --- /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:974691d20351add61bd81bcf1c9bb5eddccb8d46a04ede1566607b167a8f476c +size 115405049 diff --git a/euler-copilot-framework.spec b/euler-copilot-framework.spec index bb78417d31476fd8bbe350026f11701189139933..59a7f798b6bfec77867a48336cd24364b7250a38 100644 --- a/euler-copilot-framework.spec +++ b/euler-copilot-framework.spec @@ -1,7 +1,7 @@ %define _python_bytecompile_skip 1 Name: euler-copilot-framework -Version: 0.10.1 -Release: 13 +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 @@ -14,36 +14,23 @@ Requires: python3-asyncer Requires: python3-asyncpg Requires: python3-cryptography Requires: python3-fastapi -Requires: python3-httpx Requires: python3-httpx-sse Requires: python3-jinja2 Requires: python-jionlp Requires: python3-jsonschema -Requires: python3-mcp Requires: python3-minio -Requires: python3-ollama -Requires: python3-openai Requires: python3-pandas Requires: python3-pgvector Requires: python3-pillow -Requires: python3-pydantic -Requires: python3-pymongo Requires: python3-python-jsonpath Requires: python3-magic Requires: python3-python-multipart -Requires: python3-pytz -Requires: python3-pyyaml -Requires: python3-rich -Requires: python3-sqids -Requires: python3-sqlalchemy Requires: python3-tiktoken Requires: python3-toml Requires: python3-uvicorn -Requires: python3-paramiko -Requires: python3-langchain -Requires: python3-langchain-openai -Requires: python3-psutil -Requires: python3 +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. @@ -58,84 +45,94 @@ Intelligent framework engine based on LLM that supports calling traditional serv %post -echo -e "\033[0;32m%{name}-%{version}-%{release} installed successfully.\033[0m" +packages=( + "httpx==0.28.1" + "mcp==1.17.0" + "ollama==0.5.3" + "openai==2.3.0" + "pydantic==2.11.7" + "rich==14.2.0" + "sqlalchemy==2.0.41" +) + +# 镜像源 +mirror="https://mirrors.huaweicloud.com/repository/pypi/simple" + +# 记录安装失败的包 +failed_packages=() + +# 逐个安装包 +for package in "${packages[@]}"; do + echo "正在安装: $package" + 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" + failed_packages+=("$package") + fi + echo "----------------------------------------" +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 -* Mon Dec 1 2025 ylzhangah - 0.10.1-13 -- Resolving RPM package dependencies -* Sat Oct 25 2025 houxu - 0.10.1-11 -- Upgradge source code -* Fri Oct 24 2025 houxu - 0.10.1-10 -- Upgradge source code -* Fri Oct 17 2025 houxu - 0.10.1-9 -- Upgradge source code -* Wed Oct 15 2025 zxstty - 0.10.1-8 -- Upgradge spec udpate date -* Wed Oct 15 2025 zxstty - 0.10.1-7 -- Upgradge source code -* Tue Sep 23 2025 zxstty - 0.10.1-6 +* 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 -* Tue Sep 23 2025 zxstty - 0.10.1-5 +* Fri Oct 17 2025 houxu - 0.10.1-2 - Upgradge source code -* Mon Sep 22 2025 houxu - 0.10.1-4 +* Wed Oct 15 2025 zxstty - 0.10.1-1 - Upgradge source code -* Fri Sep 19 2025 cui-gaoleng - 0.10.1-3 -- Upgradge source code -* Tue Sep 16 2025 houxu - 0.10.1-2 -- Upgradge source code -* Mon Sep 15 2025 houxu - 0.10.1-1 -- Upgradge source code -* Mon Sep 15 2025 houxu - 0.10.0-8 -- Upgradge source code -* Fri Sep 12 2025 zxstty - 0.10.0-7 -- Upgradge source code -* Thu Sep 11 2025 zxstty - 0.10.0-6 -- Upgradge source code -* Tue Sep 9 2025 zxstty - 0.10.0-5 -- Upgradge source code -* Tue Sep 9 2025 zxstty - 0.10.0-4 -- Upgradge version -* Mon Sep 8 2025 zxstty - 0.10.0-3 -- Package Upgradge and update pip requirements -* Fri Sep 5 2025 zxstty - 0.10.0-2 -- Update source code -* Thu Sep 4 2025 zxstty - 0.10.0-1 -- Package Upgradge -* Mon Jul 21 2025 WANG-shine - 0.9.6-3 -- Bug fix -* Wed Jun 18 2025 WANG-shine - 0.9.6-2 -- Bug fix * Mon Jun 09 2025 liujiangbin - 0.9.6-1 - Package Spec generated +