fix: harden generated agent platform access
All checks were successful
build / build (push) Successful in 21s

This commit is contained in:
robert
2026-05-25 23:30:49 -03:00
parent e95a8001c0
commit a20cd5ae3b
7 changed files with 208 additions and 125 deletions

View File

@@ -21,6 +21,12 @@ Use `A2AAgent` class attributes for runtime and marketplace behavior:
- `wants_cp_jwt=True` is only for trusted platform agents. It forwards the
caller's control-plane token.
For generated/user-owned agents that call an LLM, default to
`LLMProvisioning.CALLER_PROVIDED` with `Pricing(..., caller_pays_llm=True, ...)`.
Use `LLMProvisioning.PLATFORM` only when the user explicitly wants
platform-paid LLM usage. In either mode, read `ctx.llm`; never read
`A2A_LITELLM_KEY`, provider keys, or platform secrets directly.
Keep each `@skill` method `async`, put `RunContext[...]` immediately after
`self`, and annotate every public argument. Do not use `*args` or `**kwargs`;
they are rejected and would not publish a useful schema.