From 6457d1425731dca38f0c52fcc7c47294d5edf223 Mon Sep 17 00:00:00 2001 From: a2a-cloud Date: Mon, 13 Jul 2026 03:09:29 +0000 Subject: [PATCH] a2a-source-edit: write agent.py --- agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent.py b/agent.py index cf583c4..8663a8d 100644 --- a/agent.py +++ b/agent.py @@ -332,7 +332,7 @@ class AgentComplianceAuditor(A2AAgent[AgentComplianceAuditorConfig, NoAuth]): ) @a2a.tool(description="Inventory a deployed A2A agent card, repository evidence, manifests, exposure, provenance, resources, and health", timeout_seconds=180, idempotent=True, cost_class="read-only", input_schema=_tool_schema("inventory")) - async def inventory_agent(self, ctx: RunContext[NoAuth], request: InventoryRequest) -> InventoryResult: + async def inventory_agent(self, ctx: RunContext[NoAuth], request: InventoryRequest) -> dict[str, Any]: audit_id = _audit_id(request.target, request.options.audit_id) await _event(ctx, "audit_started", audit_id=audit_id, skill="inventory_agent", target=request.target.agent_name) inventory, evidence, warnings, status = await _collect_inventory(self, ctx, request.target, request.options, audit_id) @@ -354,7 +354,7 @@ class AgentComplianceAuditor(A2AAgent[AgentComplianceAuditorConfig, NoAuth]): return FindingResult(audit_id=audit_id, target=request.target, status="ok", output_dir=output_dir, generated_files=files, findings=findings, evidence=evidence, warnings=warnings) @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) -> dict[str, Any]: + async def audit_runtime(self, ctx: RunContext[NoAuth], request: AuditRuntimeRequest) -> FindingResult: 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) inventory = request.inventory or (await _collect_inventory(self, ctx, request.target, request.options, audit_id))[0]