nstbrowser-ai-agent 0.0.1
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.
- package/LICENSE +201 -0
- package/README.md +1321 -0
- package/bin/nstbrowser-ai-agent-darwin-arm64 +0 -0
- package/bin/nstbrowser-ai-agent-darwin-x64 +0 -0
- package/bin/nstbrowser-ai-agent-linux-arm64 +0 -0
- package/bin/nstbrowser-ai-agent-linux-x64 +0 -0
- package/bin/nstbrowser-ai-agent-win32-x64.exe +0 -0
- package/bin/nstbrowser-ai-agent.js +109 -0
- package/dist/action-policy.d.ts +14 -0
- package/dist/action-policy.d.ts.map +1 -0
- package/dist/action-policy.js +253 -0
- package/dist/action-policy.js.map +1 -0
- package/dist/actions.d.ts +18 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +2037 -0
- package/dist/actions.js.map +1 -0
- package/dist/auth-cli.d.ts +2 -0
- package/dist/auth-cli.d.ts.map +1 -0
- package/dist/auth-cli.js +97 -0
- package/dist/auth-cli.js.map +1 -0
- package/dist/auth-vault.d.ts +36 -0
- package/dist/auth-vault.d.ts.map +1 -0
- package/dist/auth-vault.js +125 -0
- package/dist/auth-vault.js.map +1 -0
- package/dist/browser.d.ts +573 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +2036 -0
- package/dist/browser.js.map +1 -0
- package/dist/confirmation.d.ts +8 -0
- package/dist/confirmation.d.ts.map +1 -0
- package/dist/confirmation.js +30 -0
- package/dist/confirmation.js.map +1 -0
- package/dist/daemon.d.ts +65 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +589 -0
- package/dist/daemon.js.map +1 -0
- package/dist/diff.d.ts +18 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +271 -0
- package/dist/diff.js.map +1 -0
- package/dist/domain-filter.d.ts +28 -0
- package/dist/domain-filter.d.ts.map +1 -0
- package/dist/domain-filter.js +149 -0
- package/dist/domain-filter.js.map +1 -0
- package/dist/encryption.d.ts +73 -0
- package/dist/encryption.d.ts.map +1 -0
- package/dist/encryption.js +171 -0
- package/dist/encryption.js.map +1 -0
- package/dist/ios-actions.d.ts +11 -0
- package/dist/ios-actions.d.ts.map +1 -0
- package/dist/ios-actions.js +228 -0
- package/dist/ios-actions.js.map +1 -0
- package/dist/ios-manager.d.ts +266 -0
- package/dist/ios-manager.d.ts.map +1 -0
- package/dist/ios-manager.js +1073 -0
- package/dist/ios-manager.js.map +1 -0
- package/dist/nstbrowser-actions.d.ts +10 -0
- package/dist/nstbrowser-actions.d.ts.map +1 -0
- package/dist/nstbrowser-actions.js +277 -0
- package/dist/nstbrowser-actions.js.map +1 -0
- package/dist/nstbrowser-client.d.ts +197 -0
- package/dist/nstbrowser-client.d.ts.map +1 -0
- package/dist/nstbrowser-client.js +454 -0
- package/dist/nstbrowser-client.js.map +1 -0
- package/dist/nstbrowser-errors.d.ts +28 -0
- package/dist/nstbrowser-errors.d.ts.map +1 -0
- package/dist/nstbrowser-errors.js +59 -0
- package/dist/nstbrowser-errors.js.map +1 -0
- package/dist/nstbrowser-profile-resolver.d.ts +89 -0
- package/dist/nstbrowser-profile-resolver.d.ts.map +1 -0
- package/dist/nstbrowser-profile-resolver.js +227 -0
- package/dist/nstbrowser-profile-resolver.js.map +1 -0
- package/dist/nstbrowser-types.d.ts +151 -0
- package/dist/nstbrowser-types.d.ts.map +1 -0
- package/dist/nstbrowser-types.js +5 -0
- package/dist/nstbrowser-types.js.map +1 -0
- package/dist/nstbrowser-utils.d.ts +71 -0
- package/dist/nstbrowser-utils.d.ts.map +1 -0
- package/dist/nstbrowser-utils.js +174 -0
- package/dist/nstbrowser-utils.js.map +1 -0
- package/dist/protocol.d.ts +26 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +1245 -0
- package/dist/protocol.js.map +1 -0
- package/dist/snapshot.d.ts +67 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +514 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/state-utils.d.ts +77 -0
- package/dist/state-utils.d.ts.map +1 -0
- package/dist/state-utils.js +178 -0
- package/dist/state-utils.js.map +1 -0
- package/dist/stream-server.d.ts +117 -0
- package/dist/stream-server.d.ts.map +1 -0
- package/dist/stream-server.js +309 -0
- package/dist/stream-server.js.map +1 -0
- package/dist/types.d.ts +1121 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +83 -0
- package/scripts/analyze-api-coverage.js +205 -0
- package/scripts/analyze-cli-coverage.js +239 -0
- package/scripts/build-all-platforms.sh +68 -0
- package/scripts/check-version-sync.js +39 -0
- package/scripts/copy-native.js +36 -0
- package/scripts/download-nstbrowser-docs.js +152 -0
- package/scripts/generate-skills.sh +218 -0
- package/scripts/postinstall.js +231 -0
- package/scripts/sync-version.js +69 -0
- package/skills/nstbrowser-ai-agent/SKILL.md +759 -0
- package/skills/nstbrowser-ai-agent/references/batch-operations.md +414 -0
- package/skills/nstbrowser-ai-agent/references/nst-api-reference.md +960 -0
- package/skills/nstbrowser-ai-agent/references/profile-management.md +672 -0
- package/skills/nstbrowser-ai-agent/references/proxy-configuration.md +460 -0
- package/skills/nstbrowser-ai-agent/references/troubleshooting.md +773 -0
- package/skills/nstbrowser-ai-agent/templates/automated-workflow.sh +248 -0
- package/skills/nstbrowser-ai-agent/templates/batch-proxy-update.sh +257 -0
- package/skills/nstbrowser-ai-agent/templates/profile-setup.sh +248 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nstbrowser API client
|
|
3
|
+
* Handles all communication with Nstbrowser API v2
|
|
4
|
+
*/
|
|
5
|
+
import { NstbrowserError, NstbrowserAuthError, handleNstbrowserError, } from './nstbrowser-errors.js';
|
|
6
|
+
export class NstbrowserClient {
|
|
7
|
+
baseUrl;
|
|
8
|
+
apiKey;
|
|
9
|
+
constructor(host, port, apiKey) {
|
|
10
|
+
this.baseUrl = `http://${host}:${port}`;
|
|
11
|
+
this.apiKey = apiKey;
|
|
12
|
+
// Validate endpoint
|
|
13
|
+
this.validateEndpoint(host, port);
|
|
14
|
+
// Debug mode warning
|
|
15
|
+
if (process.env.NSTBROWSER_AI_AGENT_DEBUG === '1') {
|
|
16
|
+
console.error('[SECURITY] Debug mode enabled - API keys may be logged');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Validate endpoint configuration
|
|
21
|
+
*/
|
|
22
|
+
validateEndpoint(host, port) {
|
|
23
|
+
if (!host || host.trim() === '') {
|
|
24
|
+
throw new Error('Invalid Nstbrowser host');
|
|
25
|
+
}
|
|
26
|
+
if (port < 1 || port > 65535) {
|
|
27
|
+
throw new Error('Invalid Nstbrowser port (must be 1-65535)');
|
|
28
|
+
}
|
|
29
|
+
// Prevent connecting to dangerous internal addresses
|
|
30
|
+
const dangerousHosts = ['0.0.0.0', '169.254.169.254'];
|
|
31
|
+
if (dangerousHosts.includes(host)) {
|
|
32
|
+
throw new Error(`Connecting to ${host} is not allowed for security reasons`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Make HTTP request to Nstbrowser API
|
|
37
|
+
*/
|
|
38
|
+
async request(method, endpoint, data, options) {
|
|
39
|
+
const timeout = options?.timeout || 30000;
|
|
40
|
+
const retries = options?.retries || 3;
|
|
41
|
+
const url = `${this.baseUrl}${endpoint}`;
|
|
42
|
+
let lastError = null;
|
|
43
|
+
for (let attempt = 0; attempt < retries; attempt++) {
|
|
44
|
+
try {
|
|
45
|
+
const controller = new AbortController();
|
|
46
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
47
|
+
this.logRequest(method, endpoint, data);
|
|
48
|
+
const response = await fetch(url, {
|
|
49
|
+
method,
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Type': 'application/json',
|
|
52
|
+
'x-api-key': this.apiKey,
|
|
53
|
+
},
|
|
54
|
+
body: data ? JSON.stringify(data) : undefined,
|
|
55
|
+
signal: controller.signal,
|
|
56
|
+
});
|
|
57
|
+
clearTimeout(timeoutId);
|
|
58
|
+
if (!response.ok) {
|
|
59
|
+
if (response.status === 401) {
|
|
60
|
+
throw new NstbrowserAuthError();
|
|
61
|
+
}
|
|
62
|
+
if (response.status === 404) {
|
|
63
|
+
const errorText = await response.text().catch(() => 'No response body');
|
|
64
|
+
if (process.env.NSTBROWSER_AI_AGENT_DEBUG === '1') {
|
|
65
|
+
console.error('[DEBUG] 404 Error details:', {
|
|
66
|
+
url,
|
|
67
|
+
status: response.status,
|
|
68
|
+
statusText: response.statusText,
|
|
69
|
+
body: errorText,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
throw new NstbrowserError(`Resource not found: ${url}`, 'NST_NOT_FOUND', 404);
|
|
73
|
+
}
|
|
74
|
+
const errorData = (await response.json().catch(() => ({})));
|
|
75
|
+
throw new NstbrowserError(errorData.message || `HTTP ${response.status}: ${response.statusText}`, errorData.code?.toString(), response.status);
|
|
76
|
+
}
|
|
77
|
+
const result = (await response.json());
|
|
78
|
+
// Nstbrowser API uses 'err: false' to indicate success
|
|
79
|
+
if (result.err) {
|
|
80
|
+
throw new NstbrowserError(result.msg || 'Unknown error', result.code?.toString());
|
|
81
|
+
}
|
|
82
|
+
return result.data;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
if (error instanceof NstbrowserError) {
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
lastError = error instanceof Error ? error : new Error(String(error));
|
|
89
|
+
// If last attempt, throw error
|
|
90
|
+
if (attempt === retries - 1) {
|
|
91
|
+
throw handleNstbrowserError(lastError);
|
|
92
|
+
}
|
|
93
|
+
// Wait before retry
|
|
94
|
+
await new Promise((resolve) => setTimeout(resolve, 1000 * (attempt + 1)));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
throw lastError || new Error('Request failed');
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Log request details in debug mode
|
|
101
|
+
*/
|
|
102
|
+
logRequest(method, endpoint, data) {
|
|
103
|
+
if (process.env.NSTBROWSER_AI_AGENT_DEBUG !== '1')
|
|
104
|
+
return;
|
|
105
|
+
console.log(`[NST] ${method} ${this.baseUrl}${endpoint}`);
|
|
106
|
+
if (data) {
|
|
107
|
+
console.log(`[NST] Request body:`, JSON.stringify(data, null, 2));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// ==================== Browser Instance Management ====================
|
|
111
|
+
/**
|
|
112
|
+
* Get all running browser instances
|
|
113
|
+
*/
|
|
114
|
+
async getBrowsers() {
|
|
115
|
+
const result = await this.request('GET', '/api/v2/browsers');
|
|
116
|
+
return result || [];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Start a browser instance for a profile
|
|
120
|
+
*/
|
|
121
|
+
async startBrowser(profileId, options) {
|
|
122
|
+
// Note: Options are not supported by this endpoint
|
|
123
|
+
// Use startOnceBrowser for custom configuration
|
|
124
|
+
const response = await this.request('POST', `/api/v2/browsers/${profileId}`);
|
|
125
|
+
return {
|
|
126
|
+
profileId: response.profileId,
|
|
127
|
+
webSocketDebuggerUrl: response.webSocketDebuggerUrl,
|
|
128
|
+
remoteDebuggingPort: response.port,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Start a temporary browser (once browser)
|
|
133
|
+
*/
|
|
134
|
+
async startOnceBrowser(config) {
|
|
135
|
+
return this.request('POST', '/api/v2/browsers/once', config);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Start multiple browsers in batch
|
|
139
|
+
*/
|
|
140
|
+
async startBrowsersBatch(profileIds, options) {
|
|
141
|
+
return this.request('POST', '/api/v2/browsers/batch', {
|
|
142
|
+
profileIds,
|
|
143
|
+
...options,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Stop a browser instance
|
|
148
|
+
*/
|
|
149
|
+
async stopBrowser(profileId) {
|
|
150
|
+
await this.request('DELETE', `/api/v2/browsers/${profileId}`);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Stop all browser instances
|
|
154
|
+
* API Doc: https://apidocs.nstbrowser.io/api-15554896.md
|
|
155
|
+
* Note: Requires empty array as request body to stop all browsers
|
|
156
|
+
* Note: Endpoint requires trailing slash to avoid 307 redirect
|
|
157
|
+
*/
|
|
158
|
+
async stopAllBrowsers() {
|
|
159
|
+
await this.request('DELETE', '/api/v2/browsers/', []);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get all pages for a browser instance
|
|
163
|
+
*/
|
|
164
|
+
async getBrowserPages(profileId) {
|
|
165
|
+
return this.request('GET', `/api/v2/browsers/${profileId}/pages`);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Get remote debugging address for a browser
|
|
169
|
+
*/
|
|
170
|
+
async getBrowserDebugger(profileId) {
|
|
171
|
+
return this.request('GET', `/api/v2/browsers/${profileId}/debugger`);
|
|
172
|
+
}
|
|
173
|
+
// ==================== Profile Management ====================
|
|
174
|
+
/**
|
|
175
|
+
* Get profiles with optional query
|
|
176
|
+
* API Doc: https://apidocs.nstbrowser.io/api-15554903.md
|
|
177
|
+
*/
|
|
178
|
+
async getProfiles(query) {
|
|
179
|
+
// Build query parameters for server-side filtering
|
|
180
|
+
const params = new URLSearchParams();
|
|
181
|
+
if (query) {
|
|
182
|
+
if (query.name) {
|
|
183
|
+
params.append('s', query.name); // 's' parameter searches by name or id
|
|
184
|
+
}
|
|
185
|
+
if (query.groupId) {
|
|
186
|
+
params.append('groupId', query.groupId);
|
|
187
|
+
}
|
|
188
|
+
if (query.tags) {
|
|
189
|
+
const tagsStr = Array.isArray(query.tags) ? query.tags.join(',') : query.tags;
|
|
190
|
+
params.append('tags', tagsStr);
|
|
191
|
+
}
|
|
192
|
+
// Note: platform filtering is not supported by the API query parameters
|
|
193
|
+
// We'll apply it client-side if needed
|
|
194
|
+
}
|
|
195
|
+
const queryString = params.toString();
|
|
196
|
+
const endpoint = queryString ? `/api/v2/profiles?${queryString}` : '/api/v2/profiles';
|
|
197
|
+
const response = await this.request('GET', endpoint);
|
|
198
|
+
let profiles = response.docs || [];
|
|
199
|
+
// Apply client-side platform filtering if needed (API doesn't support this parameter)
|
|
200
|
+
if (query?.platform) {
|
|
201
|
+
const platformMap = { Windows: 0, macOS: 1, Linux: 2 };
|
|
202
|
+
const platformNum = platformMap[query.platform];
|
|
203
|
+
if (platformNum !== undefined) {
|
|
204
|
+
profiles = profiles.filter((p) => p.platform === platformNum);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return profiles;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Get profiles with cursor-based pagination
|
|
211
|
+
* API Doc: https://apidocs.nstbrowser.io/api-19974738.md
|
|
212
|
+
* Note: Requires Nstbrowser 1.17.3+
|
|
213
|
+
*/
|
|
214
|
+
async getProfilesByCursor(cursor, pageSize, direction) {
|
|
215
|
+
// Build query parameters
|
|
216
|
+
const params = new URLSearchParams();
|
|
217
|
+
if (pageSize) {
|
|
218
|
+
params.append('pageSize', pageSize.toString());
|
|
219
|
+
}
|
|
220
|
+
if (cursor) {
|
|
221
|
+
params.append('cursor', cursor);
|
|
222
|
+
}
|
|
223
|
+
if (direction) {
|
|
224
|
+
params.append('direction', direction);
|
|
225
|
+
}
|
|
226
|
+
const queryString = params.toString();
|
|
227
|
+
const endpoint = queryString
|
|
228
|
+
? `/api/v2/profiles/cursor?${queryString}`
|
|
229
|
+
: '/api/v2/profiles/cursor';
|
|
230
|
+
return this.request('GET', endpoint);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Create a new profile
|
|
234
|
+
*/
|
|
235
|
+
async createProfile(config) {
|
|
236
|
+
const response = await this.request('POST', '/api/v2/profiles', config);
|
|
237
|
+
// Debug log in debug mode
|
|
238
|
+
if (process.env.NSTBROWSER_AI_AGENT_DEBUG === '1') {
|
|
239
|
+
console.error('[DEBUG] Create profile response:', JSON.stringify(response, null, 2));
|
|
240
|
+
}
|
|
241
|
+
return response;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Delete a profile
|
|
245
|
+
*/
|
|
246
|
+
async deleteProfile(profileId) {
|
|
247
|
+
await this.request('DELETE', `/api/v2/profiles/${profileId}`);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Delete multiple profiles in batch
|
|
251
|
+
* API Doc: https://apidocs.nstbrowser.io/api-15554905.md
|
|
252
|
+
*/
|
|
253
|
+
async deleteProfilesBatch(profileIds) {
|
|
254
|
+
// Note: API expects array directly as request body, not wrapped in object
|
|
255
|
+
await this.request('DELETE', '/api/v2/profiles', profileIds);
|
|
256
|
+
}
|
|
257
|
+
// ==================== Proxy Management ====================
|
|
258
|
+
/**
|
|
259
|
+
* Update profile proxy configuration
|
|
260
|
+
* API Doc: https://apidocs.nstbrowser.io/api-15554907.md
|
|
261
|
+
*/
|
|
262
|
+
async updateProfileProxy(profileId, proxy) {
|
|
263
|
+
// Convert ProxyConfig to URL format expected by API
|
|
264
|
+
const proxyUrl = `${proxy.type}://${proxy.username && proxy.password ? `${proxy.username}:${proxy.password}@` : ''}${proxy.host}:${proxy.port}`;
|
|
265
|
+
await this.request('PUT', `/api/v2/profiles/${profileId}/proxy`, { url: proxyUrl });
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Update proxy for multiple profiles in batch
|
|
269
|
+
* API Doc: https://apidocs.nstbrowser.io/api-15554909.md
|
|
270
|
+
*/
|
|
271
|
+
async batchUpdateProxy(profileIds, proxy) {
|
|
272
|
+
// Convert ProxyConfig to URL format expected by API
|
|
273
|
+
const proxyUrl = `${proxy.type}://${proxy.username && proxy.password ? `${proxy.username}:${proxy.password}@` : ''}${proxy.host}:${proxy.port}`;
|
|
274
|
+
await this.request('PUT', '/api/v2/profiles/proxy/batch', {
|
|
275
|
+
profileIds,
|
|
276
|
+
proxyConfig: {
|
|
277
|
+
// Note: API expects 'proxyConfig', not 'proxy'
|
|
278
|
+
url: proxyUrl,
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Reset profile proxy to local type
|
|
284
|
+
*/
|
|
285
|
+
async resetProfileProxy(profileId) {
|
|
286
|
+
await this.request('DELETE', `/api/v2/profiles/${profileId}/proxy`);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Reset proxy for multiple profiles in batch
|
|
290
|
+
*/
|
|
291
|
+
async batchResetProfileProxy(profileIds) {
|
|
292
|
+
await this.request('POST', '/api/v2/profiles/proxy/batch-reset', { profileIds });
|
|
293
|
+
}
|
|
294
|
+
// ==================== Tag Management ====================
|
|
295
|
+
/**
|
|
296
|
+
* Get all available tags
|
|
297
|
+
*/
|
|
298
|
+
async getProfileTags() {
|
|
299
|
+
return this.request('GET', '/api/v2/profiles/tags');
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Create tags for a profile
|
|
303
|
+
*/
|
|
304
|
+
async createProfileTags(profileId, tags) {
|
|
305
|
+
// API expects array directly, not wrapped in object
|
|
306
|
+
await this.request('POST', `/api/v2/profiles/${profileId}/tags`, tags);
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Create tags for multiple profiles in batch
|
|
310
|
+
*/
|
|
311
|
+
async batchCreateProfileTags(profileIds, tags) {
|
|
312
|
+
await this.request('POST', '/api/v2/profiles/tags/batch', {
|
|
313
|
+
profileIds,
|
|
314
|
+
tags,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Update tags for a profile
|
|
319
|
+
*/
|
|
320
|
+
async updateProfileTags(profileId, tags) {
|
|
321
|
+
await this.request('PUT', `/api/v2/profiles/${profileId}/tags`, { tags });
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Update tags for multiple profiles in batch
|
|
325
|
+
*/
|
|
326
|
+
async batchUpdateProfileTags(profileIds, tags) {
|
|
327
|
+
await this.request('PUT', '/api/v2/profiles/tags/batch', {
|
|
328
|
+
profileIds,
|
|
329
|
+
tags,
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Clear tags for a profile
|
|
334
|
+
*/
|
|
335
|
+
async clearProfileTags(profileId) {
|
|
336
|
+
await this.request('DELETE', `/api/v2/profiles/${profileId}/tags`);
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Clear tags for multiple profiles in batch
|
|
340
|
+
*/
|
|
341
|
+
async batchClearProfileTags(profileIds) {
|
|
342
|
+
await this.request('POST', '/api/v2/profiles/tags/batch-clear', { profileIds });
|
|
343
|
+
}
|
|
344
|
+
// ==================== Group Management ====================
|
|
345
|
+
/**
|
|
346
|
+
* Get all profile groups
|
|
347
|
+
*/
|
|
348
|
+
async getAllProfileGroups() {
|
|
349
|
+
return this.request('GET', '/api/v2/profiles/groups');
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Change profile group
|
|
353
|
+
*/
|
|
354
|
+
async changeProfileGroup(profileId, groupId) {
|
|
355
|
+
await this.request('PUT', `/api/v2/profiles/${profileId}/group`, { groupId });
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Change group for multiple profiles in batch
|
|
359
|
+
*/
|
|
360
|
+
async batchChangeProfileGroup(profileIds, groupId) {
|
|
361
|
+
await this.request('PUT', '/api/v2/profiles/group/batch', {
|
|
362
|
+
profileIds,
|
|
363
|
+
groupId,
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
// ==================== Local Data Management ====================
|
|
367
|
+
/**
|
|
368
|
+
* Clear profile cache
|
|
369
|
+
*/
|
|
370
|
+
async clearProfileCache(profileId) {
|
|
371
|
+
await this.request('DELETE', `/api/v2/profiles/${profileId}/cache`);
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Clear profile cookies
|
|
375
|
+
*/
|
|
376
|
+
async clearProfileCookies(profileId) {
|
|
377
|
+
await this.request('DELETE', `/api/v2/profiles/${profileId}/cookies`);
|
|
378
|
+
}
|
|
379
|
+
// ==================== CDP Endpoints ====================
|
|
380
|
+
/**
|
|
381
|
+
* Get CDP WebSocket URL for a profile browser
|
|
382
|
+
* Uses the correct CDP endpoint: GET /api/v2/connect/{profileId}
|
|
383
|
+
*/
|
|
384
|
+
async getCdpUrl(profileId) {
|
|
385
|
+
const response = await this.request('GET', `/api/v2/connect/${profileId}`);
|
|
386
|
+
return {
|
|
387
|
+
webSocketDebuggerUrl: response.webSocketDebuggerUrl,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Get CDP WebSocket URL for once browser
|
|
392
|
+
* Uses the correct CDP endpoint: GET /api/v2/connect
|
|
393
|
+
*/
|
|
394
|
+
async getCdpUrlOnce() {
|
|
395
|
+
const response = await this.request('GET', '/api/v2/connect');
|
|
396
|
+
return {
|
|
397
|
+
webSocketDebuggerUrl: response.webSocketDebuggerUrl,
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Connect to a browser (start and get CDP URL)
|
|
402
|
+
*/
|
|
403
|
+
async connectBrowser(profileId) {
|
|
404
|
+
const response = await this.request('POST', `/api/v2/browsers/${profileId}`);
|
|
405
|
+
return {
|
|
406
|
+
profileId: response.profileId,
|
|
407
|
+
webSocketDebuggerUrl: response.webSocketDebuggerUrl,
|
|
408
|
+
remoteDebuggingPort: response.port,
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Connect to a temporary browser (once browser)
|
|
413
|
+
*/
|
|
414
|
+
async connectOnceBrowser(config) {
|
|
415
|
+
const response = await this.request('POST', '/api/v2/browsers/once', config);
|
|
416
|
+
return {
|
|
417
|
+
profileId: response.profileId,
|
|
418
|
+
webSocketDebuggerUrl: response.webSocketDebuggerUrl,
|
|
419
|
+
remoteDebuggingPort: response.port,
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
// ==================== Method Aliases for Convenience ====================
|
|
423
|
+
/**
|
|
424
|
+
* Alias for getProfiles()
|
|
425
|
+
*/
|
|
426
|
+
async listProfiles(query) {
|
|
427
|
+
return this.getProfiles(query);
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Alias for deleteProfilesBatch()
|
|
431
|
+
*/
|
|
432
|
+
async deleteProfiles(profileIds) {
|
|
433
|
+
return this.deleteProfilesBatch(profileIds);
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Alias for getBrowsers()
|
|
437
|
+
*/
|
|
438
|
+
async listBrowsers() {
|
|
439
|
+
return this.getBrowsers();
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Alias for getProfileTags()
|
|
443
|
+
*/
|
|
444
|
+
async listTags() {
|
|
445
|
+
return this.getProfileTags();
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Alias for getAllProfileGroups()
|
|
449
|
+
*/
|
|
450
|
+
async listGroups() {
|
|
451
|
+
return this.getAllProfileGroups();
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
//# sourceMappingURL=nstbrowser-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nstbrowser-client.js","sourceRoot":"","sources":["../src/nstbrowser-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,OAAO,gBAAgB;IACnB,OAAO,CAAS;IAChB,MAAM,CAAS;IAEvB,YAAY,IAAY,EAAE,IAAY,EAAE,MAAc;QACpD,IAAI,CAAC,OAAO,GAAG,UAAU,IAAI,IAAI,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,oBAAoB;QACpB,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IA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CAAC,CAAC;QAE5C,OAAO;YACL,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,oBAAoB,EAAE,QAAQ,CAAC,oBAAoB;YACnD,mBAAmB,EAAE,QAAQ,CAAC,IAAI;SACnC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB,CAAC,MAAyB;QAChD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAKhC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,CAAC;QAE5C,OAAO;YACL,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,oBAAoB,EAAE,QAAQ,CAAC,oBAAoB;YACnD,mBAAmB,EAAE,QAAQ,CAAC,IAAI;SACnC,CAAC;IACJ,CAAC;IAED,2EAA2E;IAE3E;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,KAAoB;QACrC,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc,CAAC,UAAoB;QACvC,OAAO,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ;QACZ,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nstbrowser integration error classes
|
|
3
|
+
*/
|
|
4
|
+
export declare class NstbrowserError extends Error {
|
|
5
|
+
code?: string | undefined;
|
|
6
|
+
statusCode?: number | undefined;
|
|
7
|
+
constructor(message: string, code?: string | undefined, statusCode?: number | undefined);
|
|
8
|
+
}
|
|
9
|
+
export declare class NstbrowserNotInstalledError extends NstbrowserError {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
export declare class NstbrowserNotRunningError extends NstbrowserError {
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
export declare class NstbrowserAuthError extends NstbrowserError {
|
|
16
|
+
constructor();
|
|
17
|
+
}
|
|
18
|
+
export declare class NstbrowserProfileNotFoundError extends NstbrowserError {
|
|
19
|
+
constructor(profileName: string);
|
|
20
|
+
}
|
|
21
|
+
export declare class NstbrowserConnectionError extends NstbrowserError {
|
|
22
|
+
constructor(message: string);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Convert Nstbrowser API errors to user-friendly error messages
|
|
26
|
+
*/
|
|
27
|
+
export declare function handleNstbrowserError(error: unknown): Error;
|
|
28
|
+
//# sourceMappingURL=nstbrowser-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nstbrowser-errors.d.ts","sourceRoot":"","sources":["../src/nstbrowser-errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,KAAK;IAG/B,IAAI,CAAC,EAAE,MAAM;IACb,UAAU,CAAC,EAAE,MAAM;gBAF1B,OAAO,EAAE,MAAM,EACR,IAAI,CAAC,EAAE,MAAM,YAAA,EACb,UAAU,CAAC,EAAE,MAAM,YAAA;CAK7B;AAED,qBAAa,2BAA4B,SAAQ,eAAe;;CAI/D;AAED,qBAAa,yBAA0B,SAAQ,eAAe;;CAI7D;AAED,qBAAa,mBAAoB,SAAQ,eAAe;;CAIvD;AAED,qBAAa,8BAA+B,SAAQ,eAAe;gBACrD,WAAW,EAAE,MAAM;CAGhC;AAED,qBAAa,yBAA0B,SAAQ,eAAe;gBAChD,OAAO,EAAE,MAAM;CAG5B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAoB3D"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nstbrowser integration error classes
|
|
3
|
+
*/
|
|
4
|
+
export class NstbrowserError extends Error {
|
|
5
|
+
code;
|
|
6
|
+
statusCode;
|
|
7
|
+
constructor(message, code, statusCode) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.statusCode = statusCode;
|
|
11
|
+
this.name = 'NstbrowserError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class NstbrowserNotInstalledError extends NstbrowserError {
|
|
15
|
+
constructor() {
|
|
16
|
+
super('Nstbrowser client is not installed', 'NST_NOT_INSTALLED');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class NstbrowserNotRunningError extends NstbrowserError {
|
|
20
|
+
constructor() {
|
|
21
|
+
super('Nstbrowser client is not running', 'NST_NOT_RUNNING');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class NstbrowserAuthError extends NstbrowserError {
|
|
25
|
+
constructor() {
|
|
26
|
+
super('Invalid Nstbrowser API key', 'NST_AUTH_ERROR', 401);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class NstbrowserProfileNotFoundError extends NstbrowserError {
|
|
30
|
+
constructor(profileName) {
|
|
31
|
+
super(`Profile "${profileName}" not found`, 'NST_PROFILE_NOT_FOUND', 404);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class NstbrowserConnectionError extends NstbrowserError {
|
|
35
|
+
constructor(message) {
|
|
36
|
+
super(`Failed to connect to Nstbrowser: ${message}`, 'NST_CONNECTION_ERROR');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Convert Nstbrowser API errors to user-friendly error messages
|
|
41
|
+
*/
|
|
42
|
+
export function handleNstbrowserError(error) {
|
|
43
|
+
if (error instanceof NstbrowserError) {
|
|
44
|
+
return error;
|
|
45
|
+
}
|
|
46
|
+
if (error instanceof Error) {
|
|
47
|
+
// Check for network errors
|
|
48
|
+
if (error.message.includes('ECONNREFUSED')) {
|
|
49
|
+
return new NstbrowserNotRunningError();
|
|
50
|
+
}
|
|
51
|
+
// Check for authentication errors
|
|
52
|
+
if (error.message.includes('401') || error.message.includes('Unauthorized')) {
|
|
53
|
+
return new NstbrowserAuthError();
|
|
54
|
+
}
|
|
55
|
+
return new NstbrowserError(error.message);
|
|
56
|
+
}
|
|
57
|
+
return new NstbrowserError(String(error));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=nstbrowser-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nstbrowser-errors.js","sourceRoot":"","sources":["../src/nstbrowser-errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAG/B;IACA;IAHT,YACE,OAAe,EACR,IAAa,EACb,UAAmB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAS;QACb,eAAU,GAAV,UAAU,CAAS;QAG1B,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,eAAe;IAC9D;QACE,KAAK,CAAC,oCAAoC,EAAE,mBAAmB,CAAC,CAAC;IACnE,CAAC;CACF;AAED,MAAM,OAAO,yBAA0B,SAAQ,eAAe;IAC5D;QACE,KAAK,CAAC,kCAAkC,EAAE,iBAAiB,CAAC,CAAC;IAC/D,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACtD;QACE,KAAK,CAAC,4BAA4B,EAAE,gBAAgB,EAAE,GAAG,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,MAAM,OAAO,8BAA+B,SAAQ,eAAe;IACjE,YAAY,WAAmB;QAC7B,KAAK,CAAC,YAAY,WAAW,aAAa,EAAE,uBAAuB,EAAE,GAAG,CAAC,CAAC;IAC5E,CAAC;CACF;AAED,MAAM,OAAO,yBAA0B,SAAQ,eAAe;IAC5D,YAAY,OAAe;QACzB,KAAK,CAAC,oCAAoC,OAAO,EAAE,EAAE,sBAAsB,CAAC,CAAC;IAC/E,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;QACrC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,2BAA2B;QAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;YAC3C,OAAO,IAAI,yBAAyB,EAAE,CAAC;QACzC,CAAC;QAED,kCAAkC;QAClC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;YAC5E,OAAO,IAAI,mBAAmB,EAAE,CAAC;QACnC,CAAC;QAED,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified profile resolution logic for Nstbrowser
|
|
3
|
+
*
|
|
4
|
+
* This module provides a consistent way to resolve profile names or IDs
|
|
5
|
+
* across all browser-related commands.
|
|
6
|
+
*
|
|
7
|
+
* Resolution Priority:
|
|
8
|
+
* 1. Explicit profileId parameter
|
|
9
|
+
* 2. Explicit profileName parameter
|
|
10
|
+
* 3. NST_PROFILE_ID environment variable
|
|
11
|
+
* 4. NST_PROFILE environment variable
|
|
12
|
+
* 5. No profile (use once/temporary browser)
|
|
13
|
+
*
|
|
14
|
+
* Name Resolution Logic:
|
|
15
|
+
* When a profile name is provided:
|
|
16
|
+
* 1. Check running browsers for matching name (use earliest if multiple)
|
|
17
|
+
* 2. If not running, query profile API for matching name
|
|
18
|
+
* 3. If found, use the first matching profile
|
|
19
|
+
* 4. If not found, throw error
|
|
20
|
+
*/
|
|
21
|
+
import type { NstbrowserClient } from './nstbrowser-client.js';
|
|
22
|
+
/**
|
|
23
|
+
* Check if a string is a valid UUID (case-insensitive)
|
|
24
|
+
*
|
|
25
|
+
* @param input - String to check
|
|
26
|
+
* @returns true if input is a valid UUID, false otherwise
|
|
27
|
+
*/
|
|
28
|
+
export declare function isUuid(input: string): boolean;
|
|
29
|
+
export interface ProfileResolutionOptions {
|
|
30
|
+
/** Explicit profile ID (highest priority) */
|
|
31
|
+
profileId?: string;
|
|
32
|
+
/** Explicit profile name */
|
|
33
|
+
profileName?: string;
|
|
34
|
+
/** Whether to allow once/temporary browser (default: true) */
|
|
35
|
+
allowOnce?: boolean;
|
|
36
|
+
/** Whether to auto-start browser if not running (default: true) */
|
|
37
|
+
autoStart?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface ResolvedProfile {
|
|
40
|
+
/** Resolved profile ID (undefined for once browser) */
|
|
41
|
+
profileId?: string;
|
|
42
|
+
/** Profile name (if resolved from name) */
|
|
43
|
+
profileName?: string;
|
|
44
|
+
/** Whether browser is already running */
|
|
45
|
+
isRunning: boolean;
|
|
46
|
+
/** Whether this is a once/temporary browser */
|
|
47
|
+
isOnce: boolean;
|
|
48
|
+
/** CDP WebSocket URL */
|
|
49
|
+
wsUrl?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Resolve profile from name or ID
|
|
53
|
+
*
|
|
54
|
+
* @param client - Nstbrowser API client
|
|
55
|
+
* @param options - Resolution options
|
|
56
|
+
* @returns Resolved profile information
|
|
57
|
+
* @throws Error if profile not found or invalid
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveProfile(client: NstbrowserClient, options?: ProfileResolutionOptions): Promise<ResolvedProfile>;
|
|
60
|
+
/**
|
|
61
|
+
* Ensure browser is running for the resolved profile
|
|
62
|
+
*
|
|
63
|
+
* @param client - Nstbrowser API client
|
|
64
|
+
* @param resolved - Resolved profile information
|
|
65
|
+
* @returns Updated profile information with wsUrl
|
|
66
|
+
*/
|
|
67
|
+
export declare function ensureBrowserRunning(client: NstbrowserClient, resolved: ResolvedProfile, nstHost: string, nstPort: number, nstApiKey: string): Promise<ResolvedProfile>;
|
|
68
|
+
/**
|
|
69
|
+
* Get profile ID from name or ID (without starting browser)
|
|
70
|
+
*
|
|
71
|
+
* This is useful for commands that need profile ID but don't need to start browser
|
|
72
|
+
* (e.g., profile delete, profile update, etc.)
|
|
73
|
+
*
|
|
74
|
+
* @param client - Nstbrowser API client
|
|
75
|
+
* @param nameOrId - Profile name or ID
|
|
76
|
+
* @returns Profile ID
|
|
77
|
+
* @throws Error if profile not found
|
|
78
|
+
*/
|
|
79
|
+
export declare function getProfileId(client: NstbrowserClient, nameOrId: string): Promise<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Get multiple profile IDs from names or IDs
|
|
82
|
+
*
|
|
83
|
+
* @param client - Nstbrowser API client
|
|
84
|
+
* @param namesOrIds - Array of profile names or IDs
|
|
85
|
+
* @returns Array of profile IDs
|
|
86
|
+
* @throws Error if any profile not found
|
|
87
|
+
*/
|
|
88
|
+
export declare function getProfileIds(client: NstbrowserClient, namesOrIds: string[]): Promise<string[]>;
|
|
89
|
+
//# sourceMappingURL=nstbrowser-profile-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nstbrowser-profile-resolver.d.ts","sourceRoot":"","sources":["../src/nstbrowser-profile-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAG7C;AAED,MAAM,WAAW,wBA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