feat(agent): 引入可插拔工具研究插件 - #113
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
随着 PanWatch 的工具数量增长,Tool Research 不应成为 Agent Runtime 的强耦合能力。需要把它作为可插拔扩展接入,同时保留 M0 的 shadow 模式,避免改变现有模型工具可见性和调用行为。
变更内容
pan-agent-runtime中抽取通用RuntimeExtension、BeforeModelTurnContext、ToolExposureDecision和统一extension_event。pan-agent-tool-research,封装工具描述、候选检索、选择和插件适配逻辑。marketdata与 discovery 适配器。push2.eastmoney.com切换到同协议可用的push2delay.eastmoney.com,覆盖热门股票、热门板块和板块成分股。验证
python -m pytest -q:729 passed, 1 skippedpython -m pytest packages/marketdata/tests/test_discovery_vendor.py -q:5 passedpython -m pytest tests/test_assistant_tools.py packages/pan-agent-runtime/tests packages/pan-agent-tool-research/tests -q:55 passedpnpm exec vitest run:30 passed(前序提交验证)pnpm build:成功(前序提交验证)git diff --check:通过边界与风险
YYYY-MM-DD日期,不在数据层臆造“今天”。后续计划