This commit is contained in:
a2a-platform
2026-06-21 16:00:25 +00:00
parent 3415f341d3
commit b39f499de4
3 changed files with 4 additions and 21 deletions

16
.codegraph/.gitignore vendored
View File

@@ -1,16 +0,0 @@
# CodeGraph data files
# These are local to each machine and should not be committed
# Database
*.db
*.db-wal
*.db-shm
# Cache
cache/
# Logs
*.log
# Hook markers
.dirty

View File

@@ -4,7 +4,7 @@ entrypoint: agent:TasksApi
description: API-only service for tracking tasks in Postgres.
runtime:
resources:
cpu: 1000m
cpu: 200m
memory: 512Mi
egress:
allow_hosts:

View File

@@ -31,7 +31,7 @@ OPERATIONS = json.loads("{\n \"create_crm_entity\": {\n \"base_url\": \"http
OPERATION_GROUPS = json.loads("[]")
ROOT_SECURITY = json.loads("[]")
SECURITY_SCHEMES = json.loads("{\n \"apiKeyAuth\": {\n \"description\": \"Use the configured `TASKS_API_KEY` value.\",\n \"in\": \"header\",\n \"name\": \"x-api-key\",\n \"type\": \"apiKey\"\n },\n \"bearerAuth\": {\n \"description\": \"Use `Authorization: Bearer $TASKS_API_KEY`.\",\n \"scheme\": \"bearer\",\n \"type\": \"http\"\n }\n}")
SECURITY_FIELDS = json.loads("{\n \"apiKeyAuth\": {\n \"field\": \"X_API_KEY\",\n \"kind\": \"apiKey\",\n \"location\": \"header\",\n \"name\": \"x-api-key\"\n },\n \"bearerAuth\": {\n \"field\": \"BEARERAUTH_TOKEN\",\n \"kind\": \"http\",\n \"scheme\": \"bearer\"\n }\n}")
SECURITY_FIELDS = json.loads("{\n \"apiKeyAuth\": {\n \"field\": \"TASKS_API_KEY\",\n \"kind\": \"apiKey\",\n \"location\": \"header\",\n \"name\": \"x-api-key\"\n },\n \"bearerAuth\": {\n \"field\": \"TASKS_API_KEY\",\n \"kind\": \"http\",\n \"scheme\": \"bearer\"\n }\n}")
PATH_PARAMETER_RE = re.compile(r"{([^}/]+)}")
SOURCE_ROOT = Path(globals().get("__file__", "agent.py")).resolve().parent
SOURCE_SKILLS_DIR = SOURCE_ROOT / "skills"
@@ -52,8 +52,7 @@ class TasksApi(A2AAgent):
version = "0.1.0"
consumer_setup = ConsumerSetup.from_fields(
ConsumerSetupField.config("OPENAPI_BASE_URL", label="API base URL", description="Override the default API server (https://tasks.a2acloud.io).", required=False, input_type="url"),
ConsumerSetupField.secret("BEARERAUTH_TOKEN", label="bearerAuth bearer credential", description="Use `Authorization: Bearer $TASKS_API_KEY`.", required=True),
ConsumerSetupField.secret("X_API_KEY", label="apiKeyAuth API key", description="Use the configured `TASKS_API_KEY` value.", required=True),
ConsumerSetupField.secret("TASKS_API_KEY", label="bearerAuth bearer credential", description="Use `Authorization: Bearer $TASKS_API_KEY`. Use the configured `TASKS_API_KEY` value.", required=True),
)
llm_provisioning = LLMProvisioning.PLATFORM
pricing = Pricing(
@@ -83,7 +82,7 @@ class TasksApi(A2AAgent):
name="auto",
description="Use the OpenAPI service to complete a natural-language goal.",
tags=("openapi", "auto"),
timeout_seconds=180,
timeout_seconds=900,
)
async def auto(self, ctx: RunContext, goal: str) -> dict[str, Any]:
creds = ctx.llm