vibesurf 0.1.38__py3-none-any.whl → 0.1.39__py3-none-any.whl
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.
- vibe_surf/_version.py +2 -2
- vibe_surf/agents/prompts/vibe_surf_prompt.py +1 -1
- vibe_surf/agents/vibe_surf_agent.py +3 -1
- vibe_surf/browser/agent_browser_session.py +73 -1
- {vibesurf-0.1.38.dist-info → vibesurf-0.1.39.dist-info}/METADATA +1 -1
- {vibesurf-0.1.38.dist-info → vibesurf-0.1.39.dist-info}/RECORD +10 -10
- {vibesurf-0.1.38.dist-info → vibesurf-0.1.39.dist-info}/WHEEL +0 -0
- {vibesurf-0.1.38.dist-info → vibesurf-0.1.39.dist-info}/entry_points.txt +0 -0
- {vibesurf-0.1.38.dist-info → vibesurf-0.1.39.dist-info}/licenses/LICENSE +0 -0
- {vibesurf-0.1.38.dist-info → vibesurf-0.1.39.dist-info}/top_level.txt +0 -0
vibe_surf/_version.py
CHANGED
|
@@ -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.39'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 39)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -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:
|
|
@@ -1728,7 +1730,7 @@ Action list should NEVER be empty and Each step can only output one action. If m
|
|
|
1728
1730
|
completion_event = VibeSurfAgentTelemetryEvent(
|
|
1729
1731
|
version=vibe_surf.__version__,
|
|
1730
1732
|
action='task_completed',
|
|
1731
|
-
task_description=task
|
|
1733
|
+
task_description=task if task else None,
|
|
1732
1734
|
model=getattr(self.llm, 'model_name', None),
|
|
1733
1735
|
model_provider=getattr(self.llm, 'provider', None),
|
|
1734
1736
|
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 (
|
|
@@ -717,6 +717,78 @@ class AgentBrowserSession(BrowserSession):
|
|
|
717
717
|
self.logger.error(f'Concurrent screenshot failed: {type(e).__name__}: {e}')
|
|
718
718
|
raise
|
|
719
719
|
|
|
720
|
+
async def get_or_create_cdp_session(
|
|
721
|
+
self, target_id: TargetID | None = None, focus: bool = True, new_socket: bool | None = None
|
|
722
|
+
) -> CDPSession:
|
|
723
|
+
"""Get or create a CDP session for a target.
|
|
724
|
+
|
|
725
|
+
Args:
|
|
726
|
+
target_id: Target ID to get session for. If None, uses current agent focus.
|
|
727
|
+
focus: If True, switches agent focus to this target. If False, just returns session without changing focus.
|
|
728
|
+
new_socket: If True, create a dedicated WebSocket connection. If None (default), creates new socket for new targets only.
|
|
729
|
+
|
|
730
|
+
Returns:
|
|
731
|
+
CDPSession for the specified target.
|
|
732
|
+
"""
|
|
733
|
+
assert self.cdp_url is not None, 'CDP URL not set - browser may not be configured or launched yet'
|
|
734
|
+
assert self._cdp_client_root is not None, 'Root CDP client not initialized - browser may not be connected yet'
|
|
735
|
+
assert self.agent_focus is not None, 'CDP session not initialized - browser may not be connected yet'
|
|
736
|
+
|
|
737
|
+
# If no target_id specified, use the current target_id
|
|
738
|
+
if target_id is None:
|
|
739
|
+
target_id = self.agent_focus.target_id
|
|
740
|
+
|
|
741
|
+
# Check if we already have a session for this target in the pool
|
|
742
|
+
if target_id in self._cdp_session_pool:
|
|
743
|
+
session = self._cdp_session_pool[target_id]
|
|
744
|
+
if focus and self.agent_focus.target_id != target_id:
|
|
745
|
+
self.logger.debug(
|
|
746
|
+
f'[get_or_create_cdp_session] Switching agent focus from {self.agent_focus.target_id} to {target_id}'
|
|
747
|
+
)
|
|
748
|
+
self.agent_focus = session
|
|
749
|
+
if focus:
|
|
750
|
+
await session.cdp_client.send.Target.activateTarget(params={'targetId': session.target_id})
|
|
751
|
+
await session.cdp_client.send.Runtime.runIfWaitingForDebugger(session_id=session.session_id)
|
|
752
|
+
# else:
|
|
753
|
+
# self.logger.debug(f'[get_or_create_cdp_session] Reusing existing session for {target_id} (focus={focus})')
|
|
754
|
+
return session
|
|
755
|
+
|
|
756
|
+
# If it's the current focus target, return that session
|
|
757
|
+
if self.agent_focus.target_id == target_id:
|
|
758
|
+
self._cdp_session_pool[target_id] = self.agent_focus
|
|
759
|
+
return self.agent_focus
|
|
760
|
+
|
|
761
|
+
# Create new session for this target
|
|
762
|
+
# Default to True for new sessions (each new target gets its own WebSocket)
|
|
763
|
+
should_use_new_socket = True if new_socket is None else new_socket
|
|
764
|
+
self.logger.debug(
|
|
765
|
+
f'[get_or_create_cdp_session] Creating new CDP session for target {target_id} (new_socket={should_use_new_socket})'
|
|
766
|
+
)
|
|
767
|
+
session = await CDPSession.for_target(
|
|
768
|
+
self._cdp_client_root,
|
|
769
|
+
target_id,
|
|
770
|
+
new_socket=should_use_new_socket,
|
|
771
|
+
cdp_url=self.cdp_url if should_use_new_socket else None,
|
|
772
|
+
)
|
|
773
|
+
self._cdp_session_pool[target_id] = session
|
|
774
|
+
# log length of _cdp_session_pool
|
|
775
|
+
self.logger.debug(f'[get_or_create_cdp_session] new _cdp_session_pool length: {len(self._cdp_session_pool)}')
|
|
776
|
+
|
|
777
|
+
# Only change agent focus if requested
|
|
778
|
+
if focus:
|
|
779
|
+
self.logger.debug(
|
|
780
|
+
f'[get_or_create_cdp_session] Switching agent focus from {self.agent_focus.target_id} to {target_id}'
|
|
781
|
+
)
|
|
782
|
+
self.agent_focus = session
|
|
783
|
+
await session.cdp_client.send.Target.activateTarget(params={'targetId': session.target_id})
|
|
784
|
+
await session.cdp_client.send.Runtime.runIfWaitingForDebugger(session_id=session.session_id)
|
|
785
|
+
else:
|
|
786
|
+
self.logger.debug(
|
|
787
|
+
f'[get_or_create_cdp_session] Created session for {target_id} without changing focus (still on {self.agent_focus.target_id})'
|
|
788
|
+
)
|
|
789
|
+
|
|
790
|
+
return session
|
|
791
|
+
|
|
720
792
|
async def get_html_content(self, target_id: Optional[str] = None) -> str:
|
|
721
793
|
"""
|
|
722
794
|
Get html content of current page
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
vibe_surf/__init__.py,sha256=WtduuMFGauMD_9dpk4fnRnLTAP6ka9Lfu0feAFNzLfo,339
|
|
2
|
-
vibe_surf/_version.py,sha256=
|
|
2
|
+
vibe_surf/_version.py,sha256=GLQyQfF__8GWNfm0aitCDkh-g9TqC1PxC7RtPbky6_w,706
|
|
3
3
|
vibe_surf/cli.py,sha256=pzJs--bjV6ZU7njJnxK_lh76l3pQ3opg_5V9Hw17PQw,21924
|
|
4
4
|
vibe_surf/common.py,sha256=_WWMxen5wFwzUjEShn3yDVC1OBFUiJ6Vccadi6tuG6w,1215
|
|
5
5
|
vibe_surf/logger.py,sha256=k53MFA96QX6t9OfcOf1Zws8PP0OOqjVJfhUD3Do9lKw,3043
|
|
@@ -7,11 +7,11 @@ vibe_surf/utils.py,sha256=3j6uRkgjOAIDYmbpW8C-DpYhdf1Kvahz715KSriVIk0,261
|
|
|
7
7
|
vibe_surf/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
vibe_surf/agents/browser_use_agent.py,sha256=Uj9tbCR5_dbrSSnKuajbL4zP_E9CwLMrdvw0EmDwnC0,34473
|
|
9
9
|
vibe_surf/agents/report_writer_agent.py,sha256=EiG0ITPGctCGJ8BCc6eVT92Pvb0J39nPArZuXmDUkzg,24097
|
|
10
|
-
vibe_surf/agents/vibe_surf_agent.py,sha256=
|
|
10
|
+
vibe_surf/agents/vibe_surf_agent.py,sha256=LPkGGJLW_cNzgZGbkZvz5gRPB-JckPZDZ7twJFRNLRU,79057
|
|
11
11
|
vibe_surf/agents/views.py,sha256=yHjNJloa-aofVTGyuRy08tBYP_Y3XLqt1DUWOUmHRng,4825
|
|
12
12
|
vibe_surf/agents/prompts/__init__.py,sha256=l4ieA0D8kLJthyNN85FKLNe4ExBa3stY3l-aImLDRD0,36
|
|
13
13
|
vibe_surf/agents/prompts/report_writer_prompt.py,sha256=sZE8MUT1CDLmRzbnbEQzAvTwJjpITgh2Q8g1_eXmkzE,4454
|
|
14
|
-
vibe_surf/agents/prompts/vibe_surf_prompt.py,sha256
|
|
14
|
+
vibe_surf/agents/prompts/vibe_surf_prompt.py,sha256=-lganMeU6qUFs2uMOakb7W6WMf9p1T1OZzvzv6HMgNs,7662
|
|
15
15
|
vibe_surf/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
vibe_surf/backend/llm_config.py,sha256=Ez2ZEMLRINqKOnxbmWD1mZCOKXwIv3GphxP5Y94fL0A,6065
|
|
17
17
|
vibe_surf/backend/main.py,sha256=8_n9dUF972E_UqguXK4zfq5AeulTUeey4X60qOXnigY,8272
|
|
@@ -44,7 +44,7 @@ vibe_surf/backend/utils/llm_factory.py,sha256=WO2MI83n9p5YraPnmQhq_OEH3TBznm34kq
|
|
|
44
44
|
vibe_surf/backend/utils/utils.py,sha256=nY5-DGY4MfPumpQxXLQiodO0Db7lChryWIHbY9h971o,1137
|
|
45
45
|
vibe_surf/browser/__init__.py,sha256=_UToO2fZfSCrfjOcxhn4Qq7ZLbYeyPuUUEmqIva-Yv8,325
|
|
46
46
|
vibe_surf/browser/agen_browser_profile.py,sha256=fHk5q6hkwHfoNIuUitUBPJLdqbsZ7xjsLU6vTTlXEQI,6177
|
|
47
|
-
vibe_surf/browser/agent_browser_session.py,sha256=
|
|
47
|
+
vibe_surf/browser/agent_browser_session.py,sha256=q8i4JeL0SANjWUG2Q_Brgq6mmKkMGN7xi1O9Pn6Pi6I,42804
|
|
48
48
|
vibe_surf/browser/browser_manager.py,sha256=PFJ9flmqR2uokuRZ3PDh_Dy6_6qcQ6kH_eRc1yT6Iq8,11257
|
|
49
49
|
vibe_surf/browser/utils.py,sha256=bBtpMiyz2ixWOr31GbJwZ8pVYcnxztKjTJJO92z1BDY,35742
|
|
50
50
|
vibe_surf/browser/watchdogs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -120,9 +120,9 @@ vibe_surf/tools/website_api/xhs/helpers.py,sha256=Dq2RyYKClBQ2ha2yEfpS1mtZswx0z9
|
|
|
120
120
|
vibe_surf/tools/website_api/youtube/__init__.py,sha256=QWmZWSqo1O6XtaWP-SuL3HrBLYINjEWEyOy-KCytGDw,1145
|
|
121
121
|
vibe_surf/tools/website_api/youtube/client.py,sha256=0kKy7fkBNc63hRvDgXaKnguDpDJ92rG8T2nT_Y1F5MQ,51989
|
|
122
122
|
vibe_surf/tools/website_api/youtube/helpers.py,sha256=GPgqfNirLYjIpk1OObvoXd2Ktq-ahKOOKHO2WwQVXCw,12931
|
|
123
|
-
vibesurf-0.1.
|
|
124
|
-
vibesurf-0.1.
|
|
125
|
-
vibesurf-0.1.
|
|
126
|
-
vibesurf-0.1.
|
|
127
|
-
vibesurf-0.1.
|
|
128
|
-
vibesurf-0.1.
|
|
123
|
+
vibesurf-0.1.39.dist-info/licenses/LICENSE,sha256=vRmTjOYvD8RLiSGYYmFHnveYNswtO1uvSk1sd-Eu7sg,2037
|
|
124
|
+
vibesurf-0.1.39.dist-info/METADATA,sha256=hVMdqb4nB51Yhlq4V95oYg48qPNr4cmvutCSRA7RpZA,6787
|
|
125
|
+
vibesurf-0.1.39.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
126
|
+
vibesurf-0.1.39.dist-info/entry_points.txt,sha256=UxqpvMocL-PR33S6vLF2OmXn-kVzM-DneMeZeHcPMM8,48
|
|
127
|
+
vibesurf-0.1.39.dist-info/top_level.txt,sha256=VPZGHqSb6EEqcJ4ZX6bHIuWfon5f6HXl3c7BYpbRqnY,10
|
|
128
|
+
vibesurf-0.1.39.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|