chore: bump alpha.4 and scope agent tool masks#827
Conversation
Update workspace package peers to 1.4.0-alpha.4 and keep global tool masks scoped to registered tools so direct agent-local tools remain callable.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
概览该变更向 变更
预计代码审查工作量🎯 2 (简单) | ⏱️ ~10 分钟 可能相关的拉取请求
诗歌
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the version of koishi-plugin-chatluna to 1.4.0-alpha.4 across multiple packages and introduces a tools property to the ToolMask interface to refine tool filtering logic. Feedback highlights a logic inconsistency in getFilteredTools where tools not explicitly listed in mask.tools are incorrectly excluded, which contradicts the logic implemented in applyToolMask. Additionally, a debug file containing git branch information and ANSI escape codes was accidentally committed and should be removed.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/core/src/llm-core/agent/types.ts (1)
206-212: 建议给tools增加语义注释,降低误用概率。当前
tools更像“mask 作用域”而不是“最终 allowlist”。建议在字段处补一行注释,明确未命中tools的名称应走“放行/不受该 mask 约束”的语义。💡 可选补丁
export interface ToolMask { mode: 'all' | 'allow' | 'deny' + // Scope of globally registered tools this mask applies to. + // Names outside this list are considered out-of-scope for this mask. tools?: string[] allow: string[] deny: string[] toolCallMask?: ToolMask }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/llm-core/agent/types.ts` around lines 206 - 212, Add a clarifying comment on the ToolMask.tools field to state its semantic: tools is the scope of the mask (i.e., which tool names the mask applies to), not the final allowlist; tool names not listed in tools are exempt from this mask and should be handled as "unconstrained" (i.e., allowed/ignored by this mask). Update the ToolMask interface (referencing ToolMask and the tools property) to include this single-line doc comment so callers don't mistake tools for the definitive allowlist.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@hi` 数据库!:
- Around line 1-8: The file "hi 数据库!" is a local worktree snapshot that should
not be committed; remove this file from the commit (unstage/delete it from the
index and commit the removal), add an appropriate .gitignore entry to prevent
re-adding similar worktree snapshot files, and ensure no build/config/docs
reference the file; if the file was already pushed and must be purged,
coordinate to remove it from history (e.g., git filter-repo) with the team.
---
Nitpick comments:
In `@packages/core/src/llm-core/agent/types.ts`:
- Around line 206-212: Add a clarifying comment on the ToolMask.tools field to
state its semantic: tools is the scope of the mask (i.e., which tool names the
mask applies to), not the final allowlist; tool names not listed in tools are
exempt from this mask and should be handled as "unconstrained" (i.e.,
allowed/ignored by this mask). Update the ToolMask interface (referencing
ToolMask and the tools property) to include this single-line doc comment so
callers don't mistake tools for the definitive allowlist.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: b847b5bf-70bc-4120-aed6-f088e104d7e7
⛔ Files ignored due to path filters (26)
packages/adapter-azure-openai/package.jsonis excluded by!**/*.jsonpackages/adapter-claude/package.jsonis excluded by!**/*.jsonpackages/adapter-deepseek/package.jsonis excluded by!**/*.jsonpackages/adapter-dify/package.jsonis excluded by!**/*.jsonpackages/adapter-doubao/package.jsonis excluded by!**/*.jsonpackages/adapter-gemini/package.jsonis excluded by!**/*.jsonpackages/adapter-hunyuan/package.jsonis excluded by!**/*.jsonpackages/adapter-ollama/package.jsonis excluded by!**/*.jsonpackages/adapter-openai-like/package.jsonis excluded by!**/*.jsonpackages/adapter-openai/package.jsonis excluded by!**/*.jsonpackages/adapter-qwen/package.jsonis excluded by!**/*.jsonpackages/adapter-rwkv/package.jsonis excluded by!**/*.jsonpackages/adapter-spark/package.jsonis excluded by!**/*.jsonpackages/adapter-wenxin/package.jsonis excluded by!**/*.jsonpackages/adapter-zhipu/package.jsonis excluded by!**/*.jsonpackages/core/package.jsonis excluded by!**/*.jsonpackages/extension-agent/package.jsonis excluded by!**/*.jsonpackages/extension-long-memory/package.jsonis excluded by!**/*.jsonpackages/extension-tools/package.jsonis excluded by!**/*.jsonpackages/extension-variable/package.jsonis excluded by!**/*.jsonpackages/renderer-image/package.jsonis excluded by!**/*.jsonpackages/service-embeddings/package.jsonis excluded by!**/*.jsonpackages/service-multimodal/package.jsonis excluded by!**/*.jsonpackages/service-search/package.jsonis excluded by!**/*.jsonpackages/service-vector-store/package.jsonis excluded by!**/*.jsonpackages/shared-adapter/package.jsonis excluded by!**/*.json
📒 Files selected for processing (4)
hi 数据库!packages/core/src/llm-core/agent/types.tspackages/core/src/llm-core/platform/service.tspackages/extension-agent/src/service/permissions.ts
Align the extension-tools peer dependency with the new agent release and drop the accidentally committed branch snapshot file.
Summary
koishi-plugin-chatlunato1.4.0-alpha.4and update workspace peer dependency references to matchhi 数据库!workspace snapshot file in this branch