mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
Document built-in agent OpenAPI routes
This commit is contained in:
1 parent
248a8d2e2d
commit
41ebe3579c
2 files changed
+46
No files matched your search
@@ -19,6 +19,7 @@ const apiPrefixes: Record<string, string> = {
|
||||
"assets.ts": "/api",
|
||||
"auth.ts": "/api/auth",
|
||||
"board-chat.ts": "/api",
|
||||
"built-in-agents.ts": "/api",
|
||||
"cloud-upstreams.ts": "/api",
|
||||
"companies.ts": "/api/companies",
|
||||
"company-skills.ts": "/api",
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
updateAgentInstructionsBundleSchema,
|
||||
upsertAgentInstructionsFileSchema,
|
||||
createAgentKeySchema,
|
||||
builtInAgentProvisionSchema,
|
||||
wakeAgentSchema,
|
||||
resetAgentSessionSchema,
|
||||
agentSkillSyncSchema,
|
||||
@@ -1144,6 +1145,50 @@ for (const route of [
|
||||
|
||||
// ─── Agents ──────────────────────────────────────────────────────────────────
|
||||
|
||||
registry.registerPath({
|
||||
method: "get",
|
||||
path: "/api/companies/{companyId}/built-in-agents",
|
||||
tags: ["agents"],
|
||||
summary: "List built-in agent provisioning state",
|
||||
request: { params: z.object({ companyId: z.string() }) },
|
||||
responses: { 200: r.ok(), 401: r.unauthorized, 403: r.forbidden, 404: r.notFound },
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: "post",
|
||||
path: "/api/companies/{companyId}/built-in-agents/{key}/provision",
|
||||
tags: ["agents"],
|
||||
summary: "Provision a built-in agent",
|
||||
request: {
|
||||
params: z.object({ companyId: z.string(), key: z.string() }),
|
||||
body: jsonBody(builtInAgentProvisionSchema),
|
||||
},
|
||||
responses: {
|
||||
200: r.ok(),
|
||||
202: r.ok(),
|
||||
400: r.badRequest,
|
||||
401: r.unauthorized,
|
||||
403: r.forbidden,
|
||||
404: r.notFound,
|
||||
409: r.conflict,
|
||||
},
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: "post",
|
||||
path: "/api/companies/{companyId}/built-in-agents/{key}/reset",
|
||||
tags: ["agents"],
|
||||
summary: "Reset a built-in agent",
|
||||
request: { params: z.object({ companyId: z.string(), key: z.string() }) },
|
||||
responses: {
|
||||
200: r.ok(),
|
||||
401: r.unauthorized,
|
||||
403: r.forbidden,
|
||||
404: r.notFound,
|
||||
409: r.conflict,
|
||||
},
|
||||
});
|
||||
|
||||
registry.registerPath({
|
||||
method: "get",
|
||||
path: "/api/companies/{companyId}/agents",
|
||||
|
||||
Reference in new issue
Block a user