qazen-cli 0.2.1 → 0.2.2

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.
@@ -222,11 +222,31 @@ export class VisionNavigator {
222
222
  });
223
223
  }
224
224
  }
225
+ // Debug: log every elementType:priority Claude returned, so we can see
226
+ // why the highPriority filter may be excluding everything.
227
+ const elementTypes = analysis.elements
228
+ .map((e) => `${e.elementType}:${e.priority}`)
229
+ .join(", ");
230
+ onEvent({
231
+ type: "vision_analysis",
232
+ message: `Element types found: ${elementTypes}`,
233
+ });
234
+ const NAV_TYPES = ["link", "tab", "menu"];
235
+ const NAV_TYPES_EXPANDED = [...NAV_TYPES, "button", "other"];
225
236
  const highPriority = analysis.elements
226
237
  .filter((e) => {
227
238
  if (e.priority !== "high")
228
239
  return false;
229
- if (!["link", "tab", "menu"].includes(e.elementType))
240
+ const desc = e.description.toLowerCase();
241
+ const isNavElement = desc.includes("navigation") ||
242
+ desc.includes("menu") ||
243
+ desc.includes("nav link") ||
244
+ desc.includes("sidebar");
245
+ // Allow strict nav types, OR an expanded type set when the
246
+ // description itself signals navigation intent.
247
+ if (!isNavElement && !NAV_TYPES.includes(e.elementType))
248
+ return false;
249
+ if (!NAV_TYPES_EXPANDED.includes(e.elementType))
230
250
  return false;
231
251
  // Skip if this action URL is already visited
232
252
  if (e.action && e.action.startsWith("http")) {
@@ -235,7 +255,6 @@ export class VisionNavigator {
235
255
  return false;
236
256
  }
237
257
  // Skip if element description indicates it's the current page
238
- const desc = e.description.toLowerCase();
239
258
  if (desc.includes("currently active") ||
240
259
  desc.includes("current page") ||
241
260
  desc.includes("(active)")) {
@@ -244,6 +263,10 @@ export class VisionNavigator {
244
263
  return true;
245
264
  })
246
265
  .slice(0, 4);
266
+ onEvent({
267
+ type: "vision_analysis",
268
+ message: `Navigation candidates: ${highPriority.length} (of ${analysis.elements.length})`,
269
+ });
247
270
  for (const element of highPriority) {
248
271
  try {
249
272
  const newUrl = await this.clickElement(element, pageMap, onEvent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qazen-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "QAZen CLI — capture authenticated browser sessions for enterprise SSO testing",
5
5
  "license": "MIT",
6
6
  "author": "QAZen",