Publish curated Unraid-AppOps-Gateway source from c61e0e1e292914893b40354f904f23dd9fd4a958
This commit is contained in:
1 parent
b47ce43436
commit
9b94d8d0f5
18 files changed
+1651
-75
No files matched your search
@@ -343,7 +343,8 @@ def _mcp_action_registry(session: Session) -> dict[str, Any]:
|
||||
target = str(item.get("target") or "")
|
||||
capability = str(item.get("capability") or "operator")
|
||||
mcp_policy = evaluate_policy(
|
||||
session, action=action, target=target, source="automation"
|
||||
session, action=action, target=target,
|
||||
source=mcp_operations.mcp_policy_source(action, target)
|
||||
)
|
||||
original_decision = str(mcp_policy.get("decision") or "blocked")
|
||||
|
||||
@@ -417,7 +418,8 @@ def preview_action(action: str, target: str) -> dict[str, Any]:
|
||||
safe_action = action[:160]
|
||||
with Session(engine) as session:
|
||||
decision = evaluate_policy(
|
||||
session, action=safe_action, target=target[:240], source="automation"
|
||||
session, action=safe_action, target=target[:240],
|
||||
source=mcp_operations.mcp_policy_source(safe_action, target[:240])
|
||||
)
|
||||
mcp_mode, mcp_supported = _mcp_preview_mode(
|
||||
safe_action, str(decision["decision"])
|
||||
|
||||
Reference in new issue
Block a user