deploy
This commit is contained in:
16
.codegraph/.gitignore
vendored
16
.codegraph/.gitignore
vendored
@@ -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
|
|
||||||
2
a2a.yaml
2
a2a.yaml
@@ -4,7 +4,7 @@ entrypoint: agent:TasksApi
|
|||||||
description: API-only service for tracking tasks in Postgres.
|
description: API-only service for tracking tasks in Postgres.
|
||||||
runtime:
|
runtime:
|
||||||
resources:
|
resources:
|
||||||
cpu: 1000m
|
cpu: 200m
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
egress:
|
egress:
|
||||||
allow_hosts:
|
allow_hosts:
|
||||||
|
|||||||
7
agent.py
7
agent.py
@@ -31,7 +31,7 @@ OPERATIONS = json.loads("{\n \"create_crm_entity\": {\n \"base_url\": \"http
|
|||||||
OPERATION_GROUPS = json.loads("[]")
|
OPERATION_GROUPS = json.loads("[]")
|
||||||
ROOT_SECURITY = 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_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"{([^}/]+)}")
|
PATH_PARAMETER_RE = re.compile(r"{([^}/]+)}")
|
||||||
SOURCE_ROOT = Path(globals().get("__file__", "agent.py")).resolve().parent
|
SOURCE_ROOT = Path(globals().get("__file__", "agent.py")).resolve().parent
|
||||||
SOURCE_SKILLS_DIR = SOURCE_ROOT / "skills"
|
SOURCE_SKILLS_DIR = SOURCE_ROOT / "skills"
|
||||||
@@ -52,8 +52,7 @@ class TasksApi(A2AAgent):
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
consumer_setup = ConsumerSetup.from_fields(
|
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.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("TASKS_API_KEY", label="bearerAuth bearer credential", description="Use `Authorization: Bearer $TASKS_API_KEY`. Use the configured `TASKS_API_KEY` value.", required=True),
|
||||||
ConsumerSetupField.secret("X_API_KEY", label="apiKeyAuth API key", description="Use the configured `TASKS_API_KEY` value.", required=True),
|
|
||||||
)
|
)
|
||||||
llm_provisioning = LLMProvisioning.PLATFORM
|
llm_provisioning = LLMProvisioning.PLATFORM
|
||||||
pricing = Pricing(
|
pricing = Pricing(
|
||||||
@@ -83,7 +82,7 @@ class TasksApi(A2AAgent):
|
|||||||
name="auto",
|
name="auto",
|
||||||
description="Use the OpenAPI service to complete a natural-language goal.",
|
description="Use the OpenAPI service to complete a natural-language goal.",
|
||||||
tags=("openapi", "auto"),
|
tags=("openapi", "auto"),
|
||||||
timeout_seconds=180,
|
timeout_seconds=900,
|
||||||
)
|
)
|
||||||
async def auto(self, ctx: RunContext, goal: str) -> dict[str, Any]:
|
async def auto(self, ctx: RunContext, goal: str) -> dict[str, Any]:
|
||||||
creds = ctx.llm
|
creds = ctx.llm
|
||||||
|
|||||||
Reference in New Issue
Block a user