chore(unity): 固定Unity CLI Loop本地包并移除UnitySkills依赖

This commit is contained in:
Liubing\LB
2026-09-28 18:14:59 +08:00
parent 0eb43b2b40
commit c4ae02def9
952 changed files with 70137 additions and 11 deletions

View File

@@ -0,0 +1,13 @@
namespace io.github.hatayama.uLoopMCP.Factory
{
/// <summary>
/// Exposes the default executor factory through a single composition entry point.
/// </summary>
public static class DynamicCodeExecutorFactory
{
public static IDynamicCodeExecutor Create(DynamicCodeSecurityLevel securityLevel)
{
return DynamicCodeServices.ExecutorFactory.Create(securityLevel);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7f1b482c744e04f83849187f921f3222
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
namespace io.github.hatayama.uLoopMCP.Factory
{
internal interface IDynamicCodeExecutorProvider
{
IDynamicCodeExecutor Create(DynamicCodeSecurityLevel securityLevel);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 90b8fc775a80d45f69d4b7b706d1062c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,58 @@
namespace io.github.hatayama.uLoopMCP.Factory
{
internal sealed class RegistryDynamicCodeExecutorFactory : IDynamicCodeExecutorProvider
{
private readonly DynamicCodeSourcePreparationService _sourcePreparationService;
private readonly CompiledCommandEntryPointResolver _entryPointResolver;
public RegistryDynamicCodeExecutorFactory(
DynamicCodeSourcePreparationService sourcePreparationService,
CompiledCommandEntryPointResolver entryPointResolver)
{
_sourcePreparationService = sourcePreparationService;
_entryPointResolver = entryPointResolver;
}
public IDynamicCodeExecutor Create(DynamicCodeSecurityLevel securityLevel)
{
string correlationId = McpConstants.GenerateCorrelationId();
IDynamicCompilationService compiler;
if (!DynamicCompilationServiceRegistry.TryCreate(securityLevel, out compiler))
{
VibeLogger.LogWarning(
"dynamic_executor_stub_created",
"DynamicCodeExecutorStub created (compilation provider unavailable)",
new
{
security_level = securityLevel.ToString()
},
correlationId,
"Dynamic code execution provider was not registered",
"Verify Roslyn assembly loading and define configuration");
return new DynamicCodeExecutorStub();
}
ICompiledCommandInvoker invoker = new CommandRunner(_entryPointResolver);
DynamicCodeExecutor executor = new DynamicCodeExecutor(
compiler,
invoker,
_sourcePreparationService);
VibeLogger.LogInfo(
"dynamic_executor_created",
$"DynamicCodeExecutor created with security level: {securityLevel}",
new
{
security_level = securityLevel.ToString(),
compiler_type = compiler.GetType().Name,
runner_type = invoker.GetType().Name
},
correlationId,
"Dynamic code execution system initialization completed",
"Ready for execution");
return executor;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f1351dbeae9d2421fbc36099f349ef0e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: