Adapter invariant
One signed delegate helper
Every framework should call the same local helper so auth, signing, and response handling stay consistent.
SERVICE_URL = "https://agent.nukez.xyz" async def delegate(task: str, context: dict | None = None) -> dict: body = {"task": task} if context: body["context"] = context result = await signed_post("/v1/delegate", body) while result.get("status") == "signing_needed": signatures = sign_envelopes(result["envelopes"]) result = await signed_post("/v1/delegate", { "signing_request_id": result["signing_request_id"], "signatures": signatures, }) return { "summary": result.get("summary"), "status": result.get("status"), "filename": result.get("filename"), "receipt_id": result.get("receipt_id"), "verified": result.get("verified"), "raw": result, }
Code notes
The framework-specific code should stay thin. Put request signing, /v1/delegate calls, signing_needed completion, and structured result handling in one shared helper, then let each agent framework invoke that helper.
signed_post and sign_envelopes are the local helpers from the signing bridge page.
