Skip to content

Commit 8a7a658

Browse files
committed
feat(agents): AgentBuilder.Build() auto-applies to the global policy when present
Build() now registers the config on CoreAIAgent.Policy the moment it is built (when a policy exists), so a role is routable immediately — complementing the first-Ask auto-registration. BuildDetached() still leaves the global policy untouched. EditMode test added.
1 parent 60bb168 commit 8a7a658

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

Assets/CoreAI/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
- **`AgentBuilder.Build()` auto-applies to the global policy.** When `CoreAIAgent.Policy` exists, `Build()`
6+
now registers the config immediately (on top of the first-Ask auto-registration), so a role is routable
7+
the moment it is built. `BuildDetached()` still leaves the global policy untouched. Solution-wide Rider
8+
reformat applied (shared `.editorconfig`; attributes stay one-per-line).
9+
510
## 5.6.0 - Simpler agent API, code-style rules, benchmark comparison (2026-07-11)
611

712
- **Code style: shared `.editorconfig` + comment convention.** Attributes now always sit on their own

Assets/CoreAI/Runtime/Core/Features/AgentMemory/AgentBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,4 +846,4 @@ private bool HasMemoryTool()
846846
return false;
847847
}
848848
}
849-
}
849+
}

Assets/CoreAiUnity/Tests/EditMode/AgentBuilderEditModeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,4 +364,4 @@ public void ValidateOnBuild_CompactionTrue_GlobalGateOff_ReportsCompactionGate()
364364
}
365365
}
366366
}
367-
}
367+
}

0 commit comments

Comments
 (0)