This commit is contained in:
2026-06-13 09:45:18 -03:00
parent 89c23fb0ed
commit 471c0e21a9
18 changed files with 837 additions and 91 deletions

View File

@@ -382,8 +382,9 @@ class BackofficeNativeRuntime:
return state
@staticmethod
def _after_input_guardrails(state: AgentState) -> str:
return "blocked" if state.get("error", {}).get("type") == "InputGuardrailBlocked" else "continue"
def _after_input_guardrails(state):
error = state.get("error") or {}
return "blocked" if error.get("type") == "InputGuardrailBlocked" else "continue"
async def _framework_output_supervisor(self, state: AgentState) -> AgentState:
await self._safe_emit_grl(
@@ -544,7 +545,8 @@ class BackofficeNativeRuntime:
"guardrails_config_path": self.guardrails_config.get("_config_path"),
"active_input_rails": [r.get("code") for r in self.guardrails_config.get("input", []) if r.get("enabled", True)],
"active_output_rails": [r.get("code") for r in self.guardrails_config.get("output", []) if r.get("enabled", True)],
"_oci_producer": getattr(app_state, "oci_producer", None) if app_state is not None else None,
# Progress producer is kept in src.compat.framework_services, not in state,
# so checkpoints remain JSON-stable and integrity hashes do not change.
"_framework_ics_bridge_index": 0,
})
try: