fix to_capcha
This commit is contained in:
parent
f1f32d8366
commit
3b7d02ee81
3 changed files with 13 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ if [ ! -f /var/lib/dbus/machine-id ]; then
|
||||||
dbus-uuidgen > /var/lib/dbus/machine-id 2>/dev/null || true
|
dbus-uuidgen > /var/lib/dbus/machine-id 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Удаляем stale lock/socket от прошлых падений Xvfb на том же DISPLAY.
|
# УдалÑем stale lock/socket от прошлых падений Xvfb на том же DISPLAY.
|
||||||
rm -f "/tmp/.X${DISPLAY_NUM}-lock" "/tmp/.X11-unix/X${DISPLAY_NUM}" || true
|
rm -f "/tmp/.X${DISPLAY_NUM}-lock" "/tmp/.X11-unix/X${DISPLAY_NUM}" || true
|
||||||
|
|
||||||
log "starting X stack on DISPLAY=${DISPLAY}"
|
log "starting X stack on DISPLAY=${DISPLAY}"
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,15 @@ SKILLS_GUIDANCE = (
|
||||||
"Skills that aren't maintained become liabilities."
|
"Skills that aren't maintained become liabilities."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
BROWSER_CAPTCHA_GUIDANCE = (
|
||||||
|
"For browser tasks, do not pre-emptively refuse just because CAPTCHA may appear. "
|
||||||
|
"Start the task with internet_browser. "
|
||||||
|
"If the browser runtime reports status='awaiting_user_captcha', immediately use to_captcha "
|
||||||
|
"to hand control to the user for manual verification and then resume. "
|
||||||
|
"Important: you must never claim that you solved CAPTCHA yourself and you must not attempt bypass methods. "
|
||||||
|
"Your role is orchestration: run browser steps, request manual CAPTCHA completion from the user, verify, and continue."
|
||||||
|
)
|
||||||
|
|
||||||
PLATFORM_HINTS = {
|
PLATFORM_HINTS = {
|
||||||
"whatsapp": (
|
"whatsapp": (
|
||||||
"You are on a text messaging communication platform, WhatsApp. "
|
"You are on a text messaging communication platform, WhatsApp. "
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ from hermes_constants import OPENROUTER_BASE_URL
|
||||||
from agent.prompt_builder import (
|
from agent.prompt_builder import (
|
||||||
DEFAULT_AGENT_IDENTITY, PLATFORM_HINTS,
|
DEFAULT_AGENT_IDENTITY, PLATFORM_HINTS,
|
||||||
MEMORY_GUIDANCE, SESSION_SEARCH_GUIDANCE, SKILLS_GUIDANCE,
|
MEMORY_GUIDANCE, SESSION_SEARCH_GUIDANCE, SKILLS_GUIDANCE,
|
||||||
|
BROWSER_CAPTCHA_GUIDANCE,
|
||||||
)
|
)
|
||||||
from agent.model_metadata import (
|
from agent.model_metadata import (
|
||||||
fetch_model_metadata,
|
fetch_model_metadata,
|
||||||
|
|
@ -2279,6 +2280,8 @@ class AIAgent:
|
||||||
tool_guidance.append(SESSION_SEARCH_GUIDANCE)
|
tool_guidance.append(SESSION_SEARCH_GUIDANCE)
|
||||||
if "skill_manage" in self.valid_tool_names:
|
if "skill_manage" in self.valid_tool_names:
|
||||||
tool_guidance.append(SKILLS_GUIDANCE)
|
tool_guidance.append(SKILLS_GUIDANCE)
|
||||||
|
if "internet_browser" in self.valid_tool_names and "to_captcha" in self.valid_tool_names:
|
||||||
|
tool_guidance.append(BROWSER_CAPTCHA_GUIDANCE)
|
||||||
if tool_guidance:
|
if tool_guidance:
|
||||||
prompt_parts.append(" ".join(tool_guidance))
|
prompt_parts.append(" ".join(tool_guidance))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue