feat: ship agent-first mission control v0.2.57
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Nexus.Api.Services;
|
||||
|
||||
namespace Nexus.Api.Tests;
|
||||
|
||||
internal sealed class StubOpenClawWriteGate(
|
||||
OpenClawWriteGateDecision? decision = null) : IOpenClawWriteGate
|
||||
{
|
||||
public OpenClawWriteGateDecision Decision { get; set; } =
|
||||
decision ?? OpenClawWriteGateDecision.Permit();
|
||||
|
||||
public List<(string Method, string Scope)> Evaluations { get; } = [];
|
||||
|
||||
public Task<OpenClawWriteGateDecision> EvaluateAsync(
|
||||
string method,
|
||||
string requiredScope = "operator.admin",
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
Evaluations.Add((method, requiredScope));
|
||||
return Task.FromResult(Decision);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user