接入 Godot 编辑器插件与受控执行链路
新增 GDExtension 自动引导、GDScript 执行和实例隔离缓存 接入 AGC 插件开关、Runner、Agent 工具与权限审计 完善执行回执确认、不确定状态阻断及卸载恢复 补齐 Windows 分发资源、定向测试与实机验收文档
This commit is contained in:
@@ -16,6 +16,7 @@ export const REQUIRED_WORKSPACES = Object.freeze([
|
||||
'packages/shared',
|
||||
'plugins/agc-cocos-editor',
|
||||
'plugins/agc-unity-editor',
|
||||
'plugins/agc-godot-editor',
|
||||
'tools/spine-json-export-validator',
|
||||
]);
|
||||
|
||||
@@ -31,6 +32,7 @@ const WORKSPACE_NAMES = Object.freeze({
|
||||
'packages/shared': '@genarrative/shared',
|
||||
'plugins/agc-cocos-editor': '@genarrative/agc-plugin-cocos-editor',
|
||||
'plugins/agc-unity-editor': '@genarrative/agc-plugin-unity-editor',
|
||||
'plugins/agc-godot-editor': '@genarrative/agc-plugin-godot-editor',
|
||||
'tools/spine-json-export-validator':
|
||||
'@genarrative/spine-json-export-validator',
|
||||
});
|
||||
@@ -53,6 +55,7 @@ const REQUIRED_LOCAL_DEPENDENCIES = Object.freeze({
|
||||
],
|
||||
'plugins/agc-cocos-editor/package.json': ['@genarrative/agc-plugin-sdk'],
|
||||
'plugins/agc-unity-editor/package.json': ['@genarrative/agc-plugin-sdk'],
|
||||
'plugins/agc-godot-editor/package.json': ['@genarrative/agc-plugin-sdk'],
|
||||
});
|
||||
|
||||
const DEPENDENCY_FIELDS = Object.freeze([
|
||||
|
||||
@@ -24,6 +24,7 @@ const workspaceNames = {
|
||||
'packages/shared': '@genarrative/shared',
|
||||
'plugins/agc-cocos-editor': '@genarrative/agc-plugin-cocos-editor',
|
||||
'plugins/agc-unity-editor': '@genarrative/agc-plugin-unity-editor',
|
||||
'plugins/agc-godot-editor': '@genarrative/agc-plugin-godot-editor',
|
||||
'tools/spine-json-export-validator':
|
||||
'@genarrative/spine-json-export-validator',
|
||||
};
|
||||
@@ -39,6 +40,7 @@ const localDependencies = {
|
||||
'packages/image-canvas-react': { '@genarrative/image-canvas-core': '0.1.0' },
|
||||
'plugins/agc-cocos-editor': { '@genarrative/agc-plugin-sdk': '0.1.0' },
|
||||
'plugins/agc-unity-editor': { '@genarrative/agc-plugin-sdk': '0.1.0' },
|
||||
'plugins/agc-godot-editor': { '@genarrative/agc-plugin-sdk': '0.1.0' },
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -6,7 +6,7 @@ const checks = [
|
||||
{
|
||||
file: 'package.json',
|
||||
includes:
|
||||
'"check:rustfmt": "cargo fmt --all --manifest-path server-rs/Cargo.toml -- --check && cargo fmt --all --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --check && cargo fmt --all --manifest-path plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml -- --check"',
|
||||
'"check:rustfmt": "cargo fmt --all --manifest-path server-rs/Cargo.toml -- --check && cargo fmt --all --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --check && cargo fmt --all --manifest-path plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml -- --check && cargo fmt --all --manifest-path plugins/agc-godot-editor/native/godot-editor-bridge/Cargo.toml -- --check"',
|
||||
reason: '仓库必须保留统一、只读的 Rust workspace 格式检查入口。',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -20,6 +20,11 @@ export const RUSTFMT_WORKSPACES = [
|
||||
manifestPath:
|
||||
'plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml',
|
||||
},
|
||||
{
|
||||
prefix: 'plugins/agc-godot-editor/native/godot-editor-bridge/',
|
||||
manifestPath:
|
||||
'plugins/agc-godot-editor/native/godot-editor-bridge/Cargo.toml',
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,11 +43,13 @@ describe('lint-staged Rust 格式检查的 workspace 选择', () => {
|
||||
'server-rs/crates/api-server/src/editor_project.rs',
|
||||
'apps/ai-game-creator-shell/src-tauri/src/assets.rs',
|
||||
'plugins/agc-unity-editor/native/unity-editor-bridge/src/lib.rs',
|
||||
'plugins/agc-godot-editor/native/godot-editor-bridge/src/lib.rs',
|
||||
]),
|
||||
).toEqual([
|
||||
'server-rs/Cargo.toml',
|
||||
'apps/ai-game-creator-shell/src-tauri/Cargo.toml',
|
||||
'plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml',
|
||||
'plugins/agc-godot-editor/native/godot-editor-bridge/Cargo.toml',
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -422,6 +422,9 @@ describe('project CI workflow', () => {
|
||||
expect(rootPackageJson.scripts?.['agc:plugins:test']).toContain(
|
||||
'plugins/agc-unity-editor/src/entry.test.mjs',
|
||||
);
|
||||
expect(rootPackageJson.scripts?.['agc:plugins:test']).toContain(
|
||||
'plugins/agc-godot-editor/src/entry.test.mjs',
|
||||
);
|
||||
|
||||
// 壳 bin 单测按名单分 4 片,一片一个 job:每个片 job 只跑自己那片,且只预热 AGC 壳
|
||||
// 自己那份锁定依赖(server-rs 那份归 crate 级 job)。
|
||||
@@ -470,6 +473,9 @@ describe('project CI workflow', () => {
|
||||
expect(rootPackageJson.scripts?.['agc:plugins:native-test']).toContain(
|
||||
'cargo test --locked --manifest-path plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml',
|
||||
);
|
||||
expect(rootPackageJson.scripts?.['agc:plugins:native-test']).toContain(
|
||||
'cargo test --locked --manifest-path plugins/agc-godot-editor/native/godot-editor-bridge/Cargo.toml',
|
||||
);
|
||||
|
||||
// 拆开的 web / rust 两段必须还是原 `ai-game-creator-shell:check` 的同一条命令序列,
|
||||
// rust 段再拆成 crate 级与壳分片两段后在聚合脚本里保持同序。
|
||||
@@ -543,6 +549,14 @@ describe('project CI workflow', () => {
|
||||
expect(unityStep).toContain(
|
||||
'plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml',
|
||||
);
|
||||
const godotStep = stepSection(
|
||||
'ai-game-creator-shell-rust-crates',
|
||||
'Prepare Godot plugin Rust dependencies',
|
||||
);
|
||||
expect(godotStep).toContain('cargo fetch --locked');
|
||||
expect(godotStep).toContain(
|
||||
'plugins/agc-godot-editor/native/godot-editor-bridge/Cargo.toml',
|
||||
);
|
||||
|
||||
const cratesJob = jobSection('ai-game-creator-shell-rust-crates');
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user