yiyan-browser-agent 1.3.4 → 1.4.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 CHANGED
@@ -49,6 +49,9 @@ yiyan-browser-agent status
49
49
 
50
50
  # Clear saved session
51
51
  yiyan-browser-agent reset
52
+
53
+ # Debug mode (output DOM info for troubleshooting)
54
+ yiyan-browser-agent debug
52
55
  ```
53
56
 
54
57
  ### Node.js API
@@ -78,6 +81,9 @@ console.log('Session path:', status.sessionPath);
78
81
 
79
82
  // Clear saved session
80
83
  await agent.reset();
84
+
85
+ // Debug mode (for troubleshooting selectors)
86
+ await agent.debug();
81
87
  ```
82
88
 
83
89
  ## CLI Commands
@@ -88,6 +94,7 @@ await agent.reset();
88
94
  | `ask "question"` | Send question and get answer |
89
95
  | `status` | Check login status |
90
96
  | `reset` | Clear saved session |
97
+ | `debug` | Debug mode: output DOM info for troubleshooting |
91
98
 
92
99
  ## CLI Options
93
100
 
@@ -135,6 +142,10 @@ Check login status.
135
142
 
136
143
  Clear saved session.
137
144
 
145
+ ##### `debug(): Promise<void>`
146
+
147
+ Start browser in debug mode, output DOM information for troubleshooting selectors.
148
+
138
149
  ### Error Types
139
150
 
140
151
  | Type | Description |
@@ -191,6 +202,13 @@ yiyan-browser-agent ask "question" --headful --verbose
191
202
  yiyan-browser-agent ask "question" --headful
192
203
  ```
193
204
 
205
+ ### Selectors not working
206
+
207
+ ```bash
208
+ # Use debug mode to see DOM structure
209
+ yiyan-browser-agent debug
210
+ ```
211
+
194
212
  ## Comparison with deepseek-browser-agent
195
213
 
196
214
  This package follows similar architecture to [deepseek-browser-agent](https://github.com/Omar-Azam/deepseek-browser-agent):
package/dist/cli.d.ts CHANGED
@@ -4,7 +4,7 @@ import { C as CliOutput } from './types-BhQ78DYf.js';
4
4
  declare function printHelp(): void;
5
5
  /** 解析后的 CLI 参数 */
6
6
  interface ParsedArgs {
7
- command: 'ask' | 'status' | 'reset' | 'login' | 'help' | null;
7
+ command: 'ask' | 'status' | 'reset' | 'login' | 'debug' | 'help' | null;
8
8
  question?: string;
9
9
  timeout?: number;
10
10
  headful?: boolean;