vibesurf 0.1.25__py3-none-any.whl → 0.1.26__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 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.25'
32
- __version_tuple__ = version_tuple = (0, 1, 25)
31
+ __version__ = version = '0.1.26'
32
+ __version_tuple__ = version_tuple = (0, 1, 26)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -104,7 +104,7 @@ async def submit_task(
104
104
  logger.info("Using default empty MCP server configuration")
105
105
 
106
106
  # DEBUG: Log the type and content of mcp_server_config
107
- logger.info(f"mcp_server_config type: {type(mcp_server_config)}, value: {mcp_server_config}")
107
+ logger.debug(f"mcp_server_config type: {type(mcp_server_config)}, value: {mcp_server_config}")
108
108
 
109
109
  # Create initial task record in database
110
110
  from ..database.queries import TaskQueries
@@ -486,13 +486,13 @@ class TaskQueries:
486
486
  return existing_task
487
487
  else:
488
488
  # DEBUG: Log the type and content of mcp_server_config before saving
489
- logger.info(
489
+ logger.debug(
490
490
  f"Creating task with mcp_server_config type: {type(mcp_server_config)}, value: {mcp_server_config}")
491
491
 
492
492
  # Serialize mcp_server_config to JSON string if it's a dict
493
493
  if isinstance(mcp_server_config, dict):
494
494
  mcp_server_config_json = json.dumps(mcp_server_config)
495
- logger.info(f"Converted dict to JSON string: {mcp_server_config_json}")
495
+ logger.debug(f"Converted dict to JSON string: {mcp_server_config_json}")
496
496
  else:
497
497
  mcp_server_config_json = mcp_server_config
498
498
 
@@ -58,7 +58,7 @@ def create_llm_from_profile(llm_profile) -> BaseChatModel:
58
58
  "deepseek": ["temperature"],
59
59
  "aws_bedrock": ["temperature"],
60
60
  "anthropic_bedrock": ["temperature"],
61
- "openai_compatible": ["temperature"]
61
+ "openai_compatible": ["temperature", "max_tokens"]
62
62
  }
63
63
 
64
64
  # Build common parameters based on provider support
vibe_surf/cli.py CHANGED
@@ -325,7 +325,7 @@ def start_backend(port: int) -> None:
325
325
  console.print("[yellow]📝 Press Ctrl+C to stop the server[/yellow]\n")
326
326
 
327
327
  # Run the server
328
- uvicorn.run(app, host="127.0.0.1", port=port, log_level="info")
328
+ uvicorn.run(app, host="127.0.0.1", port=port, log_level="error")
329
329
 
330
330
  except KeyboardInterrupt:
331
331
  console.print("\n[yellow]🛑 Server stopped by user[/yellow]")
@@ -76,7 +76,7 @@ class ChatOpenAICompatible(ChatOpenAI):
76
76
  The class automatically detects the model type and applies appropriate fixes.
77
77
  """
78
78
 
79
- max_completion_tokens: int | None = 16000
79
+ max_completion_tokens: int | None = 8192
80
80
 
81
81
  def _is_gemini_model(self) -> bool:
82
82
  """Check if the current model is a Gemini model."""
@@ -231,7 +231,9 @@ Example format: ["query 1", "query 2", "query 3", "query 4", "query 5", "query 6
231
231
  # Fallback to simple queries if parsing fails
232
232
  try:
233
233
  from json_repair import repair_json
234
- search_queries = repair_json(response.completion.strip())
234
+ search_queries_s = repair_json(response.completion.strip())
235
+ search_queries = json.loads(search_queries_s)
236
+ search_queries = search_queries[:query_num]
235
237
  except Exception as e:
236
238
  search_queries = [
237
239
  params.query,
@@ -244,7 +246,7 @@ Example format: ["query 1", "query 2", "query 3", "query 4", "query 5", "query 6
244
246
  # Step 2: Create browser sessions for parallel searching
245
247
  register_sessions = []
246
248
 
247
- for i, query in enumerate(search_queries):
249
+ for i, query in enumerate(search_queries[:query_num]):
248
250
  agent_id = f"search_agent_{i + 1:03d}"
249
251
  register_sessions.append(
250
252
  browser_manager.register_agent(agent_id, target_id=None)
@@ -278,41 +280,59 @@ Example format: ["query 1", "query 2", "query 3", "query 4", "query 5", "query 6
278
280
  # Step 5: Use LLM only for final ranking and selection (much smaller dataset now)
279
281
  if all_results and len(all_results) > 10:
280
282
  # Only use LLM if we have more than 10 results to rank
283
+ # Create indexed results for LLM prompt
284
+ indexed_results = []
285
+ for i, result in enumerate(all_results):
286
+ indexed_results.append({
287
+ "index": i,
288
+ "title": result.get('title', 'Unknown Title'),
289
+ "url": result.get('url', 'No URL'),
290
+ "summary": result.get('summary', 'No summary available')
291
+ })
292
+
281
293
  ranking_prompt = f"""
282
294
  Rank these search results for the query "{params.query}" by relevance and value.
283
295
  Select the TOP 10 most relevant and valuable results.
284
296
 
285
- Search Results ({len(all_results)} total):
286
- {json.dumps(all_results, indent=2)}
297
+ Search Results ({len(indexed_results)} total):
298
+ {json.dumps(indexed_results, indent=2, ensure_ascii=False)}
287
299
 
288
- Return the top 10 results as a JSON array with each result containing:
289
- - title: string
290
- - url: string
291
- - summary: string (brief description of why this result is valuable)
300
+ Return ONLY the indices of the top 10 results as a JSON array of numbers.
301
+ For example: [0, 5, 2, 8, 1, 9, 3, 7, 4, 6]
292
302
 
293
- Format: [{{"title": "...", "url": "...", "summary": "..."}}, ...]
303
+ Format: [index1, index2, index3, ...]
294
304
  """
295
305
 
296
306
  ranking_response = await llm.ainvoke([
297
307
  SystemMessage(
298
- content="You are an expert at ranking search results for relevance and value."),
308
+ content="You are an expert at ranking search results for relevance and value. Return only the indices of the top results."),
299
309
  UserMessage(content=ranking_prompt)
300
310
  ])
301
311
 
302
312
  try:
303
- top_results = json.loads(ranking_response.completion.strip())
304
- if not isinstance(top_results, list):
313
+ selected_indices = json.loads(ranking_response.completion.strip())
314
+ if not isinstance(selected_indices, list):
305
315
  raise ValueError("Invalid ranking results format")
306
- top_results = top_results[:10] # Ensure max 10 results
316
+ # Ensure indices are valid and limit to 10
317
+ valid_indices = [i for i in selected_indices if isinstance(i, int) and 0 <= i < len(all_results)][:10]
318
+ if valid_indices:
319
+ top_results = [all_results[i] for i in valid_indices]
320
+ else:
321
+ top_results = all_results[:10]
307
322
  except (json.JSONDecodeError, ValueError):
308
323
  try:
309
- top_results = repair_json(ranking_response.completion.strip())
310
- if isinstance(top_results, list):
311
- top_results = top_results[:10]
324
+ selected_indices_s = repair_json(ranking_response.completion.strip())
325
+ selected_indices = json.loads(selected_indices_s)
326
+ if isinstance(selected_indices, list):
327
+ valid_indices = [i for i in selected_indices if isinstance(i, int) and 0 <= i < len(all_results)][:10]
328
+ if valid_indices:
329
+ top_results = [all_results[i] for i in valid_indices]
330
+ else:
331
+ top_results = all_results[:10]
312
332
  else:
313
333
  top_results = all_results[:10]
314
334
  except Exception:
315
- # Fallback to first 10 deduplicated results
335
+ # Fallback to first 10 results
316
336
  top_results = all_results[:10]
317
337
  elif all_results:
318
338
  # If we have 10 or fewer results, skip LLM ranking
@@ -1075,7 +1095,7 @@ Please generate alternative JavaScript code that avoids this system error:"""
1075
1095
  results = await self._extract_google_results_rule_based(browser_session)
1076
1096
  if results and len(results) > 0:
1077
1097
  # Rule-based extraction succeeded
1078
- logger.info(f"Rule-based extraction found {len(results)} results for query: {query}")
1098
+ logger.debug(f"Rule-based extraction found {len(results)} results for query: {query}")
1079
1099
  return results[:search_ret_len] # Return top 6 results
1080
1100
 
1081
1101
  # Fallback to LLM extraction if rule-based fails
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vibesurf
3
- Version: 0.1.25
3
+ Version: 0.1.26
4
4
  Summary: VibeSurf: A powerful browser assistant for vibe surfing
5
5
  Author: Shao Warm
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  vibe_surf/__init__.py,sha256=WtduuMFGauMD_9dpk4fnRnLTAP6ka9Lfu0feAFNzLfo,339
2
- vibe_surf/_version.py,sha256=VIORluFSyo8DggJNI3m2ltXngK-bmCHX8hSwlGrwopY,706
3
- vibe_surf/cli.py,sha256=pbep2dBeQqralZ8AggkH4h2nayBarbdN8lhZxo35gNU,16689
2
+ vibe_surf/_version.py,sha256=Y9o7KiJWiG6n9XbSpMICgNgajFRbL4an-gN1BQc-jwM,706
3
+ vibe_surf/cli.py,sha256=KAmUBsXfS-NkMp3ITxzNXwtFeKVmXJUDZiWqLcIC0BI,16690
4
4
  vibe_surf/common.py,sha256=_WWMxen5wFwzUjEShn3yDVC1OBFUiJ6Vccadi6tuG6w,1215
5
5
  vibe_surf/logger.py,sha256=k53MFA96QX6t9OfcOf1Zws8PP0OOqjVJfhUD3Do9lKw,3043
6
6
  vibe_surf/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -23,12 +23,12 @@ vibe_surf/backend/api/browser.py,sha256=NXedyZG3NIVRIx5O7d9mHwVWX-Q4_KsX5mSgfKt8
23
23
  vibe_surf/backend/api/config.py,sha256=vKY6ZnKZeazQP9qqUEiQvP9HoPtJbAzETORuPWZomGw,27272
24
24
  vibe_surf/backend/api/files.py,sha256=kJMG9MWECKXwGh64Q6xvAzNjeZGcLhIEnn65HiMZHKE,11762
25
25
  vibe_surf/backend/api/models.py,sha256=n_bu8vavvO8bIKA1WUAbaGPFeZKeamMJelDWU3DlFJc,10533
26
- vibe_surf/backend/api/task.py,sha256=vpQMOn6YBuD_16jzfUajUvBYaydC0jj8Ny3WOJDVuck,14359
26
+ vibe_surf/backend/api/task.py,sha256=CYx8FNN04XM8cH9BjAuMb-E7GUTxi4pl0OsT_1KnDBQ,14360
27
27
  vibe_surf/backend/api/voices.py,sha256=YfPCqnR7EAYh2nfMRIpB0xEo6_giTtxrcSeobU3HQHg,17098
28
28
  vibe_surf/backend/database/__init__.py,sha256=XhmcscnhgMhUyXML7m4SnuQIqkFpyY_zJ0D3yYa2RqQ,239
29
29
  vibe_surf/backend/database/manager.py,sha256=Okmr6yG2aycmatONRMyRbHe6l53RkFIPeMxxPSD3ycY,11884
30
30
  vibe_surf/backend/database/models.py,sha256=Z5_RqGyD4ER5bsrYjc2iso9yPo7zfAqxNeVDGtZqotw,8887
31
- vibe_surf/backend/database/queries.py,sha256=0-RKjbHY3G5Y5_QrTtvl-nHs0KPlygmwm0ZOdbsvINY,41155
31
+ vibe_surf/backend/database/queries.py,sha256=6SsAxTr-ocQ189xQ5m0L3BsgUdkGtmt2TcrXP-JIbrw,41157
32
32
  vibe_surf/backend/database/schemas.py,sha256=OPnpRKwYG1Cu8geJ6pajiEDF8x8mRestXnAfI4Gy18w,3402
33
33
  vibe_surf/backend/database/migrations/v001_initial_schema.sql,sha256=MC2fa1WHUEhHhdOTxz0qB4RI7JdGRpiGXZ77ytl3LRQ,4345
34
34
  vibe_surf/backend/database/migrations/v002_add_agent_mode.sql,sha256=jKnW28HsphUeU9kudEx9QaLnUh8swmmOt-hFsZJay24,251
@@ -36,7 +36,7 @@ vibe_surf/backend/database/migrations/v003_fix_task_status_case.sql,sha256=npzRg
36
36
  vibe_surf/backend/database/migrations/v004_add_voice_profiles.sql,sha256=-9arjQBF-OxvFIOwkEl7JJJRDTS_nJ8GNX3T7bJgVq0,1321
37
37
  vibe_surf/backend/utils/__init__.py,sha256=V8leMFp7apAglUAoCHPZrNNcRHthSLYIudIJE5qwjb0,184
38
38
  vibe_surf/backend/utils/encryption.py,sha256=CjLNh_n0Luhfa-6BB-icfzkiiDqj5b4Gu6MADU3p2eM,3754
39
- vibe_surf/backend/utils/llm_factory.py,sha256=KF84YYgPaOF0_1P_IF0cAtY1kua0D-8gEP2NoSu2UZM,9033
39
+ vibe_surf/backend/utils/llm_factory.py,sha256=XIJYc9Lh_L2vbwlAe96PrjptlzJtLOjCGNdHEx6fThk,9047
40
40
  vibe_surf/browser/__init__.py,sha256=_UToO2fZfSCrfjOcxhn4Qq7ZLbYeyPuUUEmqIva-Yv8,325
41
41
  vibe_surf/browser/agen_browser_profile.py,sha256=J06hCBJSJ-zAFVM9yDFz8UpmiLuFyWke1EMekpU45eo,5871
42
42
  vibe_surf/browser/agent_browser_session.py,sha256=xV0nHo_TCb7b7QYhIee4cLzH-1rqJswYwH7GEwyQmqc,33980
@@ -85,7 +85,7 @@ vibe_surf/chrome_extension/styles/settings-responsive.css,sha256=jLE0yG15n2aI6_6
85
85
  vibe_surf/chrome_extension/styles/settings-utilities.css,sha256=3PuQS2857kg83d5erLbLdo_7J95-qV-qyNWS5M-w1oQ,505
86
86
  vibe_surf/chrome_extension/styles/variables.css,sha256=enjyhsa0PeU3b-3uiXa-VkV-1-h2-Ai3m4KpmC2k0rY,2984
87
87
  vibe_surf/llm/__init__.py,sha256=_vDVPo6STf343p1SgMQrF5023hicAx0g83pK2Gbk4Ek,601
88
- vibe_surf/llm/openai_compatible.py,sha256=rZfqjUggvftGGy76HQO3r3sumd2i_3iAuL52JyxkQUY,16113
88
+ vibe_surf/llm/openai_compatible.py,sha256=i0a5OLaL6QIlacVyctOG09vKr3KOi8T8Izp1v7xkD5I,16112
89
89
  vibe_surf/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
90
  vibe_surf/tools/browser_use_tools.py,sha256=tacxKUJL6uOt04f52_iIw1cs-FT-mBgIPmAsIc4Hww0,23730
91
91
  vibe_surf/tools/file_system.py,sha256=Tw_6J5QjCahQ3fd26CXziF1zPvRxhYM0889oK4bDhlU,19304
@@ -93,12 +93,12 @@ vibe_surf/tools/finance_tools.py,sha256=E8rmblp57e_cp0tFbdZ7BY3_upNlk4Whk0bYc_SF
93
93
  vibe_surf/tools/mcp_client.py,sha256=OeCoTgyx4MoY7JxXndK6pGHIoyFOhf5r7XCbx25y1Ec,2446
94
94
  vibe_surf/tools/report_writer_tools.py,sha256=2CyTTXOahTKZo7XwyWDDhJ--1mRA0uTtUWxu_DACAY0,776
95
95
  vibe_surf/tools/vibesurf_registry.py,sha256=Z-8d9BrJl3RFMEK0Tw1Q5xNHX2kZGsnIGCTBZ3RM-pw,2159
96
- vibe_surf/tools/vibesurf_tools.py,sha256=USmSqSc03h-FsuzvOcN_S8f3hHVJ-WEx0V5V8RxskoE,90101
96
+ vibe_surf/tools/vibesurf_tools.py,sha256=O8y1noWyY8y-j8I7vF4oOaVDybINNXiNXWNwGJJ5xsM,91500
97
97
  vibe_surf/tools/views.py,sha256=AEAPzML-lqWJ7dBMjXTl7o-rk4hp5PGaPRqLyilJUl8,7789
98
98
  vibe_surf/tools/voice_asr.py,sha256=AJG0yq_Jq-j8ulDlbPhVFfK1jch9_ASesis73iki9II,4702
99
- vibesurf-0.1.25.dist-info/licenses/LICENSE,sha256=czn6QYya0-jhLnStD9JqnMS-hwP5wRByipkrGTvoXLI,11355
100
- vibesurf-0.1.25.dist-info/METADATA,sha256=cplQA5KwaRfM0Hy8l7TFXjkxsxmF-xyL2WbJWZ7FOUg,5190
101
- vibesurf-0.1.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
- vibesurf-0.1.25.dist-info/entry_points.txt,sha256=UxqpvMocL-PR33S6vLF2OmXn-kVzM-DneMeZeHcPMM8,48
103
- vibesurf-0.1.25.dist-info/top_level.txt,sha256=VPZGHqSb6EEqcJ4ZX6bHIuWfon5f6HXl3c7BYpbRqnY,10
104
- vibesurf-0.1.25.dist-info/RECORD,,
99
+ vibesurf-0.1.26.dist-info/licenses/LICENSE,sha256=czn6QYya0-jhLnStD9JqnMS-hwP5wRByipkrGTvoXLI,11355
100
+ vibesurf-0.1.26.dist-info/METADATA,sha256=8Bdh3-15Hl0KbmB0ghk9KNQiveDnVGnhzZ-4Dv0MVjc,5190
101
+ vibesurf-0.1.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
+ vibesurf-0.1.26.dist-info/entry_points.txt,sha256=UxqpvMocL-PR33S6vLF2OmXn-kVzM-DneMeZeHcPMM8,48
103
+ vibesurf-0.1.26.dist-info/top_level.txt,sha256=VPZGHqSb6EEqcJ4ZX6bHIuWfon5f6HXl3c7BYpbRqnY,10
104
+ vibesurf-0.1.26.dist-info/RECORD,,