Register camera light render direct tools#70
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds external-integration status tools, registers many new material/geometry/lighting/camera/render tools and updates CATEGORY_GROUPS, expands the DEV MCP_TOOLS allowlist, and adds tests that verify registry/filter/allowlist consistency and agent-exposed tool coverage. ChangesTool Suite Expansion
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/orchestration/tool-registry.ts`:
- Around line 109-178: The TOOL_REGISTRY entries for direct tools have metadata
that doesn't match their actual wrappers: update the parameter contract strings
for duplicate_object, join_objects, parent_set, parent_clear,
move_to_collection, and set_origin so they reflect the real parameter
names/types and enum values used by the implementation; specifically ensure
duplicate_object uses "name: string, new_name?: string, location?: number[]",
join_objects uses "names: string[], new_name?: string", parent_set uses
"children: string[], parent: string, keep_transform?: boolean", parent_clear
uses "names: string[], keep_transform?: boolean", move_to_collection uses
"names: string[], collection_name: string, create_new?: boolean", and set_origin
uses the exact enum labels the code expects (e.g.,
ORIGIN_GEOMETRY|ORIGIN_CURSOR|ORIGIN_CENTER_OF_MASS or the implementation's enum
identifiers) so planner-generated params match the tool wrappers.
In `@scripts/test/test-direct-tool-surface-coverage.ts`:
- Around line 16-33: The current extraction helpers (quotedNames, filterNames,
testPipelineNames) are matching any quoted tokens and produce false positives;
update the matching to target the actual constants/structures used by the test
(e.g., the CATEGORY_GROUPS and MCP_TOOLS definitions) instead of all quoted
strings: change quotedNames or the regexes used for filterSource and
testPipelineSource so they locate the specific constant/array/object
declarations (by matching the identifier names like CATEGORY_GROUPS or MCP_TOOLS
and their array/object literal contents) and extract only the keys/names within
those literals; ensure agentToolNames, addonCommandNames, registryNames keep
their intent but use precise patterns tied to the surrounding constant/property
definitions rather than a generic quoted-string regex.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: d306a6f2-d0e6-40c0-987c-f7503ccfeaa1
📒 Files selected for processing (6)
app/api/test-pipeline/route.tslib/ai/agents.tslib/orchestration/tool-filter.tslib/orchestration/tool-registry.tsscripts/test/test-camera-light-render-tool-registry.tsscripts/test/test-direct-tool-surface-coverage.ts
| { | ||
| name: "duplicate_object", | ||
| description: | ||
| "Duplicate an existing object and optionally place it, preserving the source object as-is.", | ||
| category: "geometry", | ||
| parameters: "name: string, new_name?: string, location?: number[3]", | ||
| }, | ||
| { | ||
| name: "join_objects", | ||
| description: | ||
| "Join multiple mesh objects into one named object when the scene needs a single combined mesh.", | ||
| category: "geometry", | ||
| parameters: "names: string[], new_name?: string", | ||
| }, | ||
| { | ||
| name: "add_modifier", | ||
| description: | ||
| "Add a Blender modifier to an object using structured parameters before configuring or applying it.", | ||
| category: "geometry", | ||
| parameters: "name: string, modifier_type: string, modifier_name?: string", | ||
| }, | ||
| { | ||
| name: "apply_modifier", | ||
| description: | ||
| "Apply a named modifier after stack inspection and validation.", | ||
| category: "geometry", | ||
| parameters: "name: string, modifier: string", | ||
| }, | ||
| { | ||
| name: "apply_transforms", | ||
| description: | ||
| "Apply object location, rotation, or scale transforms with explicit booleans.", | ||
| category: "geometry", | ||
| parameters: "name: string, location?: boolean, rotation?: boolean, scale?: boolean", | ||
| }, | ||
| { | ||
| name: "shade_smooth", | ||
| description: | ||
| "Set smooth or flat shading for mesh objects without Python.", | ||
| category: "geometry", | ||
| parameters: "name: string, smooth?: boolean", | ||
| }, | ||
| { | ||
| name: "parent_set", | ||
| description: | ||
| "Parent one or more child objects to a parent while preserving the intended scene hierarchy.", | ||
| category: "geometry", | ||
| parameters: "children: string[], parent: string, keep_transform?: boolean", | ||
| }, | ||
| { | ||
| name: "parent_clear", | ||
| description: | ||
| "Clear object parenting with optional transform preservation.", | ||
| category: "geometry", | ||
| parameters: "names: string[], keep_transform?: boolean", | ||
| }, | ||
| { | ||
| name: "set_origin", | ||
| description: | ||
| "Set object origin using a bounded direct tool instead of context-sensitive Python operators.", | ||
| category: "geometry", | ||
| parameters: "name: string, origin_type?: GEOMETRY_ORIGIN|ORIGIN_GEOMETRY|ORIGIN_CURSOR|ORIGIN_CENTER_OF_MASS, center?: MEDIAN|BOUNDS", | ||
| }, | ||
| { | ||
| name: "move_to_collection", | ||
| description: | ||
| "Move objects into an existing or newly created collection for deterministic scene organization.", | ||
| category: "geometry", | ||
| parameters: "names: string[], collection_name: string, create_new?: boolean", | ||
| }, |
There was a problem hiding this comment.
Fix TOOL_REGISTRY parameter contract drift for direct tools.
Several metadata signatures don’t match the actual tool wrappers, which can cause planner-generated invalid params at runtime (e.g., duplicate_object, join_objects, parent_set, parent_clear, move_to_collection, set_origin enum wording).
Proposed metadata fixes
- parameters: "name: string, new_name?: string, location?: number[3]",
+ parameters: "name: string, new_name?: string, linked?: boolean",
- parameters: "names: string[], new_name?: string",
+ parameters: "names: string[]",
- parameters: "children: string[], parent: string, keep_transform?: boolean",
+ parameters: "child_name: string, parent_name: string, parent_type?: string",
- parameters: "names: string[], keep_transform?: boolean",
+ parameters: "name: string, keep_transform?: boolean",
- parameters: "name: string, origin_type?: GEOMETRY_ORIGIN|ORIGIN_GEOMETRY|ORIGIN_CURSOR|ORIGIN_CENTER_OF_MASS, center?: MEDIAN|BOUNDS",
+ parameters: "name: string, origin_type?: GEOMETRY_ORIGIN|ORIGIN_GEOMETRY|ORIGIN_CURSOR|ORIGIN_CENTER_OF_VOLUME, center?: MEDIAN|BOUNDS",
- parameters: "names: string[], collection_name: string, create_new?: boolean",
+ parameters: "name: string, collection_name: string, create_new?: boolean",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| name: "duplicate_object", | |
| description: | |
| "Duplicate an existing object and optionally place it, preserving the source object as-is.", | |
| category: "geometry", | |
| parameters: "name: string, new_name?: string, location?: number[3]", | |
| }, | |
| { | |
| name: "join_objects", | |
| description: | |
| "Join multiple mesh objects into one named object when the scene needs a single combined mesh.", | |
| category: "geometry", | |
| parameters: "names: string[], new_name?: string", | |
| }, | |
| { | |
| name: "add_modifier", | |
| description: | |
| "Add a Blender modifier to an object using structured parameters before configuring or applying it.", | |
| category: "geometry", | |
| parameters: "name: string, modifier_type: string, modifier_name?: string", | |
| }, | |
| { | |
| name: "apply_modifier", | |
| description: | |
| "Apply a named modifier after stack inspection and validation.", | |
| category: "geometry", | |
| parameters: "name: string, modifier: string", | |
| }, | |
| { | |
| name: "apply_transforms", | |
| description: | |
| "Apply object location, rotation, or scale transforms with explicit booleans.", | |
| category: "geometry", | |
| parameters: "name: string, location?: boolean, rotation?: boolean, scale?: boolean", | |
| }, | |
| { | |
| name: "shade_smooth", | |
| description: | |
| "Set smooth or flat shading for mesh objects without Python.", | |
| category: "geometry", | |
| parameters: "name: string, smooth?: boolean", | |
| }, | |
| { | |
| name: "parent_set", | |
| description: | |
| "Parent one or more child objects to a parent while preserving the intended scene hierarchy.", | |
| category: "geometry", | |
| parameters: "children: string[], parent: string, keep_transform?: boolean", | |
| }, | |
| { | |
| name: "parent_clear", | |
| description: | |
| "Clear object parenting with optional transform preservation.", | |
| category: "geometry", | |
| parameters: "names: string[], keep_transform?: boolean", | |
| }, | |
| { | |
| name: "set_origin", | |
| description: | |
| "Set object origin using a bounded direct tool instead of context-sensitive Python operators.", | |
| category: "geometry", | |
| parameters: "name: string, origin_type?: GEOMETRY_ORIGIN|ORIGIN_GEOMETRY|ORIGIN_CURSOR|ORIGIN_CENTER_OF_MASS, center?: MEDIAN|BOUNDS", | |
| }, | |
| { | |
| name: "move_to_collection", | |
| description: | |
| "Move objects into an existing or newly created collection for deterministic scene organization.", | |
| category: "geometry", | |
| parameters: "names: string[], collection_name: string, create_new?: boolean", | |
| }, | |
| { | |
| name: "duplicate_object", | |
| description: | |
| "Duplicate an existing object and optionally place it, preserving the source object as-is.", | |
| category: "geometry", | |
| parameters: "name: string, new_name?: string, linked?: boolean", | |
| }, | |
| { | |
| name: "join_objects", | |
| description: | |
| "Join multiple mesh objects into one named object when the scene needs a single combined mesh.", | |
| category: "geometry", | |
| parameters: "names: string[]", | |
| }, | |
| { | |
| name: "add_modifier", | |
| description: | |
| "Add a Blender modifier to an object using structured parameters before configuring or applying it.", | |
| category: "geometry", | |
| parameters: "name: string, modifier_type: string, modifier_name?: string", | |
| }, | |
| { | |
| name: "apply_modifier", | |
| description: | |
| "Apply a named modifier after stack inspection and validation.", | |
| category: "geometry", | |
| parameters: "name: string, modifier: string", | |
| }, | |
| { | |
| name: "apply_transforms", | |
| description: | |
| "Apply object location, rotation, or scale transforms with explicit booleans.", | |
| category: "geometry", | |
| parameters: "name: string, location?: boolean, rotation?: boolean, scale?: boolean", | |
| }, | |
| { | |
| name: "shade_smooth", | |
| description: | |
| "Set smooth or flat shading for mesh objects without Python.", | |
| category: "geometry", | |
| parameters: "name: string, smooth?: boolean", | |
| }, | |
| { | |
| name: "parent_set", | |
| description: | |
| "Parent one or more child objects to a parent while preserving the intended scene hierarchy.", | |
| category: "geometry", | |
| parameters: "child_name: string, parent_name: string, parent_type?: string", | |
| }, | |
| { | |
| name: "parent_clear", | |
| description: | |
| "Clear object parenting with optional transform preservation.", | |
| category: "geometry", | |
| parameters: "name: string, keep_transform?: boolean", | |
| }, | |
| { | |
| name: "set_origin", | |
| description: | |
| "Set object origin using a bounded direct tool instead of context-sensitive Python operators.", | |
| category: "geometry", | |
| parameters: "name: string, origin_type?: GEOMETRY_ORIGIN|ORIGIN_GEOMETRY|ORIGIN_CURSOR|ORIGIN_CENTER_OF_VOLUME, center?: MEDIAN|BOUNDS", | |
| }, | |
| { | |
| name: "move_to_collection", | |
| description: | |
| "Move objects into an existing or newly created collection for deterministic scene organization.", | |
| category: "geometry", | |
| parameters: "name: string, collection_name: string, create_new?: boolean", | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@lib/orchestration/tool-registry.ts` around lines 109 - 178, The TOOL_REGISTRY
entries for direct tools have metadata that doesn't match their actual wrappers:
update the parameter contract strings for duplicate_object, join_objects,
parent_set, parent_clear, move_to_collection, and set_origin so they reflect the
real parameter names/types and enum values used by the implementation;
specifically ensure duplicate_object uses "name: string, new_name?: string,
location?: number[]", join_objects uses "names: string[], new_name?: string",
parent_set uses "children: string[], parent: string, keep_transform?: boolean",
parent_clear uses "names: string[], keep_transform?: boolean",
move_to_collection uses "names: string[], collection_name: string, create_new?:
boolean", and set_origin uses the exact enum labels the code expects (e.g.,
ORIGIN_GEOMETRY|ORIGIN_CURSOR|ORIGIN_CENTER_OF_MASS or the implementation's enum
identifiers) so planner-generated params match the tool wrappers.
Summary
Validation
Summary by CodeRabbit
New Features
Tests