From aa69c14e0bdffad02f8ac691e985ad0124bad54b Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 6 Oct 2026 11:10:08 -0500 Subject: [PATCH] docs: include public agent identity in OpenAPI Co-Authored-By: Paperclip --- server/src/routes/openapi.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/server/src/routes/openapi.ts b/server/src/routes/openapi.ts index 4f67d2cc1fd..82a2ff97667 100644 --- a/server/src/routes/openapi.ts +++ b/server/src/routes/openapi.ts @@ -3454,6 +3454,25 @@ registry.registerPath({ responses: { 200: r.ok(), 401: r.unauthorized, 404: r.notFound }, }); +registry.registerPath({ + method: "get", + path: "/api/agents/{id}/identity", + tags: ["agents"], + summary: "Get an agent's public cryptographic identity, or null before provisioning", + request: { params: z.object({ id: z.string() }) }, + responses: { + 200: r.ok(z.object({ + algorithm: z.literal("Ed25519"), + keyId: z.string(), + publicKeyPem: z.string(), + createdAt: z.string().datetime(), + }).nullable()), + 401: r.unauthorized, + 403: r.forbidden, + 404: r.notFound, + }, +}); + registry.registerPath({ method: "patch", path: "/api/agents/{id}",