vibesurf 0.1.32__py3-none-any.whl → 0.1.34__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/browser_use_agent.py +1 -1
- vibe_surf/agents/prompts/vibe_surf_prompt.py +6 -0
- vibe_surf/agents/report_writer_agent.py +50 -0
- vibe_surf/agents/vibe_surf_agent.py +55 -0
- vibe_surf/backend/api/composio.py +952 -0
- vibe_surf/backend/database/migrations/v005_add_composio_integration.sql +33 -0
- vibe_surf/backend/database/migrations/v006_add_credentials_table.sql +26 -0
- vibe_surf/backend/database/models.py +53 -1
- vibe_surf/backend/database/queries.py +312 -2
- vibe_surf/backend/main.py +28 -0
- vibe_surf/backend/shared_state.py +123 -9
- vibe_surf/chrome_extension/scripts/api-client.js +32 -0
- vibe_surf/chrome_extension/scripts/settings-manager.js +954 -1
- vibe_surf/chrome_extension/sidepanel.html +190 -0
- vibe_surf/chrome_extension/styles/settings-integrations.css +927 -0
- vibe_surf/chrome_extension/styles/settings-modal.css +7 -3
- vibe_surf/chrome_extension/styles/settings-responsive.css +37 -5
- vibe_surf/cli.py +98 -3
- vibe_surf/telemetry/__init__.py +60 -0
- vibe_surf/telemetry/service.py +112 -0
- vibe_surf/telemetry/views.py +156 -0
- vibe_surf/tools/composio_client.py +456 -0
- vibe_surf/tools/mcp_client.py +21 -2
- vibe_surf/tools/vibesurf_tools.py +290 -87
- vibe_surf/tools/views.py +16 -0
- vibe_surf/tools/website_api/youtube/client.py +35 -13
- vibe_surf/utils.py +13 -0
- {vibesurf-0.1.32.dist-info → vibesurf-0.1.34.dist-info}/METADATA +11 -9
- {vibesurf-0.1.32.dist-info → vibesurf-0.1.34.dist-info}/RECORD +34 -25
- {vibesurf-0.1.32.dist-info → vibesurf-0.1.34.dist-info}/WHEEL +0 -0
- {vibesurf-0.1.32.dist-info → vibesurf-0.1.34.dist-info}/entry_points.txt +0 -0
- {vibesurf-0.1.32.dist-info → vibesurf-0.1.34.dist-info}/licenses/LICENSE +0 -0
- {vibesurf-0.1.32.dist-info → vibesurf-0.1.34.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.34'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 34)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -64,7 +64,6 @@ from browser_use.dom.views import DOMInteractedElement
|
|
|
64
64
|
from browser_use.filesystem.file_system import FileSystem
|
|
65
65
|
from browser_use.observability import observe, observe_debug
|
|
66
66
|
from browser_use.sync import CloudSync
|
|
67
|
-
from browser_use.telemetry.service import ProductTelemetry
|
|
68
67
|
from browser_use.telemetry.views import AgentTelemetryEvent
|
|
69
68
|
from browser_use.utils import (
|
|
70
69
|
_log_pretty_path,
|
|
@@ -76,6 +75,7 @@ from browser_use.utils import (
|
|
|
76
75
|
|
|
77
76
|
from browser_use.agent.service import Agent, AgentHookFunc
|
|
78
77
|
from vibe_surf.tools.file_system import CustomFileSystem
|
|
78
|
+
from vibe_surf.telemetry.service import ProductTelemetry
|
|
79
79
|
|
|
80
80
|
Context = TypeVar('Context')
|
|
81
81
|
|
|
@@ -65,6 +65,12 @@ You will receive contextual information including:
|
|
|
65
65
|
- Include file references in task descriptions when relevant
|
|
66
66
|
- All file operations automatically resolve relative to the workspace directory
|
|
67
67
|
|
|
68
|
+
## Composio Tools Usage Guidelines
|
|
69
|
+
|
|
70
|
+
When using Composio tools (those with `cpo.{toolkit_name}.{tool_name}` prefix):
|
|
71
|
+
- **Prioritize Composio Tools**: When available, prefer Composio toolkit tools over browser automation for API-based tasks (e.g., Gmail, GitHub, Slack operations) as they provide much higher efficiency through direct API calls
|
|
72
|
+
- **Parameter Optimization**: Always optimize default parameters to prevent information overload. Use appropriate filters and limits to get only essential information. Such as: Set `include_payload=False` when possible to avoid unnecessary response data.
|
|
73
|
+
|
|
68
74
|
## Skills Command Processing
|
|
69
75
|
- When users input commands in `/skill_name` format, please use the corresponding skill action:
|
|
70
76
|
- **Tab Targeting[Optional]**: Such as `/crawl @1234` → Execute `skill_crawl` with tab_id "1234"
|
|
@@ -16,6 +16,8 @@ from vibe_surf.agents.prompts.report_writer_prompt import REPORT_WRITER_PROMPT
|
|
|
16
16
|
from vibe_surf.tools.file_system import CustomFileSystem
|
|
17
17
|
from vibe_surf.tools.report_writer_tools import ReportWriterTools
|
|
18
18
|
from vibe_surf.agents.views import CustomAgentOutput
|
|
19
|
+
from vibe_surf.telemetry.service import ProductTelemetry
|
|
20
|
+
from vibe_surf.telemetry.views import ReportWriterTelemetryEvent
|
|
19
21
|
|
|
20
22
|
from vibe_surf.logger import get_logger
|
|
21
23
|
|
|
@@ -66,6 +68,9 @@ class ReportWriterAgent:
|
|
|
66
68
|
|
|
67
69
|
# Initialize message history as instance variable
|
|
68
70
|
self.message_history = []
|
|
71
|
+
|
|
72
|
+
# Initialize telemetry
|
|
73
|
+
self.telemetry = ProductTelemetry()
|
|
69
74
|
|
|
70
75
|
logger.info("📄 ReportWriterAgent initialized with LLM-controlled flow")
|
|
71
76
|
|
|
@@ -111,6 +116,18 @@ class ReportWriterAgent:
|
|
|
111
116
|
ReportTaskResult: Result containing success status, message, and report path
|
|
112
117
|
"""
|
|
113
118
|
logger.info("📝 Starting LLM-controlled report generation...")
|
|
119
|
+
|
|
120
|
+
# Capture telemetry start event
|
|
121
|
+
start_time = time.time()
|
|
122
|
+
import vibe_surf
|
|
123
|
+
start_event = ReportWriterTelemetryEvent(
|
|
124
|
+
version=vibe_surf.__version__,
|
|
125
|
+
action='start',
|
|
126
|
+
model=getattr(self.llm, 'model_name', None),
|
|
127
|
+
model_provider=getattr(self.llm, 'provider', None),
|
|
128
|
+
report_type='html'
|
|
129
|
+
)
|
|
130
|
+
self.telemetry.capture(start_event)
|
|
114
131
|
|
|
115
132
|
# Get current event loop
|
|
116
133
|
loop = asyncio.get_event_loop()
|
|
@@ -260,6 +277,22 @@ Please analyze the task, determine if you need to read any additional files, the
|
|
|
260
277
|
elif task_completed:
|
|
261
278
|
# Task completed successfully by LLM
|
|
262
279
|
logger.info(f"✅ Report generated successfully: {report_path}")
|
|
280
|
+
|
|
281
|
+
# Capture telemetry completion event
|
|
282
|
+
end_time = time.time()
|
|
283
|
+
duration = end_time - start_time
|
|
284
|
+
completion_event = ReportWriterTelemetryEvent(
|
|
285
|
+
version=vibe_surf.__version__,
|
|
286
|
+
action='report_completed',
|
|
287
|
+
model=getattr(self.llm, 'model_name', None),
|
|
288
|
+
model_provider=getattr(self.llm, 'provider', None),
|
|
289
|
+
duration_seconds=duration,
|
|
290
|
+
success=True,
|
|
291
|
+
report_type='html'
|
|
292
|
+
)
|
|
293
|
+
self.telemetry.capture(completion_event)
|
|
294
|
+
self.telemetry.flush()
|
|
295
|
+
|
|
263
296
|
return ReportTaskResult(
|
|
264
297
|
success=True,
|
|
265
298
|
msg="Report generated successfully by LLM",
|
|
@@ -283,6 +316,23 @@ Please analyze the task, determine if you need to read any additional files, the
|
|
|
283
316
|
|
|
284
317
|
except Exception as e:
|
|
285
318
|
logger.error(f"❌ Failed to generate report: {e}")
|
|
319
|
+
|
|
320
|
+
# Capture telemetry error event
|
|
321
|
+
end_time = time.time()
|
|
322
|
+
duration = end_time - start_time
|
|
323
|
+
error_event = ReportWriterTelemetryEvent(
|
|
324
|
+
version=vibe_surf.__version__,
|
|
325
|
+
action='error',
|
|
326
|
+
model=getattr(self.llm, 'model_name', None),
|
|
327
|
+
model_provider=getattr(self.llm, 'provider', None),
|
|
328
|
+
duration_seconds=duration,
|
|
329
|
+
success=False,
|
|
330
|
+
error_message=str(e)[:200], # Limit error message length
|
|
331
|
+
report_type='html'
|
|
332
|
+
)
|
|
333
|
+
self.telemetry.capture(error_event)
|
|
334
|
+
self.telemetry.flush()
|
|
335
|
+
|
|
286
336
|
# Generate a simple fallback report
|
|
287
337
|
fallback_path = await self._generate_fallback_report(report_data)
|
|
288
338
|
return ReportTaskResult(
|
|
@@ -40,6 +40,9 @@ from vibe_surf.tools.vibesurf_tools import VibeSurfTools
|
|
|
40
40
|
from vibe_surf.tools.file_system import CustomFileSystem
|
|
41
41
|
from vibe_surf.agents.views import VibeSurfAgentSettings
|
|
42
42
|
|
|
43
|
+
from vibe_surf.telemetry.service import ProductTelemetry
|
|
44
|
+
from vibe_surf.telemetry.views import VibeSurfAgentTelemetryEvent
|
|
45
|
+
|
|
43
46
|
from vibe_surf.logger import get_logger
|
|
44
47
|
|
|
45
48
|
logger = get_logger(__name__)
|
|
@@ -1041,6 +1044,9 @@ class VibeSurfAgent:
|
|
|
1041
1044
|
self._execution_task: Optional[asyncio.Task] = None
|
|
1042
1045
|
|
|
1043
1046
|
logger.info("🌊 VibeSurf Agent initialized with LangGraph workflow")
|
|
1047
|
+
|
|
1048
|
+
# Initialize telemetry
|
|
1049
|
+
self.telemetry = ProductTelemetry()
|
|
1044
1050
|
|
|
1045
1051
|
def load_message_history(self, session_id: Optional[str] = None) -> list:
|
|
1046
1052
|
"""Load message history for a specific session, or return [] for new sessions"""
|
|
@@ -1568,6 +1574,20 @@ Please continue with your assigned work, incorporating this guidance only if it'
|
|
|
1568
1574
|
str: Markdown summary of execution results
|
|
1569
1575
|
"""
|
|
1570
1576
|
logger.info(f"🚀 Starting VibeSurfAgent execution for task: {task}. Powered by LLM model: {self.llm.model_name}")
|
|
1577
|
+
|
|
1578
|
+
# Capture telemetry start event
|
|
1579
|
+
start_time = time.time()
|
|
1580
|
+
import vibe_surf
|
|
1581
|
+
start_event = VibeSurfAgentTelemetryEvent(
|
|
1582
|
+
version=vibe_surf.__version__,
|
|
1583
|
+
action='start',
|
|
1584
|
+
task_description=task if task else None, # Limit task description length
|
|
1585
|
+
model=getattr(self.llm, 'model_name', None),
|
|
1586
|
+
model_provider=getattr(self.llm, 'provider', None),
|
|
1587
|
+
session_id=session_id
|
|
1588
|
+
)
|
|
1589
|
+
self.telemetry.capture(start_event)
|
|
1590
|
+
|
|
1571
1591
|
try:
|
|
1572
1592
|
self.settings.agent_mode = agent_mode
|
|
1573
1593
|
session_id = session_id or self.cur_session_id or uuid7str()
|
|
@@ -1642,6 +1662,23 @@ Please continue with your assigned work, incorporating this guidance only if it'
|
|
|
1642
1662
|
# Get final result
|
|
1643
1663
|
result = await self._get_result(final_state)
|
|
1644
1664
|
logger.info("✅ VibeSurfAgent execution completed")
|
|
1665
|
+
|
|
1666
|
+
# Capture telemetry completion event
|
|
1667
|
+
end_time = time.time()
|
|
1668
|
+
duration = end_time - start_time
|
|
1669
|
+
completion_event = VibeSurfAgentTelemetryEvent(
|
|
1670
|
+
version=vibe_surf.__version__,
|
|
1671
|
+
action='task_completed',
|
|
1672
|
+
task_description=task[:200] if task else None,
|
|
1673
|
+
model=getattr(self.llm, 'model_name', None),
|
|
1674
|
+
model_provider=getattr(self.llm, 'provider', None),
|
|
1675
|
+
duration_seconds=duration,
|
|
1676
|
+
success=True,
|
|
1677
|
+
session_id=session_id
|
|
1678
|
+
)
|
|
1679
|
+
self.telemetry.capture(completion_event)
|
|
1680
|
+
self.telemetry.flush()
|
|
1681
|
+
|
|
1645
1682
|
return result
|
|
1646
1683
|
|
|
1647
1684
|
except asyncio.CancelledError:
|
|
@@ -1659,6 +1696,24 @@ Please continue with your assigned work, incorporating this guidance only if it'
|
|
|
1659
1696
|
import traceback
|
|
1660
1697
|
traceback.print_exc()
|
|
1661
1698
|
logger.error(f"❌ VibeSurfAgent execution failed: {e}")
|
|
1699
|
+
|
|
1700
|
+
# Capture telemetry error event
|
|
1701
|
+
end_time = time.time()
|
|
1702
|
+
duration = end_time - start_time
|
|
1703
|
+
error_event = VibeSurfAgentTelemetryEvent(
|
|
1704
|
+
version=vibe_surf.__version__,
|
|
1705
|
+
action='error',
|
|
1706
|
+
task_description=BrowserTaskResult if task else None,
|
|
1707
|
+
model=getattr(self.llm, 'model_name', None),
|
|
1708
|
+
model_provider=getattr(self.llm, 'provider', None),
|
|
1709
|
+
duration_seconds=duration,
|
|
1710
|
+
success=False,
|
|
1711
|
+
error_message=str(e), # Limit error message length
|
|
1712
|
+
session_id=session_id
|
|
1713
|
+
)
|
|
1714
|
+
self.telemetry.capture(error_event)
|
|
1715
|
+
self.telemetry.flush()
|
|
1716
|
+
|
|
1662
1717
|
# Add error activity log
|
|
1663
1718
|
if self.activity_logs:
|
|
1664
1719
|
activity_entry = {
|