انتقل إلى المحتوى
#0548
AgentExec

The agent's script is validated before it's an endpoint

Your customers' agents write exec scripts: a webhook handler, a report generator. Published, each one is a live URL. A broken script published to a live URL is a broken product.

So the agent runs POST /api/v1/exec/validate/script first. The body is the code. The response is a 200 payload that says whether it parses, whether the TypeScript transpiles, whether the dependencies it imports are present, whether the magic comments are well formed, whether the return type matches. Failures come back as structured data, so the agent reads them, patches the script, and validates again. Only a clean result gets written to the scripts folder.

No test harness, no staging deploy, no "let me just curl it and see." The runtime told the agent what would break before anything could.

The compiler's opinion arrives before the URL does.