b5a143c04f
- 合并 origin/master(140 个提交),解决 4 处冲突:build.rs 取只读校验分支、package.json 同时保留 bundled-resources:test 与 check:generated-bindings、决策日志与踩坑记录两侧条目并存 - master 的构建期 staging(stage_bundled_claude_agent、prune_stale_codex_components)不进构建脚本;sidecar 改由声明与准备步骤产出 - package-layout.json 新增 claudeAgent section(锁定版本、sidecar 入口、上游 SDK 与平台原生运行时目标表、复制跳过规则),layoutVersion 递增到 2 - prepare-bundled-resources.mjs 新增 sidecar 整目录原子替换与缓存 key,复制规则按 section 参数化,Windows 真机 24 个文件、复跑命中缓存零写入 - package_layout.rs 新增 sidecar 只读校验(入口与仓库源码逐字节一致、上游包版本、可执行位、白名单外文件)与声明钉住用例 - build.rs 调用 sidecar 校验并导出 AGC_CLAUDE_AGENT_SDK_VERSION;claude_code_cli.rs 的 sidecar 身份串改用声明版本 - resources/claude-agent 映射从基线 tauri.conf.json 移到 windows/macos 平台配置,check-config.mjs 增加「基线不得声明 resources/**」守卫 - 修正 package_layout 的 Windows 路径期望用例(期望值改与实现同形,原用例在 Windows 必红) - 同步技术方案 §4.5/§4.9、共享决策日志与踩坑记录
235 lines
8.1 KiB
JSON
235 lines
8.1 KiB
JSON
{
|
|
"schema": "agc-package-layout.v1",
|
|
"description": "AGC 随包资源布局与复制规则的唯一声明。Rust 侧构建期校验与 Node 侧准备步骤共用本文件,任何一侧都不得再写第二份布局或组件白名单。含 <platform>、<target> 占位符的字段由调用方按目标三元展开。修改布局时同步递增 layoutVersion(准备步骤的缓存 key 组成部分)。",
|
|
"layoutVersion": 2,
|
|
"codex": {
|
|
"version": "0.155.1",
|
|
"cliVersionPrefix": "codex-cli ",
|
|
"manifestSchema": "genarrative-codex-sidecar.v2",
|
|
"packageMetadata": {
|
|
"layoutVersion": 1,
|
|
"resourcesDir": "codex-resources",
|
|
"pathDir": "codex-path"
|
|
},
|
|
"resourceDirectory": "resources/codex",
|
|
"manifestFileName": "manifest.json",
|
|
"packageMetadataFileName": "codex-package.json",
|
|
"noticeFileName": "NOTICE.md",
|
|
"sourceRoots": ["app", "repo"],
|
|
"sourceRelativePaths": [
|
|
"node_modules/@openai/codex-<platform>/vendor/<target>",
|
|
"node_modules/@openai/codex/node_modules/@openai/codex-<platform>/vendor/<target>"
|
|
],
|
|
"noticeSources": [
|
|
{
|
|
"targets": ["aarch64-apple-darwin", "x86_64-apple-darwin"],
|
|
"source": "resources/codex/【声明】Mac内置Codex组件-2026-09-18.md",
|
|
"preserve": false
|
|
},
|
|
{
|
|
"targets": ["x86_64-pc-windows-msvc"],
|
|
"source": "resources/codex/win-x64/NOTICE.md",
|
|
"preserve": true
|
|
}
|
|
],
|
|
"universalGroups": [
|
|
{
|
|
"name": "mac-native",
|
|
"directory": "mac-native",
|
|
"targets": ["aarch64-apple-darwin", "x86_64-apple-darwin"]
|
|
}
|
|
],
|
|
"targets": [
|
|
{
|
|
"target": "x86_64-pc-windows-msvc",
|
|
"platform": "win32-x64",
|
|
"directory": "win-x64",
|
|
"executable": "bin/codex.exe",
|
|
"files": [
|
|
"bin/codex.exe",
|
|
"bin/codex-code-mode-host.exe",
|
|
"codex-path/rg.exe",
|
|
"codex-resources/codex-command-runner.exe",
|
|
"codex-resources/codex-windows-sandbox-setup.exe",
|
|
"codex-package.json"
|
|
]
|
|
},
|
|
{
|
|
"target": "aarch64-apple-darwin",
|
|
"platform": "darwin-arm64",
|
|
"directory": "mac-native/darwin-arm64",
|
|
"executable": "bin/codex",
|
|
"files": [
|
|
"bin/codex",
|
|
"bin/codex-code-mode-host",
|
|
"codex-path/rg",
|
|
"codex-resources/zsh/bin/zsh",
|
|
"codex-package.json"
|
|
]
|
|
},
|
|
{
|
|
"target": "x86_64-apple-darwin",
|
|
"platform": "darwin-x64",
|
|
"directory": "mac-native/darwin-x64",
|
|
"executable": "bin/codex",
|
|
"files": [
|
|
"bin/codex",
|
|
"bin/codex-code-mode-host",
|
|
"codex-path/rg",
|
|
"codex-resources/zsh/bin/zsh",
|
|
"codex-package.json"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"claudeAgent": {
|
|
"version": "0.3.285",
|
|
"resourceDirectory": "resources/claude-agent",
|
|
"entryRelativePath": "agent-sidecar/src/index.mjs",
|
|
"entryFileName": "index.mjs",
|
|
"nodeModulesDirectory": "node_modules",
|
|
"sdkPackageName": "@anthropic-ai/claude-agent-sdk",
|
|
"sdkEntryFileName": "sdk.mjs",
|
|
"sdkPackageMetadataFileName": "package.json",
|
|
"sourceRoots": ["app", "repo"],
|
|
"skipDirectoryNames": ["target", "node_modules"],
|
|
"skipDirectoryNamePrefixes": ["."],
|
|
"skipFileNamePrefixes": ["."],
|
|
"skipFileNameFragments": [".test."],
|
|
"targets": [
|
|
{
|
|
"target": "x86_64-pc-windows-msvc",
|
|
"runtimePackage": "claude-agent-sdk-win32-x64",
|
|
"runtimeFileName": "claude.exe"
|
|
},
|
|
{
|
|
"target": "aarch64-apple-darwin",
|
|
"runtimePackage": "claude-agent-sdk-darwin-arm64",
|
|
"runtimeFileName": "claude"
|
|
},
|
|
{
|
|
"target": "x86_64-apple-darwin",
|
|
"runtimePackage": "claude-agent-sdk-darwin-x64",
|
|
"runtimeFileName": "claude"
|
|
}
|
|
]
|
|
},
|
|
"plugins": {
|
|
"sourceDirectory": "plugins",
|
|
"destinationDirectory": "resources/plugins",
|
|
"manifestFileName": "plugin.json",
|
|
"targetContainsAny": ["windows", "apple-darwin"],
|
|
"subdirectories": [
|
|
{
|
|
"path": "src",
|
|
"origin": "source"
|
|
},
|
|
{
|
|
"path": "panels",
|
|
"origin": "source"
|
|
},
|
|
{
|
|
"path": "skills",
|
|
"origin": "source"
|
|
},
|
|
{
|
|
"path": "native/payload",
|
|
"origin": "prepared",
|
|
"targetContains": ["windows"],
|
|
"plugin": "agc-cocos-editor",
|
|
"prepare": "cocos-bridge-build",
|
|
"features": ["cocos-editor-injection"]
|
|
},
|
|
{
|
|
"path": "dotnet/publish/win-x64",
|
|
"origin": "prepared",
|
|
"prepare": "unity-helper-publish",
|
|
"targets": ["x86_64-pc-windows-msvc"],
|
|
"features": ["unity-editor-execute"],
|
|
"plugin": "agc-unity-editor"
|
|
}
|
|
],
|
|
"libraryStaging": [
|
|
{
|
|
"plugin": "agc-godot-editor",
|
|
"sourceSubdirectory": "native/gdextension",
|
|
"prepare": "godot-extension-build",
|
|
"targets": ["x86_64-pc-windows-msvc"],
|
|
"features": ["godot-editor-execute"],
|
|
"layout": "godot-bundle",
|
|
"files": [
|
|
"bin/win-x64/agc_godot_editor.dll",
|
|
"bin/win-x64/metadata.json",
|
|
"vendor/LICENSE.txt",
|
|
"vendor/provenance.json"
|
|
]
|
|
}
|
|
],
|
|
"nativePayloads": [
|
|
{
|
|
"plugin": "agc-cocos-editor",
|
|
"prepare": "cocos-bridge-build",
|
|
"sourceFileName": "cocos_editor_bridge.dll",
|
|
"destinationSubdirectory": "native/payload",
|
|
"targets": ["x86_64-pc-windows-msvc"],
|
|
"features": ["cocos-editor-injection"],
|
|
"destinationFileName": "cocos-editor-bridge.dll"
|
|
}
|
|
],
|
|
"prepareSteps": [
|
|
{
|
|
"name": "unity-helper-publish",
|
|
"kind": "powershell",
|
|
"workingDirectory": "plugins/agc-unity-editor/dotnet",
|
|
"scriptFileName": "build.ps1",
|
|
"fingerprint": {
|
|
"roots": ["."],
|
|
"excludeDirectoryNames": ["bin", "obj", "publish", "native-build"],
|
|
"stampRelativePath": "publish/win-x64/.agc-source.sha256"
|
|
},
|
|
"requiredOutputs": [
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/Agc.Unity.Attach.exe",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/NOTICE",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/THIRD-PARTY-NOTICES.txt",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/licenses/DotCraft-Apache-2.0.txt",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/licenses/Roslyn-MIT.txt",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/licenses/upstream.json",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/licenses/dotnet-LICENSE.TXT",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/licenses/dotnet-THIRD-PARTY-NOTICES.TXT",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/licenses/microsoft.codeanalysis.common-ThirdPartyNotices.rtf",
|
|
"plugins/agc-unity-editor/dotnet/publish/win-x64/licenses/microsoft.codeanalysis.csharp-ThirdPartyNotices.rtf"
|
|
]
|
|
},
|
|
{
|
|
"name": "godot-extension-build",
|
|
"kind": "powershell",
|
|
"workingDirectory": "plugins/agc-godot-editor/native/gdextension",
|
|
"scriptFileName": "build.ps1",
|
|
"removeEnvironment": ["PSModulePath"],
|
|
"requiredOutputs": [
|
|
"plugins/agc-godot-editor/native/gdextension/bin/win-x64/agc_godot_editor.dll",
|
|
"plugins/agc-godot-editor/native/gdextension/bin/win-x64/metadata.json",
|
|
"plugins/agc-godot-editor/native/gdextension/vendor/LICENSE.txt",
|
|
"plugins/agc-godot-editor/native/gdextension/vendor/provenance.json"
|
|
],
|
|
"fingerprint": {
|
|
"roots": ["."],
|
|
"excludeDirectoryNames": ["bin", ".build", "native-build"],
|
|
"stampRelativePath": "bin/win-x64/.agc-source.sha256"
|
|
}
|
|
},
|
|
{
|
|
"name": "cocos-bridge-build",
|
|
"kind": "cargo",
|
|
"packageDirectory": "plugins/agc-cocos-editor/native/cocos-editor-bridge",
|
|
"features": ["windows-injection"],
|
|
"requiredOutputs": []
|
|
}
|
|
],
|
|
"skipDirectoryNames": ["target", "node_modules"],
|
|
"skipDirectoryNamePrefixes": ["."],
|
|
"skipFileNamePrefixes": ["."],
|
|
"skipFileNameFragments": [".test."]
|
|
}
|
|
}
|