@capyclaw/browser-workbench 0.0.0-stage → 0.1.17

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 (334) hide show
  1. package/README.md +88 -2
  2. package/contract/browser-contract.json +1349 -0
  3. package/demo/form.html +112 -0
  4. package/lib/host.mjs +1 -0
  5. package/node_modules/@capyclaw/asset-service/README.md +48 -0
  6. package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
  7. package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
  8. package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
  9. package/node_modules/@capyclaw/asset-service/package.json +59 -0
  10. package/node_modules/@capyclaw/asset-service/src/index.mjs +223 -0
  11. package/node_modules/@capyclaw/document-workbench/README.md +125 -0
  12. package/node_modules/@capyclaw/document-workbench/package.json +44 -0
  13. package/node_modules/@capyclaw/document-workbench/src/bridge/index.mjs +321 -0
  14. package/node_modules/@capyclaw/document-workbench/src/client/index.mjs +625 -0
  15. package/node_modules/@capyclaw/document-workbench/src/client/screenshot.mjs +98 -0
  16. package/node_modules/@capyclaw/document-workbench/src/index.mjs +9 -0
  17. package/node_modules/@capyclaw/document-workbench/src/model/audit.mjs +101 -0
  18. package/node_modules/@capyclaw/document-workbench/src/model/conformance.mjs +92 -0
  19. package/node_modules/@capyclaw/document-workbench/src/model/ids.mjs +56 -0
  20. package/node_modules/@capyclaw/document-workbench/src/model/index.mjs +18 -0
  21. package/node_modules/@capyclaw/document-workbench/src/model/locate.mjs +118 -0
  22. package/node_modules/@capyclaw/document-workbench/src/model/manifest.mjs +148 -0
  23. package/node_modules/@capyclaw/document-workbench/src/model/ops.mjs +160 -0
  24. package/node_modules/@capyclaw/document-workbench/src/model/validate.mjs +72 -0
  25. package/node_modules/@capyclaw/document-workbench/src/ops/index.mjs +93 -0
  26. package/node_modules/@capyclaw/document-workbench/src/session/context.mjs +91 -0
  27. package/node_modules/@capyclaw/document-workbench/src/session/index.mjs +394 -0
  28. package/node_modules/@capyclaw/document-workbench/src/session/lease.mjs +105 -0
  29. package/node_modules/@capyclaw/document-workbench/src/session/mode.mjs +80 -0
  30. package/node_modules/@capyclaw/document-workbench/src/session/sanitize.mjs +107 -0
  31. package/node_modules/@capyclaw/document-workbench/src/session/state.mjs +159 -0
  32. package/node_modules/@capyclaw/document-workbench/src/session/watch.mjs +63 -0
  33. package/node_modules/@capyclaw/document-workbench/src/store/file-backend.mjs +158 -0
  34. package/node_modules/@capyclaw/document-workbench/src/testing/index.mjs +75 -0
  35. package/node_modules/@capyclaw/foundation/README.md +51 -0
  36. package/node_modules/@capyclaw/foundation/abi/bridge.mjs +86 -0
  37. package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
  38. package/node_modules/@capyclaw/foundation/abi/index.mjs +35 -0
  39. package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
  40. package/node_modules/@capyclaw/foundation/abi/loader.mjs +345 -0
  41. package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
  42. package/node_modules/@capyclaw/foundation/abi/spec.mjs +255 -0
  43. package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
  44. package/node_modules/@capyclaw/foundation/abi/version.mjs +82 -0
  45. package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
  46. package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
  47. package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
  48. package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
  49. package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
  50. package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +55 -0
  51. package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
  52. package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +68 -0
  53. package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +113 -0
  54. package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
  55. package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
  56. package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
  57. package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
  58. package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
  59. package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +34 -0
  60. package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +85 -0
  61. package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +50 -0
  62. package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +160 -0
  63. package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
  64. package/node_modules/@capyclaw/foundation/lib/kernel.mjs +185 -0
  65. package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +87 -0
  66. package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
  67. package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
  68. package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +188 -0
  69. package/node_modules/@capyclaw/foundation/package.json +53 -0
  70. package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
  71. package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
  72. package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
  73. package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
  74. package/node_modules/@capyclaw/plugin-kit/package.json +69 -0
  75. package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
  76. package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
  77. package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +129 -0
  78. package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +139 -0
  79. package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
  80. package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
  81. package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
  82. package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
  83. package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
  84. package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
  85. package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
  86. package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
  87. package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +143 -0
  88. package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
  89. package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
  90. package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
  91. package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
  92. package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
  93. package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +41 -0
  94. package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
  95. package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
  96. package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
  97. package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
  98. package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +656 -0
  99. package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
  100. package/node_modules/@capyclaw/service-host/README.md +86 -0
  101. package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
  102. package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
  103. package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
  104. package/node_modules/@capyclaw/service-host/package.json +60 -0
  105. package/node_modules/@capyclaw/service-host/src/index.mjs +571 -0
  106. package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
  107. package/node_modules/@capyclaw/tool-host/README.md +56 -0
  108. package/node_modules/@capyclaw/tool-host/cordis.patch.yml +4 -0
  109. package/node_modules/@capyclaw/tool-host/dsh-suite.json +30 -0
  110. package/node_modules/@capyclaw/tool-host/lib/host.mjs +16 -0
  111. package/node_modules/@capyclaw/tool-host/package.json +59 -0
  112. package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +142 -0
  113. package/node_modules/@capyclaw/tool-host/src/index.mjs +390 -0
  114. package/node_modules/playwright/LICENSE +202 -0
  115. package/node_modules/playwright/NOTICE +5 -0
  116. package/node_modules/playwright/README.md +318 -0
  117. package/node_modules/playwright/ThirdPartyNotices.txt +14 -0
  118. package/node_modules/playwright/cli.js +19 -0
  119. package/node_modules/playwright/index.d.ts +17 -0
  120. package/node_modules/playwright/index.js +17 -0
  121. package/node_modules/playwright/index.mjs +18 -0
  122. package/node_modules/playwright/lib/agents/agentParser.js +89 -0
  123. package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
  124. package/node_modules/playwright/lib/agents/generateAgents.js +395 -0
  125. package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
  126. package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
  127. package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
  128. package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
  129. package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
  130. package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
  131. package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
  132. package/node_modules/playwright/lib/cli/reportActions.js +78 -0
  133. package/node_modules/playwright/lib/cli/testActions.js +217 -0
  134. package/node_modules/playwright/lib/common/index.js +2937 -0
  135. package/node_modules/playwright/lib/common/index.js.txt +33 -0
  136. package/node_modules/playwright/lib/errorContext.js +129 -0
  137. package/node_modules/playwright/lib/globals.js +58 -0
  138. package/node_modules/playwright/lib/index.js +827 -0
  139. package/node_modules/playwright/lib/isomorphic.js +260 -0
  140. package/node_modules/playwright/lib/isomorphic.js.txt +9 -0
  141. package/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
  142. package/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
  143. package/node_modules/playwright/lib/matchers/expect.js +13496 -0
  144. package/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
  145. package/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
  146. package/node_modules/playwright/lib/package.js +47 -0
  147. package/node_modules/playwright/lib/program.js +242 -0
  148. package/node_modules/playwright/lib/runner/index.js +8721 -0
  149. package/node_modules/playwright/lib/runner/index.js.txt +62 -0
  150. package/node_modules/playwright/lib/transform/babelBundle.js +72490 -0
  151. package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
  152. package/node_modules/playwright/lib/transform/babelBundle.js.txt +328 -0
  153. package/node_modules/playwright/lib/transform/esmLoader.js +8066 -0
  154. package/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
  155. package/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
  156. package/node_modules/playwright/lib/util.js +373 -0
  157. package/node_modules/playwright/lib/worker/workerProcessEntry.js +1860 -0
  158. package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
  159. package/node_modules/playwright/package.json +50 -0
  160. package/node_modules/playwright/test.d.ts +18 -0
  161. package/node_modules/playwright/test.js +24 -0
  162. package/node_modules/playwright/test.mjs +35 -0
  163. package/node_modules/playwright/types/test.d.ts +11191 -0
  164. package/node_modules/playwright/types/testReporter.d.ts +950 -0
  165. package/node_modules/playwright-core/LICENSE +202 -0
  166. package/node_modules/playwright-core/NOTICE +5 -0
  167. package/node_modules/playwright-core/README.md +3 -0
  168. package/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
  169. package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
  170. package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
  171. package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  172. package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  173. package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  174. package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  175. package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  176. package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  177. package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  178. package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  179. package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  180. package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  181. package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  182. package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  183. package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  184. package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  185. package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  186. package/node_modules/playwright-core/browsers.json +52 -0
  187. package/node_modules/playwright-core/cli.js +22 -0
  188. package/node_modules/playwright-core/index.d.ts +17 -0
  189. package/node_modules/playwright-core/index.js +17 -0
  190. package/node_modules/playwright-core/index.mjs +28 -0
  191. package/node_modules/playwright-core/lib/bootstrap.js +149 -0
  192. package/node_modules/playwright-core/lib/coreBundle.js +78041 -0
  193. package/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
  194. package/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
  195. package/node_modules/playwright-core/lib/entry/mcp.js +10 -0
  196. package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
  197. package/node_modules/playwright-core/lib/package.js +50 -0
  198. package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  199. package/node_modules/playwright-core/lib/server/electron/loader.js +123 -0
  200. package/node_modules/playwright-core/lib/serverRegistry.js +1939 -0
  201. package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +65 -0
  202. package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
  203. package/node_modules/playwright-core/lib/tools/cli-client/cli.js +7 -0
  204. package/node_modules/playwright-core/lib/tools/cli-client/help.json +808 -0
  205. package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
  206. package/node_modules/playwright-core/lib/tools/cli-client/output.js +352 -0
  207. package/node_modules/playwright-core/lib/tools/cli-client/program.js +422 -0
  208. package/node_modules/playwright-core/lib/tools/cli-client/registry.js +180 -0
  209. package/node_modules/playwright-core/lib/tools/cli-client/session.js +261 -0
  210. package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
  211. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +493 -0
  212. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
  213. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
  214. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
  215. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
  216. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
  217. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
  218. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
  219. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
  220. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
  221. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
  222. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
  223. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
  224. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
  225. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
  226. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
  227. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
  228. package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
  229. package/node_modules/playwright-core/lib/tools/utils/extension.js +112 -0
  230. package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
  231. package/node_modules/playwright-core/lib/utilsBundle.js +86078 -0
  232. package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +1890 -0
  233. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
  234. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
  235. package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  236. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  237. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  238. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  239. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
  240. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
  241. package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  242. package/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
  243. package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
  244. package/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
  245. package/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
  246. package/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
  247. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  248. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +32 -0
  249. package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  250. package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
  251. package/node_modules/playwright-core/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
  252. package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
  253. package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  254. package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +32 -0
  255. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
  256. package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  257. package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +7 -0
  258. package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  259. package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  260. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
  261. package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  262. package/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
  263. package/node_modules/playwright-core/lib/vite/traceViewer/index.oNry3Hjv.js +1 -0
  264. package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  265. package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  266. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  267. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
  268. package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
  269. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CYwC_gH1.js +5 -0
  270. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
  271. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
  272. package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  273. package/node_modules/playwright-core/lib/webp_codec.LICENSE +173 -0
  274. package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
  275. package/node_modules/playwright-core/lib/xdg-open +1267 -0
  276. package/node_modules/playwright-core/package.json +34 -0
  277. package/node_modules/playwright-core/types/protocol.d.ts +24776 -0
  278. package/node_modules/playwright-core/types/structs.d.ts +52 -0
  279. package/node_modules/playwright-core/types/types.d.ts +27167 -0
  280. package/package.json +79 -4
  281. package/plugin.mjs +1 -0
  282. package/server/constants.mjs +16 -0
  283. package/server/contract-snapshots.mjs +81 -0
  284. package/server/contract.mjs +24 -0
  285. package/server/embedded-host.mjs +247 -0
  286. package/server/engine.mjs +2466 -0
  287. package/server/governor.mjs +189 -0
  288. package/server/http-utils.mjs +2 -0
  289. package/server/human.mjs +628 -0
  290. package/server/infra/http.mjs +2 -0
  291. package/server/infra/tuning.mjs +2 -0
  292. package/server/input.mjs +154 -0
  293. package/server/login-vault.mjs +109 -0
  294. package/server/mcp/handler.mjs +2 -0
  295. package/server/mcp/instructions.mjs +31 -0
  296. package/server/orphans.mjs +163 -0
  297. package/server/relay.mjs +198 -0
  298. package/server/routes/api.mjs +233 -0
  299. package/server/routes/assets.mjs +2 -0
  300. package/server/routes/mcp.mjs +17 -0
  301. package/server/routes/workbench.mjs +33 -0
  302. package/server/session-engines.mjs +184 -0
  303. package/server/shared/SHARED_MANIFEST.json +70 -0
  304. package/server/shared/asset-service.mjs +2 -0
  305. package/server/shared/editor-host.mjs +2 -0
  306. package/server/shared/kit/editor/lease.mjs +2 -0
  307. package/server/shared/kit/service/api.mjs +2 -0
  308. package/server/shared/kit/service/http.mjs +2 -0
  309. package/server/shared/kit/service/mcp-http.mjs +2 -0
  310. package/server/shared/kit/tools/validate.mjs +2 -0
  311. package/server/shared/kit/tuning.mjs +2 -0
  312. package/server/shared/kit/util/fs-lock.mjs +2 -0
  313. package/server/shared/service-host.mjs +2 -0
  314. package/server/shared/tool-host.mjs +2 -0
  315. package/server/shared/tuning.mjs +2 -0
  316. package/server/tools/capabilities/contract.mjs +55 -0
  317. package/server/tools/capabilities/evaluate.mjs +36 -0
  318. package/server/tools/capabilities/index.mjs +26 -0
  319. package/server/tools/capabilities/interaction.mjs +215 -0
  320. package/server/tools/capabilities/navigation.mjs +35 -0
  321. package/server/tools/capabilities/screenshot.mjs +50 -0
  322. package/server/tools/capabilities/session.mjs +81 -0
  323. package/server/tools/capabilities/snapshot.mjs +30 -0
  324. package/server/tools/capabilities/tabs.mjs +35 -0
  325. package/server/tools/index.mjs +12 -0
  326. package/server/tools/kernel/define.mjs +5 -0
  327. package/server/tools/kernel/output.mjs +30 -0
  328. package/server/tools/kernel/ports.mjs +59 -0
  329. package/server/tools/kernel/registry.mjs +17 -0
  330. package/server/tools.mjs +3 -0
  331. package/server/workbench-framework.mjs +305 -0
  332. package/ui/app.js +447 -0
  333. package/ui/index.html +46 -0
  334. package/ui/style.css +144 -0
@@ -0,0 +1,373 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var util_exports = {};
30
+ __export(util_exports, {
31
+ addSuffixToFilePath: () => addSuffixToFilePath,
32
+ ansiRegex: () => ansiRegex,
33
+ createFileMatcher: () => createFileMatcher,
34
+ createTitleMatcher: () => createTitleMatcher,
35
+ debugTest: () => debugTest,
36
+ errorWithFile: () => errorWithFile,
37
+ expectTypes: () => expectTypes,
38
+ fileExistsAsync: () => fileExistsAsync,
39
+ fileIsModule: () => fileIsModule,
40
+ filterStackTrace: () => filterStackTrace,
41
+ forceRegExp: () => forceRegExp,
42
+ formatLocation: () => formatLocation,
43
+ getContainedPath: () => getContainedPath,
44
+ getPackageJsonPath: () => getPackageJsonPath,
45
+ mergeObjects: () => mergeObjects,
46
+ normalizeAndSaveAttachment: () => normalizeAndSaveAttachment,
47
+ parseLocationArg: () => parseLocationArg,
48
+ relativeFilePath: () => relativeFilePath,
49
+ removeDirAndLogToConsole: () => removeDirAndLogToConsole,
50
+ resolveImportSpecifierAfterMapping: () => resolveImportSpecifierAfterMapping,
51
+ resolveReporterOutputPath: () => resolveReporterOutputPath,
52
+ sanitizeFilePathBeforeExtension: () => sanitizeFilePathBeforeExtension,
53
+ serializeError: () => serializeError,
54
+ stripAnsiEscapes: () => stripAnsiEscapes,
55
+ takeFirst: () => takeFirst,
56
+ windowsFilesystemFriendlyLength: () => windowsFilesystemFriendlyLength
57
+ });
58
+ module.exports = __toCommonJS(util_exports);
59
+ var import_fs = __toESM(require("fs"));
60
+ var import_path = __toESM(require("path"));
61
+ var import_util = __toESM(require("util"));
62
+ const debug = require("playwright-core/lib/utilsBundle").debug;
63
+ const mime = require("playwright-core/lib/utilsBundle").mime;
64
+ const { minimatch } = require("playwright-core/lib/utilsBundle");
65
+ const { calculateSha1 } = require("playwright-core/lib/coreBundle").utils;
66
+ const { sanitizeForFilePath } = require("playwright-core/lib/coreBundle").utils;
67
+ const { isRegExp } = require("playwright-core/lib/coreBundle").iso;
68
+ const { stringifyStackFrames, filteredStackTrace } = require("playwright-core/lib/coreBundle").utils;
69
+ const { ansiRegex, isString, stripAnsiEscapes } = require("playwright-core/lib/coreBundle").iso;
70
+ function filterStackTrace(e) {
71
+ const name = e.name ? e.name + ": " : "";
72
+ const cause = e.cause instanceof Error ? filterStackTrace(e.cause) : void 0;
73
+ if (process.env.PWDEBUGIMPL)
74
+ return { message: name + e.message, stack: e.stack || "", cause };
75
+ const stackLines = stringifyStackFrames(filteredStackTrace(e.stack?.split("\n") || []));
76
+ return {
77
+ message: name + e.message,
78
+ stack: `${name}${e.message}${stackLines.map((line) => "\n" + line).join("")}`,
79
+ cause
80
+ };
81
+ }
82
+ function serializeError(error) {
83
+ if (error instanceof Error)
84
+ return filterStackTrace(error);
85
+ return {
86
+ value: import_util.default.inspect(error)
87
+ };
88
+ }
89
+ function parseLocationArg(arg) {
90
+ const match = /^(.*?):(\d+):?(\d+)?$/.exec(arg);
91
+ return {
92
+ file: match ? match[1] : arg,
93
+ line: match ? parseInt(match[2], 10) : null,
94
+ column: match?.[3] ? parseInt(match[3], 10) : null
95
+ };
96
+ }
97
+ function createFileMatcher(patterns) {
98
+ const reList = [];
99
+ const filePatterns = [];
100
+ for (const pattern of Array.isArray(patterns) ? patterns : [patterns]) {
101
+ if (isRegExp(pattern)) {
102
+ reList.push(pattern);
103
+ } else {
104
+ if (!pattern.startsWith("**/"))
105
+ filePatterns.push("**/" + pattern);
106
+ else
107
+ filePatterns.push(pattern);
108
+ }
109
+ }
110
+ return (filePath) => {
111
+ for (const re of reList) {
112
+ re.lastIndex = 0;
113
+ if (re.test(filePath))
114
+ return true;
115
+ }
116
+ if (import_path.default.sep === "\\") {
117
+ const unixPath = filePath.split(import_path.default.sep).join("/");
118
+ for (const re of reList) {
119
+ re.lastIndex = 0;
120
+ if (re.test(unixPath))
121
+ return true;
122
+ }
123
+ }
124
+ for (const pattern of filePatterns) {
125
+ if (minimatch(filePath, pattern, { nocase: true, dot: true }))
126
+ return true;
127
+ }
128
+ return false;
129
+ };
130
+ }
131
+ function createTitleMatcher(patterns) {
132
+ const reList = Array.isArray(patterns) ? patterns : [patterns];
133
+ return (value) => {
134
+ for (const re of reList) {
135
+ re.lastIndex = 0;
136
+ if (re.test(value))
137
+ return true;
138
+ }
139
+ return false;
140
+ };
141
+ }
142
+ function mergeObjects(a, b, c) {
143
+ const result = { ...a };
144
+ for (const x of [b, c].filter(Boolean)) {
145
+ for (const [name, value] of Object.entries(x)) {
146
+ if (!Object.is(value, void 0))
147
+ result[name] = value;
148
+ }
149
+ }
150
+ return result;
151
+ }
152
+ function forceRegExp(pattern) {
153
+ const match = pattern.match(/^\/(.*)\/([gi]*)$/);
154
+ if (match)
155
+ return new RegExp(match[1], match[2]);
156
+ return new RegExp(pattern, "gi");
157
+ }
158
+ function relativeFilePath(file) {
159
+ if (!import_path.default.isAbsolute(file))
160
+ return file;
161
+ return import_path.default.relative(process.cwd(), file);
162
+ }
163
+ function formatLocation(location) {
164
+ return relativeFilePath(location.file) + ":" + location.line + ":" + location.column;
165
+ }
166
+ function errorWithFile(file, message) {
167
+ return new Error(`${relativeFilePath(file)}: ${message}`);
168
+ }
169
+ function expectTypes(receiver, types, matcherName) {
170
+ if (typeof receiver !== "object" || !types.includes(receiver._apiName)) {
171
+ const receiverString = typeof receiver === "object" && receiver !== null ? `${receiver.constructor.name} ${import_util.default.inspect(receiver)}` : String(receiver);
172
+ const commaSeparated = types.slice();
173
+ const lastType = commaSeparated.pop();
174
+ const typesString = commaSeparated.length ? commaSeparated.join(", ") + " or " + lastType : lastType;
175
+ throw new Error(`${matcherName} can be only used with ${typesString} object${types.length > 1 ? "s" : ""}, was called with ${receiverString}`);
176
+ }
177
+ }
178
+ const windowsFilesystemFriendlyLength = 60;
179
+ function addSuffixToFilePath(filePath, suffix) {
180
+ const ext = import_path.default.extname(filePath);
181
+ const base = filePath.substring(0, filePath.length - ext.length);
182
+ return base + suffix + ext;
183
+ }
184
+ function sanitizeFilePathBeforeExtension(filePath, ext) {
185
+ ext ??= import_path.default.extname(filePath);
186
+ const base = filePath.substring(0, filePath.length - ext.length);
187
+ return sanitizeForFilePath(base) + ext;
188
+ }
189
+ function getContainedPath(parentPath, subPath = "") {
190
+ const resolvedPath = import_path.default.resolve(parentPath, subPath);
191
+ if (resolvedPath === parentPath || resolvedPath.startsWith(parentPath + import_path.default.sep))
192
+ return resolvedPath;
193
+ return null;
194
+ }
195
+ const debugTest = debug("pw:test");
196
+ const folderToPackageJsonPath = /* @__PURE__ */ new Map();
197
+ function getPackageJsonPath(folderPath) {
198
+ const cached = folderToPackageJsonPath.get(folderPath);
199
+ if (cached !== void 0)
200
+ return cached;
201
+ const packageJsonPath = import_path.default.join(folderPath, "package.json");
202
+ if (import_fs.default.existsSync(packageJsonPath)) {
203
+ folderToPackageJsonPath.set(folderPath, packageJsonPath);
204
+ return packageJsonPath;
205
+ }
206
+ const parentFolder = import_path.default.dirname(folderPath);
207
+ if (folderPath === parentFolder) {
208
+ folderToPackageJsonPath.set(folderPath, "");
209
+ return "";
210
+ }
211
+ const result = getPackageJsonPath(parentFolder);
212
+ folderToPackageJsonPath.set(folderPath, result);
213
+ return result;
214
+ }
215
+ function resolveReporterOutputPath(defaultValue, configDir, configValue) {
216
+ if (configValue)
217
+ return import_path.default.resolve(configDir, configValue);
218
+ let basePath = getPackageJsonPath(configDir);
219
+ basePath = basePath ? import_path.default.dirname(basePath) : process.cwd();
220
+ return import_path.default.resolve(basePath, defaultValue);
221
+ }
222
+ async function normalizeAndSaveAttachment(outputPath, name, options = {}) {
223
+ if (options.path === void 0 && options.body === void 0)
224
+ return { name, contentType: "text/plain" };
225
+ if ((options.path !== void 0 ? 1 : 0) + (options.body !== void 0 ? 1 : 0) !== 1)
226
+ throw new Error(`Exactly one of "path" and "body" must be specified`);
227
+ if (options.path !== void 0) {
228
+ const hash = calculateSha1(options.path);
229
+ if (!isString(name))
230
+ throw new Error('"name" should be string.');
231
+ const sanitizedNamePrefix = sanitizeForFilePath(name) + "-";
232
+ const dest = import_path.default.join(outputPath, "attachments", sanitizedNamePrefix + hash + import_path.default.extname(options.path));
233
+ await import_fs.default.promises.mkdir(import_path.default.dirname(dest), { recursive: true });
234
+ await import_fs.default.promises.copyFile(options.path, dest);
235
+ const contentType = options.contentType ?? (mime.getType(import_path.default.basename(options.path)) || "application/octet-stream");
236
+ return { name, contentType, path: dest };
237
+ } else {
238
+ const contentType = options.contentType ?? (typeof options.body === "string" ? "text/plain" : "application/octet-stream");
239
+ return { name, contentType, body: typeof options.body === "string" ? Buffer.from(options.body) : options.body };
240
+ }
241
+ }
242
+ function fileIsModule(file) {
243
+ if (file.endsWith(".mjs") || file.endsWith(".mts"))
244
+ return true;
245
+ if (file.endsWith(".cjs") || file.endsWith(".cts"))
246
+ return false;
247
+ const folder = import_path.default.dirname(file);
248
+ return folderIsModule(folder);
249
+ }
250
+ const packageJsonIsModuleCache = /* @__PURE__ */ new Map();
251
+ function folderIsModule(folder) {
252
+ const packageJsonPath = getPackageJsonPath(folder);
253
+ if (!packageJsonPath)
254
+ return false;
255
+ if (!packageJsonIsModuleCache.has(packageJsonPath)) {
256
+ let isModule = false;
257
+ try {
258
+ isModule = JSON.parse(import_fs.default.readFileSync(packageJsonPath, "utf8")).type === "module";
259
+ } catch {
260
+ }
261
+ packageJsonIsModuleCache.set(packageJsonPath, isModule);
262
+ }
263
+ return packageJsonIsModuleCache.get(packageJsonPath);
264
+ }
265
+ const packageJsonMainFieldCache = /* @__PURE__ */ new Map();
266
+ function getMainFieldFromPackageJson(packageJsonPath) {
267
+ if (!packageJsonMainFieldCache.has(packageJsonPath)) {
268
+ let mainField;
269
+ try {
270
+ mainField = JSON.parse(import_fs.default.readFileSync(packageJsonPath, "utf8")).main;
271
+ } catch {
272
+ }
273
+ packageJsonMainFieldCache.set(packageJsonPath, mainField);
274
+ }
275
+ return packageJsonMainFieldCache.get(packageJsonPath);
276
+ }
277
+ const kExtLookups = /* @__PURE__ */ new Map([
278
+ [".js", [".jsx", ".ts", ".tsx"]],
279
+ [".jsx", [".tsx"]],
280
+ [".cjs", [".cts"]],
281
+ [".mjs", [".mts"]],
282
+ ["", [".js", ".ts", ".jsx", ".tsx", ".cjs", ".mjs", ".cts", ".mts"]]
283
+ ]);
284
+ function resolveImportSpecifierExtension(resolved) {
285
+ if (fileExists(resolved))
286
+ return resolved;
287
+ for (const [ext, others] of kExtLookups) {
288
+ if (!resolved.endsWith(ext))
289
+ continue;
290
+ for (const other of others) {
291
+ const modified = resolved.substring(0, resolved.length - ext.length) + other;
292
+ if (fileExists(modified))
293
+ return modified;
294
+ }
295
+ break;
296
+ }
297
+ }
298
+ function resolveImportSpecifierAfterMapping(resolved, afterPathMapping) {
299
+ const resolvedFile = resolveImportSpecifierExtension(resolved);
300
+ if (resolvedFile)
301
+ return resolvedFile;
302
+ if (dirExists(resolved)) {
303
+ const packageJsonPath = import_path.default.join(resolved, "package.json");
304
+ if (afterPathMapping) {
305
+ const mainField = getMainFieldFromPackageJson(packageJsonPath);
306
+ const mainFieldResolved = mainField ? resolveImportSpecifierExtension(import_path.default.resolve(resolved, mainField)) : void 0;
307
+ return mainFieldResolved || resolveImportSpecifierExtension(import_path.default.join(resolved, "index"));
308
+ }
309
+ if (fileExists(packageJsonPath))
310
+ return resolved;
311
+ const dirImport = import_path.default.join(resolved, "index");
312
+ return resolveImportSpecifierExtension(dirImport);
313
+ }
314
+ }
315
+ function fileExists(resolved) {
316
+ return import_fs.default.statSync(resolved, { throwIfNoEntry: false })?.isFile();
317
+ }
318
+ async function fileExistsAsync(resolved) {
319
+ try {
320
+ const stat = await import_fs.default.promises.stat(resolved);
321
+ return stat.isFile();
322
+ } catch {
323
+ return false;
324
+ }
325
+ }
326
+ function dirExists(resolved) {
327
+ return import_fs.default.statSync(resolved, { throwIfNoEntry: false })?.isDirectory();
328
+ }
329
+ async function removeDirAndLogToConsole(dir) {
330
+ try {
331
+ if (!import_fs.default.existsSync(dir))
332
+ return;
333
+ console.log(`Removing ${await import_fs.default.promises.realpath(dir)}`);
334
+ await import_fs.default.promises.rm(dir, { recursive: true, force: true });
335
+ } catch {
336
+ }
337
+ }
338
+ function takeFirst(...args) {
339
+ for (const arg of args) {
340
+ if (arg !== void 0)
341
+ return arg;
342
+ }
343
+ return void 0;
344
+ }
345
+ // Annotate the CommonJS export names for ESM import in node:
346
+ 0 && (module.exports = {
347
+ addSuffixToFilePath,
348
+ ansiRegex,
349
+ createFileMatcher,
350
+ createTitleMatcher,
351
+ debugTest,
352
+ errorWithFile,
353
+ expectTypes,
354
+ fileExistsAsync,
355
+ fileIsModule,
356
+ filterStackTrace,
357
+ forceRegExp,
358
+ formatLocation,
359
+ getContainedPath,
360
+ getPackageJsonPath,
361
+ mergeObjects,
362
+ normalizeAndSaveAttachment,
363
+ parseLocationArg,
364
+ relativeFilePath,
365
+ removeDirAndLogToConsole,
366
+ resolveImportSpecifierAfterMapping,
367
+ resolveReporterOutputPath,
368
+ sanitizeFilePathBeforeExtension,
369
+ serializeError,
370
+ stripAnsiEscapes,
371
+ takeFirst,
372
+ windowsFilesystemFriendlyLength
373
+ });