ShrinkSDK

Public Unity SDK packages and workspace. yeah, almost AI slop. ;)

com.cneicy.shrink-command-integration-app (0.2.5)

Published 2026-09-29 10:51:27 +08:00 by cneicy

Installation

registry=https://git.crash.work/api/packages/ShrinkSDK/npm/
npm install com.cneicy.shrink-command-integration-app@0.2.5
"com.cneicy.shrink-command-integration-app": "0.2.5"

About this package

ShrinkCommand 与 ShrinkApp 的桥接层,把默认命令服务纳入统一宿主服务容器。

ShrinkCommand.Integration.App

ShrinkCommand.Integration.App 是 ShrinkCommand 与 ShrinkApp.Core 的桥接层。它的职责很简单:把默认命令服务挂进 ShrinkApp 的服务容器里,让项目在进入统一宿主模式后,仍能用熟悉的命令系统,而不需要到处手动拿 ShrinkCommandRuntime.Default。

Godot 和普通 .NET 项目安装 ShrinkSDK.Command.Integration.App;可打包源码位于 DotNet~。

当前能力

  • 提供原生 ShrinkCommandAppComponent,发布 shrink.service.command
  • 把 ShrinkCommandRuntime.Default 包装为 ShrinkCommandAppService
  • ContextLoader 下由 Starter 组合根装配,服务门面随组件停用可逆注销
  • ShrinkCommandAppInstaller 仅保留给 ClassicHost 兼容路径,已标记过时

使用示例

var command = ShrinkApp.ShrinkApp.Services.GetRequired<ShrinkCommand.Integration.App.ShrinkCommandAppService>();
var result = await command.ExecuteAsync(source, "help");

说明

  • 本包不改变 ShrinkCommand 的原有 API。
  • 静态命令的默认注册仍由 ShrinkCommandRuntime.Default 完成。
  • 运行时实例命令仍然走 RegisterCommands(object target)。

可复用能力

Capability: 把命令服务作为 Context 组件和应用服务门面提供 Aliases: 命令宿主 command app Limits: 退役撤回门面;业务命令仍由 Command 实现 Extension: shrink.service.command 和原生组件 Evidence: ShrinkCommandAppComponent

Dependencies

Dependencies

ID Version
com.cneicy.shrink-app-core 0.2.3
com.cneicy.shrink-command 0.4.2
com.cneicy.shrink-context-core 0.3.0
com.cysharp.unitask 2.5.10

Keywords

command integration app console
Details
npm
2026-09-29 10:51:27 +08:00
2
cneicy
latest
3.3 KiB
Assets (1)
Versions (6) View all
0.2.5 2026-09-29
0.2.0 2026-09-05
0.1.3 2026-08-28
0.1.2 2026-08-28
0.1.1 2026-08-26