Skip to content

fix: 为 openviking-server 添加 --version 并修复 AGFS 模式判断#358

Merged
qin-ctx merged 1 commit intomainfrom
fix/add-version-flag-and-agfs-mode
Feb 28, 2026
Merged

fix: 为 openviking-server 添加 --version 并修复 AGFS 模式判断#358
qin-ctx merged 1 commit intomainfrom
fix/add-version-flag-and-agfs-mode

Conversation

@qin-ctx
Copy link
Collaborator

@qin-ctx qin-ctx commented Feb 28, 2026

Description

openviking-server 命令添加 --version 参数支持,并修复 AGFS 初始化时多余的条件判断。

Related Issue

close #354

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Changes Made

  • openviking/server/bootstrap.py:添加 --version 参数,通过 argparse 的 action="version" 实现,版本号从 openviking.__version__ 读取
  • openviking/service/core.py:移除 AGFS 初始化中 config.agfs.backend == "local" 的多余条件,使 http-client 模式下始终启动 AGFSManager

Testing

  • openviking-server --version 正常输出版本号(openviking-server 0.2.1.dev23
  • openviking-server --help 正常显示 --version 选项
  • ov --version(Rust CLI)确认已支持(openviking 0.2.0
  • pre-commit hooks(ruff check + ruff format)通过

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • My changes generate no new warnings

Additional Notes

openviking-server 之前缺少 --version 参数,agent 误调用 openviking-server --version 时会报 option not found 导致安装流程中断。

🤖 Generated with Claude Code

openviking-server 缺少 --version 导致 agent 误调用时报 option not found 中断安装流程,
现通过 argparse 的 version action 支持 --version 输出版本号。
同时移除 AGFS 初始化中多余的 backend == "local" 条件判断。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@qin-ctx qin-ctx merged commit 3814939 into main Feb 28, 2026
4 of 5 checks passed
@qin-ctx qin-ctx deleted the fix/add-version-flag-and-agfs-mode branch February 28, 2026 10:27
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: 通过 docker 部署报错,AGFS 服务未连接

3 participants