-
Notifications
You must be signed in to change notification settings - Fork 2
feat: 同步 MaaFW v5.1 接口及回调消息 #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's Guide通过为流水线 / 识别 / 动作节点新增节点级通知类型、丰富 NextList 载荷、公开新的上下文 / Agent / 资源 API(锚点、命中次数和自定义节点列表),并将它们贯穿打通到 interop、通知和处理器层,以同步 MaaFramework .NET 绑定到 MaaFW v5.1。 节点流水线通知处理的时序图sequenceDiagram
participant NativeFramework as Native_framework
participant ManagedBinding as MaaCallback
participant Registry as NotificationHandlerRegistry
participant Nodes as NodeRegistry
participant Pipeline as PipelineNodeRegistry
participant UserHandler as User_subscriber
NativeFramework->>ManagedBinding: MaaCallback(caller, message, details)
ManagedBinding->>Registry: OnCallback(sender, MaaCallbackEventArgs)
Registry->>Registry: switch Message
Registry->>Nodes: Node.PipelineNode.OnStarting(sender, details)
Nodes->>Pipeline: OnStarting(sender, details)
Pipeline->>Pipeline: JsonSerializer.Deserialize(details, NodePipelineNodeDetail)
Pipeline-->>UserHandler: Starting(sender, NodePipelineNodeDetail)
activate UserHandler
UserHandler-->>Pipeline: handle event
deactivate UserHandler
新增节点通知消息和详情的类图classDiagram
namespace MaaMsg_Node {
class Task_Node {
}
class Node_PipelineNode {
<<static>>
+string Starting
+string Prefix
+string Succeeded
+string Failed
}
class Node_RecognitionNode {
<<static>>
+string Starting
+string Prefix
+string Succeeded
+string Failed
}
class Node_ActionNode {
<<static>>
+string Starting
+string Prefix
+string Succeeded
+string Failed
}
}
namespace Notification_Detail {
class NodePipelineNodeDetail {
+int TaskId
+int NodeId
+string Name
+JsonElement Focus
}
class NodeRecognitionNodeDetail {
+int TaskId
+int NodeId
+string Name
+JsonElement Focus
}
class NodeActionNodeDetail {
+int TaskId
+int NodeId
+string Name
+JsonElement Focus
}
class NextListItem {
+string Name
+bool JumpBack
+bool Anchor
}
class NodeNextListDetail {
+int TaskId
+string Name
+IReadOnlyList~NextListItem~ NextList
+JsonElement Focus
}
}
MaaMsg_Node.Node_PipelineNode ..> Notification_Detail.NodePipelineNodeDetail : details_json
MaaMsg_Node.Node_RecognitionNode ..> Notification_Detail.NodeRecognitionNodeDetail : details_json
MaaMsg_Node.Node_ActionNode ..> Notification_Detail.NodeActionNodeDetail : details_json
Notification_Detail.NodeNextListDetail o--> Notification_Detail.NextListItem : list
通知处理器注册扩展的类图classDiagram
class NotificationHandlerRegistry {
+OnCallback(object sender, MaaCallbackEventArgs e) void
+NodeRegistry Node
}
class MaaCallbackEventArgs {
+string Message
+string Details
}
class NodeRegistry {
+PipelineNodeRegistry PipelineNode
+RecognitionNodeRegistry RecognitionNode
+ActionNodeRegistry ActionNode
+NextListRegistry NextList
}
class PipelineNodeRegistry {
+event EventHandler~NodePipelineNodeDetail~ Starting
+event EventHandler~NodePipelineNodeDetail~ Succeeded
+event EventHandler~NodePipelineNodeDetail~ Failed
+OnStarting(object sender, string details) void
+OnSucceeded(object sender, string details) void
+OnFailed(object sender, string details) void
}
class RecognitionNodeRegistry {
+event EventHandler~NodeRecognitionNodeDetail~ Starting
+event EventHandler~NodeRecognitionNodeDetail~ Succeeded
+event EventHandler~NodeRecognitionNodeDetail~ Failed
+OnStarting(object sender, string details) void
+OnSucceeded(object sender, string details) void
+OnFailed(object sender, string details) void
}
class ActionNodeRegistry {
+event EventHandler~NodeActionNodeDetail~ Starting
+event EventHandler~NodeActionNodeDetail~ Succeeded
+event EventHandler~NodeActionNodeDetail~ Failed
+OnStarting(object sender, string details) void
+OnSucceeded(object sender, string details) void
+OnFailed(object sender, string details) void
}
class NextListRegistry {
+event EventHandler~NodeNextListDetail~ Starting
+event EventHandler~NodeNextListDetail~ Succeeded
+event EventHandler~NodeNextListDetail~ Failed
+OnStarting(object sender, string details) void
+OnSucceeded(object sender, string details) void
+OnFailed(object sender, string details) void
}
class NotificationDetailContext {
+NodePipelineNodeDetail NodePipelineNodeDetail
+NodeRecognitionNodeDetail NodeRecognitionNodeDetail
+NodeActionNodeDetail NodeActionNodeDetail
+NextListItem NextListItem
+NodeNextListDetail NodeNextListDetail
}
class NodePipelineNodeDetail
class NodeRecognitionNodeDetail
class NodeActionNodeDetail
class NodeNextListDetail
class NextListItem
NotificationHandlerRegistry --> NodeRegistry : has
NodeRegistry --> PipelineNodeRegistry : exposes
NodeRegistry --> RecognitionNodeRegistry : exposes
NodeRegistry --> ActionNodeRegistry : exposes
NodeRegistry --> NextListRegistry : exposes
PipelineNodeRegistry ..> NodePipelineNodeDetail : deserialize
RecognitionNodeRegistry ..> NodeRecognitionNodeDetail : deserialize
ActionNodeRegistry ..> NodeActionNodeDetail : deserialize
NextListRegistry ..> NodeNextListDetail : deserialize
PipelineNodeRegistry ..> NotificationDetailContext : uses
RecognitionNodeRegistry ..> NotificationDetailContext : uses
ActionNodeRegistry ..> NotificationDetailContext : uses
NextListRegistry ..> NotificationDetailContext : uses
上下文、Agent 客户端、资源与 interop 新增内容的类图classDiagram
class IMaaContext {
+IMaaContext Clone()
+bool SetAnchor(string anchorName, string nodeName)
+bool GetAnchor(string anchorName, out string nodeName)
+bool GetHitCount(string nodeName, out ulong count)
+bool ClearHitCount(string nodeName)
}
class MaaContext {
+MaaContext Clone()
+bool SetAnchor(string anchorName, string nodeName)
+bool GetAnchor(string anchorName, out string nodeName)
+bool GetHitCount(string nodeName, out ulong count)
+bool ClearHitCount(string nodeName)
}
class MaaContextInterop {
+MaaContextClone(MaaContextHandle context) MaaContextHandle
+MaaContextSetAnchor(MaaContextHandle context, string anchorName, string nodeName) bool
+MaaContextGetAnchor(MaaContextHandle context, string anchorName, MaaStringBufferHandle buffer) bool
+MaaContextGetHitCount(MaaContextHandle context, string nodeName, MaaSize count) bool
+MaaContextClearHitCount(MaaContextHandle context, string nodeName) bool
}
class IMaaAgentClient {
+Process AgentServerProcess
+IList~string~ CustomRecognitionList
+IList~string~ CustomActionList
}
class MaaAgentClient {
+Process AgentServerProcess
+IList~string~ CustomRecognitionList
+IList~string~ CustomActionList
}
class MaaAgentClientInterop {
+MaaAgentClientGetCustomRecognitionList(MaaAgentClientHandle client, MaaStringListBufferHandle buffer) bool
+MaaAgentClientGetCustomActionList(MaaAgentClientHandle client, MaaStringListBufferHandle buffer) bool
}
class IMaaResource {
+IList~string~ NodeList
+IList~string~ CustomRecognitionList
+IList~string~ CustomActionList
}
class MaaResource {
+IList~string~ NodeList
+IList~string~ CustomRecognitionList
+IList~string~ CustomActionList
}
class MaaResourceInterop {
+MaaResourceGetNodeList(MaaResourceHandle res, MaaStringListBufferHandle buffer) bool
+MaaResourceGetCustomRecognitionList(MaaResourceHandle res, MaaStringListBufferHandle buffer) bool
+MaaResourceGetCustomActionList(MaaResourceHandle res, MaaStringListBufferHandle buffer) bool
}
class MaaStringBuffer {
+TryGetValue(out string value, Func~MaaStringBufferHandle,bool~ invoker) bool
}
class MaaStringListBuffer {
+TryGetList(out IList~string~ list, Func~MaaStringListBufferHandle,bool~ invoker) bool
}
IMaaContext <|.. MaaContext
MaaContext ..> MaaContextInterop : calls
MaaContext ..> MaaStringBuffer : uses
IMaaAgentClient <|.. MaaAgentClient
MaaAgentClient ..> MaaAgentClientInterop : calls
MaaAgentClient ..> MaaStringListBuffer : uses
IMaaResource <|.. MaaResource
MaaResource ..> MaaResourceInterop : calls
MaaResource ..> MaaStringListBuffer : uses
富化后的 NextList 载荷流程图flowchart LR
A_NodeNextListDetail["NodeNextListDetail
task_id, name, focus"] --> B_List["list
IReadOnlyList<NextListItem>"]
B_List --> C_NextListItem["NextListItem
name"]
B_List --> D_JumpBack["NextListItem
jump_back"]
B_List --> E_Anchor["NextListItem
anchor"]
A_NodeNextListDetail --> F_Consumer["Next list consumer
(notification handlers, user code)"]
文件级变更
技巧与命令与 Sourcery 交互
自定义你的体验访问你的 仪表盘 以:
获取帮助Original review guide in EnglishReviewer's GuideSyncs MaaFramework .NET bindings with MaaFW v5.1 by adding node-level notification types for pipeline/recognition/action nodes, enriching NextList payloads, exposing new context/agent/resource APIs (anchors, hit counts, and custom node lists), and wiring them through the interop, notification, and handler layers. Sequence diagram for node pipeline notification handlingsequenceDiagram
participant NativeFramework as Native_framework
participant ManagedBinding as MaaCallback
participant Registry as NotificationHandlerRegistry
participant Nodes as NodeRegistry
participant Pipeline as PipelineNodeRegistry
participant UserHandler as User_subscriber
NativeFramework->>ManagedBinding: MaaCallback(caller, message, details)
ManagedBinding->>Registry: OnCallback(sender, MaaCallbackEventArgs)
Registry->>Registry: switch Message
Registry->>Nodes: Node.PipelineNode.OnStarting(sender, details)
Nodes->>Pipeline: OnStarting(sender, details)
Pipeline->>Pipeline: JsonSerializer.Deserialize(details, NodePipelineNodeDetail)
Pipeline-->>UserHandler: Starting(sender, NodePipelineNodeDetail)
activate UserHandler
UserHandler-->>Pipeline: handle event
deactivate UserHandler
Class diagram for new node notification messages and detailsclassDiagram
namespace MaaMsg_Node {
class Task_Node {
}
class Node_PipelineNode {
<<static>>
+string Starting
+string Prefix
+string Succeeded
+string Failed
}
class Node_RecognitionNode {
<<static>>
+string Starting
+string Prefix
+string Succeeded
+string Failed
}
class Node_ActionNode {
<<static>>
+string Starting
+string Prefix
+string Succeeded
+string Failed
}
}
namespace Notification_Detail {
class NodePipelineNodeDetail {
+int TaskId
+int NodeId
+string Name
+JsonElement Focus
}
class NodeRecognitionNodeDetail {
+int TaskId
+int NodeId
+string Name
+JsonElement Focus
}
class NodeActionNodeDetail {
+int TaskId
+int NodeId
+string Name
+JsonElement Focus
}
class NextListItem {
+string Name
+bool JumpBack
+bool Anchor
}
class NodeNextListDetail {
+int TaskId
+string Name
+IReadOnlyList~NextListItem~ NextList
+JsonElement Focus
}
}
MaaMsg_Node.Node_PipelineNode ..> Notification_Detail.NodePipelineNodeDetail : details_json
MaaMsg_Node.Node_RecognitionNode ..> Notification_Detail.NodeRecognitionNodeDetail : details_json
MaaMsg_Node.Node_ActionNode ..> Notification_Detail.NodeActionNodeDetail : details_json
Notification_Detail.NodeNextListDetail o--> Notification_Detail.NextListItem : list
Class diagram for notification handler registry extensionsclassDiagram
class NotificationHandlerRegistry {
+OnCallback(object sender, MaaCallbackEventArgs e) void
+NodeRegistry Node
}
class MaaCallbackEventArgs {
+string Message
+string Details
}
class NodeRegistry {
+PipelineNodeRegistry PipelineNode
+RecognitionNodeRegistry RecognitionNode
+ActionNodeRegistry ActionNode
+NextListRegistry NextList
}
class PipelineNodeRegistry {
+event EventHandler~NodePipelineNodeDetail~ Starting
+event EventHandler~NodePipelineNodeDetail~ Succeeded
+event EventHandler~NodePipelineNodeDetail~ Failed
+OnStarting(object sender, string details) void
+OnSucceeded(object sender, string details) void
+OnFailed(object sender, string details) void
}
class RecognitionNodeRegistry {
+event EventHandler~NodeRecognitionNodeDetail~ Starting
+event EventHandler~NodeRecognitionNodeDetail~ Succeeded
+event EventHandler~NodeRecognitionNodeDetail~ Failed
+OnStarting(object sender, string details) void
+OnSucceeded(object sender, string details) void
+OnFailed(object sender, string details) void
}
class ActionNodeRegistry {
+event EventHandler~NodeActionNodeDetail~ Starting
+event EventHandler~NodeActionNodeDetail~ Succeeded
+event EventHandler~NodeActionNodeDetail~ Failed
+OnStarting(object sender, string details) void
+OnSucceeded(object sender, string details) void
+OnFailed(object sender, string details) void
}
class NextListRegistry {
+event EventHandler~NodeNextListDetail~ Starting
+event EventHandler~NodeNextListDetail~ Succeeded
+event EventHandler~NodeNextListDetail~ Failed
+OnStarting(object sender, string details) void
+OnSucceeded(object sender, string details) void
+OnFailed(object sender, string details) void
}
class NotificationDetailContext {
+NodePipelineNodeDetail NodePipelineNodeDetail
+NodeRecognitionNodeDetail NodeRecognitionNodeDetail
+NodeActionNodeDetail NodeActionNodeDetail
+NextListItem NextListItem
+NodeNextListDetail NodeNextListDetail
}
class NodePipelineNodeDetail
class NodeRecognitionNodeDetail
class NodeActionNodeDetail
class NodeNextListDetail
class NextListItem
NotificationHandlerRegistry --> NodeRegistry : has
NodeRegistry --> PipelineNodeRegistry : exposes
NodeRegistry --> RecognitionNodeRegistry : exposes
NodeRegistry --> ActionNodeRegistry : exposes
NodeRegistry --> NextListRegistry : exposes
PipelineNodeRegistry ..> NodePipelineNodeDetail : deserialize
RecognitionNodeRegistry ..> NodeRecognitionNodeDetail : deserialize
ActionNodeRegistry ..> NodeActionNodeDetail : deserialize
NextListRegistry ..> NodeNextListDetail : deserialize
PipelineNodeRegistry ..> NotificationDetailContext : uses
RecognitionNodeRegistry ..> NotificationDetailContext : uses
ActionNodeRegistry ..> NotificationDetailContext : uses
NextListRegistry ..> NotificationDetailContext : uses
Class diagram for context, agent client, resource, and interop additionsclassDiagram
class IMaaContext {
+IMaaContext Clone()
+bool SetAnchor(string anchorName, string nodeName)
+bool GetAnchor(string anchorName, out string nodeName)
+bool GetHitCount(string nodeName, out ulong count)
+bool ClearHitCount(string nodeName)
}
class MaaContext {
+MaaContext Clone()
+bool SetAnchor(string anchorName, string nodeName)
+bool GetAnchor(string anchorName, out string nodeName)
+bool GetHitCount(string nodeName, out ulong count)
+bool ClearHitCount(string nodeName)
}
class MaaContextInterop {
+MaaContextClone(MaaContextHandle context) MaaContextHandle
+MaaContextSetAnchor(MaaContextHandle context, string anchorName, string nodeName) bool
+MaaContextGetAnchor(MaaContextHandle context, string anchorName, MaaStringBufferHandle buffer) bool
+MaaContextGetHitCount(MaaContextHandle context, string nodeName, MaaSize count) bool
+MaaContextClearHitCount(MaaContextHandle context, string nodeName) bool
}
class IMaaAgentClient {
+Process AgentServerProcess
+IList~string~ CustomRecognitionList
+IList~string~ CustomActionList
}
class MaaAgentClient {
+Process AgentServerProcess
+IList~string~ CustomRecognitionList
+IList~string~ CustomActionList
}
class MaaAgentClientInterop {
+MaaAgentClientGetCustomRecognitionList(MaaAgentClientHandle client, MaaStringListBufferHandle buffer) bool
+MaaAgentClientGetCustomActionList(MaaAgentClientHandle client, MaaStringListBufferHandle buffer) bool
}
class IMaaResource {
+IList~string~ NodeList
+IList~string~ CustomRecognitionList
+IList~string~ CustomActionList
}
class MaaResource {
+IList~string~ NodeList
+IList~string~ CustomRecognitionList
+IList~string~ CustomActionList
}
class MaaResourceInterop {
+MaaResourceGetNodeList(MaaResourceHandle res, MaaStringListBufferHandle buffer) bool
+MaaResourceGetCustomRecognitionList(MaaResourceHandle res, MaaStringListBufferHandle buffer) bool
+MaaResourceGetCustomActionList(MaaResourceHandle res, MaaStringListBufferHandle buffer) bool
}
class MaaStringBuffer {
+TryGetValue(out string value, Func~MaaStringBufferHandle,bool~ invoker) bool
}
class MaaStringListBuffer {
+TryGetList(out IList~string~ list, Func~MaaStringListBufferHandle,bool~ invoker) bool
}
IMaaContext <|.. MaaContext
MaaContext ..> MaaContextInterop : calls
MaaContext ..> MaaStringBuffer : uses
IMaaAgentClient <|.. MaaAgentClient
MaaAgentClient ..> MaaAgentClientInterop : calls
MaaAgentClient ..> MaaStringListBuffer : uses
IMaaResource <|.. MaaResource
MaaResource ..> MaaResourceInterop : calls
MaaResource ..> MaaStringListBuffer : uses
Flow diagram for NextList enriched payloadflowchart LR
A_NodeNextListDetail["NodeNextListDetail
task_id, name, focus"] --> B_List["list
IReadOnlyList<NextListItem>"]
B_List --> C_NextListItem["NextListItem
name"]
B_List --> D_JumpBack["NextListItem
jump_back"]
B_List --> E_Anchor["NextListItem
anchor"]
A_NodeNextListDetail --> F_Consumer["Next list consumer
(notification handlers, user code)"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你好——我已经审阅了你的改动,这里有一些反馈:
- 这三个节点明细记录(
NodePipelineNodeDetail、NodeRecognitionNodeDetail、NodeActionNodeDetail)及其对应的 registry/handler 在结构上是完全相同的;可以考虑通过一个共享的 record 和/或泛型节点 registry 来进行抽象整合,以避免重复,并让后续对 schema 的修改可以集中在一个地方。 - 对于
IMaaAgentClient/IMaaResource上的CustomRecognitionList和CustomActionList,这些属性返回的是从底层 native 状态构建的新列表,但类型却是IList<string>(这暗示修改该列表会影响底层的 agent/resource);可以考虑将其暴露为IReadOnlyList<string>,或改为方法(例如GetCustomRecognitionList()),以更好地体现其语义。 - 在新的节点 registry 中,当
JsonSerializer.Deserialize返回null时你会抛出InvalidCastException;由于这其实是反序列化失败而不是类型转换问题,使用更具体的异常(例如JsonException或InvalidDataException)会让调试更加容易,也更符合实际问题的性质。
给 AI Agent 的提示词
Please address the comments from this code review:
## Overall Comments
- The three node detail records (`NodePipelineNodeDetail`, `NodeRecognitionNodeDetail`, `NodeActionNodeDetail`) and their corresponding registries/handlers are structurally identical; consider consolidating them via a shared record and/or generic node registry to avoid duplication and keep future changes to the schema in one place.
- For `CustomRecognitionList` and `CustomActionList` on `IMaaAgentClient`/`IMaaResource`, the properties return a new list built from native state but are typed as `IList<string>` (suggesting mutability that affects the underlying agent/resource); consider exposing these as `IReadOnlyList<string>` or methods (e.g., `GetCustomRecognitionList()`) to better reflect their semantics.
- In the new node registries you throw `InvalidCastException` when `JsonSerializer.Deserialize` returns `null`; since this is a deserialization failure rather than a type-cast issue, a more specific exception (e.g., `JsonException` or `InvalidDataException`) would make debugging easier and better reflect the underlying problem.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English
Hey there - I've reviewed your changes - here's some feedback:
- The three node detail records (
NodePipelineNodeDetail,NodeRecognitionNodeDetail,NodeActionNodeDetail) and their corresponding registries/handlers are structurally identical; consider consolidating them via a shared record and/or generic node registry to avoid duplication and keep future changes to the schema in one place. - For
CustomRecognitionListandCustomActionListonIMaaAgentClient/IMaaResource, the properties return a new list built from native state but are typed asIList<string>(suggesting mutability that affects the underlying agent/resource); consider exposing these asIReadOnlyList<string>or methods (e.g.,GetCustomRecognitionList()) to better reflect their semantics. - In the new node registries you throw
InvalidCastExceptionwhenJsonSerializer.Deserializereturnsnull; since this is a deserialization failure rather than a type-cast issue, a more specific exception (e.g.,JsonExceptionorInvalidDataException) would make debugging easier and better reflect the underlying problem.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The three node detail records (`NodePipelineNodeDetail`, `NodeRecognitionNodeDetail`, `NodeActionNodeDetail`) and their corresponding registries/handlers are structurally identical; consider consolidating them via a shared record and/or generic node registry to avoid duplication and keep future changes to the schema in one place.
- For `CustomRecognitionList` and `CustomActionList` on `IMaaAgentClient`/`IMaaResource`, the properties return a new list built from native state but are typed as `IList<string>` (suggesting mutability that affects the underlying agent/resource); consider exposing these as `IReadOnlyList<string>` or methods (e.g., `GetCustomRecognitionList()`) to better reflect their semantics.
- In the new node registries you throw `InvalidCastException` when `JsonSerializer.Deserialize` returns `null`; since this is a deserialization failure rather than a type-cast issue, a more specific exception (e.g., `JsonException` or `InvalidDataException`) would make debugging easier and better reflect the underlying problem.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR synchronizes the MaaFramework.Binding with MaaFW v5.1 interface changes, adding support for new node types, anchor/hit count management in pipeline contexts, and custom recognition/action list retrieval. The changes extend the callback notification system with three new node types (PipelineNode, RecognitionNode, ActionNode) while updating the NextList structure to include metadata about jump_back and anchor flags.
- Adds three new node callback message types: PipelineNode, RecognitionNode, and ActionNode
- Introduces anchor and hit count management methods to IMaaContext
- Adds CustomRecognitionList and CustomActionList properties to IMaaResource and IMaaAgentClient
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/MaaFramework.Binding/MaaMsg.cs | Defines new message constants for PipelineNode, RecognitionNode, and ActionNode; updates NextList JSON structure documentation |
| src/MaaFramework.Binding/IMaaResource.cs | Adds CustomRecognitionList and CustomActionList property definitions |
| src/MaaFramework.Binding/IMaaContext.cs | Adds anchor management (SetAnchor, GetAnchor) and hit count methods (GetHitCount, ClearHitCount) |
| src/MaaFramework.Binding/IMaaAgentClient.cs | Adds CustomRecognitionList and CustomActionList property definitions |
| src/MaaFramework.Binding.Native/MaaResource.cs | Implements CustomRecognitionList and CustomActionList properties |
| src/MaaFramework.Binding.Native/MaaContext.cs | Implements anchor and hit count management methods |
| src/MaaFramework.Binding.Native/MaaAgentClient.cs | Implements CustomRecognitionList and CustomActionList properties |
| src/MaaFramework.Binding.Native/Interop/Framework/Instance/MaaResource.cs | Declares P/Invoke signatures for custom recognition/action list APIs |
| src/MaaFramework.Binding.Native/Interop/Framework/Instance/MaaContext.cs | Declares P/Invoke signatures for anchor and hit count APIs |
| src/MaaFramework.Binding.Native/Interop/AgentClient/MaaAgentClientAPI.cs | Declares P/Invoke signatures for agent client custom list APIs |
| src/MaaFramework.Binding.Extensions/Notification/NotificationHandlerRegistry.cs | Adds handlers for new PipelineNode, RecognitionNode, and ActionNode events |
| src/MaaFramework.Binding.Extensions/Notification/NotificationHandler.cs | Adds ToCallback extension methods for new node types |
| src/MaaFramework.Binding.Extensions/Notification/NotificationDetailContext.cs | Registers new detail types for JSON serialization |
| src/MaaFramework.Binding.Extensions/Notification/NotificationDetail.cs | Defines new record types for node details and NextListItem structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
LGTM |
Summary by Sourcery
为新的 MaaFW v5.1 节点级 API 和自定义列表添加绑定和通知,并扩展上下文和资源接口以暴露新的框架能力。
新功能:
增强内容:
Original summary in English
Summary by Sourcery
Add bindings and notifications for new MaaFW v5.1 node-level APIs and custom lists, and extend context and resource interfaces to expose new framework capabilities.
New Features:
Enhancements: