a2a-source-edit: write agent.py
This commit is contained in:
4
agent.py
4
agent.py
@@ -576,7 +576,7 @@ class CustomerIntegrationEngineer(A2AAgent[CustomerIntegrationEngineerConfig, No
|
|||||||
)
|
)
|
||||||
|
|
||||||
@a2a.tool(description="Validate OpenAPI, JSON Schema, and webhook contracts with deterministic fixtures", input_schema=_VALIDATE_INPUT_SCHEMA, timeout_seconds=120, idempotent=True, max_retries=0, cost_class="deterministic", grant_outputs_prefix="outputs", grant_write_prefixes=("outputs/integrations",))
|
@a2a.tool(description="Validate OpenAPI, JSON Schema, and webhook contracts with deterministic fixtures", input_schema=_VALIDATE_INPUT_SCHEMA, timeout_seconds=120, idempotent=True, max_retries=0, cost_class="deterministic", grant_outputs_prefix="outputs", grant_write_prefixes=("outputs/integrations",))
|
||||||
async def validate_contract(self, ctx: RunContext[NoAuth], request: ValidateContractRequest) -> dict[str, Any]:
|
async def validate_contract(self, ctx: RunContext[NoAuth], request: ValidateContractRequest) -> ValidateContractResult:
|
||||||
dry_run = _effective_dry_run(self, request.dry_run)
|
dry_run = _effective_dry_run(self, request.dry_run)
|
||||||
audit = [_audit("contract_validation_started", request.integration_id, {"contracts": len(request.contracts), "dry_run": dry_run})]
|
audit = [_audit("contract_validation_started", request.integration_id, {"contracts": len(request.contracts), "dry_run": dry_run})]
|
||||||
await _emit(ctx, audit[-1])
|
await _emit(ctx, audit[-1])
|
||||||
@@ -608,7 +608,7 @@ class CustomerIntegrationEngineer(A2AAgent[CustomerIntegrationEngineerConfig, No
|
|||||||
)
|
)
|
||||||
|
|
||||||
@a2a.tool(description="Run dry-run or allowlisted acceptance checks using endpoint metadata and secret references", input_schema=_ACCEPTANCE_INPUT_SCHEMA, timeout_seconds=180, idempotent=True, max_retries=0, cost_class="deterministic", grant_outputs_prefix="outputs", grant_write_prefixes=("outputs/integrations",))
|
@a2a.tool(description="Run dry-run or allowlisted acceptance checks using endpoint metadata and secret references", input_schema=_ACCEPTANCE_INPUT_SCHEMA, timeout_seconds=180, idempotent=True, max_retries=0, cost_class="deterministic", grant_outputs_prefix="outputs", grant_write_prefixes=("outputs/integrations",))
|
||||||
async def run_acceptance(self, ctx: RunContext[NoAuth], request: RunAcceptanceRequest) -> RunAcceptanceResult:
|
async def run_acceptance(self, ctx: RunContext[NoAuth], request: RunAcceptanceRequest) -> dict[str, Any]:
|
||||||
dry_run = _effective_dry_run(self, request.dry_run)
|
dry_run = _effective_dry_run(self, request.dry_run)
|
||||||
live_network_block = _live_network_unavailable_reason(self)
|
live_network_block = _live_network_unavailable_reason(self)
|
||||||
audit = [_audit("acceptance_started", request.integration_id, {"endpoint_tests": len(request.endpoint_tests), "dry_run": dry_run, "allow_network": request.allow_network})]
|
audit = [_audit("acceptance_started", request.integration_id, {"endpoint_tests": len(request.endpoint_tests), "dry_run": dry_run, "allow_network": request.allow_network})]
|
||||||
|
|||||||
Reference in New Issue
Block a user