@liqngliz/browser-coding-agent 0.0.0-stage → 0.1.3

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 (133) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +46 -2
  3. package/app/.playwright/package/LICENSE +202 -0
  4. package/app/.playwright/package/NOTICE +5 -0
  5. package/app/.playwright/package/README.md +3 -0
  6. package/app/.playwright/package/ThirdPartyNotices.txt +13 -0
  7. package/app/.playwright/package/bin/install_media_pack.ps1 +5 -0
  8. package/app/.playwright/package/bin/install_webkit_wsl.ps1 +33 -0
  9. package/app/.playwright/package/bin/reinstall_chrome_beta_linux.sh +42 -0
  10. package/app/.playwright/package/bin/reinstall_chrome_beta_mac.sh +13 -0
  11. package/app/.playwright/package/bin/reinstall_chrome_beta_win.ps1 +24 -0
  12. package/app/.playwright/package/bin/reinstall_chrome_stable_linux.sh +42 -0
  13. package/app/.playwright/package/bin/reinstall_chrome_stable_mac.sh +12 -0
  14. package/app/.playwright/package/bin/reinstall_chrome_stable_win.ps1 +24 -0
  15. package/app/.playwright/package/bin/reinstall_msedge_beta_linux.sh +48 -0
  16. package/app/.playwright/package/bin/reinstall_msedge_beta_mac.sh +11 -0
  17. package/app/.playwright/package/bin/reinstall_msedge_beta_win.ps1 +23 -0
  18. package/app/.playwright/package/bin/reinstall_msedge_dev_linux.sh +48 -0
  19. package/app/.playwright/package/bin/reinstall_msedge_dev_mac.sh +11 -0
  20. package/app/.playwright/package/bin/reinstall_msedge_dev_win.ps1 +23 -0
  21. package/app/.playwright/package/bin/reinstall_msedge_stable_linux.sh +48 -0
  22. package/app/.playwright/package/bin/reinstall_msedge_stable_mac.sh +11 -0
  23. package/app/.playwright/package/bin/reinstall_msedge_stable_win.ps1 +24 -0
  24. package/app/.playwright/package/browsers.json +52 -0
  25. package/app/.playwright/package/cli.js +21 -0
  26. package/app/.playwright/package/index.d.ts +17 -0
  27. package/app/.playwright/package/index.js +17 -0
  28. package/app/.playwright/package/index.mjs +28 -0
  29. package/app/.playwright/package/lib/bootstrap.js +88 -0
  30. package/app/.playwright/package/lib/coreBundle.js +75813 -0
  31. package/app/.playwright/package/lib/entry/cliDaemon.js +5 -0
  32. package/app/.playwright/package/lib/entry/dashboardApp.js +3 -0
  33. package/app/.playwright/package/lib/entry/mcp.js +10 -0
  34. package/app/.playwright/package/lib/entry/oopBrowserDownload.js +3 -0
  35. package/app/.playwright/package/lib/package.js +50 -0
  36. package/app/.playwright/package/lib/server/chromium/appIcon.png +0 -0
  37. package/app/.playwright/package/lib/server/electron/loader.js +116 -0
  38. package/app/.playwright/package/lib/serverRegistry.js +1939 -0
  39. package/app/.playwright/package/lib/serverRegistry.js.LICENSE +65 -0
  40. package/app/.playwright/package/lib/tools/cli-client/channelSessions.js +141 -0
  41. package/app/.playwright/package/lib/tools/cli-client/cli.js +6 -0
  42. package/app/.playwright/package/lib/tools/cli-client/help.json +721 -0
  43. package/app/.playwright/package/lib/tools/cli-client/minimist.js +128 -0
  44. package/app/.playwright/package/lib/tools/cli-client/output.js +351 -0
  45. package/app/.playwright/package/lib/tools/cli-client/program.js +418 -0
  46. package/app/.playwright/package/lib/tools/cli-client/registry.js +180 -0
  47. package/app/.playwright/package/lib/tools/cli-client/session.js +259 -0
  48. package/app/.playwright/package/lib/tools/dashboard/appIcon.png +0 -0
  49. package/app/.playwright/package/lib/tools/skills/playwright-cli/SKILL.md +425 -0
  50. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
  51. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
  52. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
  53. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/running-code.md +241 -0
  54. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/session-management.md +225 -0
  55. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
  56. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
  57. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
  58. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/video-recording.md +143 -0
  59. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
  60. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
  61. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
  62. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
  63. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
  64. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
  65. package/app/.playwright/package/lib/tools/skills/playwright-trace/SKILL.md +174 -0
  66. package/app/.playwright/package/lib/tools/utils/extension.js +112 -0
  67. package/app/.playwright/package/lib/tools/utils/socketConnection.js +108 -0
  68. package/app/.playwright/package/lib/utilsBundle.js +85357 -0
  69. package/app/.playwright/package/lib/utilsBundle.js.LICENSE +1890 -0
  70. package/app/.playwright/package/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
  71. package/app/.playwright/package/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
  72. package/app/.playwright/package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  73. package/app/.playwright/package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  74. package/app/.playwright/package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  75. package/app/.playwright/package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  76. package/app/.playwright/package/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
  77. package/app/.playwright/package/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
  78. package/app/.playwright/package/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  79. package/app/.playwright/package/lib/vite/dashboard/index.html +29 -0
  80. package/app/.playwright/package/lib/vite/dashboard/playwright-logo.svg +24 -0
  81. package/app/.playwright/package/lib/vite/htmlReport/index.html +16 -0
  82. package/app/.playwright/package/lib/vite/htmlReport/report.css +2 -0
  83. package/app/.playwright/package/lib/vite/htmlReport/report.js +32 -0
  84. package/app/.playwright/package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  85. package/app/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
  86. package/app/.playwright/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  87. package/app/.playwright/package/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
  88. package/app/.playwright/package/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
  89. package/app/.playwright/package/lib/vite/recorder/index.html +29 -0
  90. package/app/.playwright/package/lib/vite/recorder/playwright-logo.svg +9 -0
  91. package/app/.playwright/package/lib/vite/traceViewer/assets/codeMirrorModule-BbkfBe3n.js +32 -0
  92. package/app/.playwright/package/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
  93. package/app/.playwright/package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  94. package/app/.playwright/package/lib/vite/traceViewer/assets/xtermModule-DywYcAf8.js +7 -0
  95. package/app/.playwright/package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  96. package/app/.playwright/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  97. package/app/.playwright/package/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
  98. package/app/.playwright/package/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
  99. package/app/.playwright/package/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  100. package/app/.playwright/package/lib/vite/traceViewer/index.html +44 -0
  101. package/app/.playwright/package/lib/vite/traceViewer/manifest.webmanifest +16 -0
  102. package/app/.playwright/package/lib/vite/traceViewer/playwright-logo.svg +9 -0
  103. package/app/.playwright/package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  104. package/app/.playwright/package/lib/vite/traceViewer/snapshot.html +10 -0
  105. package/app/.playwright/package/lib/vite/traceViewer/sw.bundle.js +4 -0
  106. package/app/.playwright/package/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
  107. package/app/.playwright/package/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
  108. package/app/.playwright/package/lib/vite/traceViewer/uiMode.html +18 -0
  109. package/app/.playwright/package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  110. package/app/.playwright/package/lib/webp_codec.LICENSE +173 -0
  111. package/app/.playwright/package/lib/webp_codec.wasm +0 -0
  112. package/app/.playwright/package/lib/xdg-open +1267 -0
  113. package/app/.playwright/package/package.json +34 -0
  114. package/app/.playwright/package/types/protocol.d.ts +24645 -0
  115. package/app/.playwright/package/types/structs.d.ts +52 -0
  116. package/app/.playwright/package/types/types.d.ts +26632 -0
  117. package/app/BrowserCodingAgent.Api.deps.json +109 -0
  118. package/app/BrowserCodingAgent.Api.dll +0 -0
  119. package/app/BrowserCodingAgent.Api.pdb +0 -0
  120. package/app/BrowserCodingAgent.Api.runtimeconfig.json +20 -0
  121. package/app/BrowserCodingAgent.Api.staticwebassets.endpoints.json +1 -0
  122. package/app/Microsoft.AspNetCore.OpenApi.dll +0 -0
  123. package/app/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  124. package/app/Microsoft.OpenApi.dll +0 -0
  125. package/app/Microsoft.Playwright.dll +0 -0
  126. package/app/Swashbuckle.AspNetCore.SwaggerUI.dll +0 -0
  127. package/app/appsettings.Development.json +8 -0
  128. package/app/appsettings.json +16 -0
  129. package/app/playwright.ps1 +7 -0
  130. package/app/replacements.json +48 -0
  131. package/app/web.config +11 -0
  132. package/browser-coding-agent.cjs +99 -0
  133. package/package.json +34 -4
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var socketConnection_exports = {};
20
+ __export(socketConnection_exports, {
21
+ SocketConnection: () => SocketConnection,
22
+ compareSemver: () => compareSemver
23
+ });
24
+ module.exports = __toCommonJS(socketConnection_exports);
25
+ class SocketConnection {
26
+ constructor(socket) {
27
+ this._pendingBuffers = [];
28
+ this._socket = socket;
29
+ socket.on("data", (buffer) => this._onData(buffer));
30
+ socket.on("close", () => {
31
+ this.onclose?.();
32
+ });
33
+ socket.on("error", (e) => console.error(`error: ${e.message}`));
34
+ }
35
+ async send(message) {
36
+ await new Promise((resolve, reject) => {
37
+ this._socket.write(`${JSON.stringify(message)}
38
+ `, (error) => {
39
+ if (error)
40
+ reject(error);
41
+ else
42
+ resolve(void 0);
43
+ });
44
+ });
45
+ }
46
+ close() {
47
+ this._socket.destroy();
48
+ }
49
+ _onData(buffer) {
50
+ let end = buffer.indexOf("\n");
51
+ if (end === -1) {
52
+ this._pendingBuffers.push(buffer);
53
+ return;
54
+ }
55
+ this._pendingBuffers.push(buffer.slice(0, end));
56
+ const message = Buffer.concat(this._pendingBuffers).toString();
57
+ this._dispatchMessage(message);
58
+ let start = end + 1;
59
+ end = buffer.indexOf("\n", start);
60
+ while (end !== -1) {
61
+ const message2 = buffer.toString(void 0, start, end);
62
+ this._dispatchMessage(message2);
63
+ start = end + 1;
64
+ end = buffer.indexOf("\n", start);
65
+ }
66
+ this._pendingBuffers = [buffer.slice(start)];
67
+ }
68
+ _dispatchMessage(message) {
69
+ try {
70
+ this.onmessage?.(JSON.parse(message));
71
+ } catch (e) {
72
+ console.error("failed to dispatch message", e);
73
+ }
74
+ }
75
+ }
76
+ function compareSemver(a, b) {
77
+ const aBase = a.replace(/-.*$/, "");
78
+ const bBase = b.replace(/-.*$/, "");
79
+ const aParts = aBase.split(".").map(Number);
80
+ const bParts = bBase.split(".").map(Number);
81
+ for (let i = 0; i < 3; i++) {
82
+ if (aParts[i] > bParts[i])
83
+ return 1;
84
+ if (aParts[i] < bParts[i])
85
+ return -1;
86
+ }
87
+ const aTimestamp = parseSuffixTimestamp(a);
88
+ const bTimestamp = parseSuffixTimestamp(b);
89
+ if (aTimestamp > bTimestamp)
90
+ return 1;
91
+ if (aTimestamp < bTimestamp)
92
+ return -1;
93
+ return 0;
94
+ }
95
+ function parseSuffixTimestamp(version) {
96
+ const match = version.match(/^\d+\.\d+\.\d+-(?:alpha|beta)-(.+)$/);
97
+ if (!match)
98
+ return Infinity;
99
+ const suffix = match[1];
100
+ if (/^\d{4}-\d{2}-\d{2}$/.test(suffix))
101
+ return new Date(suffix).getTime();
102
+ return Number(suffix);
103
+ }
104
+ // Annotate the CommonJS export names for ESM import in node:
105
+ 0 && (module.exports = {
106
+ SocketConnection,
107
+ compareSemver
108
+ });