Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Allow paired clients to read visible thread goals

vincent4fbe7f5440c1
diff --git a/server/request-auth.test.ts b/server/request-auth.test.ts
index 2f7bbe4f19..8e9be0f277 100644
--- a/server/request-auth.test.ts
+++ b/server/request-auth.test.ts
@@ -179,7 +179,7 @@ describe("scopes", () => {
["PATCH", "/api/bots/x"], ["PATCH", "/api/bots/x/profile"], ["POST", "/api/attachments"], ["PUT", "/api/bots/order"],
["GET", "/api/attachments/a.png"], ["POST", "/api/routines"], ["POST", "/api/routines/r/run"],
["POST", "/api/routine-runs/seen-all"], ["POST", "/api/inbox/read-all"],
- ["GET", "/api/bots"], ["GET", "/api/threads/t/messages"], ["GET", "/api/search"], ["GET", "/api/events"],
+ ["GET", "/api/bots"], ["GET", "/api/threads/t/messages"], ["GET", "/api/threads/t/goals"], ["GET", "/api/search"], ["GET", "/api/events"],
["GET", "/api/config"], ["GET", "/api/webhooks"], ["POST", "/api/tts/speak"],
["GET", "/api/auth/session"], ["POST", "/api/auth/stream-ticket"], ["POST", "/api/auth/logout"],
["GET", "/api/bots/x/slack-management"], ["GET", "/api/bots/x/library"],
diff --git a/server/request-auth.ts b/server/request-auth.ts
index b74edabee1..dfa39ee053 100644
--- a/server/request-auth.ts
+++ b/server/request-auth.ts
@@ -353,6 +353,7 @@ export const CLIENT_ALLOW: ReadonlyArray<{ methods: readonly string[]; path: Reg
// what a bot made in the conversations this viewer can read, the same rows those conversations' messages show (routes/bot-library.ts)
{ methods: ["GET"], path: /^\/api\/bots\/[\w-]+\/library$/ },
{ methods: ["GET"], path: /^\/api\/search$/ },
+ { methods: ["GET"], path: /^\/api\/threads\/[\w-]+\/goals$/ },
{ methods: ["GET"], path: /^\/api\/threads\/[\w-]+\/messages$/ },
{ methods: ["GET"], path: /^\/api\/threads\/[\w-]+\/messages\/[\w-]+\/image$/ },
{ methods: ["GET"], path: /^\/api\/threads\/[\w-]+\/messages\/[\w-]+\/tool$/ },