devicely 2.2.20 → 2.3.0

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.
Files changed (53) hide show
  1. package/README.md +24 -84
  2. package/bin/devicely.js +1 -1
  3. package/config/devices.conf +1 -6
  4. package/lib/aiProviders.js +592 -1
  5. package/lib/aiProvidersConfig.js +171 -1
  6. package/lib/aiProviders_new.js +70 -0
  7. package/lib/androidDeviceDetection.js +1 -1
  8. package/lib/appMappings.js +1 -1
  9. package/lib/cognitiveLocator.js +1 -0
  10. package/lib/commanderService.js +1 -1
  11. package/lib/deviceDetection.js +1 -1
  12. package/lib/devices.js +1 -1
  13. package/lib/doctor.js +1 -1
  14. package/lib/encryption.js +1 -1
  15. package/lib/executor.js +1 -1
  16. package/lib/frontend/asset-manifest.json +3 -5
  17. package/lib/frontend/index.html +1 -1
  18. package/lib/frontend/static/css/main.ed39ba12.css +2 -0
  19. package/lib/frontend/static/js/main.310a0af8.js +3 -0
  20. package/lib/frontend/static/js/main.310a0af8.js.LICENSE.txt +59 -0
  21. package/lib/locatorStrategy.js +1 -1
  22. package/lib/logger.js +1 -1
  23. package/lib/package.json +6 -7
  24. package/lib/public/asset-manifest.json +3 -3
  25. package/lib/public/index.html +1 -1
  26. package/lib/scriptLoader.js +1 -1
  27. package/lib/server.js +1 -1
  28. package/package.json +3 -4
  29. package/scripts/shell/android_device_control.enc +1 -1
  30. package/scripts/shell/connect_ios_usb_multi_final.enc +1 -1
  31. package/scripts/shell/connect_ios_wireless_multi_final.enc +1 -1
  32. package/lib/advanced-logger.js +0 -1
  33. package/lib/aiProviders.js.strategic-backup +0 -657
  34. package/lib/aiProvidersConfig.js.backup +0 -218
  35. package/lib/commanderService.js.backup +0 -5552
  36. package/lib/devices.js.strategic-backup +0 -57
  37. package/lib/encryption.js.strategic-backup +0 -61
  38. package/lib/executor.js.strategic-backup +0 -107
  39. package/lib/hybridAI.js +0 -1
  40. package/lib/intelligentLocatorService.js +0 -1
  41. package/lib/lightweightAI.js +0 -1
  42. package/lib/localBuiltInAI.js +0 -1
  43. package/lib/localBuiltInAI_backup.js +0 -1
  44. package/lib/localBuiltInAI_simple.js +0 -1
  45. package/lib/logger-demo.js +0 -2
  46. package/lib/logger-integration-examples.js +0 -102
  47. package/lib/public/static/css/main.ed39ba12.css.map +0 -1
  48. package/lib/quick-start-logger.js +0 -2
  49. package/lib/server.js.strategic-backup +0 -6298
  50. package/lib/tensorflowAI.js +0 -1
  51. package/lib/tensorflowAI.js.strategic-backup +0 -717
  52. package/lib/tinyAI.js +0 -1
  53. package/lib/universalSessionManager.js +0 -1
@@ -1,218 +0,0 @@
1
- // AI Providers Configuration
2
- // Centralized configuration for all supported AI providers
3
-
4
- const AI_PROVIDERS_CONFIG = {
5
- local: {
6
- id: 'local',
7
- name: '🤖 Local Built-In AI (FREE & FAST)',
8
- icon: '🤖',
9
- description: 'Zero-cost, offline, lightning-fast AI processing - Always FREE & Private',
10
- models: [
11
- { id: 'built-in-patterns', name: 'Built-In Patterns', description: 'Optimized for mobile automation', default: true }
12
- ],
13
- apiKeyLabel: 'No API Key Required',
14
- apiKeyPlaceholder: 'Always FREE - No setup required!',
15
- apiKeyPattern: null, // No key needed
16
- docsUrl: '#',
17
- docsLabel: 'Local AI Documentation',
18
- features: [
19
- 'Zero API costs - runs completely offline',
20
- 'Lightning fast - sub-millisecond processing',
21
- '100% private - no data sent to external servers',
22
- 'Perfect accuracy - optimized for mobile automation'
23
- ]
24
- },
25
-
26
- tensorflow: {
27
- id: 'tensorflow',
28
- name: '🧠 TensorFlow.js AI (Enhanced Patterns)',
29
- icon: '🧠',
30
- description: 'Enhanced pattern matching with TensorFlow.js - FREE & Improved',
31
- models: [
32
- { id: 'enhanced-patterns', name: 'Enhanced Patterns', description: 'TensorFlow.js with enhanced pattern matching', default: true }
33
- ],
34
- apiKeyLabel: 'No API Key Required',
35
- apiKeyPlaceholder: 'FREE enhanced pattern matching',
36
- apiKeyPattern: null,
37
- docsUrl: '#',
38
- docsLabel: 'TensorFlow.js Documentation',
39
- features: [
40
- 'Enhanced pattern matching for better accuracy',
41
- 'Handles multi-step voice commands',
42
- 'Improved version/device info recognition',
43
- 'FREE with no external dependencies'
44
- ]
45
- },
46
-
47
- openai: {
48
- id: 'openai',
49
- name: 'OpenAI',
50
- icon: '🤖',
51
- description: 'GPT-4o and GPT-4 Turbo models',
52
- models: [
53
- { id: 'gpt-4o', name: 'GPT-4o', description: 'Fastest GPT-4 level, multimodal', default: true },
54
- { id: 'gpt-4o-mini', name: 'GPT-4o Mini', description: 'Affordable and fast' },
55
- { id: 'gpt-4-turbo', name: 'GPT-4 Turbo', description: 'Most capable GPT-4' },
56
- { id: 'gpt-4', name: 'GPT-4', description: 'High capability' },
57
- { id: 'gpt-3.5-turbo', name: 'GPT-3.5 Turbo', description: 'Fast and cost-effective' },
58
- ],
59
- apiKeyLabel: 'OpenAI API Key',
60
- apiKeyPlaceholder: 'sk-proj-...',
61
- apiKeyPattern: /^sk-(proj-)?[A-Za-z0-9]{32,}$/,
62
- docsUrl: 'https://platform.openai.com/api-keys',
63
- docsLabel: 'OpenAI Platform',
64
- },
65
-
66
- gemini: {
67
- id: 'gemini',
68
- name: 'Google Gemini',
69
- icon: '✨',
70
- description: 'Gemini 3, 2.5, and 2.0 models',
71
- models: [
72
- { id: 'gemini-2.5-flash', name: 'Gemini 2.5 Flash', description: 'Fast and reliable', default: true },
73
- { id: 'gemini-2.5-pro', name: 'Gemini 2.5 Pro', description: 'Most capable' },
74
- { id: 'gemini-1.5-flash', name: 'Gemini 1.5 Flash', description: 'Fast and efficient' },
75
- { id: 'gemini-1.5-pro', name: 'Gemini 1.5 Pro', description: 'High performance' },
76
- ],
77
- apiKeyLabel: 'Google AI API Key',
78
- apiKeyPlaceholder: 'AIza...',
79
- apiKeyPattern: /^AIza[0-9A-Za-z-_]{35}$/,
80
- docsUrl: 'https://aistudio.google.com/apikey',
81
- docsLabel: 'Google AI Studio',
82
- },
83
-
84
- claude: {
85
- id: 'claude',
86
- name: 'Anthropic Claude',
87
- icon: '🤖',
88
- description: 'Claude 3.5 Sonnet and Haiku models',
89
- models: [
90
- { id: 'claude-3-5-sonnet-20241022', name: 'Claude 3.5 Sonnet', description: 'Most intelligent, best for complex tasks', default: true },
91
- { id: 'claude-3-5-haiku-20241022', name: 'Claude 3.5 Haiku', description: 'Fast and cost-effective' },
92
- { id: 'claude-3-opus-20240229', name: 'Claude 3 Opus', description: 'Previous generation, still powerful' },
93
- ],
94
- apiKeyLabel: 'Anthropic API Key',
95
- apiKeyPlaceholder: 'sk-ant-...',
96
- apiKeyPattern: /^sk-ant-[a-zA-Z0-9\-_]{95,}$/,
97
- docsUrl: 'https://console.anthropic.com/settings/keys',
98
- docsLabel: 'Anthropic Console',
99
- models: [
100
- { id: 'claude-3-5-sonnet-20241022', name: 'Claude 3.5 Sonnet (Latest)', description: 'Best overall, Oct 2024', default: true },
101
- { id: 'claude-3-5-sonnet-20240620', name: 'Claude 3.5 Sonnet', description: 'Previous version' },
102
- { id: 'claude-3-5-haiku-20241022', name: 'Claude 3.5 Haiku', description: 'Fastest 3.5 version' },
103
- { id: 'claude-3-opus-20240229', name: 'Claude 3 Opus', description: 'Most powerful' },
104
- { id: 'claude-3-sonnet-20240229', name: 'Claude 3 Sonnet', description: 'Balanced performance' },
105
- { id: 'claude-3-haiku-20240307', name: 'Claude 3 Haiku', description: 'Fastest, most compact' },
106
- },
107
-
108
- copilot: {
109
- id: 'copilot',
110
- name: 'GitHub Copilot',
111
- icon: '🐙',
112
- description: 'GitHub Copilot AI models',
113
- models: [
114
- { id: 'gpt-4o', name: 'GPT-4o', description: 'Latest multimodal', default: true },
115
- { id: 'gpt-4', name: 'GPT-4', description: 'High capability' },
116
- { id: 'gpt-3.5-turbo', name: 'GPT-3.5 Turbo', description: 'Fast responses' },
117
- ],
118
- apiKeyLabel: 'GitHub Token',
119
- apiKeyPlaceholder: 'ghp_...',
120
- apiKeyPattern: /^(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}$/,
121
- docsUrl: 'https://github.com/settings/tokens',
122
- docsLabel: 'GitHub Tokens',
123
- },
124
-
125
- groq: {
126
- id: 'groq',
127
- name: 'Groq',
128
- icon: '⚡',
129
- description: 'Ultra-fast LLM inference',
130
- models: [
131
- { id: 'llama-3.3-70b-versatile', name: 'Llama 3.3 70B', description: 'Latest Llama, best quality', default: true },
132
- { id: 'llama-3.1-8b-instant', name: 'Llama 3.1 8B Instant', description: 'Fastest responses' },
133
- { id: 'mixtral-8x7b-32768', name: 'Mixtral 8x7B', description: '32K context' },
134
- { id: 'gemma2-9b-it', name: 'Gemma 2 9B', description: 'Google model' },
135
- ],
136
- apiKeyLabel: 'Groq API Key',
137
- apiKeyPlaceholder: 'gsk_...',
138
- apiKeyPattern: /^gsk_[A-Za-z0-9]{52}$/,
139
- docsUrl: 'https://console.groq.com/keys',
140
- docsLabel: 'Groq Console',
141
- },
142
-
143
- cohere: {
144
- id: 'cohere',
145
- name: 'Cohere',
146
- icon: '🌊',
147
- description: 'Enterprise-grade AI',
148
- models: [
149
- { id: 'command-r-plus', name: 'Command R+', description: 'Most capable', default: true },
150
- { id: 'command-r', name: 'Command R', description: 'Balanced' },
151
- { id: 'command', name: 'Command', description: 'Fast' },
152
- ],
153
- apiKeyLabel: 'Cohere API Key',
154
- apiKeyPlaceholder: 'Co...',
155
- apiKeyPattern: /^[A-Za-z0-9]{40}$/,
156
- docsUrl: 'https://dashboard.cohere.com/api-keys',
157
- docsLabel: 'Cohere Dashboard',
158
- },
159
-
160
- mistral: {
161
- id: 'mistral',
162
- name: 'Mistral AI',
163
- icon: '🔥',
164
- description: 'European AI excellence',
165
- models: [
166
- { id: 'mistral-large-latest', name: 'Mistral Large Latest', description: 'Top-tier flagship model', default: true },
167
- { id: 'mistral-small-latest', name: 'Mistral Small Latest', description: 'Cost-effective and fast' },
168
- { id: 'codestral-latest', name: 'Codestral Latest', description: 'Specialized for code' },
169
- { id: 'mistral-embed', name: 'Mistral Embed', description: 'Embeddings model' },
170
- ],
171
- apiKeyLabel: 'Mistral API Key',
172
- apiKeyPlaceholder: 'Enter API key',
173
- apiKeyPattern: /^[A-Za-z0-9]{32,}$/,
174
- docsUrl: 'https://console.mistral.ai/api-keys',
175
- docsLabel: 'Mistral Console',
176
- },
177
- };
178
-
179
- // Get default model for a provider
180
- function getDefaultModel(providerId) {
181
- const provider = AI_PROVIDERS_CONFIG[providerId];
182
- if (!provider) return null;
183
-
184
- const defaultModel = provider.models.find(m => m.default);
185
- return defaultModel ? defaultModel.id : provider.models[0].id;
186
- }
187
-
188
- // Validate API key format
189
- function validateApiKey(providerId, apiKey) {
190
- const provider = AI_PROVIDERS_CONFIG[providerId];
191
- if (!provider || !apiKey) return false;
192
-
193
- return provider.apiKeyPattern.test(apiKey);
194
- }
195
-
196
- // Get provider list for frontend
197
- function getProvidersList() {
198
- return Object.values(AI_PROVIDERS_CONFIG).map(provider => ({
199
- id: provider.id,
200
- name: provider.name,
201
- icon: provider.icon,
202
- description: provider.description,
203
- }));
204
- }
205
-
206
- // Get models for a specific provider
207
- function getProviderModels(providerId) {
208
- const provider = AI_PROVIDERS_CONFIG[providerId];
209
- return provider ? provider.models : [];
210
- }
211
-
212
- module.exports = {
213
- AI_PROVIDERS_CONFIG,
214
- getDefaultModel,
215
- validateApiKey,
216
- getProvidersList,
217
- getProviderModels,
218
- };