vibesurf 0.1.20__py3-none-any.whl → 0.1.21__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.

Files changed (40) hide show
  1. vibe_surf/_version.py +2 -2
  2. vibe_surf/backend/api/task.py +1 -1
  3. vibe_surf/backend/api/voices.py +481 -0
  4. vibe_surf/backend/database/migrations/v004_add_voice_profiles.sql +35 -0
  5. vibe_surf/backend/database/models.py +38 -1
  6. vibe_surf/backend/database/queries.py +189 -1
  7. vibe_surf/backend/main.py +2 -0
  8. vibe_surf/backend/shared_state.py +1 -1
  9. vibe_surf/backend/voice_model_config.py +25 -0
  10. vibe_surf/browser/agen_browser_profile.py +2 -0
  11. vibe_surf/browser/agent_browser_session.py +3 -3
  12. vibe_surf/chrome_extension/background.js +224 -9
  13. vibe_surf/chrome_extension/content.js +147 -0
  14. vibe_surf/chrome_extension/manifest.json +11 -2
  15. vibe_surf/chrome_extension/permission-iframe.html +38 -0
  16. vibe_surf/chrome_extension/permission-request.html +104 -0
  17. vibe_surf/chrome_extension/scripts/api-client.js +61 -0
  18. vibe_surf/chrome_extension/scripts/main.js +8 -2
  19. vibe_surf/chrome_extension/scripts/permission-iframe-request.js +188 -0
  20. vibe_surf/chrome_extension/scripts/permission-request.js +118 -0
  21. vibe_surf/chrome_extension/scripts/settings-manager.js +690 -3
  22. vibe_surf/chrome_extension/scripts/ui-manager.js +730 -119
  23. vibe_surf/chrome_extension/scripts/user-settings-storage.js +422 -0
  24. vibe_surf/chrome_extension/scripts/voice-recorder.js +514 -0
  25. vibe_surf/chrome_extension/sidepanel.html +106 -29
  26. vibe_surf/chrome_extension/styles/components.css +35 -0
  27. vibe_surf/chrome_extension/styles/input.css +164 -1
  28. vibe_surf/chrome_extension/styles/layout.css +1 -1
  29. vibe_surf/chrome_extension/styles/settings-environment.css +138 -0
  30. vibe_surf/chrome_extension/styles/settings-forms.css +7 -7
  31. vibe_surf/chrome_extension/styles/variables.css +51 -0
  32. vibe_surf/tools/voice_asr.py +79 -8
  33. {vibesurf-0.1.20.dist-info → vibesurf-0.1.21.dist-info}/METADATA +8 -12
  34. {vibesurf-0.1.20.dist-info → vibesurf-0.1.21.dist-info}/RECORD +38 -31
  35. vibe_surf/chrome_extension/icons/convert-svg.js +0 -33
  36. vibe_surf/chrome_extension/icons/logo-preview.html +0 -187
  37. {vibesurf-0.1.20.dist-info → vibesurf-0.1.21.dist-info}/WHEEL +0 -0
  38. {vibesurf-0.1.20.dist-info → vibesurf-0.1.21.dist-info}/entry_points.txt +0 -0
  39. {vibesurf-0.1.20.dist-info → vibesurf-0.1.21.dist-info}/licenses/LICENSE +0 -0
  40. {vibesurf-0.1.20.dist-info → vibesurf-0.1.21.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,118 @@
1
+ // Permission Request Page Script
2
+ // Handles microphone permission request in new tab
3
+
4
+ const statusEl = document.getElementById('status');
5
+
6
+ // Add debug logging
7
+ console.log('[PermissionPage] Permission page loaded');
8
+ console.log('[PermissionPage] Location:', window.location.href);
9
+ console.log('[PermissionPage] Media devices available:', !!navigator.mediaDevices);
10
+ console.log('[PermissionPage] getUserMedia available:', !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia));
11
+
12
+ document.getElementById('allowBtn').onclick = async function() {
13
+ console.log('[PermissionPage] Allow button clicked');
14
+ console.log('[PermissionPage] Current URL:', window.location.href);
15
+ console.log('[PermissionPage] Media devices available:', !!navigator.mediaDevices);
16
+ console.log('[PermissionPage] getUserMedia available:', !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia));
17
+ console.log('[PermissionPage] Is secure context:', window.isSecureContext);
18
+ console.log('[PermissionPage] Chrome runtime available:', !!(typeof chrome !== 'undefined' && chrome.runtime));
19
+
20
+ statusEl.className = 'loading';
21
+ statusEl.textContent = 'Requesting microphone access...';
22
+
23
+ try {
24
+ // Check if media devices are available
25
+ if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
26
+ throw new Error('Media devices not supported in this context');
27
+ }
28
+
29
+ console.log('[PermissionPage] Requesting getUserMedia...');
30
+ console.log('[PermissionPage] About to call getUserMedia with constraints: {audio: true, video: false}');
31
+
32
+ // This will trigger Chrome's standard permission popup in the address bar
33
+ const stream = await navigator.mediaDevices.getUserMedia({audio: true, video: false});
34
+
35
+ console.log('[PermissionPage] Permission granted, stream received');
36
+ console.log('[PermissionPage] Stream tracks:', stream.getTracks().length);
37
+
38
+ // Stop the stream immediately after getting permission
39
+ stream.getTracks().forEach(track => track.stop());
40
+
41
+ statusEl.className = 'success';
42
+ statusEl.textContent = 'Permission granted! You can close this tab.';
43
+
44
+ // Send success message to voice recorder
45
+ console.log('[PermissionPage] Sending success message');
46
+ chrome.runtime.sendMessage({
47
+ type: "MICROPHONE_PERMISSION_RESULT",
48
+ granted: true
49
+ });
50
+
51
+ // Close tab after a short delay
52
+ setTimeout(() => window.close(), 2000);
53
+
54
+ } catch (error) {
55
+ console.error('[PermissionPage] Permission error:', error);
56
+ console.error('[PermissionPage] Error details:', {
57
+ name: error.name,
58
+ message: error.message,
59
+ stack: error.stack
60
+ });
61
+
62
+ statusEl.className = 'error';
63
+
64
+ // Provide more user-friendly error messages
65
+ let errorMessage = '';
66
+ let debugInfo = '';
67
+
68
+ if (error.name === 'NotAllowedError') {
69
+ errorMessage = 'Microphone access was denied. Please check your browser permissions.';
70
+ debugInfo = 'Try clicking the microphone icon in your browser\'s address bar to allow access.';
71
+ } else if (error.name === 'NotFoundError') {
72
+ errorMessage = 'No microphone found on this device.';
73
+ debugInfo = 'Please ensure a microphone is connected and try again.';
74
+ } else if (error.name === 'NotReadableError') {
75
+ errorMessage = 'Microphone is already in use by another application.';
76
+ debugInfo = 'Please close other applications that might be using the microphone.';
77
+ } else if (error.name === 'SecurityError') {
78
+ errorMessage = 'Security restrictions prevent microphone access.';
79
+ debugInfo = 'This might be due to browser security settings or the page context.';
80
+ } else {
81
+ errorMessage = `Permission denied: ${error.message}`;
82
+ debugInfo = `Error type: ${error.name}`;
83
+ }
84
+
85
+ statusEl.textContent = errorMessage;
86
+
87
+ // Add debug info to the page
88
+ const debugDiv = document.createElement('div');
89
+ debugDiv.style.marginTop = '10px';
90
+ debugDiv.style.fontSize = '12px';
91
+ debugDiv.style.color = '#666';
92
+ debugDiv.textContent = debugInfo;
93
+ statusEl.appendChild(debugDiv);
94
+
95
+ // Send error message to voice recorder
96
+ chrome.runtime.sendMessage({
97
+ type: "MICROPHONE_PERMISSION_RESULT",
98
+ granted: false,
99
+ error: error.message,
100
+ errorName: error.name,
101
+ userMessage: errorMessage
102
+ });
103
+ }
104
+ };
105
+
106
+ document.getElementById('denyBtn').onclick = function() {
107
+ console.log('[PermissionPage] Deny button clicked');
108
+ statusEl.className = 'error';
109
+ statusEl.textContent = 'Permission denied by user';
110
+
111
+ chrome.runtime.sendMessage({
112
+ type: "MICROPHONE_PERMISSION_RESULT",
113
+ granted: false,
114
+ error: "User denied permission"
115
+ });
116
+
117
+ setTimeout(() => window.close(), 1500);
118
+ };