[Pull Request] Dev=UI separate si#6
Open
StardustSeemsInk wants to merge 61 commits into
Open
Conversation
…rd interfaces for the separation of front-end and back-end in the Dashboard.
…rkflowEditor 之间的通信
- 新增 Variable 枚举值与 VariableNode 类(无端口浮游节点,用于无初始值变量声明) - 注册 JsonDerivedType 支持多态序列化 - IWorkflowService 新增带 constantOverrides 参数的 ExecuteBlockScriptAsync 重载
- 新增 IReadOnlyList<IPluginConnector> Connections { get; }
- 允许 UI 层通过 DI 接口访问已连接插件的 PluginInfo.Functions
…;扩展 KcsFileFormat 嵌入工作流元数据;新增 IWorkflowStorageService 统一存储接口
…件参数类,用于处理工作流重命名和数据保存事件
… IWorkflowService 接口以编译和持久化工作流脚本;扩展 IWorkflowStorageService 接口以预加载已编译脚本
💾 Feat(Plugin): 新增插件连接接口及相关事件,支持插件连接状态管理和消息处理
- BlockStatement 新增 StatementId 属性,默认空串,用于BP↔CFG↔BS双向保留节点身份 - BlockScript 新增 DebugNodeMapping 字段,存储调试用StatementId→NodeId映射 - BlockScriptExecutionResult 新增 DebugNodeMapping 字段,供执行结果返回调试映射 - IBlueprintService 新增 GetDebugNodeMapping(Blueprint) 方法 - IBlockScriptExecutor 新增 SetDebugger(IBlueprintDebugController?) 方法 - IBlueprintDebugController 新增 UpdateVariableSnapshot(Dictionary) 方法 - INodeExportHelper 新增 GetOutputPubVar(node, pinName) 与 IsOutputConsumed(node, pinName)
…e、PrintNode、SetNode)以简化蓝图节点结构
…anager/IRealPluginManagerBridge/WorkflowEventNames、IDeviceHttpClient 提升至 Contract、拆分 IBlockScriptService 移除内部模型依赖、迁移 12 个内部数据模型与 9 个内部接口至 KitX.Workflow 库
[Pull Request]🧩 Refactor(Workflow): 瘦身 Core.Contract 至 Dashboard 公共契约面-新增 ITriggerM…
双窗口编辑器架构已被统一的 WorkflowEditorWindow 取代,该跨窗口数据管道接口 (GetCurrentScript/GetHelperFunctions/SetScript/AppendOutput/TriggerExecution) 的唯一实现者(Dashboard 的 WorkflowEditorBridge)与唯一消费者 (BlueprintEditorViewModel 的 bridge 字段)均已随遗留窗口清理删除,接口成为死代码。
Closed
- 新增 BranchArm:通用控制流臂模型(PinName/TargetBlockName/IsLoopback), 位于 Contract 层供 Workflow 与 Contract 共享 - 新增 VariadicPinSpec record:声明节点的变长端口增长规则 (BasePinName/StartIndex/PinType),供编辑器泛化"连一个长一个"机制 - NodeDescriptor 新增可选 InputVariadic/OutputVariadic 字段(默认 null=固定)
从 NodeDescriptor record 删除 Width/Height 两个零消费字段。 LayoutService 读取的是节点实例的 BlueprintNode.Width/Height(默认 200/100), 从未读取 descriptor 级尺寸;InitializePinsFromDescriptor 也只读 InputPins/OutputPins。 同步移除 7 个节点子类(Entry/Const/PluginTrigger/Call/CallHelper/Variable/BuiltinFunction) GetDescriptor() 里的 Width:/Height: 命名参数。 # KitX Workflow KISS 深度重构 L0 阶段:删除纯死代码 # Date: 2026-06-19 # Author: StarInk
为 BranchArm 新增 Clone() 方法,集中 arm 深拷贝逻辑。替换 BS2CFG /
CFG2BS / BP2CFG / CFGConditionDuplicator 四处字符级相同的
Select(a => new BranchArm { ... }).ToList() 为 Select(a => a.Clone()).ToList()。
直接构造新 arm 的两处(非克隆)保持不变。
# KitX Workflow KISS 深度重构 L1 阶段:机械去重(子模块部分)
# Date: 2026-06-19
# Author: StarInk
新增 ControlFlowArms 值对象(Contract 层),集中控制流 arm 的访问逻辑: Arms/TrueBlockName/FalseBlockName/LoopbackTarget/SetArm。消除 CFGStatement 与 FlowControlStatement 两处约 80 行逐字/近字重复,并修复一个隐藏的 null-vs-string.Empty 不一致(TrueBlockName/FalseBlockName 便利访问器在两层 返回不同类型的"空")。 ControlFlowArms 统一空值约定为 string.Empty(经 SetArm 归一化),避免 null 泄漏进 SourceCode 拼接。 # KitX Workflow KISS 深度重构 L5 阶段:抽取共享值对象(子模块部分) # Date: 2026-06-19 # Author: StarInk
- IWorkflowManagementService: 删除 AddWorkflow/GetWorkflows/RemoveWorkflow(Dashboard 直接走 IWorkflowStorageService) - IWorkflowPluginService: 删除 UpdateAvailablePlugins/ApplyConstantsToCode/MergeHelperFunctions(无运行时调用) - IWorkflowStorageService: 删除 RenameWorkflowAsync/PreloadCompiledScriptsAsync(Dashboard 用事件而非方法) - IBlockScriptService: 删除单参 Dictionary 重载(无调用方) - IKcsFileService: 删除整个接口(DI 注册但从未被解析)+ 删除孤儿 KcsFileFormat 末尾悬空注释 经全仓 grep 验证: 11 个接口方法 0 外部调用者, 无反射/字符串派发 BREAKING CHANGE: 公共契约 API 表面缩减, 外部插件若依赖被删成员需迁移 Date: 2026-06-20 Author: StarInk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
将Dashboard的后端逻辑分离为Core项目(和Core.Contract项目),并添加了Workflow相关的功能(包括BlockScript与蓝图,它们的互译与编译运行/debug模式运行,前端编辑器窗口与工作流库管理界面)。
This pull request introduces a comprehensive set of new contract interfaces for the KitX Core system, covering configuration, activity, and announcement management. The changes establish standardized interfaces for application configuration, plugin and security settings, activity tracking, announcement handling, and related event arguments. These additions will help ensure consistency and extensibility across the codebase for configuration and core service management.
Key changes include:
Configuration System
IAppConfig,IAppConf,IWindowsConf,IPagesConf,IWebConf,ILogConf,IIOConf,IActivityConf, andILoadersConfinterfaces to define the structure of the application's configuration sections. These interfaces provide typed access to application, logging, IO, activity, loader, and web-related settings. [1] [2] [3] [4] [5] [6]IPluginsConfigandISecurityConfiginterfaces for managing plugins and security-related configuration, including device keys and plugin installations. [1] [2]IConfigService,IConfigLoader, andIConfigSaverinterfaces for managing, loading, and saving all configurations, as well as handling configuration change events. [1] [2] [3]IConfigWithMetadatafor configurations that need metadata fields such as file location and generation time.ConfigChangedEventArgsto standardize event arguments for configuration changes.Activity and Announcement Services
IActivityService,IActivity, andIActivityStatisticsinterfaces for activity tracking, statistics, and event notification.IAnnouncementService,IAnnouncement, and related event argument classes for managing announcements and notification events.IAnnouncementConfigfor announcement-specific configuration needs.Utility and Helper Additions
TriggerHelperclass to help plugins fire trigger signals to the dashboard, standardizing the process for sending trigger events.These changes lay the foundation for a robust, modular, and event-driven configuration and core service system in KitX.