@liqngliz/browser-coding-agent 0.0.0-ci.8 → 0.0.0-stage

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/README.md +2 -130
  2. package/package.json +4 -34
  3. package/LICENSE +0 -201
  4. package/app/.playwright/package/LICENSE +0 -202
  5. package/app/.playwright/package/NOTICE +0 -5
  6. package/app/.playwright/package/README.md +0 -3
  7. package/app/.playwright/package/ThirdPartyNotices.txt +0 -13
  8. package/app/.playwright/package/bin/install_media_pack.ps1 +0 -5
  9. package/app/.playwright/package/bin/install_webkit_wsl.ps1 +0 -33
  10. package/app/.playwright/package/bin/reinstall_chrome_beta_linux.sh +0 -42
  11. package/app/.playwright/package/bin/reinstall_chrome_beta_mac.sh +0 -13
  12. package/app/.playwright/package/bin/reinstall_chrome_beta_win.ps1 +0 -24
  13. package/app/.playwright/package/bin/reinstall_chrome_stable_linux.sh +0 -42
  14. package/app/.playwright/package/bin/reinstall_chrome_stable_mac.sh +0 -12
  15. package/app/.playwright/package/bin/reinstall_chrome_stable_win.ps1 +0 -24
  16. package/app/.playwright/package/bin/reinstall_msedge_beta_linux.sh +0 -48
  17. package/app/.playwright/package/bin/reinstall_msedge_beta_mac.sh +0 -11
  18. package/app/.playwright/package/bin/reinstall_msedge_beta_win.ps1 +0 -23
  19. package/app/.playwright/package/bin/reinstall_msedge_dev_linux.sh +0 -48
  20. package/app/.playwright/package/bin/reinstall_msedge_dev_mac.sh +0 -11
  21. package/app/.playwright/package/bin/reinstall_msedge_dev_win.ps1 +0 -23
  22. package/app/.playwright/package/bin/reinstall_msedge_stable_linux.sh +0 -48
  23. package/app/.playwright/package/bin/reinstall_msedge_stable_mac.sh +0 -11
  24. package/app/.playwright/package/bin/reinstall_msedge_stable_win.ps1 +0 -24
  25. package/app/.playwright/package/browsers.json +0 -52
  26. package/app/.playwright/package/cli.js +0 -21
  27. package/app/.playwright/package/index.d.ts +0 -17
  28. package/app/.playwright/package/index.js +0 -17
  29. package/app/.playwright/package/index.mjs +0 -28
  30. package/app/.playwright/package/lib/bootstrap.js +0 -88
  31. package/app/.playwright/package/lib/coreBundle.js +0 -75813
  32. package/app/.playwright/package/lib/entry/cliDaemon.js +0 -5
  33. package/app/.playwright/package/lib/entry/dashboardApp.js +0 -3
  34. package/app/.playwright/package/lib/entry/mcp.js +0 -10
  35. package/app/.playwright/package/lib/entry/oopBrowserDownload.js +0 -3
  36. package/app/.playwright/package/lib/package.js +0 -50
  37. package/app/.playwright/package/lib/server/chromium/appIcon.png +0 -0
  38. package/app/.playwright/package/lib/server/electron/loader.js +0 -116
  39. package/app/.playwright/package/lib/serverRegistry.js +0 -1939
  40. package/app/.playwright/package/lib/serverRegistry.js.LICENSE +0 -65
  41. package/app/.playwright/package/lib/tools/cli-client/channelSessions.js +0 -141
  42. package/app/.playwright/package/lib/tools/cli-client/cli.js +0 -6
  43. package/app/.playwright/package/lib/tools/cli-client/help.json +0 -721
  44. package/app/.playwright/package/lib/tools/cli-client/minimist.js +0 -128
  45. package/app/.playwright/package/lib/tools/cli-client/output.js +0 -351
  46. package/app/.playwright/package/lib/tools/cli-client/program.js +0 -418
  47. package/app/.playwright/package/lib/tools/cli-client/registry.js +0 -180
  48. package/app/.playwright/package/lib/tools/cli-client/session.js +0 -259
  49. package/app/.playwright/package/lib/tools/dashboard/appIcon.png +0 -0
  50. package/app/.playwright/package/lib/tools/skills/playwright-cli/SKILL.md +0 -425
  51. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/element-attributes.md +0 -23
  52. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/playwright-tests.md +0 -39
  53. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/request-mocking.md +0 -87
  54. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/running-code.md +0 -241
  55. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/session-management.md +0 -225
  56. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/storage-state.md +0 -275
  57. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/test-generation.md +0 -433
  58. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/tracing.md +0 -139
  59. package/app/.playwright/package/lib/tools/skills/playwright-cli/references/video-recording.md +0 -143
  60. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/SKILL.md +0 -136
  61. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +0 -144
  62. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/migration.md +0 -89
  63. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/react.md +0 -69
  64. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/typing.md +0 -173
  65. package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/vue.md +0 -77
  66. package/app/.playwright/package/lib/tools/skills/playwright-trace/SKILL.md +0 -174
  67. package/app/.playwright/package/lib/tools/utils/extension.js +0 -112
  68. package/app/.playwright/package/lib/tools/utils/socketConnection.js +0 -108
  69. package/app/.playwright/package/lib/utilsBundle.js +0 -85357
  70. package/app/.playwright/package/lib/utilsBundle.js.LICENSE +0 -1890
  71. package/app/.playwright/package/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +0 -1
  72. package/app/.playwright/package/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +0 -32
  73. package/app/.playwright/package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  74. package/app/.playwright/package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +0 -1
  75. package/app/.playwright/package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +0 -1
  76. package/app/.playwright/package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +0 -1
  77. package/app/.playwright/package/lib/vite/dashboard/assets/index-AwgwcYie.css +0 -1
  78. package/app/.playwright/package/lib/vite/dashboard/assets/index-hRvO4yU2.js +0 -12
  79. package/app/.playwright/package/lib/vite/dashboard/assets/safari-na3_-uQk.svg +0 -1
  80. package/app/.playwright/package/lib/vite/dashboard/index.html +0 -29
  81. package/app/.playwright/package/lib/vite/dashboard/playwright-logo.svg +0 -24
  82. package/app/.playwright/package/lib/vite/htmlReport/index.html +0 -16
  83. package/app/.playwright/package/lib/vite/htmlReport/report.css +0 -2
  84. package/app/.playwright/package/lib/vite/htmlReport/report.js +0 -32
  85. package/app/.playwright/package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +0 -1
  86. package/app/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +0 -32
  87. package/app/.playwright/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  88. package/app/.playwright/package/lib/vite/recorder/assets/index-BZpYJZ-P.css +0 -1
  89. package/app/.playwright/package/lib/vite/recorder/assets/index-hrlLqLtq.js +0 -129
  90. package/app/.playwright/package/lib/vite/recorder/index.html +0 -29
  91. package/app/.playwright/package/lib/vite/recorder/playwright-logo.svg +0 -9
  92. package/app/.playwright/package/lib/vite/traceViewer/assets/codeMirrorModule-BbkfBe3n.js +0 -32
  93. package/app/.playwright/package/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +0 -182
  94. package/app/.playwright/package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +0 -1
  95. package/app/.playwright/package/lib/vite/traceViewer/assets/xtermModule-DywYcAf8.js +0 -7
  96. package/app/.playwright/package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +0 -1
  97. package/app/.playwright/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  98. package/app/.playwright/package/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +0 -1
  99. package/app/.playwright/package/lib/vite/traceViewer/index.B4cLoZK3.js +0 -1
  100. package/app/.playwright/package/lib/vite/traceViewer/index.B_TqY17P.css +0 -1
  101. package/app/.playwright/package/lib/vite/traceViewer/index.html +0 -44
  102. package/app/.playwright/package/lib/vite/traceViewer/manifest.webmanifest +0 -16
  103. package/app/.playwright/package/lib/vite/traceViewer/playwright-logo.svg +0 -9
  104. package/app/.playwright/package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +0 -1
  105. package/app/.playwright/package/lib/vite/traceViewer/snapshot.html +0 -10
  106. package/app/.playwright/package/lib/vite/traceViewer/sw.bundle.js +0 -4
  107. package/app/.playwright/package/lib/vite/traceViewer/uiMode.CU5KtEkS.js +0 -5
  108. package/app/.playwright/package/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +0 -1
  109. package/app/.playwright/package/lib/vite/traceViewer/uiMode.html +0 -18
  110. package/app/.playwright/package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +0 -1
  111. package/app/.playwright/package/lib/webp_codec.LICENSE +0 -173
  112. package/app/.playwright/package/lib/webp_codec.wasm +0 -0
  113. package/app/.playwright/package/lib/xdg-open +0 -1267
  114. package/app/.playwright/package/package.json +0 -34
  115. package/app/.playwright/package/types/protocol.d.ts +0 -24645
  116. package/app/.playwright/package/types/structs.d.ts +0 -52
  117. package/app/.playwright/package/types/types.d.ts +0 -26632
  118. package/app/BrowserCodingAgent.Api.deps.json +0 -109
  119. package/app/BrowserCodingAgent.Api.dll +0 -0
  120. package/app/BrowserCodingAgent.Api.pdb +0 -0
  121. package/app/BrowserCodingAgent.Api.runtimeconfig.json +0 -20
  122. package/app/BrowserCodingAgent.Api.staticwebassets.endpoints.json +0 -1
  123. package/app/Microsoft.AspNetCore.OpenApi.dll +0 -0
  124. package/app/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  125. package/app/Microsoft.OpenApi.dll +0 -0
  126. package/app/Microsoft.Playwright.dll +0 -0
  127. package/app/Swashbuckle.AspNetCore.SwaggerUI.dll +0 -0
  128. package/app/appsettings.Development.json +0 -8
  129. package/app/appsettings.json +0 -16
  130. package/app/playwright.ps1 +0 -7
  131. package/app/replacements.json +0 -48
  132. package/app/web.config +0 -11
  133. package/browser-coding-agent.cjs +0 -99
@@ -1,109 +0,0 @@
1
- {
2
- "runtimeTarget": {
3
- "name": ".NETCoreApp,Version=v10.0",
4
- "signature": ""
5
- },
6
- "compilationOptions": {},
7
- "targets": {
8
- ".NETCoreApp,Version=v10.0": {
9
- "BrowserCodingAgent.Api/0.0.0-ci.8": {
10
- "dependencies": {
11
- "Microsoft.AspNetCore.OpenApi": "10.0.13",
12
- "Microsoft.Playwright": "1.63.0",
13
- "Swashbuckle.AspNetCore.SwaggerUI": "10.3.1"
14
- },
15
- "runtime": {
16
- "BrowserCodingAgent.Api.dll": {}
17
- }
18
- },
19
- "Microsoft.AspNetCore.OpenApi/10.0.13": {
20
- "dependencies": {
21
- "Microsoft.OpenApi": "2.12.2"
22
- },
23
- "runtime": {
24
- "lib/net10.0/Microsoft.AspNetCore.OpenApi.dll": {
25
- "assemblyVersion": "10.0.13.0",
26
- "fileVersion": "10.0.1326.50504"
27
- }
28
- }
29
- },
30
- "Microsoft.Bcl.AsyncInterfaces/6.0.0": {
31
- "runtime": {
32
- "lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll": {
33
- "assemblyVersion": "6.0.0.0",
34
- "fileVersion": "6.0.21.52210"
35
- }
36
- }
37
- },
38
- "Microsoft.OpenApi/2.12.2": {
39
- "runtime": {
40
- "lib/net8.0/Microsoft.OpenApi.dll": {
41
- "assemblyVersion": "2.12.2.0",
42
- "fileVersion": "2.12.2.0"
43
- }
44
- }
45
- },
46
- "Microsoft.Playwright/1.63.0": {
47
- "dependencies": {
48
- "Microsoft.Bcl.AsyncInterfaces": "6.0.0"
49
- },
50
- "runtime": {
51
- "lib/netstandard2.0/Microsoft.Playwright.dll": {
52
- "assemblyVersion": "1.63.0.0",
53
- "fileVersion": "1.63.0.0"
54
- }
55
- }
56
- },
57
- "Swashbuckle.AspNetCore.SwaggerUI/10.3.1": {
58
- "runtime": {
59
- "lib/net10.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
60
- "assemblyVersion": "10.3.1.0",
61
- "fileVersion": "10.3.1.3201"
62
- }
63
- }
64
- }
65
- }
66
- },
67
- "libraries": {
68
- "BrowserCodingAgent.Api/0.0.0-ci.8": {
69
- "type": "project",
70
- "serviceable": false,
71
- "sha512": ""
72
- },
73
- "Microsoft.AspNetCore.OpenApi/10.0.13": {
74
- "type": "package",
75
- "serviceable": true,
76
- "sha512": "sha512-XVuqUBGjVUVyb4DXR5BrSkrW0Br7sYKq39f723ILhQLlFHCyhAgWe1PkJBc42R/5mKBIgHiKVSY+PN5/4XtcQw==",
77
- "path": "microsoft.aspnetcore.openapi/10.0.13",
78
- "hashPath": "microsoft.aspnetcore.openapi.10.0.13.nupkg.sha512"
79
- },
80
- "Microsoft.Bcl.AsyncInterfaces/6.0.0": {
81
- "type": "package",
82
- "serviceable": true,
83
- "sha512": "sha512-UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==",
84
- "path": "microsoft.bcl.asyncinterfaces/6.0.0",
85
- "hashPath": "microsoft.bcl.asyncinterfaces.6.0.0.nupkg.sha512"
86
- },
87
- "Microsoft.OpenApi/2.12.2": {
88
- "type": "package",
89
- "serviceable": true,
90
- "sha512": "sha512-ZkT7qiJe0Kj0+DTZOZo+xrDy1kNmdsWFQVPIQLNx9ZJ0T9cB2LG7r+Bi60so8/+yg1nkS7QCPadrzsTG4VPKrA==",
91
- "path": "microsoft.openapi/2.12.2",
92
- "hashPath": "microsoft.openapi.2.12.2.nupkg.sha512"
93
- },
94
- "Microsoft.Playwright/1.63.0": {
95
- "type": "package",
96
- "serviceable": true,
97
- "sha512": "sha512-O9F45Tt5vjauIo7mTTgQtahigL7cfRLvBMpErLJfdvgCnQ14yue5BmRASNnfNBWRBni4Mqp2YiD1eFGIO4nUUw==",
98
- "path": "microsoft.playwright/1.63.0",
99
- "hashPath": "microsoft.playwright.1.63.0.nupkg.sha512"
100
- },
101
- "Swashbuckle.AspNetCore.SwaggerUI/10.3.1": {
102
- "type": "package",
103
- "serviceable": true,
104
- "sha512": "sha512-kXuMIVJBDD6qMwG78VUrKy4x5Ke98HU0Q023Sf2iSBO/x45c5BuByYPAExIs9UeVsjdGGgvLWU5jK8l6MO2Z0Q==",
105
- "path": "swashbuckle.aspnetcore.swaggerui/10.3.1",
106
- "hashPath": "swashbuckle.aspnetcore.swaggerui.10.3.1.nupkg.sha512"
107
- }
108
- }
109
- }
Binary file
Binary file
@@ -1,20 +0,0 @@
1
- {
2
- "runtimeOptions": {
3
- "tfm": "net10.0",
4
- "frameworks": [
5
- {
6
- "name": "Microsoft.NETCore.App",
7
- "version": "10.0.0"
8
- },
9
- {
10
- "name": "Microsoft.AspNetCore.App",
11
- "version": "10.0.0"
12
- }
13
- ],
14
- "configProperties": {
15
- "System.GC.Server": true,
16
- "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
17
- "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
18
- }
19
- }
20
- }
@@ -1 +0,0 @@
1
- {"Version":1,"ManifestType":"Publish","Endpoints":[]}
Binary file
Binary file
@@ -1,8 +0,0 @@
1
- {
2
- "Logging": {
3
- "LogLevel": {
4
- "Default": "Information",
5
- "Microsoft.AspNetCore": "Warning"
6
- }
7
- }
8
- }
@@ -1,16 +0,0 @@
1
- {
2
- "Logging": {
3
- "LogLevel": {
4
- "Default": "Information",
5
- "Microsoft.AspNetCore": "Warning"
6
- }
7
- },
8
- "Browser": {
9
- "Channel": "chrome",
10
- "StartUrl": "https://m365.cloud.microsoft/chat"
11
- },
12
- "Chat": {
13
- "ModelAlias": "m365-active",
14
- "ResponseTimeoutMinutes": 10
15
- }
16
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env pwsh
2
-
3
- $Env:PLAYWRIGHT_DRIVER_SEARCH_PATH = $PSScriptRoot;
4
- $playwrightLibrary = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, "Microsoft.Playwright.dll"))
5
- # We load the library via the memory to not keep the .dll file locked/opened.
6
- [Reflection.Assembly]::Load([System.IO.File]::ReadAllBytes($playwrightLibrary)) | Out-Null
7
- exit [Microsoft.Playwright.Program]::Main($args)
@@ -1,48 +0,0 @@
1
- {
2
- "notes": [
3
- "Applied in order to every prompt before it reaches M365 Copilot; rules with reverse=true are mapped back in replies.",
4
- "find/replace: text, or a .NET regular expression when regex=true ($1 etc. refer to groups). reverse is not allowed with regex.",
5
- "wholeWord (default true, plain text only): word-character ends must sit on word boundaries, so 'cline' does not touch 'decline'.",
6
- "Copy to ~/.browser-coding-agent/replacements.json (or set Chat:ReplacementsFile) to customize; restart the server to reload.",
7
- "Defaults target Cline's system prompt: 'You are Cline, an AI coding agent.' and its <user_input mode=...>, <mode_notice>, <env> wrappers.",
8
- "Tool aliases: Cline's tool names (sdk DefaultToolNames + switch_to_act_mode) are renamed in prompts, so Copilot does not map them onto its own tools; tool calls and text are mapped back.",
9
- "Tool vocabulary (tool call / tool_call / toolcall / tool / tools) becomes the made-up word 'vexlo', so Copilot does not connect these instructions to its own built-in tools; longer phrases are listed first.",
10
- "appendToPrompt: added to the end of every prompt after the replacements run, so its own words (e.g. 'tools') are not renamed; write aliased words (vexlo ping) literally. Empty string disables it.",
11
- "Persona and environment rules run first: 'You are Cline, ...' becomes a task description, and 'Environment you are running in:' becomes 'The user's computer:' so Copilot does not treat Cline's paths as its own sandbox."
12
- ],
13
- "appendToPrompt": "Reply with text only. Do not run code, do not use your code interpreter, sandbox, or any built-in tools, do not browse the web, and do not create images or files. File paths in this conversation are on the user's computer. When you need a file's contents, a search, or a command's output, do not say you cannot access it: write a vexlo ping block and the application sends you the result.",
14
- "replacements": [
15
- { "find": "You are Cline, an AI coding agent\\.", "replace": "You help the user with coding tasks through the Cline application on their computer.", "regex": true },
16
- { "find": "You are Cline, a careful and helpful coding agent that works in the background\\.", "replace": "You help the user with coding tasks through the Cline application on their computer, working in the background.", "regex": true },
17
- { "find": "Environment you are running in:", "replace": "The user's computer (the application runs tool calls here):" },
18
- { "find": "Cline", "replace": "Codewright", "reverse": true },
19
- { "find": "cline", "replace": "codewright", "reverse": true },
20
- { "find": "CLINE", "replace": "CODEWRIGHT", "reverse": true },
21
- { "find": "read_files", "replace": "open_documents", "reverse": true },
22
- { "find": "search_codebase", "replace": "find_in_project", "reverse": true },
23
- { "find": "run_commands", "replace": "terminal_batch", "reverse": true },
24
- { "find": "fetch_web_content", "replace": "get_web_page", "reverse": true },
25
- { "find": "apply_patch", "replace": "patch_documents", "reverse": true },
26
- { "find": "editor", "replace": "document_edit", "reverse": true },
27
- { "find": "skills", "replace": "skill_library", "reverse": true },
28
- { "find": "ask_question", "replace": "ask_user", "reverse": true },
29
- { "find": "submit_and_exit", "replace": "finish_task", "reverse": true },
30
- { "find": "switch_to_act_mode", "replace": "start_implementation", "reverse": true },
31
- { "find": "tool calls", "replace": "vexlo pings", "reverse": true },
32
- { "find": "tool call", "replace": "vexlo ping", "reverse": true },
33
- { "find": "Tool calls", "replace": "Vexlo pings", "reverse": true },
34
- { "find": "Tool call", "replace": "Vexlo ping", "reverse": true },
35
- { "find": "tool_calls", "replace": "vexlo_pings", "reverse": true },
36
- { "find": "tool_call", "replace": "vexlo_ping", "reverse": true },
37
- { "find": "toolcalls", "replace": "vexlopings", "reverse": true },
38
- { "find": "toolcall", "replace": "vexloping", "reverse": true },
39
- { "find": "Tools", "replace": "Vexlos", "reverse": true },
40
- { "find": "tools", "replace": "vexlos", "reverse": true },
41
- { "find": "Tool", "replace": "Vexlo", "reverse": true },
42
- { "find": "tool", "replace": "vexlo", "reverse": true },
43
- { "find": "<user_input mode=\"([A-Za-z]+)\">\\s*", "replace": "Mode: $1\n", "regex": true },
44
- { "find": "\\s*</user_input>", "replace": "", "regex": true },
45
- { "find": "</?mode_notice>", "replace": "", "regex": true },
46
- { "find": "</?env>", "replace": "", "regex": true }
47
- ]
48
- }
package/app/web.config DELETED
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <configuration>
3
- <location path="." inheritInChildApplications="false">
4
- <system.webServer>
5
- <handlers>
6
- <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
7
- </handlers>
8
- <aspNetCore processPath="dotnet" arguments=".\BrowserCodingAgent.Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
9
- </system.webServer>
10
- </location>
11
- </configuration>
@@ -1,99 +0,0 @@
1
- #!/usr/bin/env node
2
- // Runs the framework-dependent app in ./app on a private ASP.NET Core runtime.
3
- // Runtime installs on first run (not postinstall: npm hides lifecycle output) into
4
- // ~/.browser-coding-agent/dotnet/<version>-<platform>-<arch>, separate from browser profiles.
5
- 'use strict';
6
- const { execFileSync, spawn } = require('child_process');
7
- const crypto = require('crypto'), fs = require('fs'), os = require('os'), path = require('path');
8
-
9
- const RUNTIME_VERSION = '10.0.13'; // tested ASP.NET Core patch; bump per release
10
- const SUPPORTED = ['darwin-arm64', 'darwin-x64', 'win32-x64'];
11
- const MIN_NODE_MAJOR = 20;
12
-
13
- const win = process.platform === 'win32';
14
- const target = `${process.platform}-${process.arch}`;
15
- const appDll = path.join(__dirname, 'app', 'BrowserCodingAgent.Api.dll');
16
- const runtimeRoot = path.join(os.homedir(), '.browser-coding-agent', 'dotnet');
17
- const runtimeDir = path.join(runtimeRoot, `${RUNTIME_VERSION}-${target}`);
18
- const muxer = path.join(runtimeDir, win ? 'dotnet.exe' : 'dotnet');
19
-
20
- function fail(message) {
21
- console.error(`browser-coding-agent: ${message}`);
22
- process.exit(1);
23
- }
24
-
25
- function runtimeUsable(dir) {
26
- return fs.existsSync(path.join(dir, win ? 'dotnet.exe' : 'dotnet')) &&
27
- fs.existsSync(path.join(dir, 'shared', 'Microsoft.AspNetCore.App', RUNTIME_VERSION));
28
- }
29
-
30
- async function installRuntime() {
31
- console.error(`browser-coding-agent: first run, installing ASP.NET Core ${RUNTIME_VERSION} runtime into ${runtimeDir}`);
32
- fs.mkdirSync(runtimeRoot, { recursive: true });
33
-
34
- // Unique staging dir + rename: an interrupted or concurrent install never leaves a half-valid runtimeDir
35
- const staging = `${runtimeDir}.tmp-${process.pid}-${crypto.randomBytes(4).toString('hex')}`;
36
- const scriptName = win ? 'dotnet-install.ps1' : 'dotnet-install.sh';
37
- const script = path.join(os.tmpdir(), `${path.basename(staging)}-${scriptName}`);
38
-
39
- try {
40
- const res = await fetch(`https://dot.net/v1/${scriptName}`);
41
- if (!res.ok) throw new Error(`download of ${scriptName} failed: HTTP ${res.status}`);
42
- fs.writeFileSync(script, Buffer.from(await res.arrayBuffer()), { mode: 0o755 });
43
-
44
- const args = win
45
- ? ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', script,
46
- '-Runtime', 'aspnetcore', '-Version', RUNTIME_VERSION, '-InstallDir', staging, '-NoPath']
47
- : [script, '--runtime', 'aspnetcore', '--version', RUNTIME_VERSION, '--install-dir', staging, '--no-path'];
48
- execFileSync(win ? 'powershell' : 'bash', args, { stdio: ['ignore', 'inherit', 'inherit'] });
49
-
50
- if (!runtimeUsable(staging))
51
- throw new Error(`installer finished but Microsoft.AspNetCore.App ${RUNTIME_VERSION} is missing from ${staging}`);
52
-
53
- try {
54
- fs.renameSync(staging, runtimeDir);
55
- } catch (err) {
56
- if (!runtimeUsable(runtimeDir)) throw err; // another launcher won the race
57
- }
58
- } finally {
59
- fs.rmSync(staging, { recursive: true, force: true });
60
- fs.rmSync(script, { force: true });
61
- }
62
- console.error('browser-coding-agent: runtime ready\n');
63
- }
64
-
65
- async function main() {
66
- if (!SUPPORTED.includes(target) && process.env.BROWSER_CODING_AGENT_ALLOW_UNSUPPORTED !== '1')
67
- fail(`unsupported platform ${target}. Supported: ${SUPPORTED.join(', ')}.`);
68
- // The Playwright driver (playwright-core, engines node >=20) runs on this Node instead of a bundled one
69
- if (Number(process.versions.node.split('.')[0]) < MIN_NODE_MAJOR)
70
- fail(`Node ${process.versions.node} is too old; Node ${MIN_NODE_MAJOR} or newer is required.`);
71
- if (!fs.existsSync(appDll))
72
- fail(`application not found at ${appDll}; the package is incomplete.`);
73
-
74
- if (!runtimeUsable(runtimeDir)) {
75
- try {
76
- await installRuntime();
77
- } catch (err) {
78
- fail(`runtime install failed: ${err.message}\n` +
79
- (win ? 'Requires PowerShell and network access to dot.net.'
80
- : 'Requires bash, curl or wget, and network access to dot.net.'));
81
- }
82
- }
83
-
84
- // The package ships without .playwright/node binaries (npm rejects the ~200 MB tarball they make)
85
- const env = { ...process.env, PLAYWRIGHT_NODEJS_PATH: process.env.PLAYWRIGHT_NODEJS_PATH || process.execPath };
86
- const child = spawn(muxer, [appDll, ...process.argv.slice(2)], { stdio: 'inherit', env });
87
- const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
88
- const forward = sig => { if (child.exitCode === null) child.kill(sig); };
89
- for (const sig of signals) process.on(sig, forward);
90
-
91
- child.on('error', err => fail(`failed to start ${muxer}: ${err.message}`));
92
- child.on('exit', (code, signal) => {
93
- for (const sig of signals) process.removeListener(sig, forward);
94
- if (signal) process.kill(process.pid, signal); // re-raise so the caller sees the same termination
95
- else process.exit(code ?? 1);
96
- });
97
- }
98
-
99
- main();