Build coffee history and experiment workflows with Ask Bean Bro
Test and deploy / test-and-deploy (push) Successful in 1m21s
Test and deploy / test-and-deploy (push) Successful in 1m21s
This commit is contained in:
1 parent
1fd53091ac
commit
8c21750356
28 files changed
+3848
-384
No files matched your search
+6
-1
@@ -90,6 +90,11 @@ export function buildOpenApiSpec({ origin = "" } = {}) {
|
||||
},
|
||||
"/api/tokens/{id}": { delete: { tags: ["tokens"], summary: "Revoke an API token", parameters: [{ ...idParam, schema: str }], responses: { 200: ok("Revoked"), 404: err("Not found") } } },
|
||||
|
||||
"/api/workspace": {get:{tags:["roast plans"],summary:"Your coffee histories, tasting feedback, experiments and next actions",responses:{200:ok("Workspace")}}},
|
||||
"/api/plans/{id}/revisions": {get:{tags:["roast plans"],summary:"List your latest 50 plan revisions",parameters:[idParam],responses:{200:ok("Revisions"),404:err("Not found")}}},
|
||||
"/api/plans/{id}/restore": {post:{tags:["roast plans"],summary:"Restore planning inputs while retaining current recorded consumption and conversation",parameters:[idParam],requestBody:jsonBody(obj({revisionId:str},["revisionId"])),responses:{200:ok("Restored"),404:err("Not found")}}},
|
||||
"/api/roasts/manual": {post:{tags:["actual roasts"],summary:"Finish a saved roast-day record; repeated requests return the same roast",requestBody:jsonBody(obj({planId:str},["planId"])),responses:{201:ok("Finished roast"),400:err("Missing or invalid milestones"),404:err("Not found")}}},
|
||||
"/api/admin/llm/test": {post:{tags:["admin"],summary:"Test the configured Bean Bro provider with a short model request",responses:{200:ok("Connected"),503:err("Connection failed")}}},
|
||||
// ── Roast plans ──
|
||||
"/api/plans": {
|
||||
get: { tags: ["roast plans"], summary: "List your roast plans; view=summary returns paginated lightweight rows", parameters: ["view","q","process","level","sort","page","limit"].map(name=>({name,in:"query",schema:{type:"string"}})), responses: { 200: ok("Plans", obj({ ok: bool, plans: arr({ type: "object" }) })) } },
|
||||
@@ -166,7 +171,7 @@ export function buildOpenApiSpec({ origin = "" } = {}) {
|
||||
},
|
||||
|
||||
// ── LLM helpers ──
|
||||
"/api/plan-chat": { post: { tags: ["llm"], summary: "Chat with the LLM about a roast plan (stateless; send the full visible conversation)", requestBody: jsonBody(obj({ plan: { type: "object" }, messages: arr(obj({ role: { ...str, enum: ["user", "assistant"] }, content: str }, ["role", "content"])) }, ["plan", "messages"])), responses: { 200: ok("Reply", obj({ ok: bool, reply: str })), 400: err("Bad plan/messages"), 503: err("No LLM model configured") } } },
|
||||
"/api/plan-chat": { post: { tags: ["llm"], summary: "Ask Bean Bro about a plan, grounded in your matching coffee history; returns reviewable suggestions", requestBody: jsonBody(obj({ plan: { type: "object" }, messages: arr(obj({ role: { ...str, enum: ["user", "assistant"] }, content: str }, ["role", "content"])) }, ["plan", "messages"])), responses: { 200: ok("Reply", obj({ ok: bool, reply: str })), 400: err("Bad plan/messages"), 503: err("No LLM model configured") } } },
|
||||
"/api/roaster-profile": { get: { tags: ["llm"], summary: "Learned behavior for a machine (?roaster=id; default roaster otherwise), with user overrides applied", parameters: [{ name: "roaster", in: "query", schema: { type: "string", format: "uuid" } }], responses: { 200: ok("Profile", obj({ ok: bool, profile: { type: "object" } })) } } },
|
||||
"/api/roasters": {
|
||||
get: { tags: ["roasters"], summary: "List your roasting machines", responses: { 200: ok("Roasters") } },
|
||||
|
||||
Reference in new issue
Block a user