a2a-source-edit: write agent.py
This commit is contained in:
2
agent.py
2
agent.py
@@ -354,7 +354,7 @@ class AgentComplianceAuditor(A2AAgent[AgentComplianceAuditorConfig, NoAuth]):
|
|||||||
return {"audit_id": audit_id, "target": _dump(request.target), "status": "ok", "output_dir": output_dir, "generated_files": [_dump(f) for f in files], "findings": [_dump(f) for f in findings], "evidence": [_dump(e) for e in evidence], "warnings": warnings, "mutations_performed": False}
|
return {"audit_id": audit_id, "target": _dump(request.target), "status": "ok", "output_dir": output_dir, "generated_files": [_dump(f) for f in files], "findings": [_dump(f) for f in findings], "evidence": [_dump(e) for e in evidence], "warnings": warnings, "mutations_performed": False}
|
||||||
|
|
||||||
@a2a.tool(description="Run bounded non-destructive runtime probes and audit deployment health without mutations", timeout_seconds=180, idempotent=True, cost_class="read-only")
|
@a2a.tool(description="Run bounded non-destructive runtime probes and audit deployment health without mutations", timeout_seconds=180, idempotent=True, cost_class="read-only")
|
||||||
async def audit_runtime(self, ctx: RunContext[NoAuth], request: AuditRuntimeRequest) -> FindingResult:
|
async def audit_runtime(self, ctx: RunContext[NoAuth], request: AuditRuntimeRequest) -> Any:
|
||||||
audit_id = _audit_id(request.target, request.options.audit_id)
|
audit_id = _audit_id(request.target, request.options.audit_id)
|
||||||
await _event(ctx, "audit_started", audit_id=audit_id, skill="audit_runtime", target=request.target.agent_name)
|
await _event(ctx, "audit_started", audit_id=audit_id, skill="audit_runtime", target=request.target.agent_name)
|
||||||
inventory = request.inventory or (await _collect_inventory(self, ctx, request.target, request.options, audit_id))[0]
|
inventory = request.inventory or (await _collect_inventory(self, ctx, request.target, request.options, audit_id))[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user