vibesurf 0.1.38__tar.gz → 0.1.40__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of vibesurf might be problematic. Click here for more details.
- {vibesurf-0.1.38 → vibesurf-0.1.40}/.gitignore +7 -1
- {vibesurf-0.1.38 → vibesurf-0.1.40}/PKG-INFO +1 -1
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/_version.py +3 -3
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/agents/prompts/vibe_surf_prompt.py +1 -1
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/agents/vibe_surf_agent.py +5 -10
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/browser/agent_browser_session.py +79 -44
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/config.js +1 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/ui-manager.js +7 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibesurf.egg-info/PKG-INFO +1 -1
- {vibesurf-0.1.38 → vibesurf-0.1.40}/.env.example +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/.github/workflows/publish.yml +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/.python-version +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/LICENSE +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/MANIFEST.in +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/README.md +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/README_zh.md +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/docs/EXECUTABLE_BUILD.md +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/docs/PYPI_SETUP.md +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/pyproject.toml +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/scripts/build-local.bat +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/scripts/build-local.sh +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/setup.cfg +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/tests/test_agents.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/tests/test_backend_api.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/tests/test_browser.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/tests/test_telemetry.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/tests/test_tools.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/tests/test_voice_api.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/agents/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/agents/browser_use_agent.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/agents/prompts/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/agents/prompts/report_writer_prompt.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/agents/report_writer_agent.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/agents/views.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/activity.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/agent.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/browser.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/composio.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/config.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/files.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/models.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/task.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/api/voices.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/manager.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/migrations/v001_initial_schema.sql +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/migrations/v002_add_agent_mode.sql +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/migrations/v003_fix_task_status_case.sql +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/migrations/v004_add_voice_profiles.sql +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/migrations/v005_add_composio_integration.sql +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/migrations/v006_add_credentials_table.sql +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/models.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/queries.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/schemas.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/llm_config.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/main.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/shared_state.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/utils/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/utils/encryption.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/utils/llm_factory.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/utils/utils.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/voice_model_config.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/browser/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/browser/agen_browser_profile.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/browser/browser_manager.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/browser/utils.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/browser/watchdogs/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/browser/watchdogs/action_watchdog.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/browser/watchdogs/dom_watchdog.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/background.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/content.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/dev-reload.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/icons/logo.icns +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/icons/logo.png +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/manifest.json +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/permission-iframe.html +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/permission-request.html +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/popup.html +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/api-client.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/file-manager.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/history-manager.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/main.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/markdown-it.min.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/modal-manager.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/permission-iframe-request.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/permission-request.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/session-manager.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/settings-manager.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/user-settings-storage.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/voice-recorder.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/sidepanel.html +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/activity.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/animations.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/base.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/components.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/history-modal.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/input.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/layout.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/responsive.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-environment.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-forms.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-integrations.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-modal.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-profiles.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-responsive.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-utilities.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/variables.css +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/cli.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/common.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/llm/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/llm/openai_compatible.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/logger.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/telemetry/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/telemetry/service.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/telemetry/views.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/browser_use_tools.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/composio_client.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/file_system.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/finance_tools.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/mcp_client.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/report_writer_tools.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/utils.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/vibesurf_registry.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/vibesurf_tools.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/views.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/voice_asr.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/douyin/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/douyin/client.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/douyin/douyin.js +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/douyin/helpers.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/weibo/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/weibo/client.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/weibo/helpers.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/xhs/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/xhs/client.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/xhs/helpers.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/youtube/__init__.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/youtube/client.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/tools/website_api/youtube/helpers.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/utils.py +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibesurf.egg-info/SOURCES.txt +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibesurf.egg-info/dependency_links.txt +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibesurf.egg-info/entry_points.txt +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibesurf.egg-info/requires.txt +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibesurf.egg-info/top_level.txt +0 -0
- {vibesurf-0.1.38 → vibesurf-0.1.40}/vibesurf.spec +0 -0
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
31
|
+
__version__ = version = '0.1.40'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 40)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g43aac7565'
|
|
@@ -78,7 +78,7 @@ When using Composio tools (those with `cpo.{toolkit_name}.{tool_name}` prefix):
|
|
|
78
78
|
- **Special Cases**: `skill_deep_research` only returns guidelines only, then follow guidelines to conduct actual research
|
|
79
79
|
- **Execution Policy**: Skill actions execute only once (no need to retry if errors occur), and all results - whether successful or failed - should be presented to users in structured markdown format.
|
|
80
80
|
- **Follow-up Operations**: When users input skill operations without specifying additional tasks, do not automatically perform subsequent operations. Only perform additional tool operations when users specifically request actions like saving results to files or writing reports.
|
|
81
|
-
- **Search Skill Usage**: `/
|
|
81
|
+
- **Search Skill Usage**: `/skill_search` should ONLY be used when users want to quickly obtain specific information or news and user specify `/skill_search` in request. Please analyze user intent carefully - if the request contains other browser tasks or requires more complex web operations, you should generally execute browser tasks instead of using skill search.
|
|
82
82
|
|
|
83
83
|
## Language Adaptability
|
|
84
84
|
|
|
@@ -393,6 +393,8 @@ async def _vibesurf_agent_node_impl(state: VibeSurfState) -> VibeSurfState:
|
|
|
393
393
|
context_info.append(f"Generated Report: ❌ Failed - {state.generated_report_result.msg}\nPath: {state.generated_report_result.report_path}\n")
|
|
394
394
|
|
|
395
395
|
context_str = "\n".join(context_info) if context_info else "No additional context available."
|
|
396
|
+
logger.debug("VibeSurf State Message:\n")
|
|
397
|
+
logger.debug(context_str)
|
|
396
398
|
vibesurf_agent.message_history.append(UserMessage(content=context_str))
|
|
397
399
|
|
|
398
400
|
try:
|
|
@@ -505,15 +507,8 @@ async def _vibesurf_agent_node_impl(state: VibeSurfState) -> VibeSurfState:
|
|
|
505
507
|
llm=vibesurf_agent.llm,
|
|
506
508
|
file_system=vibesurf_agent.file_system,
|
|
507
509
|
)
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
# Format final response
|
|
511
|
-
final_response = f"{result.extracted_content}" or f"{result.error}"
|
|
512
|
-
state.final_response = final_response
|
|
513
|
-
logger.debug(final_response)
|
|
514
|
-
state.is_complete = True
|
|
515
|
-
else:
|
|
516
|
-
state.current_step = "vibesurf_agent"
|
|
510
|
+
|
|
511
|
+
state.current_step = "vibesurf_agent"
|
|
517
512
|
|
|
518
513
|
if result.extracted_content:
|
|
519
514
|
vibesurf_agent.message_history.append(
|
|
@@ -1728,7 +1723,7 @@ Action list should NEVER be empty and Each step can only output one action. If m
|
|
|
1728
1723
|
completion_event = VibeSurfAgentTelemetryEvent(
|
|
1729
1724
|
version=vibe_surf.__version__,
|
|
1730
1725
|
action='task_completed',
|
|
1731
|
-
task_description=task
|
|
1726
|
+
task_description=task if task else None,
|
|
1732
1727
|
model=getattr(self.llm, 'model_name', None),
|
|
1733
1728
|
model_provider=getattr(self.llm, 'provider', None),
|
|
1734
1729
|
duration_seconds=duration,
|
|
@@ -5,7 +5,7 @@ import os
|
|
|
5
5
|
import pdb
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from typing import TYPE_CHECKING, Any, Literal, Self, Union, cast, Optional
|
|
8
|
-
|
|
8
|
+
from cdp_use.cdp.target import AttachedToTargetEvent, SessionID, TargetID
|
|
9
9
|
from browser_use.browser.session import BrowserSession, CDPSession
|
|
10
10
|
from pydantic import Field
|
|
11
11
|
from browser_use.browser.events import (
|
|
@@ -206,7 +206,7 @@ class AgentBrowserSession(BrowserSession):
|
|
|
206
206
|
assert self._cdp_client_root is not None
|
|
207
207
|
await self._cdp_client_root.start()
|
|
208
208
|
await self._cdp_client_root.send.Target.setAutoAttach(
|
|
209
|
-
params={'autoAttach':
|
|
209
|
+
params={'autoAttach': False, 'waitForDebuggerOnStart': False, 'flatten': True}
|
|
210
210
|
)
|
|
211
211
|
self.logger.debug('CDP client connected successfully')
|
|
212
212
|
|
|
@@ -228,39 +228,9 @@ class AgentBrowserSession(BrowserSession):
|
|
|
228
228
|
from browser_use.utils import is_new_tab_page
|
|
229
229
|
|
|
230
230
|
# Collect all targets that need redirection
|
|
231
|
-
redirected_targets = []
|
|
232
|
-
redirect_sessions = {} # Store sessions created for redirection to potentially reuse
|
|
233
|
-
for target in page_targets:
|
|
234
|
-
target_url = target.get('url', '')
|
|
235
|
-
if is_new_tab_page(target_url) and target_url != '':
|
|
236
|
-
# Redirect chrome://newtab to about:blank to avoid JS issues preventing driving chrome://newtab
|
|
237
|
-
target_id = target['targetId']
|
|
238
|
-
self.logger.debug(f'🔄 Redirecting {target_url} to about:blank for target {target_id}')
|
|
239
|
-
try:
|
|
240
|
-
# Create a CDP session for redirection (minimal domains to avoid duplicate event handlers)
|
|
241
|
-
# Only enable Page domain for navigation, avoid duplicate event handlers
|
|
242
|
-
redirect_session = await CDPSession.for_target(self._cdp_client_root, target_id,
|
|
243
|
-
domains=['Page'])
|
|
244
|
-
# Navigate to about:blank
|
|
245
|
-
await redirect_session.cdp_client.send.Page.navigate(
|
|
246
|
-
params={'url': ''}, session_id=redirect_session.session_id
|
|
247
|
-
)
|
|
248
|
-
redirected_targets.append(target_id)
|
|
249
|
-
redirect_sessions[target_id] = redirect_session # Store for potential reuse
|
|
250
|
-
# Update the target's URL in our list for later use
|
|
251
|
-
target['url'] = ''
|
|
252
|
-
# Small delay to ensure navigation completes
|
|
253
|
-
await asyncio.sleep(0.1)
|
|
254
|
-
except Exception as e:
|
|
255
|
-
self.logger.warning(f'Failed to redirect {target_url} to about:blank: {e}')
|
|
256
|
-
|
|
257
|
-
# Log summary of redirections
|
|
258
|
-
if redirected_targets:
|
|
259
|
-
self.logger.debug(f'Redirected {len(redirected_targets)} chrome://newtab pages to about:blank')
|
|
260
|
-
|
|
261
231
|
if not page_targets:
|
|
262
232
|
# No pages found, create a new one
|
|
263
|
-
new_target = await self._cdp_client_root.send.Target.createTarget(params={'url': ''})
|
|
233
|
+
new_target = await self._cdp_client_root.send.Target.createTarget(params={'url': 'chrome://newtab/'})
|
|
264
234
|
target_id = new_target['targetId']
|
|
265
235
|
self.logger.debug(f'📄 Created new blank page with target ID: {target_id}')
|
|
266
236
|
else:
|
|
@@ -268,14 +238,8 @@ class AgentBrowserSession(BrowserSession):
|
|
|
268
238
|
target_id = [page for page in page_targets if page.get('type') == 'page'][0]['targetId']
|
|
269
239
|
self.logger.debug(f'📄 Using existing page with target ID: {target_id}')
|
|
270
240
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
if target_id in redirect_sessions:
|
|
274
|
-
self.logger.debug(f'Reusing redirect session for target {target_id}')
|
|
275
|
-
self.agent_focus = redirect_sessions[target_id]
|
|
276
|
-
else:
|
|
277
|
-
# For the initial connection, we'll use the shared root WebSocket
|
|
278
|
-
self.agent_focus = await CDPSession.for_target(self._cdp_client_root, target_id, new_socket=False)
|
|
241
|
+
self.agent_focus = await CDPSession.for_target(self._cdp_client_root, target_id, new_socket=False)
|
|
242
|
+
|
|
279
243
|
if self.agent_focus:
|
|
280
244
|
self._cdp_session_pool[target_id] = self.agent_focus
|
|
281
245
|
|
|
@@ -297,13 +261,12 @@ class AgentBrowserSession(BrowserSession):
|
|
|
297
261
|
for idx, target in enumerate(page_targets):
|
|
298
262
|
target_url = target.get('url', '')
|
|
299
263
|
self.logger.debug(f'Dispatching TabCreatedEvent for initial tab {idx}: {target_url}')
|
|
300
|
-
|
|
264
|
+
self.event_bus.dispatch(TabCreatedEvent(url=target_url, target_id=target['targetId']))
|
|
301
265
|
|
|
302
266
|
# Dispatch initial focus event
|
|
303
267
|
if page_targets:
|
|
304
268
|
initial_url = page_targets[0].get('url', '')
|
|
305
|
-
|
|
306
|
-
AgentFocusChangedEvent(target_id=page_targets[0]['targetId'], url=initial_url))
|
|
269
|
+
self.event_bus.dispatch(AgentFocusChangedEvent(target_id=page_targets[0]['targetId'], url=initial_url))
|
|
307
270
|
self.logger.debug(f'Initial agent focus set to tab 0: {initial_url}')
|
|
308
271
|
|
|
309
272
|
except Exception as e:
|
|
@@ -717,6 +680,78 @@ class AgentBrowserSession(BrowserSession):
|
|
|
717
680
|
self.logger.error(f'Concurrent screenshot failed: {type(e).__name__}: {e}')
|
|
718
681
|
raise
|
|
719
682
|
|
|
683
|
+
async def get_or_create_cdp_session(
|
|
684
|
+
self, target_id: TargetID | None = None, focus: bool = True, new_socket: bool | None = None
|
|
685
|
+
) -> CDPSession:
|
|
686
|
+
"""Get or create a CDP session for a target.
|
|
687
|
+
|
|
688
|
+
Args:
|
|
689
|
+
target_id: Target ID to get session for. If None, uses current agent focus.
|
|
690
|
+
focus: If True, switches agent focus to this target. If False, just returns session without changing focus.
|
|
691
|
+
new_socket: If True, create a dedicated WebSocket connection. If None (default), creates new socket for new targets only.
|
|
692
|
+
|
|
693
|
+
Returns:
|
|
694
|
+
CDPSession for the specified target.
|
|
695
|
+
"""
|
|
696
|
+
assert self.cdp_url is not None, 'CDP URL not set - browser may not be configured or launched yet'
|
|
697
|
+
assert self._cdp_client_root is not None, 'Root CDP client not initialized - browser may not be connected yet'
|
|
698
|
+
assert self.agent_focus is not None, 'CDP session not initialized - browser may not be connected yet'
|
|
699
|
+
|
|
700
|
+
# If no target_id specified, use the current target_id
|
|
701
|
+
if target_id is None:
|
|
702
|
+
target_id = self.agent_focus.target_id
|
|
703
|
+
|
|
704
|
+
# Check if we already have a session for this target in the pool
|
|
705
|
+
if target_id in self._cdp_session_pool:
|
|
706
|
+
session = self._cdp_session_pool[target_id]
|
|
707
|
+
if focus and self.agent_focus.target_id != target_id:
|
|
708
|
+
self.logger.debug(
|
|
709
|
+
f'[get_or_create_cdp_session] Switching agent focus from {self.agent_focus.target_id} to {target_id}'
|
|
710
|
+
)
|
|
711
|
+
self.agent_focus = session
|
|
712
|
+
if focus:
|
|
713
|
+
await session.cdp_client.send.Target.activateTarget(params={'targetId': session.target_id})
|
|
714
|
+
await session.cdp_client.send.Runtime.runIfWaitingForDebugger(session_id=session.session_id)
|
|
715
|
+
# else:
|
|
716
|
+
# self.logger.debug(f'[get_or_create_cdp_session] Reusing existing session for {target_id} (focus={focus})')
|
|
717
|
+
return session
|
|
718
|
+
|
|
719
|
+
# If it's the current focus target, return that session
|
|
720
|
+
if self.agent_focus.target_id == target_id:
|
|
721
|
+
self._cdp_session_pool[target_id] = self.agent_focus
|
|
722
|
+
return self.agent_focus
|
|
723
|
+
|
|
724
|
+
# Create new session for this target
|
|
725
|
+
# Default to True for new sessions (each new target gets its own WebSocket)
|
|
726
|
+
should_use_new_socket = True if new_socket is None else new_socket
|
|
727
|
+
self.logger.debug(
|
|
728
|
+
f'[get_or_create_cdp_session] Creating new CDP session for target {target_id} (new_socket={should_use_new_socket})'
|
|
729
|
+
)
|
|
730
|
+
session = await CDPSession.for_target(
|
|
731
|
+
self._cdp_client_root,
|
|
732
|
+
target_id,
|
|
733
|
+
new_socket=should_use_new_socket,
|
|
734
|
+
cdp_url=self.cdp_url if should_use_new_socket else None,
|
|
735
|
+
)
|
|
736
|
+
self._cdp_session_pool[target_id] = session
|
|
737
|
+
# log length of _cdp_session_pool
|
|
738
|
+
self.logger.debug(f'[get_or_create_cdp_session] new _cdp_session_pool length: {len(self._cdp_session_pool)}')
|
|
739
|
+
|
|
740
|
+
# Only change agent focus if requested
|
|
741
|
+
if focus:
|
|
742
|
+
self.logger.debug(
|
|
743
|
+
f'[get_or_create_cdp_session] Switching agent focus from {self.agent_focus.target_id} to {target_id}'
|
|
744
|
+
)
|
|
745
|
+
self.agent_focus = session
|
|
746
|
+
await session.cdp_client.send.Target.activateTarget(params={'targetId': session.target_id})
|
|
747
|
+
await session.cdp_client.send.Runtime.runIfWaitingForDebugger(session_id=session.session_id)
|
|
748
|
+
else:
|
|
749
|
+
self.logger.debug(
|
|
750
|
+
f'[get_or_create_cdp_session] Created session for {target_id} without changing focus (still on {self.agent_focus.target_id})'
|
|
751
|
+
)
|
|
752
|
+
|
|
753
|
+
return session
|
|
754
|
+
|
|
720
755
|
async def get_html_content(self, target_id: Optional[str] = None) -> str:
|
|
721
756
|
"""
|
|
722
757
|
Get html content of current page
|
|
@@ -33,6 +33,7 @@ const VIBESURF_CONFIG = {
|
|
|
33
33
|
github: "https://github.com/vibesurf-ai/VibeSurf",
|
|
34
34
|
discord: "https://discord.gg/EZ2YnUXP",
|
|
35
35
|
x: "https://x.com/warmshao",
|
|
36
|
+
reportBug: "https://github.com/vibesurf-ai/VibeSurf/issues/new/choose",
|
|
36
37
|
website: "https://vibe-surf.com/"
|
|
37
38
|
},
|
|
38
39
|
|
|
@@ -3603,6 +3603,13 @@ class VibeSurfUIManager {
|
|
|
3603
3603
|
break;
|
|
3604
3604
|
|
|
3605
3605
|
|
|
3606
|
+
case 'reportbug':
|
|
3607
|
+
title = 'Report Bug';
|
|
3608
|
+
svg = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3609
|
+
<path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.42.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z" fill="currentColor"/>
|
|
3610
|
+
</svg>`;
|
|
3611
|
+
break;
|
|
3612
|
+
|
|
3606
3613
|
default:
|
|
3607
3614
|
console.warn(`[UIManager] Unknown social platform: ${platform}`);
|
|
3608
3615
|
return null;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/migrations/v001_initial_schema.sql
RENAMED
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/backend/database/migrations/v002_add_agent_mode.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/permission-iframe-request.js
RENAMED
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/permission-request.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/scripts/user-settings-storage.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-environment.css
RENAMED
|
File without changes
|
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-integrations.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-responsive.css
RENAMED
|
File without changes
|
{vibesurf-0.1.38 → vibesurf-0.1.40}/vibe_surf/chrome_extension/styles/settings-utilities.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|