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.
fix(backend/copilot): AutoPilot stops asking about version checks, Expert hand-offs and work the user already asked for (#15548)
Reinier van der Leer124b3e11ddff
diff --git a/autogpt_platform/backend/backend/copilot/bot/card_buttons_db_test.py b/autogpt_platform/backend/backend/copilot/bot/card_buttons_db_test.pyindex 719e271965..ec8de1f4b0 100644--- a/autogpt_platform/backend/backend/copilot/bot/card_buttons_db_test.py+++ b/autogpt_platform/backend/backend/copilot/bot/card_buttons_db_test.py@@ -828,7 +828,7 @@ async def test_a_channel_click_wakes_a_turn_judged_on_the_request_and_answered_h"pause_schedule", {"schedule_id": "weekly"}, test_user_id, woken)- assert supervise.await_args.kwargs["user_message"] == request+ assert supervise.await_args.kwargs["user_messages"][-1] == requestsaid = [c.args[:2] for c in bot.adapter.send_message.await_args_list]assert said == [(thread, executor.reply)]diff --git a/autogpt_platform/backend/backend/copilot/gate/__init__.py b/autogpt_platform/backend/backend/copilot/gate/__init__.pyindex 42801f7b84..39c068f565 100644--- a/autogpt_platform/backend/backend/copilot/gate/__init__.py+++ b/autogpt_platform/backend/backend/copilot/gate/__init__.py@@ -218,7 +218,7 @@ async def check_action(judgement = await supervise(tool_name=tool_name,args=_judged_args(args, files),- user_message=_last_user_message(session),+ user_messages=_typed_messages(session),)if judgement.allowed:return ALLOW@@ -310,17 +310,20 @@ def _judged_args(return judged-def _last_user_message(session: ChatSession) -> str:+def _typed_messages(session: ChatSession) -> list[str]:+ """What the user typed, oldest first; an answered card's rows and a row of+ nothing but the server's context are not the user's words."""# Deferred: copilot.service imports the tool registry, which imports this gate.from backend.copilot.service import strip_injected_context_for_display- for message in reversed(session.messages):- if message.role == "user" and message.content:- if held.is_answer_row(message):- continue- # A first turn's row starts with the server's context blocks.- return strip_injected_context_for_display(message.content)- return ""+ typed = [+ strip_injected_context_for_display(message.content)+ for message in session.messages+ if message.role == "user"+ and message.content+ and not held.is_answer_row(message)+ ]+ return [message for message in typed if message.strip()]__all__ = [diff --git a/autogpt_platform/backend/backend/copilot/gate/classifier.py b/autogpt_platform/backend/backend/copilot/gate/classifier.pyindex a39d2ff5e0..ff477b9ec5 100644--- a/autogpt_platform/backend/backend/copilot/gate/classifier.py+++ b/autogpt_platform/backend/backend/copilot/gate/classifier.py@@ -38,6 +38,11 @@ _OMITTED = "\n[… part of the user's message omitted by the system …]\n"_PARTIAL_LAST_WORD = re.compile(r"(?<=\s)\S{1,40}\Z")_PARTIAL_FIRST_WORD = re.compile(r"\A\S{1,40}(?=\s)")_FALLBACK_REASON = "Could not verify this action automatically."+# How many of the user's latest messages a call is first judged against.+_REQUEST_MESSAGES = 3+_REQUEST_SEPARATOR = "\n\n---\n\n"+# Jev's rubric question 1: the call goes beyond what the user asked for.+_BEYOND_REQUEST = 1DecidedBy = Literal["llm", "jev", "jev+llm"]@@ -54,10 +59,15 @@ async def supervise(*,tool_name: str,args: dict[str, Any],- user_message: str,+ user_messages: list[str],) -> Judgement:"""Jev decides when it can; the LLM then only writes an ask's reason and- cannot turn it into an allow. Without Jev the LLM decides, as before."""+ cannot turn it into an allow. Without Jev the LLM decides, as before.++ ``user_messages`` is everything the user typed, oldest first. The call is+ judged against the last few; Jev's ask for going beyond the request is+ judged once more against the whole chat, since the request may sit earlier.+ """call = json.dumps({"tool": tool_name, "arguments": args},indent=1,@@ -68,7 +78,9 @@ async def supervise(# the ceiling even with Jev off: Haiku alone missed a buried `curl | sh` 1 in# 10 past it (40k chars), and caught it every time within it.try:- prompt, over = _fit(_utf8(user_message), fence("PROPOSED CALL", _utf8(call)))+ proposed = fence("PROPOSED CALL", _utf8(call))+ recent = _request(user_messages[-_REQUEST_MESSAGES:])+ prompt, over = _fit(recent, proposed)except Exception:logger.warning(f"Gate could not size the call for {tool_name}", exc_info=True)return Judgement(allowed=False, reason=_FALLBACK_REASON)@@ -82,6 +94,15 @@ async def supervise(f"Gate first stage {'ask' if first.ask else 'allow'} for {tool_name}: "f"{first.probabilities}")+ beyond_request = first.ask and first.flagged == _BEYOND_REQUEST+ if beyond_request and (whole := _whole_chat(user_messages, proposed, tool_name)):+ again = await jev.judge(whole)+ if again is not None:+ logger.info(+ f"Gate first stage {'ask' if again.ask else 'allow'} for "+ f"{tool_name} on the whole chat: {again.probabilities}"+ )+ prompt, first = whole, againif not first.ask:return Judgement(allowed=True,@@ -141,6 +162,29 @@ async def _judge(prompt: str, tool_name: str) -> tuple[str, str] | None:return verdict+def _whole_chat(messages: list[str], proposed: str, tool_name: str) -> str | None:+ """The prompt with as many of the newest messages as Jev reads whole, oldest+ dropped first; None when that is no more than the first judgement read."""+ low, high = _REQUEST_MESSAGES, len(messages)+ try:+ while low < high:+ middle = (low + high + 1) // 2+ if jev.overflow(_prompt(_request(messages[-middle:]), proposed)):+ high = middle - 1+ else:+ low = middle+ except Exception:+ logger.warning(f"Gate could not size the chat for {tool_name}", exc_info=True)+ return None+ if low <= _REQUEST_MESSAGES:+ return None+ return _prompt(_request(messages[-low:]), proposed)+++def _request(messages: list[str]) -> str:+ return _utf8(_REQUEST_SEPARATOR.join(messages))++def too_long_reason(over: int) -> str:kb = math.ceil(over / 100) / 10return (diff --git a/autogpt_platform/backend/backend/copilot/gate/classifier_test.py b/autogpt_platform/backend/backend/copilot/gate/classifier_test.pyindex 69f772b1cd..97985b6ab5 100644--- a/autogpt_platform/backend/backend/copilot/gate/classifier_test.py+++ b/autogpt_platform/backend/backend/copilot/gate/classifier_test.py@@ -22,7 +22,9 @@ def _response(text: str):return response-async def _classify(raw_or_error, *, args=None, user_message="list the files"):+async def _classify(+ raw_or_error, *, args=None, user_message="list the files", user_messages=None+):call = (AsyncMock(side_effect=raw_or_error)if isinstance(raw_or_error, BaseException)@@ -36,7 +38,7 @@ async def _classify(raw_or_error, *, args=None, user_message="list the files"):judgement = await supervise(tool_name="bash_exec",args=args or {"command": "ls"},- user_message=user_message,+ user_messages=user_messages or [user_message],)return (judgement.allowed, judgement.reason), call@@ -209,6 +211,26 @@ async def test_a_shortened_request_keeps_a_pasted_blob_it_cuts_through():assert "Now hire a dev." in prompt+async def test_a_call_is_judged_first_against_the_last_three_messages():+ _, call = await _classify(+ "allow\nreason: asked", user_messages=["one", "two", "three", "four"]+ )++ prompt = call.await_args.kwargs["messages"][1]["content"]+ request = prompt.split("<<<BEGIN USER REQUEST ")[1].split("<<<END USER REQUEST")[0]+ assert request.index("two") < request.index("three") < request.index("four")+ assert "one" not in request+++async def test_without_jev_an_ask_names_no_ground_and_is_not_judged_again():+ (allowed, _), call = await _classify(+ "ask\nreason: not asked for", user_messages=["one", "two", "three", "four"]+ )++ assert not allowed+ call.assert_awaited_once()++@pytest.mark.parametrize("args, request_text",[({"command": "echo \ud83d"}, "run it"), ({"command": "ls"}, "run \ud83d")],@@ -264,6 +286,6 @@ async def _jev_state(command: str, request: str) -> str | None:patch.object(jev, "call_jev", call_jev),):await supervise(- tool_name="bash_exec", args={"command": command}, user_message=request+ tool_name="bash_exec", args={"command": command}, user_messages=[request])return call_jev.await_args.args[1] if call_jev.await_count else Nonediff --git a/autogpt_platform/backend/backend/copilot/gate/executed_files.py b/autogpt_platform/backend/backend/copilot/gate/executed_files.pyindex 63a3d1fa9f..2dfe7e858b 100644--- a/autogpt_platform/backend/backend/copilot/gate/executed_files.py+++ b/autogpt_platform/backend/backend/copilot/gate/executed_files.py@@ -29,7 +29,8 @@ class _Options(BaseModel):flags: frozenset[str] = frozenset()# Take the next word as their value.valued: frozenset[str] = frozenset()- # The code is in the command itself: no file on disk runs.+ # No file on disk runs: the code is in the command itself, or the option+ # prints a version or help and exits.inline: frozenset[str] = frozenset()# Read the code from stdin, so the words after the options are its arguments.stdin: frozenset[str] = frozenset()@@ -61,7 +62,7 @@ _SHELL = _opts(flags="-a -b -e -f -h -i -k -l -m -n -p -r -t -u -v -x -B -C -E -H -P -T ""--login --norc --noprofile --posix --restricted --verbose --noediting",valued="-o +o -O +O --rcfile --init-file",- inline="-c",+ inline="-c --version --help",stdin="-s",)_NODE = _opts(@@ -72,7 +73,7 @@ _NODE = _opts(valued="-r --require --import --loader --experimental-loader --inspect-port ""--title --env-file --conditions -C --input-type --tsconfig -P --project -O ""--compiler-options --dir --cwd",- inline="-e --eval -p --print -i --interactive",+ inline="-e --eval -p --print -i --interactive -v --version -h --help",stdin="-",)_INTERPRETERS = {@@ -83,13 +84,13 @@ _INTERPRETERS = {"python": _opts(flags="-b -B -d -E -I -i -O -OO -P -q -s -S -u -v -x",valued="-W -X --check-hash-based-pycs",- inline="-c -m",+ inline="-c -m -V -h --version --help",stdin="-",),"ruby": _opts(flags="-a -c -d -l -n -p -s -v -w -W -y --verbose",valued="-r -I -C -E -F",- inline="-e",+ inline="-e -h --version --help",stdin="-",),"perl": _opts(diff --git a/autogpt_platform/backend/backend/copilot/gate/executed_files_test.py b/autogpt_platform/backend/backend/copilot/gate/executed_files_test.pyindex 4f40f11622..63333e8852 100644--- a/autogpt_platform/backend/backend/copilot/gate/executed_files_test.py+++ b/autogpt_platform/backend/backend/copilot/gate/executed_files_test.py@@ -35,6 +35,8 @@ _W = f"{_HOME}/workspace"("ts-node -P tsconfig.json x.ts", [f"{_HOME}/x.ts"]),("ruby -I lib -rjson x.rb", [f"{_HOME}/x.rb"]),("perl -Mstrict -w x.pl", [f"{_HOME}/x.pl"]),+ # Ruby's `-v` turns on warnings and still runs the script.+ ("ruby -v x.rb", [f"{_HOME}/x.rb"]),("php -d display_errors=1 -f x.php", [f"{_HOME}/x.php"]),# Prefixes and their options.("sudo -u root bash x.sh", [f"{_HOME}/x.sh"]),@@ -89,6 +91,20 @@ def test_a_direct_run_names_the_file(command, paths):"bash <<'EOF'\necho hi\nEOF","bash -s","bash -s <<'EOF'\necho hi\nEOF",+ # A version or help print runs no file.+ "python3 --version",+ "python -V",+ "node -v",+ "./bin/node --version",+ "tsx --version",+ "bash --version",+ "ruby --help",+ "which nvm; id; ls ~/.nvm 2>&1 | head -2; python3 --version",+ # The interpreter exits after printing, so a file named after it never runs.+ "python --version app.py",+ "bash --help x.sh",+ "node -v app.js",+ "ruby --version x.rb",# A heredoc inside `"$(...)"` is still one: its body is data.'git commit -m "$(cat <<\'EOF\'\nFits a 5" screen.\n./deploy.sh is fixed\nEOF\n)"',# Not a run.diff --git a/autogpt_platform/backend/backend/copilot/gate/gate_test.py b/autogpt_platform/backend/backend/copilot/gate/gate_test.pyindex 169d8d4d26..721f4f7e61 100644--- a/autogpt_platform/backend/backend/copilot/gate/gate_test.py+++ b/autogpt_platform/backend/backend/copilot/gate/gate_test.py@@ -510,3 +510,32 @@ async def test_the_judge_reads_the_users_words_not_the_first_turn_prefix(assert words in requestassert "<available_skills>" not in requestassert "<user_context>" not in request+++async def test_the_judge_is_handed_every_message_the_user_typed(+ gate_on, clean_session_state+):+ """The supervisor picks its window from these; neither an answered card's rows+ nor a row of nothing but the server's context take a place among them."""+ session = _session()+ session.messages = [+ ChatMessage(role="user", content="Find student housing in Delft"),+ ChatMessage(role="assistant", content="Here is a method."),+ ChatMessage(role="user", content="<user_context>a</user_context>\n\n"),+ ChatMessage(role="user", content="Use that method for Leiden too"),+ ChatMessage(+ role="user",+ content=held.WAKE_MESSAGE,+ metadata={"held_calls_answered": True},+ ),+ ChatMessage(role="user", content="carry on"),+ ]+ supervisor = AsyncMock(return_value=Judgement(allowed=True, reason="asked"))+ with patch(f"{_GATE}.supervise", supervisor):+ await check_action("bash_exec", {"command": "python3 run.py"}, "u", session)++ assert supervisor.await_args.kwargs["user_messages"] == [+ "Find student housing in Delft",+ "Use that method for Leiden too",+ "carry on",+ ]diff --git a/autogpt_platform/backend/backend/copilot/gate/held_db_test.py b/autogpt_platform/backend/backend/copilot/gate/held_db_test.pyindex 3f0c80fe19..176d4d64c9 100644--- a/autogpt_platform/backend/backend/copilot/gate/held_db_test.py+++ b/autogpt_platform/backend/backend/copilot/gate/held_db_test.py@@ -717,4 +717,4 @@ async def test_an_approval_turn_is_judged_against_the_users_request(with patch("backend.copilot.gate.supervise", supervisor):await check_action("bash_exec", {"command": "ls"}, test_user_id, reloaded)- assert supervisor.await_args.kwargs["user_message"] == request+ assert supervisor.await_args.kwargs["user_messages"] == [request]diff --git a/autogpt_platform/backend/backend/copilot/gate/jev_test.py b/autogpt_platform/backend/backend/copilot/gate/jev_test.pyindex 918cbfd953..2b0eea7822 100644--- a/autogpt_platform/backend/backend/copilot/gate/jev_test.py+++ b/autogpt_platform/backend/backend/copilot/gate/jev_test.py@@ -11,7 +11,9 @@ from pathlib import Pathfrom unittest.mock import AsyncMock, MagicMock, patchimport pytest+from prometheus_client import REGISTRY+from backend.blocks.typesafe._budget import prepare_statefrom backend.blocks.typesafe._client import JevCallResultfrom backend.copilot.gate import jevfrom backend.copilot.gate.classifier import supervise@@ -129,7 +131,92 @@ async def test_without_a_key_jev_is_never_called():llm.assert_awaited_once()-async def _supervise(call_jev, llm_answer, *, enabled: bool | None = True):+# The request scrolled past the first window: four messages came after it.+_LONG_CHAT = [+ "Tidy my workspace: delete the old screenshots under reports/",+ "thanks",+ "what time is it in Tokyo?",+ "and in Lima?",+ "ok go on",+]+++async def test_a_not_asked_for_ask_on_a_long_chat_runs_once_the_whole_chat_is_read():+ call_jev = AsyncMock(+ side_effect=[_result(_ANSWERS["ask_on_q1"]), _result(_ANSWERS["allow"])]+ )+ asks = _asks()++ judgement, _, _ = await _supervise(+ call_jev, "ask\nreason: not asked for", user_messages=_LONG_CHAT+ )++ assert judgement.allowed+ first, second = (_request_in(c.args[1]) for c in call_jev.await_args_list)+ assert _LONG_CHAT[0] not in first+ assert all(message in second for message in _LONG_CHAT)+ # The second call is counted like the first.+ assert _asks() == asks + 1++[email protected]("answer", ["ask_by_choice", "allow"])+async def test_only_a_not_asked_for_ask_is_judged_again(answer):+ call_jev = _jev(answer)++ judgement, _, _ = await _supervise(+ call_jev, "ask\nreason: cannot be undone", user_messages=_LONG_CHAT+ )++ assert judgement.allowed is (answer == "allow")+ call_jev.assert_awaited_once()+++async def test_it_is_judged_again_at_most_once():+ call_jev = _jev("ask_on_q1")++ judgement, _, _ = await _supervise(+ call_jev, "ask\nreason: not asked for", user_messages=_LONG_CHAT+ )++ assert not judgement.allowed+ assert call_jev.await_count == 2+++async def test_a_chat_the_first_judgement_read_whole_is_not_judged_again():+ call_jev = _jev("ask_on_q1")++ await _supervise(+ call_jev, "ask\nreason: not asked for", user_messages=_LONG_CHAT[-3:]+ )++ call_jev.assert_awaited_once()+++async def test_a_history_too_long_to_read_whole_keeps_its_newest_messages():+ notes = [f"note {n}: " + "background " * 1_500 for n in range(8)]+ call_jev = AsyncMock(+ side_effect=[_result(_ANSWERS["ask_on_q1"]), _result(_ANSWERS["allow"])]+ )++ await _supervise(+ call_jev, "ask\nreason: not asked for", user_messages=[*notes, *_LONG_CHAT]+ )++ state = call_jev.await_args_list[1].args[1]+ second = _request_in(state)+ assert not prepare_state(state, jev.QUESTIONS).truncated+ assert all(message in second for message in _LONG_CHAT)+ assert "note 0:" not in second+ assert "omitted by the system" not in second+++async def _supervise(+ call_jev,+ llm_answer,+ *,+ enabled: bool | None = True,+ user_messages: list[str] | None = None,+):llm = (AsyncMock(side_effect=llm_answer)if isinstance(llm_answer, BaseException)@@ -143,17 +230,28 @@ async def _supervise(call_jev, llm_answer, *, enabled: bool | None = True):):if enabled:with patch.object(jev, "_api_key", "test-key"):- judgement = await _judge()+ judgement = await _judge(user_messages)else:- judgement = await _judge()+ judgement = await _judge(user_messages)return judgement, llm, call_jev-async def _judge():+async def _judge(user_messages: list[str] | None = None):return await supervise(tool_name="bash_exec",args={"command": "ls reports/"},- user_message="list the files in reports",+ user_messages=user_messages or ["list the files in reports"],+ )+++def _request_in(state: str) -> str:+ return state.split("<<<BEGIN USER REQUEST ")[1].split("<<<END USER REQUEST")[0]+++def _asks() -> float:+ return (+ REGISTRY.get_sample_value("copilot_gate_first_stage_total", {"outcome": "ask"})+ or 0.0)diff --git a/autogpt_platform/backend/backend/copilot/gate/policy.py b/autogpt_platform/backend/backend/copilot/gate/policy.pyindex fe256779c1..6491614974 100644--- a/autogpt_platform/backend/backend/copilot/gate/policy.py+++ b/autogpt_platform/backend/backend/copilot/gate/policy.py@@ -16,6 +16,8 @@ class Effect(str, Enum):READ = "read"WORKSPACE = "workspace"SHELL = "shell"+ # Work handed to a chat of one of the user's Experts, which the gate covers itself.+ TEAM = "team"PLATFORM = "platform"EXTERNAL = "external"# Never gated: the call is itself a question to the user, finishes a@@ -24,7 +26,7 @@ class Effect(str, Enum):# What the gate can hold for an answer, and so what a rule can be set on.-PARKABLE = frozenset({Effect.SHELL, Effect.PLATFORM, Effect.EXTERNAL})+PARKABLE = frozenset({Effect.SHELL, Effect.TEAM, Effect.PLATFORM, Effect.EXTERNAL})class Verdict(str, Enum):@@ -119,8 +121,6 @@ _PLATFORM = frozenset("revoke_expert_credential","update_expert","update_expert_soul",- "delegate_to_expert",- "handoff_to_expert","message_session","run_sub_session",# Deletes inside the workspace: the user may have put the thing there.@@ -130,6 +130,10 @@ _PLATFORM = frozenset(})+# The chat they open keeps this one's origin, so the gate judges what the Expert does+# there; Ask First still asks, as that chat runs in Auto.+_TEAM = frozenset({"delegate_to_expert", "handoff_to_expert"})+_EXTERNAL = frozenset({"browser_act", "edit_chat_platform_message", "post_to_chat_platform"})@@ -157,6 +161,7 @@ _EFFECTS: dict[str, Effect] = {**{name: Effect.READ for name in _READ | MCP_FILE_READ_TOOLS},**{name: Effect.WORKSPACE for name in _WORKSPACE | MCP_FILE_WRITE_TOOLS},"bash_exec": Effect.SHELL,+ **{name: Effect.TEAM for name in _TEAM},**{name: Effect.PLATFORM for name in _PLATFORM},**{name: Effect.EXTERNAL for name in _EXTERNAL | _BY_SUBJECT},**{name: Effect.UNGATED for name in _UNGATED},@@ -169,6 +174,7 @@ _MODE_VERDICTS: dict[AutopilotMode, dict[Effect, Verdict]] = {Effect.READ: Verdict.RUN,Effect.WORKSPACE: Verdict.RUN,Effect.SHELL: Verdict.JUDGE,+ Effect.TEAM: Verdict.ASK,Effect.PLATFORM: Verdict.ASK,Effect.EXTERNAL: Verdict.ASK,},@@ -176,6 +182,7 @@ _MODE_VERDICTS: dict[AutopilotMode, dict[Effect, Verdict]] = {Effect.READ: Verdict.RUN,Effect.WORKSPACE: Verdict.RUN,Effect.SHELL: Verdict.JUDGE,+ Effect.TEAM: Verdict.RUN,Effect.PLATFORM: Verdict.JUDGE,Effect.EXTERNAL: Verdict.ASK,},diff --git a/autogpt_platform/backend/backend/copilot/gate/policy_test.py b/autogpt_platform/backend/backend/copilot/gate/policy_test.pyindex 4acf8c0710..d4f86915c6 100644--- a/autogpt_platform/backend/backend/copilot/gate/policy_test.py+++ b/autogpt_platform/backend/backend/copilot/gate/policy_test.py@@ -32,6 +32,8 @@ def test_the_table_names_no_tool_that_does_not_exist():("Write", Verdict.RUN, Verdict.RUN, Verdict.RUN),("bash_exec", Verdict.JUDGE, Verdict.JUDGE, Verdict.RUN),("delete_folder", Verdict.ASK, Verdict.JUDGE, Verdict.RUN),+ ("delegate_to_expert", Verdict.ASK, Verdict.RUN, Verdict.RUN),+ ("handoff_to_expert", Verdict.ASK, Verdict.RUN, Verdict.RUN),("post_to_chat_platform", Verdict.ASK, Verdict.ASK, Verdict.RUN),],)diff --git a/autogpt_platform/backend/backend/copilot/gate/review_test.py b/autogpt_platform/backend/backend/copilot/gate/review_test.pyindex 960447a254..31ada5b8b3 100644--- a/autogpt_platform/backend/backend/copilot/gate/review_test.py+++ b/autogpt_platform/backend/backend/copilot/gate/review_test.py@@ -9,7 +9,7 @@ from prisma.enums import ReviewStatusfrom backend.blocks.google.gmail import GmailSendBlockfrom backend.copilot.gate.headline import gated_tools, headline_for-from backend.copilot.gate.policy import Effect, classified_tools, effect_for+from backend.copilot.gate.policy import PARKABLE, classified_tools, effect_forfrom backend.copilot.gate.review import (find_decision,node_id_for,@@ -112,11 +112,7 @@ def test_the_headline_names_the_action_and_its_object():def test_every_tool_the_gate_can_hold_has_its_own_words():- held = {- tool- for tool in classified_tools()- if effect_for(tool) in (Effect.SHELL, Effect.PLATFORM, Effect.EXTERNAL)- }+ held = {tool for tool in classified_tools() if effect_for(tool) in PARKABLE}assert gated_tools() == helddiff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ApprovalQueue/__tests__/referenceCards.json b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ApprovalQueue/__tests__/referenceCards.jsonindex b1803e62f6..26ff585627 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ApprovalQueue/__tests__/referenceCards.json+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ApprovalQueue/__tests__/referenceCards.json@@ -673,8 +673,8 @@}],"reference_totals": {- "credential_id": 1,- "expert_id": 1+ "expert_id": 1,+ "credential_id": 1},"tool_call_id": "call-grant_expert_credential","turn": 1,@@ -1105,8 +1105,8 @@}],"reference_totals": {- "expert_id": 1,- "store_listing_version_id": 1+ "store_listing_version_id": 1,+ "expert_id": 1},"tool_call_id": "call-install_expert_workflow","turn": 1,@@ -1675,7 +1675,7 @@"kind": "tool","key": "delegate_to_expert","name": "Hand a task to a teammate",- "effect": "platform",+ "effect": "team","irreversible": false,"block_id": null},