@petukhovart/agent-view 0.1.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 (141) hide show
  1. package/.claude-plugin/plugin.json +10 -0
  2. package/LICENSE +21 -0
  3. package/README.md +296 -0
  4. package/dist/adapters/browser.d.ts +3 -0
  5. package/dist/adapters/browser.d.ts.map +1 -0
  6. package/dist/adapters/browser.js +20 -0
  7. package/dist/adapters/browser.js.map +1 -0
  8. package/dist/adapters/electron.d.ts +3 -0
  9. package/dist/adapters/electron.d.ts.map +1 -0
  10. package/dist/adapters/electron.js +20 -0
  11. package/dist/adapters/electron.js.map +1 -0
  12. package/dist/adapters/registry.d.ts +4 -0
  13. package/dist/adapters/registry.d.ts.map +1 -0
  14. package/dist/adapters/registry.js +13 -0
  15. package/dist/adapters/registry.js.map +1 -0
  16. package/dist/adapters/tauri.d.ts +8 -0
  17. package/dist/adapters/tauri.d.ts.map +1 -0
  18. package/dist/adapters/tauri.js +32 -0
  19. package/dist/adapters/tauri.js.map +1 -0
  20. package/dist/adapters/types.d.ts +8 -0
  21. package/dist/adapters/types.d.ts.map +1 -0
  22. package/dist/adapters/types.js +2 -0
  23. package/dist/adapters/types.js.map +1 -0
  24. package/dist/cdp/transport.d.ts +4 -0
  25. package/dist/cdp/transport.d.ts.map +1 -0
  26. package/dist/cdp/transport.js +89 -0
  27. package/dist/cdp/transport.js.map +1 -0
  28. package/dist/cdp/types.d.ts +37 -0
  29. package/dist/cdp/types.d.ts.map +1 -0
  30. package/dist/cdp/types.js +2 -0
  31. package/dist/cdp/types.js.map +1 -0
  32. package/dist/cli/client.d.ts +3 -0
  33. package/dist/cli/client.d.ts.map +1 -0
  34. package/dist/cli/client.js +89 -0
  35. package/dist/cli/client.js.map +1 -0
  36. package/dist/cli/commands/click.d.ts +9 -0
  37. package/dist/cli/commands/click.d.ts.map +1 -0
  38. package/dist/cli/commands/click.js +43 -0
  39. package/dist/cli/commands/click.js.map +1 -0
  40. package/dist/cli/commands/discover.d.ts +3 -0
  41. package/dist/cli/commands/discover.d.ts.map +1 -0
  42. package/dist/cli/commands/discover.js +15 -0
  43. package/dist/cli/commands/discover.js.map +1 -0
  44. package/dist/cli/commands/dom.d.ts +9 -0
  45. package/dist/cli/commands/dom.d.ts.map +1 -0
  46. package/dist/cli/commands/dom.js +19 -0
  47. package/dist/cli/commands/dom.js.map +1 -0
  48. package/dist/cli/commands/fill.d.ts +8 -0
  49. package/dist/cli/commands/fill.d.ts.map +1 -0
  50. package/dist/cli/commands/fill.js +39 -0
  51. package/dist/cli/commands/fill.js.map +1 -0
  52. package/dist/cli/commands/init.d.ts +2 -0
  53. package/dist/cli/commands/init.d.ts.map +1 -0
  54. package/dist/cli/commands/init.js +14 -0
  55. package/dist/cli/commands/init.js.map +1 -0
  56. package/dist/cli/commands/launch.d.ts +3 -0
  57. package/dist/cli/commands/launch.d.ts.map +1 -0
  58. package/dist/cli/commands/launch.js +21 -0
  59. package/dist/cli/commands/launch.js.map +1 -0
  60. package/dist/cli/commands/scene.d.ts +11 -0
  61. package/dist/cli/commands/scene.d.ts.map +1 -0
  62. package/dist/cli/commands/scene.js +29 -0
  63. package/dist/cli/commands/scene.js.map +1 -0
  64. package/dist/cli/commands/screenshot.d.ts +7 -0
  65. package/dist/cli/commands/screenshot.d.ts.map +1 -0
  66. package/dist/cli/commands/screenshot.js +20 -0
  67. package/dist/cli/commands/screenshot.js.map +1 -0
  68. package/dist/cli/commands/snap.d.ts +9 -0
  69. package/dist/cli/commands/snap.d.ts.map +1 -0
  70. package/dist/cli/commands/snap.js +25 -0
  71. package/dist/cli/commands/snap.js.map +1 -0
  72. package/dist/cli/commands/stop.d.ts +2 -0
  73. package/dist/cli/commands/stop.d.ts.map +1 -0
  74. package/dist/cli/commands/stop.js +22 -0
  75. package/dist/cli/commands/stop.js.map +1 -0
  76. package/dist/cli/commands/wait.d.ts +9 -0
  77. package/dist/cli/commands/wait.d.ts.map +1 -0
  78. package/dist/cli/commands/wait.js +26 -0
  79. package/dist/cli/commands/wait.js.map +1 -0
  80. package/dist/cli/index.d.ts +3 -0
  81. package/dist/cli/index.d.ts.map +1 -0
  82. package/dist/cli/index.js +136 -0
  83. package/dist/cli/index.js.map +1 -0
  84. package/dist/config/manager.d.ts +5 -0
  85. package/dist/config/manager.d.ts.map +1 -0
  86. package/dist/config/manager.js +84 -0
  87. package/dist/config/manager.js.map +1 -0
  88. package/dist/config/types.d.ts +13 -0
  89. package/dist/config/types.d.ts.map +1 -0
  90. package/dist/config/types.js +2 -0
  91. package/dist/config/types.js.map +1 -0
  92. package/dist/index.d.ts +3 -0
  93. package/dist/index.d.ts.map +1 -0
  94. package/dist/index.js +2 -0
  95. package/dist/index.js.map +1 -0
  96. package/dist/inspectors/dom.d.ts +17 -0
  97. package/dist/inspectors/dom.d.ts.map +1 -0
  98. package/dist/inspectors/dom.js +131 -0
  99. package/dist/inspectors/dom.js.map +1 -0
  100. package/dist/inspectors/scene/formatter.d.ts +5 -0
  101. package/dist/inspectors/scene/formatter.d.ts.map +1 -0
  102. package/dist/inspectors/scene/formatter.js +91 -0
  103. package/dist/inspectors/scene/formatter.js.map +1 -0
  104. package/dist/inspectors/scene/index.d.ts +8 -0
  105. package/dist/inspectors/scene/index.d.ts.map +1 -0
  106. package/dist/inspectors/scene/index.js +26 -0
  107. package/dist/inspectors/scene/index.js.map +1 -0
  108. package/dist/inspectors/scene/pixi.d.ts +3 -0
  109. package/dist/inspectors/scene/pixi.d.ts.map +1 -0
  110. package/dist/inspectors/scene/pixi.js +52 -0
  111. package/dist/inspectors/scene/pixi.js.map +1 -0
  112. package/dist/inspectors/scene/registry.d.ts +4 -0
  113. package/dist/inspectors/scene/registry.d.ts.map +1 -0
  114. package/dist/inspectors/scene/registry.js +13 -0
  115. package/dist/inspectors/scene/registry.js.map +1 -0
  116. package/dist/inspectors/scene/types.d.ts +31 -0
  117. package/dist/inspectors/scene/types.d.ts.map +1 -0
  118. package/dist/inspectors/scene/types.js +2 -0
  119. package/dist/inspectors/scene/types.js.map +1 -0
  120. package/dist/server/index.d.ts +2 -0
  121. package/dist/server/index.d.ts.map +1 -0
  122. package/dist/server/index.js +11 -0
  123. package/dist/server/index.js.map +1 -0
  124. package/dist/server/launcher.d.ts +4 -0
  125. package/dist/server/launcher.d.ts.map +1 -0
  126. package/dist/server/launcher.js +43 -0
  127. package/dist/server/launcher.js.map +1 -0
  128. package/dist/server/ref-store.d.ts +20 -0
  129. package/dist/server/ref-store.d.ts.map +1 -0
  130. package/dist/server/ref-store.js +29 -0
  131. package/dist/server/ref-store.js.map +1 -0
  132. package/dist/server/server.d.ts +28 -0
  133. package/dist/server/server.d.ts.map +1 -0
  134. package/dist/server/server.js +444 -0
  135. package/dist/server/server.js.map +1 -0
  136. package/dist/types.d.ts +33 -0
  137. package/dist/types.d.ts.map +1 -0
  138. package/dist/types.js +11 -0
  139. package/dist/types.js.map +1 -0
  140. package/package.json +59 -0
  141. package/skills/verify/SKILL.md +100 -0
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: verify
3
+ description: "Visual verification of desktop app UI after code changes. Use when modifying UI components, fixing visual bugs, testing user interactions, verifying layout, or when any workflow phase needs to inspect the running application. Triggers on: verify, check UI, test how it looks, visual regression, screenshot, inspect DOM."
4
+ allowed-tools: Bash(agent-view *)
5
+ ---
6
+
7
+ # Visual Verification with agent-view
8
+
9
+ You have access to `agent-view` CLI for inspecting and interacting with desktop applications via Chrome DevTools Protocol.
10
+
11
+ ## Prerequisites
12
+
13
+ The target project must have:
14
+ 1. `agent-view.config.json` in project root (run `agent-view init` to generate)
15
+ 2. CDP enabled in the app (e.g. `--remote-debugging-port=9222` for Electron)
16
+
17
+ If config is missing, run `agent-view init` first.
18
+
19
+ ## Commands Reference
20
+
21
+ ### Discovery & Launch
22
+ ```bash
23
+ agent-view launch # Start app from config, wait for CDP readiness
24
+ agent-view discover # List windows (JSON) — get window IDs
25
+ agent-view stop # Stop the lazy server
26
+ ```
27
+
28
+ ### DOM Inspection
29
+ ```bash
30
+ agent-view dom # DOM accessibility tree (default window)
31
+ agent-view dom --window <id|name> # Specific window
32
+ agent-view dom --filter "button" # Filter by text/role
33
+ agent-view dom --depth 3 # Limit tree depth
34
+ ```
35
+
36
+ ### Interaction
37
+ ```bash
38
+ agent-view click <ref> # Click element by ref from dom output
39
+ agent-view click --pos 100,200 # Click by coordinates (for canvas)
40
+ agent-view fill <ref> "text" # Type into input field
41
+ ```
42
+
43
+ ### Screenshots
44
+ ```bash
45
+ agent-view screenshot # Save PNG to temp dir, print path
46
+ agent-view screenshot --window <id> # Specific window
47
+ ```
48
+
49
+ ### Canvas / WebGL (only when `webgl` is configured in agent-view.config.json)
50
+
51
+ These commands read the scene graph from canvas-based rendering engines. Skip this section if the project has no `webgl` field in config.
52
+
53
+ ```bash
54
+ agent-view scene # Scene graph from configured engine
55
+ agent-view scene --filter "player" # Filter by object name/type
56
+ agent-view scene --verbose # Extended props (scale, alpha, rotation)
57
+ agent-view scene --diff # Changes since last call
58
+ agent-view snap # DOM + Scene combined
59
+ ```
60
+
61
+ ## Verification Workflow
62
+
63
+ ### Ad-hoc Mode (standalone)
64
+
65
+ After making code changes:
66
+
67
+ 1. **Determine affected areas** from git diff
68
+ 2. **Ensure app is running**: `agent-view launch` or `agent-view discover`
69
+ 3. **Inspect DOM**: `agent-view dom --filter "<area>"` — check structure matches expectations
70
+ 4. **Take screenshot**: `agent-view screenshot` — capture visual state
71
+ 5. **Interact if needed**: `agent-view click`/`fill` → `agent-view dom` to verify state changed
72
+ 6. **For canvas apps**: `agent-view scene --diff` to see what changed
73
+
74
+ ### Scenario Execution Mode (from plan)
75
+
76
+ When UI scenarios are pre-generated (e.g., from a plan file with `## UI Scenarios` section):
77
+
78
+ 1. **Read scenario steps** with symbolic refs (`$var` notation)
79
+ 2. **Resolve each $var**: `agent-view dom --filter "<text>" --depth 3` → map to ref ID
80
+ 3. **Execute steps** sequentially: fill, click, dom --filter (verify expected outcome)
81
+ 4. **Screenshot**: capture on FAIL and at E2E scenario end — not every step
82
+ 5. **Report per-scenario**: PASS / FAIL with reason and evidence
83
+
84
+ This mode works with any workflow that generates plan files with UI scenarios.
85
+
86
+ ## Resilience
87
+
88
+ - **Stale refs:** After HMR, navigation, or state change — re-run `dom` for fresh refs before interacting
89
+ - **Element not found:** Wait 2s, retry once (render delay after HMR). If still missing — report FAIL
90
+ - **CDP disconnect:** Run `agent-view discover` to check. If no windows — `agent-view launch`
91
+ - **Max retries per command:** 2. After that — SKIP scenario step with warning
92
+
93
+ ## Important Notes
94
+
95
+ - **Refs are session-scoped** — after HMR or navigation, run `dom` again for fresh refs
96
+ - **Multiple windows**: use `--window <id>` from `discover` output when titles overlap
97
+ - **Multiwindow**: all commands support `--window` flag
98
+ - **Output format**: plain text (DOM, scene), JSON (discover only), file path (screenshot)
99
+ - **Lazy server**: auto-starts on first call, shuts down after 5min idle
100
+ - **Token optimization**: always use `dom --filter` with specific text, limit `--depth` to 2-3