fix: Windows spawn, prefab path, preview API, asset deps, error messages; add execute-context resource, tool descriptions, scene/script/asset tools
Bug fixes (verified against Cocos Creator 3.8.8): - diagnostics: shell:true for .cmd/.bat on Windows (T125/T126) - prefabs: duplicatePrefab target resolves under assets/ (T420) - cocos-project: add preview.open candidate for 3.8.8 (T444) - assets-advanced: detect directory assets in inspectAssetDependencies (T110) - scene: improve component-not-found errors with compilation hint (T429) Documentation improvements: - tool-registry: add enum and injected vars to execute_javascript, path format examples, asset ref limitation note - resources: add cocos://mcp/execute-context resource with variables, patterns, pitfalls New tools (core 37->38, full 101->110): - scene-management: create_scene, query_scene_state (core), copy_paste_node, rename_node, reparent_node - scripts: create_script with component/plain templates - prefabs: create_prefab - assets-advanced: batch_asset_ops, find_unused_assets
This commit is contained in:
@@ -21,7 +21,7 @@ function createRegistry(profile, projectPath = path.resolve('/tmp/funplay-cocos-
|
||||
|
||||
test('core profile exposes the documented focused tool set', () => {
|
||||
const tools = createRegistry('core').listTools();
|
||||
assert.equal(tools.length, 37);
|
||||
assert.equal(tools.length, 38);
|
||||
assert.equal(tools.some((tool) => tool.name === 'execute_javascript'), true);
|
||||
assert.equal(tools.some((tool) => tool.name === 'get_editor_state'), true);
|
||||
assert.equal(tools.some((tool) => tool.name === 'get_tool_catalog'), true);
|
||||
@@ -31,12 +31,13 @@ test('core profile exposes the documented focused tool set', () => {
|
||||
assert.equal(tools.some((tool) => tool.name === 'get_performance_snapshot'), true);
|
||||
assert.equal(tools.some((tool) => tool.name === 'list_project_instructions'), true);
|
||||
assert.equal(tools.some((tool) => tool.name === 'set_selection'), true);
|
||||
assert.equal(tools.some((tool) => tool.name === 'query_scene_state'), true);
|
||||
assert.equal(tools.some((tool) => tool.name === 'write_file'), false);
|
||||
});
|
||||
|
||||
test('full profile exposes all built-in tools', () => {
|
||||
const tools = createRegistry('full').listTools();
|
||||
assert.equal(tools.length, 101);
|
||||
assert.equal(tools.length, 110);
|
||||
assert.equal(tools.some((tool) => tool.name === 'write_file'), true);
|
||||
assert.equal(tools.some((tool) => tool.name === 'edit_prefab_json'), true);
|
||||
assert.equal(tools.some((tool) => tool.name === 'create_project_skill'), true);
|
||||
|
||||
Reference in New Issue
Block a user