@probebrowser/trace 1.0.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.
package/README.md ADDED
@@ -0,0 +1,271 @@
1
+ # @trace/cli
2
+
3
+ **AI-Powered Web Debugging from the Terminal**
4
+
5
+ Command-line interface for Trace, providing access to all 79 debugging tools. Analyze pages, find errors, check performance, and debug interactively - all from your terminal.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install -g @trace/cli
11
+ ```
12
+
13
+ Or run with npx:
14
+
15
+ ```bash
16
+ npx @trace/cli analyze https://example.com
17
+ ```
18
+
19
+ ## Commands
20
+
21
+ ### `trace analyze <url>` - Analyze a page
22
+
23
+ ```bash
24
+ # Basic analysis
25
+ trace analyze https://example.com
26
+
27
+ # Ask specific question
28
+ trace analyze https://example.com -q "Why is the page slow?"
29
+
30
+ # JSON output
31
+ trace analyze https://example.com --json
32
+ ```
33
+
34
+ Options:
35
+ - `-q, --query <query>` - Specific question to ask
36
+ - `--api-url <url>` - API endpoint
37
+ - `--api-key <key>` - API key
38
+ - `--headless` / `--no-headless` - Browser visibility
39
+ - `--json` - Output as JSON
40
+ - `-v, --verbose` - Verbose output
41
+
42
+ ### `trace debug <url>` - Full debug scan
43
+
44
+ ```bash
45
+ trace debug https://example.com
46
+ ```
47
+
48
+ Runs a comprehensive debug scan checking console, network, DOM, and performance.
49
+
50
+ ### `trace errors <url>` - Get console errors
51
+
52
+ ```bash
53
+ # Show errors
54
+ trace errors https://example.com
55
+
56
+ # JSON output
57
+ trace errors https://example.com --json
58
+ ```
59
+
60
+ ### `trace network <url>` - Network analysis
61
+
62
+ ```bash
63
+ # Full network summary
64
+ trace network https://example.com
65
+
66
+ # Failed requests only
67
+ trace network https://example.com --failed
68
+
69
+ # JSON output
70
+ trace network https://example.com --json
71
+ ```
72
+
73
+ ### `trace perf <url>` - Performance metrics
74
+
75
+ ```bash
76
+ trace perf https://example.com
77
+ ```
78
+
79
+ Shows:
80
+ - DOM Content Loaded time
81
+ - First Contentful Paint
82
+ - JS Heap Size
83
+ - DOM Nodes count
84
+ - Layout count
85
+ - Performance issues
86
+
87
+ ### `trace a11y <url>` - Accessibility check
88
+
89
+ ```bash
90
+ trace a11y https://example.com
91
+ ```
92
+
93
+ Finds accessibility issues like:
94
+ - Missing alt text
95
+ - Low contrast
96
+ - Missing labels
97
+ - Keyboard issues
98
+
99
+ ### `trace health <url>` - Quick health check
100
+
101
+ ```bash
102
+ # Check health (exits with code 1 if unhealthy)
103
+ trace health https://example.com
104
+
105
+ # Use in CI
106
+ trace health https://example.com || echo "Site has issues!"
107
+ ```
108
+
109
+ ### `trace inspect <url> <selector>` - Inspect element
110
+
111
+ ```bash
112
+ trace inspect https://example.com "#my-button"
113
+ ```
114
+
115
+ Shows:
116
+ - Element info (tag, id, class)
117
+ - Visibility status
118
+ - Box model dimensions
119
+
120
+ ### `trace tool <url> <toolName>` - Run specific tool
121
+
122
+ ```bash
123
+ # Run any of the 79 tools
124
+ trace tool https://example.com get_console_errors
125
+ trace tool https://example.com get_performance_metrics
126
+ trace tool https://example.com inspect_element -i '{"selector": "#app"}'
127
+ ```
128
+
129
+ ### `trace tools` - List all tools
130
+
131
+ ```bash
132
+ trace tools
133
+ ```
134
+
135
+ Lists all 79 available debugging tools by category.
136
+
137
+ ### `trace screenshot <url> [output]` - Take screenshot
138
+
139
+ ```bash
140
+ # Default filename
141
+ trace screenshot https://example.com
142
+
143
+ # Custom filename
144
+ trace screenshot https://example.com page.png
145
+ ```
146
+
147
+ ### `trace watch <url>` - Real-time monitoring
148
+
149
+ ```bash
150
+ # Watch for 30 seconds
151
+ trace watch https://example.com
152
+
153
+ # Watch for 60 seconds
154
+ trace watch https://example.com -d 60
155
+ ```
156
+
157
+ Monitors console errors and failed network requests in real-time.
158
+
159
+ ### `trace repl <url>` - Interactive session
160
+
161
+ ```bash
162
+ trace repl https://example.com
163
+ ```
164
+
165
+ Opens an interactive debugging session with commands:
166
+
167
+ ```
168
+ Commands:
169
+ /debug - Full debug scan
170
+ /errors - Get console errors
171
+ /network - Network summary
172
+ /perf - Performance metrics
173
+ /a11y - Accessibility check
174
+ /tool <name> - Run a specific tool
175
+ /eval <expr> - Evaluate JavaScript
176
+ /nav <url> - Navigate to URL
177
+ /reload - Reload page
178
+ /screenshot - Take screenshot
179
+ /help - Show all commands
180
+ /exit - Exit REPL
181
+
182
+ Or just type a question to ask the AI!
183
+ ```
184
+
185
+ Example REPL session:
186
+
187
+ ```
188
+ trace> /errors
189
+ []
190
+
191
+ trace> Why is the page loading slowly?
192
+ 🔄 Analyzing...
193
+
194
+ 📊 Analysis Results
195
+ ─────────────────────────
196
+
197
+ Summary:
198
+ The page has 3 performance issues...
199
+
200
+ Issues (3):
201
+ 🟠 [HIGH] Large JavaScript Bundle
202
+ The main.js file is 2.5MB uncompressed
203
+ Fix: Enable code splitting and tree shaking
204
+
205
+ trace> /perf
206
+ {
207
+ "DOMContentLoaded": 1234,
208
+ "FirstContentfulPaint": 2100,
209
+ ...
210
+ }
211
+
212
+ trace> /exit
213
+ ```
214
+
215
+ ## CI/CD Integration
216
+
217
+ ### GitHub Actions
218
+
219
+ ```yaml
220
+ - name: Check site health
221
+ run: |
222
+ npx @trace/cli health https://myapp.com
223
+
224
+ - name: Run debug analysis
225
+ run: |
226
+ npx @trace/cli analyze https://myapp.com --json > debug-report.json
227
+ ```
228
+
229
+ ### Exit Codes
230
+
231
+ - `0` - Success / Healthy
232
+ - `1` - Errors found / Unhealthy
233
+
234
+ ## Configuration
235
+
236
+ ### Environment Variables
237
+
238
+ ```bash
239
+ export TRACE_API_URL="https://your-api.com"
240
+ export TRACE_API_KEY="your-key"
241
+ ```
242
+
243
+ ### API Key
244
+
245
+ ```bash
246
+ trace analyze https://example.com --api-key YOUR_KEY
247
+ ```
248
+
249
+ ## All 79 Tools
250
+
251
+ Run `trace tools` to see all available tools:
252
+
253
+ **Console (6):** get_console_logs, get_console_errors, get_error_groups, get_exception_details, clear_console, get_log_count
254
+
255
+ **Network (10):** get_network_requests, get_network_failed, get_network_summary, get_request_details, get_cached_requests, get_request_timing, get_request_body, get_response_body, get_redirect_chain, replay_request
256
+
257
+ **DOM (16):** inspect_element, get_element_styles, get_element_box_model, query_selector, get_dom_tree, get_element_attributes, get_element_events, analyze_visibility, get_element_accessibility, check_accessibility, highlight_element, scroll_to_element, get_element_screenshot, get_computed_style, get_element_hierarchy, measure_element
258
+
259
+ **Debugger (24):** get_debug_state, set_breakpoint, remove_breakpoint, get_breakpoints, set_conditional_breakpoint, set_logpoint, pause_execution, resume_execution, step_over, step_into, step_out, get_call_stack, get_scope_variables, get_variable_value, set_variable_value, evaluate_expression, evaluate_on_frame, get_this_object, add_watch, remove_watch, get_watches, enable_debugger, disable_debugger, get_possible_breakpoints
260
+
261
+ **Source (8):** get_scripts, get_script_source, search_scripts, get_script_parsed, set_script_source, blackbox_script, unblackbox_script, get_script_coverage
262
+
263
+ **Performance (4):** get_performance_metrics, start_performance_profile, stop_performance_profile, get_heap_snapshot
264
+
265
+ **Timeline (5):** get_timeline_events, start_timeline, stop_timeline, get_event_listeners_timeline, take_timeline_snapshot
266
+
267
+ **Tracing (3):** start_trace, stop_trace, get_trace_events
268
+
269
+ ## License
270
+
271
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,803 @@
1
+ #!/usr/bin/env node
2
+ // ============================================
3
+ // TRACE CLI - FULL POWER VERSION
4
+ // AI-powered web debugging from the terminal
5
+ // Complete with all commands and interactive REPL
6
+ // ============================================
7
+ import { program } from 'commander';
8
+ import chalk from 'chalk';
9
+ import ora from 'ora';
10
+ import readline from 'readline';
11
+ import { Trace } from '../../sdk/dist/index.js';
12
+ const VERSION = '1.0.0';
13
+ // ============================================
14
+ // LOGGING HELPERS
15
+ // ============================================
16
+ const log = {
17
+ info: (msg) => console.log(chalk.blue('ℹ'), msg),
18
+ success: (msg) => console.log(chalk.green('✓'), msg),
19
+ error: (msg) => console.log(chalk.red('✗'), msg),
20
+ warn: (msg) => console.log(chalk.yellow('⚠'), msg),
21
+ dim: (msg) => console.log(chalk.dim(msg)),
22
+ bold: (msg) => console.log(chalk.bold(msg)),
23
+ issue: (issue) => {
24
+ const colors = {
25
+ critical: chalk.red,
26
+ high: chalk.redBright,
27
+ medium: chalk.yellow,
28
+ low: chalk.dim,
29
+ };
30
+ const color = colors[issue.severity] || chalk.white;
31
+ const icon = issue.severity === 'critical' ? '🔴' :
32
+ issue.severity === 'high' ? '🟠' :
33
+ issue.severity === 'medium' ? '🟡' : '⚪';
34
+ console.log(` ${icon} ${color(`[${issue.severity.toUpperCase()}]`)} ${chalk.bold(issue.title)}`);
35
+ console.log(` ${chalk.dim(issue.description)}`);
36
+ if (issue.fix) {
37
+ console.log(` ${chalk.cyan('Fix:')} ${issue.fix}`);
38
+ }
39
+ console.log();
40
+ },
41
+ result: (result) => {
42
+ console.log();
43
+ console.log(chalk.bold('📊 Analysis Results'));
44
+ console.log(chalk.gray('─'.repeat(60)));
45
+ console.log();
46
+ console.log(chalk.bold('Summary:'));
47
+ console.log(` ${result.analysis.summary}`);
48
+ console.log();
49
+ if (result.analysis.issues.length > 0) {
50
+ console.log(chalk.bold(`Issues (${result.analysis.issues.length}):`));
51
+ console.log();
52
+ for (const issue of result.analysis.issues) {
53
+ log.issue(issue);
54
+ }
55
+ }
56
+ else {
57
+ log.success('No issues found!');
58
+ console.log();
59
+ }
60
+ if (result.analysis.recommendations.length > 0) {
61
+ console.log(chalk.bold('Recommendations:'));
62
+ for (const rec of result.analysis.recommendations) {
63
+ console.log(` ${chalk.cyan('→')} ${rec.action}`);
64
+ console.log(` ${chalk.dim(rec.reason)}`);
65
+ }
66
+ console.log();
67
+ }
68
+ console.log(chalk.dim(`Executed ${result.execution.results.length} tools in ${result.execution.totalDuration}ms`));
69
+ },
70
+ table: (data) => {
71
+ const maxKeyLen = Math.max(...Object.keys(data).map(k => k.length));
72
+ for (const [key, value] of Object.entries(data)) {
73
+ console.log(` ${chalk.cyan(key.padEnd(maxKeyLen))} ${value}`);
74
+ }
75
+ },
76
+ };
77
+ // ============================================
78
+ // CLI SETUP
79
+ // ============================================
80
+ program
81
+ .name('trace')
82
+ .description('AI-powered web debugging from the terminal')
83
+ .version(VERSION);
84
+ // ============================================
85
+ // ANALYZE COMMAND
86
+ // ============================================
87
+ program
88
+ .command('analyze <url>')
89
+ .alias('a')
90
+ .description('Analyze a URL for issues')
91
+ .option('-q, --query <query>', 'Specific question to ask')
92
+ .option('--api-url <url>', 'API endpoint', 'https://dev-intelli-api.azurewebsites.net')
93
+ .option('--api-key <key>', 'API key')
94
+ .option('--headless', 'Run in headless mode', true)
95
+ .option('--no-headless', 'Run with visible browser')
96
+ .option('--json', 'Output as JSON')
97
+ .option('-v, --verbose', 'Verbose output')
98
+ .action(async (url, options) => {
99
+ const spinner = ora('Connecting...').start();
100
+ try {
101
+ const trace = new Trace({
102
+ apiUrl: options.apiUrl,
103
+ apiKey: options.apiKey,
104
+ headless: options.headless,
105
+ verbose: options.verbose,
106
+ });
107
+ spinner.text = `Connecting to ${url}`;
108
+ await trace.connect(url);
109
+ spinner.text = 'Analyzing...';
110
+ const query = options.query || 'What issues are on this page? Check console errors, network failures, and performance.';
111
+ const result = await trace.query(query);
112
+ await trace.disconnect();
113
+ spinner.stop();
114
+ if (options.json) {
115
+ console.log(JSON.stringify(result, null, 2));
116
+ return;
117
+ }
118
+ log.result(result);
119
+ }
120
+ catch (error) {
121
+ spinner.stop();
122
+ log.error(`Failed: ${error}`);
123
+ process.exit(1);
124
+ }
125
+ });
126
+ // ============================================
127
+ // DEBUG COMMAND
128
+ // ============================================
129
+ program
130
+ .command('debug <url>')
131
+ .alias('d')
132
+ .description('Full debug scan of a URL')
133
+ .option('--api-url <url>', 'API endpoint', 'https://dev-intelli-api.azurewebsites.net')
134
+ .option('--api-key <key>', 'API key')
135
+ .option('--json', 'Output as JSON')
136
+ .action(async (url, options) => {
137
+ const spinner = ora('Connecting...').start();
138
+ try {
139
+ const trace = new Trace({
140
+ apiUrl: options.apiUrl,
141
+ apiKey: options.apiKey,
142
+ });
143
+ spinner.text = `Connecting to ${url}`;
144
+ await trace.connect(url);
145
+ spinner.text = 'Running full debug scan...';
146
+ const result = await trace.debug();
147
+ await trace.disconnect();
148
+ spinner.stop();
149
+ if (options.json) {
150
+ console.log(JSON.stringify(result, null, 2));
151
+ return;
152
+ }
153
+ log.result(result);
154
+ }
155
+ catch (error) {
156
+ spinner.stop();
157
+ log.error(`Failed: ${error}`);
158
+ process.exit(1);
159
+ }
160
+ });
161
+ // ============================================
162
+ // ERRORS COMMAND
163
+ // ============================================
164
+ program
165
+ .command('errors <url>')
166
+ .alias('e')
167
+ .description('Get console errors from a URL')
168
+ .option('--json', 'Output as JSON')
169
+ .action(async (url, options) => {
170
+ const spinner = ora('Connecting...').start();
171
+ try {
172
+ const trace = new Trace({ headless: true });
173
+ spinner.text = `Connecting to ${url}`;
174
+ await trace.connect(url);
175
+ spinner.text = 'Checking for errors...';
176
+ const errors = await trace.getConsoleErrors();
177
+ const groups = await trace.getErrorGroups();
178
+ await trace.disconnect();
179
+ spinner.stop();
180
+ if (options.json) {
181
+ console.log(JSON.stringify({ errors, groups }, null, 2));
182
+ return;
183
+ }
184
+ console.log();
185
+ console.log(chalk.bold(`🔴 Console Errors (${errors.length})`));
186
+ console.log(chalk.gray('─'.repeat(60)));
187
+ if (errors.length === 0) {
188
+ log.success('No console errors found!');
189
+ }
190
+ else {
191
+ for (const err of errors.slice(0, 20)) {
192
+ console.log();
193
+ console.log(` ${chalk.red('●')} ${chalk.bold(err.errorType || 'Error')}`);
194
+ console.log(` ${err.message.substring(0, 200)}`);
195
+ if (err.location) {
196
+ console.log(` ${chalk.dim(err.location)}`);
197
+ }
198
+ }
199
+ }
200
+ console.log();
201
+ }
202
+ catch (error) {
203
+ spinner.stop();
204
+ log.error(`Failed: ${error}`);
205
+ process.exit(1);
206
+ }
207
+ });
208
+ // ============================================
209
+ // NETWORK COMMAND
210
+ // ============================================
211
+ program
212
+ .command('network <url>')
213
+ .alias('n')
214
+ .description('Analyze network requests from a URL')
215
+ .option('--failed', 'Show only failed requests')
216
+ .option('--json', 'Output as JSON')
217
+ .action(async (url, options) => {
218
+ const spinner = ora('Connecting...').start();
219
+ try {
220
+ const trace = new Trace({ headless: true });
221
+ spinner.text = `Connecting to ${url}`;
222
+ await trace.connect(url);
223
+ spinner.text = 'Capturing network...';
224
+ // Wait a bit for network activity
225
+ await new Promise(r => setTimeout(r, 2000));
226
+ const summary = await trace.getNetworkSummary();
227
+ const failed = await trace.getNetworkFailed();
228
+ await trace.disconnect();
229
+ spinner.stop();
230
+ if (options.json) {
231
+ console.log(JSON.stringify({ summary, failed }, null, 2));
232
+ return;
233
+ }
234
+ console.log();
235
+ console.log(chalk.bold('🌐 Network Summary'));
236
+ console.log(chalk.gray('─'.repeat(60)));
237
+ console.log();
238
+ log.table({
239
+ 'Total Requests': summary.total || 0,
240
+ 'Failed': summary.failed || 0,
241
+ 'Cached': summary.cached || 0,
242
+ 'Total Size': `${Math.round((summary.totalSize || 0) / 1024)} KB`,
243
+ 'Avg Duration': `${Math.round(summary.avgDuration || 0)} ms`,
244
+ });
245
+ console.log();
246
+ if (failed.length > 0 || options.failed) {
247
+ console.log(chalk.bold(`❌ Failed Requests (${failed.length})`));
248
+ console.log();
249
+ for (const req of failed.slice(0, 10)) {
250
+ console.log(` ${chalk.red('●')} ${chalk.bold(req.status || 'ERR')} ${req.method || 'GET'}`);
251
+ console.log(` ${req.url?.substring(0, 80)}`);
252
+ if (req.errorText) {
253
+ console.log(` ${chalk.dim(req.errorText)}`);
254
+ }
255
+ console.log();
256
+ }
257
+ }
258
+ }
259
+ catch (error) {
260
+ spinner.stop();
261
+ log.error(`Failed: ${error}`);
262
+ process.exit(1);
263
+ }
264
+ });
265
+ // ============================================
266
+ // PERFORMANCE COMMAND
267
+ // ============================================
268
+ program
269
+ .command('perf <url>')
270
+ .alias('p')
271
+ .description('Analyze page performance')
272
+ .option('--json', 'Output as JSON')
273
+ .action(async (url, options) => {
274
+ const spinner = ora('Connecting...').start();
275
+ try {
276
+ const trace = new Trace({ headless: true });
277
+ spinner.text = `Connecting to ${url}`;
278
+ await trace.connect(url);
279
+ spinner.text = 'Measuring performance...';
280
+ const metrics = await trace.getPerformanceMetrics();
281
+ const result = await trace.performance();
282
+ await trace.disconnect();
283
+ spinner.stop();
284
+ if (options.json) {
285
+ console.log(JSON.stringify({ metrics, result: result.analysis }, null, 2));
286
+ return;
287
+ }
288
+ console.log();
289
+ console.log(chalk.bold('⚡ Performance Metrics'));
290
+ console.log(chalk.gray('─'.repeat(60)));
291
+ console.log();
292
+ const keyMetrics = {
293
+ 'DOM Content Loaded': `${Math.round(metrics.DOMContentLoaded || 0)} ms`,
294
+ 'First Contentful Paint': `${Math.round((metrics.FirstContentfulPaint || 0) * 1000)} ms`,
295
+ 'JS Heap Size': `${Math.round((metrics.JSHeapUsedSize || 0) / 1024 / 1024)} MB`,
296
+ 'DOM Nodes': metrics.Nodes || 0,
297
+ 'JS Event Listeners': metrics.JSEventListeners || 0,
298
+ 'Layout Count': metrics.LayoutCount || 0,
299
+ };
300
+ log.table(keyMetrics);
301
+ console.log();
302
+ if (result.analysis.issues.length > 0) {
303
+ console.log(chalk.bold('Performance Issues:'));
304
+ console.log();
305
+ for (const issue of result.analysis.issues) {
306
+ log.issue(issue);
307
+ }
308
+ }
309
+ }
310
+ catch (error) {
311
+ spinner.stop();
312
+ log.error(`Failed: ${error}`);
313
+ process.exit(1);
314
+ }
315
+ });
316
+ // ============================================
317
+ // ACCESSIBILITY COMMAND
318
+ // ============================================
319
+ program
320
+ .command('a11y <url>')
321
+ .description('Check page accessibility')
322
+ .option('--json', 'Output as JSON')
323
+ .action(async (url, options) => {
324
+ const spinner = ora('Connecting...').start();
325
+ try {
326
+ const trace = new Trace({ headless: true });
327
+ spinner.text = `Connecting to ${url}`;
328
+ await trace.connect(url);
329
+ spinner.text = 'Checking accessibility...';
330
+ const issues = await trace.checkAccessibility();
331
+ await trace.disconnect();
332
+ spinner.stop();
333
+ if (options.json) {
334
+ console.log(JSON.stringify(issues, null, 2));
335
+ return;
336
+ }
337
+ console.log();
338
+ console.log(chalk.bold('♿ Accessibility Check'));
339
+ console.log(chalk.gray('─'.repeat(60)));
340
+ console.log();
341
+ if (!issues || issues.length === 0) {
342
+ log.success('No accessibility issues found!');
343
+ }
344
+ else {
345
+ console.log(`Found ${issues.length} issue(s):\n`);
346
+ for (const issue of issues.slice(0, 20)) {
347
+ console.log(` ${chalk.yellow('●')} ${chalk.bold(issue.type)}`);
348
+ console.log(` Element: ${issue.element}`);
349
+ console.log(` Issue: ${issue.issue}`);
350
+ console.log(` ${chalk.cyan('Fix:')} ${issue.fix}`);
351
+ console.log();
352
+ }
353
+ }
354
+ }
355
+ catch (error) {
356
+ spinner.stop();
357
+ log.error(`Failed: ${error}`);
358
+ process.exit(1);
359
+ }
360
+ });
361
+ // ============================================
362
+ // HEALTH COMMAND
363
+ // ============================================
364
+ program
365
+ .command('health <url>')
366
+ .alias('h')
367
+ .description('Quick health check')
368
+ .option('--json', 'Output as JSON')
369
+ .action(async (url, options) => {
370
+ const spinner = ora('Checking...').start();
371
+ try {
372
+ const trace = new Trace({ headless: true });
373
+ await trace.connect(url);
374
+ const health = await trace.healthCheck();
375
+ await trace.disconnect();
376
+ spinner.stop();
377
+ if (options.json) {
378
+ console.log(JSON.stringify(health, null, 2));
379
+ process.exit(health.healthy ? 0 : 1);
380
+ return;
381
+ }
382
+ console.log();
383
+ if (health.healthy) {
384
+ console.log(chalk.green.bold('✓ Page is healthy!'));
385
+ }
386
+ else {
387
+ console.log(chalk.red.bold('✗ Page has issues'));
388
+ }
389
+ console.log();
390
+ log.table({
391
+ 'Status': health.healthy ? chalk.green('Healthy') : chalk.red('Issues Found'),
392
+ 'Total Issues': health.issues,
393
+ 'Critical': health.critical > 0 ? chalk.red(health.critical) : chalk.green(0),
394
+ });
395
+ console.log();
396
+ process.exit(health.healthy ? 0 : 1);
397
+ }
398
+ catch (error) {
399
+ spinner.stop();
400
+ log.error(`Failed: ${error}`);
401
+ process.exit(1);
402
+ }
403
+ });
404
+ // ============================================
405
+ // INSPECT COMMAND
406
+ // ============================================
407
+ program
408
+ .command('inspect <url> <selector>')
409
+ .alias('i')
410
+ .description('Inspect a DOM element')
411
+ .option('--json', 'Output as JSON')
412
+ .action(async (url, selector, options) => {
413
+ const spinner = ora('Connecting...').start();
414
+ try {
415
+ const trace = new Trace({ headless: true });
416
+ spinner.text = `Connecting to ${url}`;
417
+ await trace.connect(url);
418
+ spinner.text = `Inspecting ${selector}...`;
419
+ const element = await trace.inspectElement(selector);
420
+ const visibility = await trace.analyzeVisibility(selector);
421
+ await trace.disconnect();
422
+ spinner.stop();
423
+ if (options.json) {
424
+ console.log(JSON.stringify({ element, visibility }, null, 2));
425
+ return;
426
+ }
427
+ console.log();
428
+ console.log(chalk.bold(`🔍 Element: ${selector}`));
429
+ console.log(chalk.gray('─'.repeat(60)));
430
+ console.log();
431
+ if (!element) {
432
+ log.error('Element not found');
433
+ return;
434
+ }
435
+ log.table({
436
+ 'Tag': element.tagName,
437
+ 'ID': element.id || '-',
438
+ 'Class': element.className || '-',
439
+ 'Visible': element.visible ? chalk.green('Yes') : chalk.red('No'),
440
+ });
441
+ if (element.rect) {
442
+ console.log();
443
+ console.log(chalk.bold('Box Model:'));
444
+ log.table({
445
+ 'X': element.rect.x,
446
+ 'Y': element.rect.y,
447
+ 'Width': element.rect.width,
448
+ 'Height': element.rect.height,
449
+ });
450
+ }
451
+ console.log();
452
+ }
453
+ catch (error) {
454
+ spinner.stop();
455
+ log.error(`Failed: ${error}`);
456
+ process.exit(1);
457
+ }
458
+ });
459
+ // ============================================
460
+ // TOOL COMMAND (Direct tool access)
461
+ // ============================================
462
+ program
463
+ .command('tool <url> <toolName>')
464
+ .alias('t')
465
+ .description('Execute a specific debugging tool')
466
+ .option('-i, --input <json>', 'Tool input as JSON')
467
+ .action(async (url, toolName, options) => {
468
+ const spinner = ora('Connecting...').start();
469
+ try {
470
+ const trace = new Trace({ headless: true });
471
+ spinner.text = `Connecting to ${url}`;
472
+ await trace.connect(url);
473
+ spinner.text = `Running ${toolName}...`;
474
+ const input = options.input ? JSON.parse(options.input) : {};
475
+ const result = await trace.tool(toolName, input);
476
+ await trace.disconnect();
477
+ spinner.stop();
478
+ console.log(JSON.stringify(result, null, 2));
479
+ }
480
+ catch (error) {
481
+ spinner.stop();
482
+ log.error(`Failed: ${error}`);
483
+ process.exit(1);
484
+ }
485
+ });
486
+ // ============================================
487
+ // TOOLS COMMAND (List available tools)
488
+ // ============================================
489
+ program
490
+ .command('tools')
491
+ .description('List all available debugging tools')
492
+ .action(() => {
493
+ const trace = new Trace();
494
+ const tools = trace.getToolNames();
495
+ console.log();
496
+ console.log(chalk.bold(`🛠️ Available Tools (${tools.length})`));
497
+ console.log(chalk.gray('─'.repeat(60)));
498
+ console.log();
499
+ const categories = {
500
+ 'Console': tools.filter((t) => t.includes('console') || t.includes('error') || t.includes('exception')),
501
+ 'Network': tools.filter((t) => t.includes('network') || t.includes('request') || t.includes('response') || t.includes('cached') || t.includes('timing') || t.includes('redirect') || t.includes('replay')),
502
+ 'DOM': tools.filter((t) => t.includes('element') || t.includes('dom') || t.includes('style') || t.includes('visibility') || t.includes('accessibility') || t.includes('highlight') || t.includes('scroll')),
503
+ 'Debugger': tools.filter((t) => t.includes('debug') || t.includes('breakpoint') || t.includes('step') || t.includes('variable') || t.includes('call_stack') || t.includes('evaluate') || t.includes('watch') || t.includes('pause') || t.includes('resume')),
504
+ 'Source': tools.filter((t) => t.includes('script') || t.includes('source') || t.includes('blackbox')),
505
+ 'Performance': tools.filter((t) => t.includes('performance') || t.includes('heap')),
506
+ 'Timeline': tools.filter((t) => t.includes('timeline') || t.includes('events') || t.includes('snapshot')),
507
+ 'Tracing': tools.filter((t) => t.includes('trace') || t.includes('span')),
508
+ };
509
+ for (const [category, categoryTools] of Object.entries(categories)) {
510
+ if (categoryTools.length > 0) {
511
+ console.log(chalk.cyan.bold(`${category} (${categoryTools.length}):`));
512
+ for (const tool of categoryTools) {
513
+ console.log(` • ${tool}`);
514
+ }
515
+ console.log();
516
+ }
517
+ }
518
+ });
519
+ // ============================================
520
+ // INTERACTIVE REPL COMMAND
521
+ // ============================================
522
+ program
523
+ .command('repl <url>')
524
+ .alias('r')
525
+ .description('Interactive debugging session')
526
+ .option('--api-url <url>', 'API endpoint', 'https://dev-intelli-api.azurewebsites.net')
527
+ .option('--api-key <key>', 'API key')
528
+ .action(async (url, options) => {
529
+ const spinner = ora('Connecting...').start();
530
+ let trace;
531
+ try {
532
+ trace = new Trace({
533
+ apiUrl: options.apiUrl,
534
+ apiKey: options.apiKey,
535
+ headless: true,
536
+ verbose: false,
537
+ });
538
+ await trace.connect(url);
539
+ spinner.stop();
540
+ console.log();
541
+ console.log(chalk.bold.cyan('🔧 Trace Interactive Debugger'));
542
+ console.log(chalk.gray('─'.repeat(60)));
543
+ console.log(`Connected to: ${chalk.green(url)}`);
544
+ console.log(`Tools available: ${chalk.yellow(trace.getToolCount())}`);
545
+ console.log();
546
+ console.log('Commands:');
547
+ console.log(' /debug - Full debug scan');
548
+ console.log(' /errors - Get console errors');
549
+ console.log(' /network - Network summary');
550
+ console.log(' /perf - Performance metrics');
551
+ console.log(' /a11y - Accessibility check');
552
+ console.log(' /tool <name> - Run a specific tool');
553
+ console.log(' /eval <expr> - Evaluate JavaScript');
554
+ console.log(' /nav <url> - Navigate to URL');
555
+ console.log(' /reload - Reload page');
556
+ console.log(' /screenshot - Take screenshot');
557
+ console.log(' /help - Show all commands');
558
+ console.log(' /exit - Exit REPL');
559
+ console.log();
560
+ console.log('Or just type a question to ask the AI!');
561
+ console.log();
562
+ const rl = readline.createInterface({
563
+ input: process.stdin,
564
+ output: process.stdout,
565
+ prompt: chalk.cyan('trace> '),
566
+ });
567
+ rl.prompt();
568
+ rl.on('line', async (line) => {
569
+ const input = line.trim();
570
+ if (!input) {
571
+ rl.prompt();
572
+ return;
573
+ }
574
+ try {
575
+ if (input === '/exit' || input === '/quit' || input === '/q') {
576
+ console.log('Goodbye!');
577
+ await trace.disconnect();
578
+ process.exit(0);
579
+ }
580
+ if (input === '/help' || input === '/?') {
581
+ console.log(`
582
+ Commands:
583
+ /debug - Full debug scan
584
+ /errors - Get console errors
585
+ /network - Network summary
586
+ /perf - Performance metrics
587
+ /a11y - Accessibility check
588
+ /tool <name> [json] - Run a specific tool
589
+ /tools - List all tools
590
+ /eval <expression> - Evaluate JavaScript
591
+ /nav <url> - Navigate to URL
592
+ /reload - Reload page
593
+ /screenshot [path] - Take screenshot
594
+ /url - Show current URL
595
+ /clear - Clear console
596
+ /exit - Exit REPL
597
+
598
+ Or type any question to ask the AI debugger!
599
+ `);
600
+ rl.prompt();
601
+ return;
602
+ }
603
+ if (input === '/debug') {
604
+ console.log(chalk.dim('Running full debug...'));
605
+ const result = await trace.debug();
606
+ log.result(result);
607
+ rl.prompt();
608
+ return;
609
+ }
610
+ if (input === '/errors') {
611
+ const errors = await trace.getConsoleErrors();
612
+ console.log(JSON.stringify(errors, null, 2));
613
+ rl.prompt();
614
+ return;
615
+ }
616
+ if (input === '/network') {
617
+ const summary = await trace.getNetworkSummary();
618
+ console.log(JSON.stringify(summary, null, 2));
619
+ rl.prompt();
620
+ return;
621
+ }
622
+ if (input === '/perf') {
623
+ const metrics = await trace.getPerformanceMetrics();
624
+ console.log(JSON.stringify(metrics, null, 2));
625
+ rl.prompt();
626
+ return;
627
+ }
628
+ if (input === '/a11y') {
629
+ const issues = await trace.checkAccessibility();
630
+ console.log(JSON.stringify(issues, null, 2));
631
+ rl.prompt();
632
+ return;
633
+ }
634
+ if (input === '/tools') {
635
+ const tools = trace.getToolNames();
636
+ console.log(tools.join('\n'));
637
+ rl.prompt();
638
+ return;
639
+ }
640
+ if (input.startsWith('/tool ')) {
641
+ const parts = input.slice(6).split(' ');
642
+ const toolName = parts[0];
643
+ const toolInput = parts.slice(1).join(' ');
644
+ const parsedInput = toolInput ? JSON.parse(toolInput) : {};
645
+ const result = await trace.tool(toolName, parsedInput);
646
+ console.log(JSON.stringify(result, null, 2));
647
+ rl.prompt();
648
+ return;
649
+ }
650
+ if (input.startsWith('/eval ')) {
651
+ const expr = input.slice(6);
652
+ const result = await trace.evaluate(expr);
653
+ console.log(JSON.stringify(result, null, 2));
654
+ rl.prompt();
655
+ return;
656
+ }
657
+ if (input.startsWith('/nav ')) {
658
+ const newUrl = input.slice(5);
659
+ console.log(chalk.dim(`Navigating to ${newUrl}...`));
660
+ await trace.navigate(newUrl);
661
+ console.log(chalk.green('Done'));
662
+ rl.prompt();
663
+ return;
664
+ }
665
+ if (input === '/reload') {
666
+ console.log(chalk.dim('Reloading...'));
667
+ await trace.reload();
668
+ console.log(chalk.green('Done'));
669
+ rl.prompt();
670
+ return;
671
+ }
672
+ if (input.startsWith('/screenshot')) {
673
+ const path = input.slice(12).trim() || `screenshot-${Date.now()}.png`;
674
+ await trace.screenshot(path);
675
+ console.log(chalk.green(`Screenshot saved to ${path}`));
676
+ rl.prompt();
677
+ return;
678
+ }
679
+ if (input === '/url') {
680
+ console.log(trace.getUrl());
681
+ rl.prompt();
682
+ return;
683
+ }
684
+ if (input === '/clear') {
685
+ console.clear();
686
+ rl.prompt();
687
+ return;
688
+ }
689
+ // Treat as AI question
690
+ console.log(chalk.dim('Thinking...'));
691
+ const result = await trace.query(input);
692
+ log.result(result);
693
+ }
694
+ catch (error) {
695
+ log.error(String(error));
696
+ }
697
+ rl.prompt();
698
+ });
699
+ rl.on('close', async () => {
700
+ await trace.disconnect();
701
+ process.exit(0);
702
+ });
703
+ }
704
+ catch (error) {
705
+ spinner.stop();
706
+ log.error(`Failed: ${error}`);
707
+ process.exit(1);
708
+ }
709
+ });
710
+ // ============================================
711
+ // SCREENSHOT COMMAND
712
+ // ============================================
713
+ program
714
+ .command('screenshot <url> [output]')
715
+ .alias('ss')
716
+ .description('Take a screenshot of a URL')
717
+ .option('--full', 'Full page screenshot', true)
718
+ .action(async (url, output, options) => {
719
+ const spinner = ora('Connecting...').start();
720
+ try {
721
+ const trace = new Trace({ headless: true });
722
+ spinner.text = `Connecting to ${url}`;
723
+ await trace.connect(url);
724
+ spinner.text = 'Taking screenshot...';
725
+ const path = output || `screenshot-${Date.now()}.png`;
726
+ await trace.screenshot(path);
727
+ await trace.disconnect();
728
+ spinner.stop();
729
+ log.success(`Screenshot saved to ${path}`);
730
+ }
731
+ catch (error) {
732
+ spinner.stop();
733
+ log.error(`Failed: ${error}`);
734
+ process.exit(1);
735
+ }
736
+ });
737
+ // ============================================
738
+ // WATCH COMMAND
739
+ // ============================================
740
+ program
741
+ .command('watch <url>')
742
+ .alias('w')
743
+ .description('Watch a URL for errors in real-time')
744
+ .option('-d, --duration <seconds>', 'Watch duration in seconds', '30')
745
+ .action(async (url, options) => {
746
+ const spinner = ora('Connecting...').start();
747
+ try {
748
+ const trace = new Trace({ headless: true, verbose: false });
749
+ spinner.text = `Connecting to ${url}`;
750
+ await trace.connect(url);
751
+ spinner.stop();
752
+ console.log();
753
+ console.log(chalk.bold(`👀 Watching ${url}`));
754
+ console.log(chalk.dim(`Duration: ${options.duration}s (Ctrl+C to stop)`));
755
+ console.log(chalk.gray('─'.repeat(60)));
756
+ console.log();
757
+ const duration = parseInt(options.duration) * 1000;
758
+ const startTime = Date.now();
759
+ let lastErrorCount = 0;
760
+ let lastNetworkFailed = 0;
761
+ const interval = setInterval(async () => {
762
+ const errors = await trace.getConsoleErrors();
763
+ const failed = await trace.getNetworkFailed();
764
+ if (errors.length > lastErrorCount) {
765
+ for (const err of errors.slice(lastErrorCount)) {
766
+ console.log(`${chalk.red('●')} ${chalk.bold('ERROR')} ${err.message.substring(0, 100)}`);
767
+ }
768
+ lastErrorCount = errors.length;
769
+ }
770
+ if (failed.length > lastNetworkFailed) {
771
+ for (const req of failed.slice(lastNetworkFailed)) {
772
+ console.log(`${chalk.yellow('●')} ${chalk.bold('NETWORK')} ${req.status || 'ERR'} ${req.url?.substring(0, 80)}`);
773
+ }
774
+ lastNetworkFailed = failed.length;
775
+ }
776
+ if (Date.now() - startTime >= duration) {
777
+ clearInterval(interval);
778
+ console.log();
779
+ console.log(chalk.dim('Watch complete'));
780
+ console.log(`Errors: ${errors.length}, Failed requests: ${failed.length}`);
781
+ await trace.disconnect();
782
+ process.exit(0);
783
+ }
784
+ }, 1000);
785
+ process.on('SIGINT', async () => {
786
+ clearInterval(interval);
787
+ console.log();
788
+ console.log(chalk.dim('Stopped'));
789
+ await trace.disconnect();
790
+ process.exit(0);
791
+ });
792
+ }
793
+ catch (error) {
794
+ spinner.stop();
795
+ log.error(`Failed: ${error}`);
796
+ process.exit(1);
797
+ }
798
+ });
799
+ // ============================================
800
+ // RUN CLI
801
+ // ============================================
802
+ program.parse();
803
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,+CAA+C;AAC/C,iCAAiC;AACjC,6CAA6C;AAC7C,kDAAkD;AAClD,+CAA+C;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGhD,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB,+CAA+C;AAC/C,kBAAkB;AAClB,+CAA+C;AAE/C,MAAM,GAAG,GAAG;IACR,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;IACxD,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAA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IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,CAAC;QACL,CAAC,EAAE,IAAI,CAAC,CAAC;QAET,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;YAC5B,aAAa,CAAC,QAAQ,CAAC,CAAC;YACxB,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;YAClC,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IAEP,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,EAAE,CAAC,CAAC;QAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC;AAEP,+CAA+C;AAC/C,UAAU;AACV,+CAA+C;AAE/C,OAAO,CAAC,KAAK,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@probebrowser/trace",
3
+ "version": "1.0.0",
4
+ "description": "Trace - AI-powered debugging for web applications",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "trace": "./dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "dev": "tsc --watch",
13
+ "start": "node dist/index.js",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "keywords": [
17
+ "debugging",
18
+ "devtools",
19
+ "chrome-devtools",
20
+ "ai-debugging",
21
+ "cli",
22
+ "web-debugging",
23
+ "trace",
24
+ "probebrowser"
25
+ ],
26
+ "author": "Probe Browser <daksh@probebrowser.com>",
27
+ "license": "UNLICENSED",
28
+ "private": false,
29
+ "homepage": "https://www.probebrowser.com/trace",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/probe-hq/dev-intelli.git",
33
+ "directory": "packages/cli"
34
+ },
35
+ "bugs": {
36
+ "url": "https://www.probebrowser.com/support"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "dependencies": {
42
+ "chalk": "^5.3.0",
43
+ "commander": "^12.0.0",
44
+ "ora": "^8.0.1",
45
+ "puppeteer": "^24.34.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/node": "^20.0.0",
49
+ "typescript": "^5.3.0"
50
+ },
51
+ "files": [
52
+ "dist",
53
+ "README.md"
54
+ ]
55
+ }