From b44213da322bd3abcca4c349fbd41e7368fc2b01 Mon Sep 17 00:00:00 2001 From: Vladislav Panin Date: Wed, 22 Jul 2026 00:13:19 +0300 Subject: [PATCH 1/2] chore: migrate from UniCli to official Unity CLI pipeline - replace com.yucchiy.unicli-server with com.unity.pipeline 0.3.1-exp.1 in the Unity project manifest - drop the unicli Claude Code plugin and marketplace from project settings Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01B1JLXgHBRVUtJJquu1RnCm --- .claude/settings.json | 11 ----------- Aspid.FastTools/Packages/manifest.json | 4 ++-- Aspid.FastTools/Packages/packages-lock.json | 21 ++++++++++++++------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 44bb7e48..4f7901c8 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,15 +1,4 @@ { - "extraKnownMarketplaces": { - "unicli": { - "source": { - "source": "github", - "repo": "yucchiy/UniCli" - } - } - }, - "enabledPlugins": { - "unicli@unicli": true - }, "hooks": { "PostToolUse": [ { diff --git a/Aspid.FastTools/Packages/manifest.json b/Aspid.FastTools/Packages/manifest.json index 80f6a977..e9acbe2b 100755 --- a/Aspid.FastTools/Packages/manifest.json +++ b/Aspid.FastTools/Packages/manifest.json @@ -13,7 +13,6 @@ "com.unity.timeline": "1.8.11", "com.unity.ugui": "2.0.0", "com.unity.visualscripting": "1.9.10", - "com.yucchiy.unicli-server": "https://github.com/yucchiy/UniCli.git?path=src/UniCli.Unity/Packages/com.yucchiy.unicli-server", "com.unity.modules.accessibility": "1.0.0", "com.unity.modules.adaptiveperformance": "1.0.0", "com.unity.modules.ai": "1.0.0", @@ -47,7 +46,8 @@ "com.unity.modules.video": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", - "com.unity.modules.xr": "1.0.0" + "com.unity.modules.xr": "1.0.0", + "com.unity.pipeline": "0.3.1-exp.1" }, "testables": [ "tech.aspid.fasttools" diff --git a/Aspid.FastTools/Packages/packages-lock.json b/Aspid.FastTools/Packages/packages-lock.json index bfa835bb..e33f9372 100755 --- a/Aspid.FastTools/Packages/packages-lock.json +++ b/Aspid.FastTools/Packages/packages-lock.json @@ -127,6 +127,20 @@ }, "url": "https://packages.unity.com" }, + "com.unity.pipeline": { + "version": "0.3.1-exp.1", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.33", + "com.unity.nuget.mono-cecil": "1.11.6", + "com.unity.modules.uielements": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.nuget.newtonsoft-json": "3.0.2" + }, + "url": "https://packages.unity.com" + }, "com.unity.render-pipelines.core": { "version": "17.4.0", "depth": 1, @@ -225,13 +239,6 @@ }, "url": "https://packages.unity.com" }, - "com.yucchiy.unicli-server": { - "version": "https://github.com/yucchiy/UniCli.git?path=src/UniCli.Unity/Packages/com.yucchiy.unicli-server", - "depth": 0, - "source": "git", - "dependencies": {}, - "hash": "be0abbd15c319e1fd6c1843f4d57acbe90eedfce" - }, "tech.aspid.fasttools": { "version": "file:tech.aspid.fasttools", "depth": 0, From c031fa420c732b8d8c526b1129a8938ec485a9d9 Mon Sep 17 00:00:00 2001 From: Vladislav Panin Date: Wed, 22 Jul 2026 00:13:37 +0300 Subject: [PATCH 2/2] feat(devtests): add sr_gate Unity CLI command wrapping the SerializeReference gate scanner - new dev-only editor assembly under Assets/DevTests/CliCommands referencing Unity.Pipeline - sr_gate runs the gate scan (missing | required | full) in the live Editor and returns structured JSON, no batchmode relaunch needed - expose package internals to the new assembly via InternalsVisibleTo Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01B1JLXgHBRVUtJJquu1RnCm --- .../Assets/DevTests/CliCommands.meta | 8 +++ .../Assets/DevTests/CliCommands/Editor.meta | 8 +++ ...stTools.DevTests.CliCommands.Editor.asmdef | 19 +++++++ ...ls.DevTests.CliCommands.Editor.asmdef.meta | 7 +++ .../Editor/SerializeReferenceGateCommands.cs | 53 +++++++++++++++++++ .../SerializeReferenceGateCommands.cs.meta | 2 + .../Unity/Editor/Scripts/AssemblyInfo.cs | 1 + .../SerializeReferences/Yaml/AssemblyInfo.cs | 1 + 8 files changed, 99 insertions(+) create mode 100644 Aspid.FastTools/Assets/DevTests/CliCommands.meta create mode 100644 Aspid.FastTools/Assets/DevTests/CliCommands/Editor.meta create mode 100644 Aspid.FastTools/Assets/DevTests/CliCommands/Editor/Aspid.FastTools.DevTests.CliCommands.Editor.asmdef create mode 100644 Aspid.FastTools/Assets/DevTests/CliCommands/Editor/Aspid.FastTools.DevTests.CliCommands.Editor.asmdef.meta create mode 100644 Aspid.FastTools/Assets/DevTests/CliCommands/Editor/SerializeReferenceGateCommands.cs create mode 100644 Aspid.FastTools/Assets/DevTests/CliCommands/Editor/SerializeReferenceGateCommands.cs.meta diff --git a/Aspid.FastTools/Assets/DevTests/CliCommands.meta b/Aspid.FastTools/Assets/DevTests/CliCommands.meta new file mode 100644 index 00000000..ddf5922c --- /dev/null +++ b/Aspid.FastTools/Assets/DevTests/CliCommands.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ce9aa844052a54282b9acd83bdc3ae75 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Aspid.FastTools/Assets/DevTests/CliCommands/Editor.meta b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor.meta new file mode 100644 index 00000000..1a841f9a --- /dev/null +++ b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 101ca99d4e0f54189ab70cf8029bc101 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/Aspid.FastTools.DevTests.CliCommands.Editor.asmdef b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/Aspid.FastTools.DevTests.CliCommands.Editor.asmdef new file mode 100644 index 00000000..854f2e48 --- /dev/null +++ b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/Aspid.FastTools.DevTests.CliCommands.Editor.asmdef @@ -0,0 +1,19 @@ +{ + "name": "Aspid.FastTools.DevTests.CliCommands.Editor", + "references": [ + "Aspid.FastTools.Unity.Editor", + "Aspid.FastTools.Unity.Editor.SerializeReferences.Yaml", + "Unity.Pipeline" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} diff --git a/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/Aspid.FastTools.DevTests.CliCommands.Editor.asmdef.meta b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/Aspid.FastTools.DevTests.CliCommands.Editor.asmdef.meta new file mode 100644 index 00000000..1d36d643 --- /dev/null +++ b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/Aspid.FastTools.DevTests.CliCommands.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c012c3cc320d547c19d595e9f832cb5f +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/SerializeReferenceGateCommands.cs b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/SerializeReferenceGateCommands.cs new file mode 100644 index 00000000..8b6d5cac --- /dev/null +++ b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/SerializeReferenceGateCommands.cs @@ -0,0 +1,53 @@ +using System.Linq; +using Unity.Pipeline.Commands; +using Aspid.FastTools.SerializeReferences.Editors; + +// ReSharper disable once CheckNamespace +namespace Aspid.FastTools.DevTests.Editors +{ + /// + /// Dev-only Unity CLI wrapper over the SerializeReference gate scanner: unity command sr_gate returns the + /// violations as structured JSON without a batchmode Editor relaunch, unlike . + /// + internal static class SerializeReferenceGateCommands + { + [CliCommand("sr_gate", "Scan the project for SerializeReference gate violations (missing types / unset Required fields)")] + internal static object Run( + [CliArg("scope", "What to scan: missing | required | full")] string scope = "missing", + [CliArg("warn_only", "Force Warn severity: report but exit code 0")] bool warnOnly = false, + [CliArg("fail", "Force Fail severity: exit code 1 on violations")] bool fail = false) + { + var options = scope?.ToLowerInvariant() switch + { + "missing" => GateOptions.MissingOnly, + "required" => GateOptions.RequiredOnly, + "full" => GateOptions.Full, + _ => default, + }; + + if (options.Equals(default(GateOptions))) + return new { success = false, error = $"Unknown scope '{scope}'. Use: missing | required | full." }; + + var severity = SerializeReferenceCiGate.ResolveSeverity(SerializeReferenceSettings.BuildSeverity, warnOnly, fail); + var violations = SerializeReferenceGateScanner.Scan(options); + + return new + { + success = true, + scope, + severity = severity.ToString(), + violationCount = violations.Count, + exitCode = SerializeReferenceCiGate.ComputeExitCode(violations.Count, severity), + violations = violations.Select(violation => new + { + kind = violation.Kind.ToString(), + assetPath = violation.AssetPath, + fieldPath = violation.FieldPath, + storedType = violation.StoredType.Class, + fileId = violation.FileId, + rid = violation.Rid, + }).ToArray(), + }; + } + } +} diff --git a/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/SerializeReferenceGateCommands.cs.meta b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/SerializeReferenceGateCommands.cs.meta new file mode 100644 index 00000000..c26de9af --- /dev/null +++ b/Aspid.FastTools/Assets/DevTests/CliCommands/Editor/SerializeReferenceGateCommands.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 22168adc7920444d0a81ca384ff585d9 \ No newline at end of file diff --git a/Aspid.FastTools/Packages/tech.aspid.fasttools/Unity/Editor/Scripts/AssemblyInfo.cs b/Aspid.FastTools/Packages/tech.aspid.fasttools/Unity/Editor/Scripts/AssemblyInfo.cs index 83ea98cf..47d6cf1d 100644 --- a/Aspid.FastTools/Packages/tech.aspid.fasttools/Unity/Editor/Scripts/AssemblyInfo.cs +++ b/Aspid.FastTools/Packages/tech.aspid.fasttools/Unity/Editor/Scripts/AssemblyInfo.cs @@ -4,3 +4,4 @@ [assembly: InternalsVisibleTo(assemblyName: "Aspid.MVVM.StarterKit.Unity.Editor")] [assembly: InternalsVisibleTo(assemblyName: "Aspid.FastTools.Unity.Editor.Tests")] [assembly: InternalsVisibleTo(assemblyName: "Aspid.FastTools.Unity.Editor.SerializeReferences.Tests")] +[assembly: InternalsVisibleTo(assemblyName: "Aspid.FastTools.DevTests.CliCommands.Editor")] diff --git a/Aspid.FastTools/Packages/tech.aspid.fasttools/Unity/Editor/Scripts/SerializeReferences/Yaml/AssemblyInfo.cs b/Aspid.FastTools/Packages/tech.aspid.fasttools/Unity/Editor/Scripts/SerializeReferences/Yaml/AssemblyInfo.cs index d6ad2190..54708477 100644 --- a/Aspid.FastTools/Packages/tech.aspid.fasttools/Unity/Editor/Scripts/SerializeReferences/Yaml/AssemblyInfo.cs +++ b/Aspid.FastTools/Packages/tech.aspid.fasttools/Unity/Editor/Scripts/SerializeReferences/Yaml/AssemblyInfo.cs @@ -6,3 +6,4 @@ [assembly: InternalsVisibleTo("Aspid.FastTools.Unity.Editor")] [assembly: InternalsVisibleTo("Aspid.FastTools.Unity.Editor.SerializeReferences.Tests")] [assembly: InternalsVisibleTo("Aspid.FastTools.Unity.Editor.Tests")] +[assembly: InternalsVisibleTo("Aspid.FastTools.DevTests.CliCommands.Editor")]