vibesurf 0.1.22__py3-none-any.whl → 0.1.23__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 +10 -0
- vibe_surf/agents/vibe_surf_agent.py +13 -2
- vibe_surf/backend/api/agent.py +38 -0
- vibe_surf/backend/api/task.py +1 -1
- vibe_surf/backend/main.py +2 -0
- vibe_surf/browser/agent_browser_session.py +5 -5
- vibe_surf/chrome_extension/scripts/api-client.js +5 -0
- vibe_surf/chrome_extension/scripts/main.js +1 -1
- vibe_surf/chrome_extension/scripts/ui-manager.js +397 -20
- vibe_surf/chrome_extension/sidepanel.html +13 -1
- vibe_surf/chrome_extension/styles/input.css +115 -0
- vibe_surf/tools/browser_use_tools.py +0 -90
- vibe_surf/tools/vibesurf_registry.py +52 -0
- vibe_surf/tools/vibesurf_tools.py +954 -5
- vibe_surf/tools/views.py +60 -0
- {vibesurf-0.1.22.dist-info → vibesurf-0.1.23.dist-info}/METADATA +1 -1
- {vibesurf-0.1.22.dist-info → vibesurf-0.1.23.dist-info}/RECORD +22 -20
- {vibesurf-0.1.22.dist-info → vibesurf-0.1.23.dist-info}/WHEEL +0 -0
- {vibesurf-0.1.22.dist-info → vibesurf-0.1.23.dist-info}/entry_points.txt +0 -0
- {vibesurf-0.1.22.dist-info → vibesurf-0.1.23.dist-info}/licenses/LICENSE +0 -0
- {vibesurf-0.1.22.dist-info → vibesurf-0.1.23.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.23'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 23)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -65,6 +65,15 @@ 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
|
+
## Skills Command Processing
|
|
69
|
+
- When users input commands in `/skill_name` format, please use the corresponding skill action:
|
|
70
|
+
- **Tab Targeting[Optional]**: Such as `/crawl @1234` → Execute `skill_crawl` with tab_id "1234"
|
|
71
|
+
- **Parameter Processing**: Sometimes user provide uncompleted or simple prompt, please convert it to correct and optimized params. Such as convert natural language to valid JavaScript for code skill
|
|
72
|
+
- **Special Cases**: `skill_deep_research` only returns guidelines only, then follow guidelines to conduct actual research
|
|
73
|
+
- **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.
|
|
74
|
+
- **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.
|
|
75
|
+
- After `/search` completion, NEVER use browser agent to deeply investigate search result (unless explicitly emphasized by the user). The user usually only need the search results. Just return the search results.
|
|
76
|
+
|
|
68
77
|
## Language Adaptability
|
|
69
78
|
|
|
70
79
|
**Critical**: Your output language must match the user's request language. If the user communicates in Chinese, respond in Chinese. If in English, respond in English. Maintain consistency throughout the interaction.
|
|
@@ -77,6 +86,7 @@ Before executing any action:
|
|
|
77
86
|
3. **Plan Resource Usage**: Consider tab management and session optimization
|
|
78
87
|
4. **Validate Completeness**: Ensure all user requirements are addressed
|
|
79
88
|
|
|
89
|
+
|
|
80
90
|
Execute with precision, leverage concurrent capabilities for efficiency, and deliver professional results that exceed expectations.
|
|
81
91
|
"""
|
|
82
92
|
|
|
@@ -479,6 +479,16 @@ async def _vibesurf_agent_node_impl(state: VibeSurfState) -> VibeSurfState:
|
|
|
479
479
|
llm=vibesurf_agent.llm,
|
|
480
480
|
file_system=vibesurf_agent.file_system,
|
|
481
481
|
)
|
|
482
|
+
if "skill_search" in action_name or "skill_crawl" in action_name or "skill_summary" in action_name:
|
|
483
|
+
state.current_step = "END"
|
|
484
|
+
# Format final response
|
|
485
|
+
final_response = f"{result.extracted_content}"
|
|
486
|
+
await log_agent_activity(state, agent_name, "result", final_response)
|
|
487
|
+
state.final_response = final_response
|
|
488
|
+
logger.debug(final_response)
|
|
489
|
+
state.is_complete = True
|
|
490
|
+
return state
|
|
491
|
+
|
|
482
492
|
state.current_step = "vibesurf_agent"
|
|
483
493
|
if result.extracted_content:
|
|
484
494
|
vibesurf_agent.message_history.append(
|
|
@@ -1479,8 +1489,9 @@ Please continue with your assigned work, incorporating this guidance only if it'
|
|
|
1479
1489
|
"""
|
|
1480
1490
|
activity_entry = {
|
|
1481
1491
|
"agent_name": 'user',
|
|
1482
|
-
"agent_status": '
|
|
1483
|
-
"agent_msg": f"{new_task}"
|
|
1492
|
+
"agent_status": 'additional_request', # working, result, error
|
|
1493
|
+
"agent_msg": f"{new_task}",
|
|
1494
|
+
"timestamp": datetime.now().isoformat()
|
|
1484
1495
|
}
|
|
1485
1496
|
self.activity_logs.append(activity_entry)
|
|
1486
1497
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Agent API endpoints
|
|
3
|
+
"""
|
|
4
|
+
from typing import List
|
|
5
|
+
from fastapi import APIRouter, HTTPException
|
|
6
|
+
|
|
7
|
+
from vibe_surf.logger import get_logger
|
|
8
|
+
|
|
9
|
+
logger = get_logger(__name__)
|
|
10
|
+
|
|
11
|
+
router = APIRouter(prefix="/agent", tags=["agent"])
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@router.get("/get_all_skills", response_model=List[str])
|
|
15
|
+
async def get_all_skills():
|
|
16
|
+
"""
|
|
17
|
+
Get all available skill names from the VibeSurf tools registry.
|
|
18
|
+
Returns skill names with the 'skill_' prefix removed.
|
|
19
|
+
"""
|
|
20
|
+
try:
|
|
21
|
+
from ..shared_state import vibesurf_tools
|
|
22
|
+
if not vibesurf_tools:
|
|
23
|
+
raise HTTPException(status_code=500, detail="VibeSurf tools not initialized")
|
|
24
|
+
|
|
25
|
+
# Get all action names from the registry
|
|
26
|
+
all_actions = vibesurf_tools.registry.registry.actions.keys()
|
|
27
|
+
|
|
28
|
+
# Filter for actions that start with 'skill_' and remove the prefix
|
|
29
|
+
skill_names = [
|
|
30
|
+
action_name.replace('skill_', '')
|
|
31
|
+
for action_name in all_actions
|
|
32
|
+
if action_name.startswith('skill_')
|
|
33
|
+
]
|
|
34
|
+
logger.info(skill_names)
|
|
35
|
+
return skill_names
|
|
36
|
+
|
|
37
|
+
except Exception as e:
|
|
38
|
+
raise HTTPException(status_code=500, detail=f"Failed to get skills: {str(e)}")
|
vibe_surf/backend/api/task.py
CHANGED
vibe_surf/backend/main.py
CHANGED
|
@@ -21,6 +21,7 @@ from .api.activity import router as activity_router
|
|
|
21
21
|
from .api.config import router as config_router
|
|
22
22
|
from .api.browser import router as browser_router
|
|
23
23
|
from .api.voices import router as voices_router
|
|
24
|
+
from .api.agent import router as agent_router
|
|
24
25
|
|
|
25
26
|
# Import shared state
|
|
26
27
|
from . import shared_state
|
|
@@ -53,6 +54,7 @@ app.include_router(activity_router, prefix="/api", tags=["activity"])
|
|
|
53
54
|
app.include_router(config_router, prefix="/api", tags=["config"])
|
|
54
55
|
app.include_router(browser_router, prefix="/api", tags=["browser"])
|
|
55
56
|
app.include_router(voices_router, prefix="/api", tags=["voices"])
|
|
57
|
+
app.include_router(agent_router, prefix="/api", tags=["agent"])
|
|
56
58
|
|
|
57
59
|
# Global variable to control browser monitoring task
|
|
58
60
|
browser_monitor_task = None
|
|
@@ -407,11 +407,11 @@ class AgentBrowserSession(BrowserSession):
|
|
|
407
407
|
self.logger.info('🚫 VibeSurfBrowserSession: AboutBlankWatchdog disabled - no DVD animation will be shown')
|
|
408
408
|
|
|
409
409
|
# Initialize DownloadsWatchdog
|
|
410
|
-
DownloadsWatchdog.model_rebuild()
|
|
411
|
-
self._downloads_watchdog = DownloadsWatchdog(event_bus=self.event_bus, browser_session=self)
|
|
412
|
-
self._downloads_watchdog.attach_to_session()
|
|
413
|
-
if self.browser_profile.auto_download_pdfs:
|
|
414
|
-
|
|
410
|
+
# DownloadsWatchdog.model_rebuild()
|
|
411
|
+
# self._downloads_watchdog = DownloadsWatchdog(event_bus=self.event_bus, browser_session=self)
|
|
412
|
+
# self._downloads_watchdog.attach_to_session()
|
|
413
|
+
# if self.browser_profile.auto_download_pdfs:
|
|
414
|
+
# self.logger.info('📄 PDF auto-download enabled for this session')
|
|
415
415
|
|
|
416
416
|
# Initialize LocalBrowserWatchdog
|
|
417
417
|
LocalBrowserWatchdog.model_rebuild()
|
|
@@ -498,6 +498,11 @@ class VibeSurfAPIClient {
|
|
|
498
498
|
return this.get('/browser/all-tabs');
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
+
// Agent APIs - Get available skills
|
|
502
|
+
async getAllSkills() {
|
|
503
|
+
return this.get('/agent/get_all_skills');
|
|
504
|
+
}
|
|
505
|
+
|
|
501
506
|
// Utility methods
|
|
502
507
|
delay(ms) {
|
|
503
508
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
@@ -340,7 +340,7 @@ class VibeSurfApp {
|
|
|
340
340
|
<div class="input-container">
|
|
341
341
|
<div class="input-main">
|
|
342
342
|
<div class="textarea-container">
|
|
343
|
-
<textarea id="task-input" class="task-input" placeholder="
|
|
343
|
+
<textarea id="task-input" class="task-input" placeholder="Ask anything (/ for skills, @ to specify tab)" rows="3"></textarea>
|
|
344
344
|
<div class="input-actions">
|
|
345
345
|
<button id="attach-file-btn" class="action-btn attach-btn" title="Attach Files">
|
|
346
346
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|