Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Revert "chore: experiment"

Lluis Agustieb7e91945057
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/SelectedRunView/SelectedRunView.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/SelectedRunView/SelectedRunView.tsx
index 73b08c99de..52122edf8d 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/SelectedRunView/SelectedRunView.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/SelectedRunView/SelectedRunView.tsx
@@ -12,8 +12,6 @@ import {
} from "@/components/molecules/TabsLine/TabsLine";
import { PendingReviewsList } from "@/components/organisms/PendingReviewsList/PendingReviewsList";
import { usePendingReviewsForExecution } from "@/hooks/usePendingReviews";
-import { ensureSupabaseClient } from "@/lib/supabase/hooks/helpers";
-import { environment } from "@/services/environment";
import { parseAsString, useQueryState } from "nuqs";
import { useEffect } from "react";
import { AgentInputsReadOnly } from "../../modals/AgentInputsReadOnly/AgentInputsReadOnly";
@@ -52,75 +50,6 @@ export function SelectedRunView({
parseAsString.withDefault("output"),
);
- // EXPERIMENTAL: Direct API call bypassing proxy
- useEffect(() => {
- if (!runId || !agent.graph_id) return;
-
- async function makeDirectCall() {
- const supabaseClient = ensureSupabaseClient();
- if (!supabaseClient) {
- console.error("[EXPERIMENTAL] No Supabase client available");
- return;
- }
-
- const {
- data: { session },
- } = await supabaseClient.auth.getSession();
-
- if (!session?.access_token) {
- console.error("[EXPERIMENTAL] No session token available");
- return;
- }
-
- const baseUrl = environment.getAGPTServerApiUrl();
- const url = `${baseUrl}/graphs/${agent.graph_id}/executions/${runId}`;
-
- console.log("[EXPERIMENTAL] Making direct API call to:", url);
- const startTime = performance.now();
-
- try {
- const response = await fetch(url, {
- method: "GET",
- credentials: "include",
- headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${session.access_token}`,
- },
- });
-
- const endTime = performance.now();
- const duration = endTime - startTime;
- console.log(
- `[EXPERIMENTAL] Direct API call completed in ${duration.toFixed(2)}ms`,
- {
- status: response.status,
- statusText: response.statusText,
- duration: `${duration.toFixed(2)}ms`,
- graphId: agent.graph_id,
- runId: runId,
- },
- );
-
- if (response.ok) {
- const data = await response.json();
- console.log("[EXPERIMENTAL] Direct API response:", data);
- } else {
- const errorText = await response.text();
- console.error("[EXPERIMENTAL] Direct API error:", errorText);
- }
- } catch (error) {
- const endTime = performance.now();
- const duration = endTime - startTime;
- console.error(
- `[EXPERIMENTAL] Direct API call failed after ${duration.toFixed(2)}ms:`,
- error,
- );
- }
- }
-
- void makeDirectCall();
- }, [runId, agent.graph_id]);
-
useEffect(() => {
if (run?.status === AgentExecutionStatus.REVIEW && runId) {
refetchReviews();
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/page.tsx b/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
index 71abae6172..c4c3f5ab21 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
@@ -1,7 +1,5 @@
"use client";
-import { ensureSupabaseClient } from "@/lib/supabase/hooks/helpers";
-import { environment } from "@/services/environment";
import { useEffect } from "react";
import FavoritesSection from "./components/FavoritesSection/FavoritesSection";
import LibraryActionHeader from "./components/LibraryActionHeader/LibraryActionHeader";
@@ -13,71 +11,6 @@ export default function LibraryPage() {
document.title = "Library – AutoGPT Platform";
}, []);
- // EXPERIMENTAL: Direct API call bypassing proxy
- useEffect(() => {
- async function makeDirectCall() {
- const supabaseClient = ensureSupabaseClient();
- if (!supabaseClient) {
- console.error("[EXPERIMENTAL] No Supabase client available");
- return;
- }
-
- const {
- data: { session },
- } = await supabaseClient.auth.getSession();
-
- if (!session?.access_token) {
- console.error("[EXPERIMENTAL] No session token available");
- return;
- }
-
- const baseUrl = environment.getAGPTServerApiUrl();
- const url = `${baseUrl}/library/agents?page=1&page_size=8`;
-
- console.log("[EXPERIMENTAL] Making direct API call to:", url);
- const startTime = performance.now();
-
- try {
- const response = await fetch(url, {
- method: "GET",
- credentials: "include",
- headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${session.access_token}`,
- },
- });
-
- const endTime = performance.now();
- const duration = endTime - startTime;
- console.log(
- `[EXPERIMENTAL] Direct API call completed in ${duration.toFixed(2)}ms`,
- {
- status: response.status,
- statusText: response.statusText,
- duration: `${duration.toFixed(2)}ms`,
- },
- );
-
- if (response.ok) {
- const data = await response.json();
- console.log("[EXPERIMENTAL] Direct API response:", data);
- } else {
- const errorText = await response.text();
- console.error("[EXPERIMENTAL] Direct API error:", errorText);
- }
- } catch (error) {
- const endTime = performance.now();
- const duration = endTime - startTime;
- console.error(
- `[EXPERIMENTAL] Direct API call failed after ${duration.toFixed(2)}ms:`,
- error,
- );
- }
- }
-
- void makeDirectCall();
- }, []);
-
return (
<main className="pt-160 container min-h-screen space-y-4 pb-20 pt-16 sm:px-8 md:px-12">
<LibraryPageStateProvider>
diff --git a/autogpt_platform/frontend/src/app/api/openapi.json b/autogpt_platform/frontend/src/app/api/openapi.json
index bd0b38ee16..aa37cee8b5 100644
--- a/autogpt_platform/frontend/src/app/api/openapi.json
+++ b/autogpt_platform/frontend/src/app/api/openapi.json
@@ -5291,7 +5291,14 @@
},
"APIKeyPermission": {
"type": "string",
- "enum": ["EXECUTE_GRAPH", "READ_GRAPH", "EXECUTE_BLOCK", "READ_BLOCK"],
+ "enum": [
+ "EXECUTE_GRAPH",
+ "READ_GRAPH",
+ "EXECUTE_BLOCK",
+ "READ_BLOCK",
+ "READ_STORE",
+ "USE_TOOLS"
+ ],
"title": "APIKeyPermission"
},
"APIKeyStatus": {
diff --git a/autogpt_platform/frontend/src/lib/supabase/helpers.ts b/autogpt_platform/frontend/src/lib/supabase/helpers.ts
index 21e5ca8493..7b2d36a0fd 100644
--- a/autogpt_platform/frontend/src/lib/supabase/helpers.ts
+++ b/autogpt_platform/frontend/src/lib/supabase/helpers.ts
@@ -18,7 +18,7 @@ export function getCookieSettings(): Partial<CookieOptions> {
return {
secure: process.env.NODE_ENV === "production",
sameSite: "lax",
- httpOnly: false,
+ httpOnly: true,
} as const;
}