@liqngliz/browser-coding-agent 0.0.0-stage → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +132 -2
- package/app/.playwright/package/LICENSE +202 -0
- package/app/.playwright/package/NOTICE +5 -0
- package/app/.playwright/package/README.md +3 -0
- package/app/.playwright/package/ThirdPartyNotices.txt +13 -0
- package/app/.playwright/package/bin/install_media_pack.ps1 +5 -0
- package/app/.playwright/package/bin/install_webkit_wsl.ps1 +33 -0
- package/app/.playwright/package/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/app/.playwright/package/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/app/.playwright/package/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/app/.playwright/package/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/app/.playwright/package/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/app/.playwright/package/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/app/.playwright/package/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/app/.playwright/package/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/app/.playwright/package/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/app/.playwright/package/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/app/.playwright/package/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/app/.playwright/package/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/app/.playwright/package/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/app/.playwright/package/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/app/.playwright/package/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/app/.playwright/package/browsers.json +52 -0
- package/app/.playwright/package/cli.js +21 -0
- package/app/.playwright/package/index.d.ts +17 -0
- package/app/.playwright/package/index.js +17 -0
- package/app/.playwright/package/index.mjs +28 -0
- package/app/.playwright/package/lib/bootstrap.js +88 -0
- package/app/.playwright/package/lib/coreBundle.js +75813 -0
- package/app/.playwright/package/lib/entry/cliDaemon.js +5 -0
- package/app/.playwright/package/lib/entry/dashboardApp.js +3 -0
- package/app/.playwright/package/lib/entry/mcp.js +10 -0
- package/app/.playwright/package/lib/entry/oopBrowserDownload.js +3 -0
- package/app/.playwright/package/lib/package.js +50 -0
- package/app/.playwright/package/lib/server/chromium/appIcon.png +0 -0
- package/app/.playwright/package/lib/server/electron/loader.js +116 -0
- package/app/.playwright/package/lib/serverRegistry.js +1939 -0
- package/app/.playwright/package/lib/serverRegistry.js.LICENSE +65 -0
- package/app/.playwright/package/lib/tools/cli-client/channelSessions.js +141 -0
- package/app/.playwright/package/lib/tools/cli-client/cli.js +6 -0
- package/app/.playwright/package/lib/tools/cli-client/help.json +721 -0
- package/app/.playwright/package/lib/tools/cli-client/minimist.js +128 -0
- package/app/.playwright/package/lib/tools/cli-client/output.js +351 -0
- package/app/.playwright/package/lib/tools/cli-client/program.js +418 -0
- package/app/.playwright/package/lib/tools/cli-client/registry.js +180 -0
- package/app/.playwright/package/lib/tools/cli-client/session.js +259 -0
- package/app/.playwright/package/lib/tools/dashboard/appIcon.png +0 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/SKILL.md +425 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/running-code.md +241 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/session-management.md +225 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/app/.playwright/package/lib/tools/skills/playwright-cli/references/video-recording.md +143 -0
- package/app/.playwright/package/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/app/.playwright/package/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/app/.playwright/package/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/app/.playwright/package/lib/tools/utils/extension.js +112 -0
- package/app/.playwright/package/lib/tools/utils/socketConnection.js +108 -0
- package/app/.playwright/package/lib/utilsBundle.js +85357 -0
- package/app/.playwright/package/lib/utilsBundle.js.LICENSE +1890 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/app/.playwright/package/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/app/.playwright/package/lib/vite/dashboard/index.html +29 -0
- package/app/.playwright/package/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/app/.playwright/package/lib/vite/htmlReport/index.html +16 -0
- package/app/.playwright/package/lib/vite/htmlReport/report.css +2 -0
- package/app/.playwright/package/lib/vite/htmlReport/report.js +32 -0
- package/app/.playwright/package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/app/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
- package/app/.playwright/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/app/.playwright/package/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/app/.playwright/package/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
- package/app/.playwright/package/lib/vite/recorder/index.html +29 -0
- package/app/.playwright/package/lib/vite/recorder/playwright-logo.svg +9 -0
- package/app/.playwright/package/lib/vite/traceViewer/assets/codeMirrorModule-BbkfBe3n.js +32 -0
- package/app/.playwright/package/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
- package/app/.playwright/package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/app/.playwright/package/lib/vite/traceViewer/assets/xtermModule-DywYcAf8.js +7 -0
- package/app/.playwright/package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/app/.playwright/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/app/.playwright/package/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
- package/app/.playwright/package/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
- package/app/.playwright/package/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/app/.playwright/package/lib/vite/traceViewer/index.html +44 -0
- package/app/.playwright/package/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/app/.playwright/package/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/app/.playwright/package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/app/.playwright/package/lib/vite/traceViewer/snapshot.html +10 -0
- package/app/.playwright/package/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/app/.playwright/package/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
- package/app/.playwright/package/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/app/.playwright/package/lib/vite/traceViewer/uiMode.html +18 -0
- package/app/.playwright/package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/app/.playwright/package/lib/webp_codec.LICENSE +173 -0
- package/app/.playwright/package/lib/webp_codec.wasm +0 -0
- package/app/.playwright/package/lib/xdg-open +1267 -0
- package/app/.playwright/package/package.json +34 -0
- package/app/.playwright/package/types/protocol.d.ts +24645 -0
- package/app/.playwright/package/types/structs.d.ts +52 -0
- package/app/.playwright/package/types/types.d.ts +26632 -0
- package/app/BrowserCodingAgent.Api.deps.json +109 -0
- package/app/BrowserCodingAgent.Api.dll +0 -0
- package/app/BrowserCodingAgent.Api.pdb +0 -0
- package/app/BrowserCodingAgent.Api.runtimeconfig.json +20 -0
- package/app/BrowserCodingAgent.Api.staticwebassets.endpoints.json +1 -0
- package/app/Microsoft.AspNetCore.OpenApi.dll +0 -0
- package/app/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/app/Microsoft.OpenApi.dll +0 -0
- package/app/Microsoft.Playwright.dll +0 -0
- package/app/Swashbuckle.AspNetCore.SwaggerUI.dll +0 -0
- package/app/appsettings.Development.json +8 -0
- package/app/appsettings.json +16 -0
- package/app/playwright.ps1 +7 -0
- package/app/replacements.json +48 -0
- package/app/web.config +11 -0
- package/browser-coding-agent.cjs +99 -0
- package/package.json +34 -4
|
@@ -0,0 +1,109 @@
|
|
|
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.1.2": {
|
|
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.1.2": {
|
|
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
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"Version":1,"ManifestType":"Publish","Endpoints":[]}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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)
|
|
@@ -0,0 +1,48 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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>
|
|
@@ -0,0 +1,99 @@
|
|
|
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();
|
package/package.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liqngliz/browser-coding-agent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "OpenAI-compatible chat completions server backed by Microsoft 365 Copilot web chat via Playwright.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"browser-coding-agent": "browser-coding-agent.cjs"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"browser-coding-agent.cjs",
|
|
10
|
+
"app",
|
|
11
|
+
"app/.playwright"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=20"
|
|
15
|
+
},
|
|
16
|
+
"license": "Apache-2.0",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/liqngliz/Browser-Coding-Agent.git"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/liqngliz/Browser-Coding-Agent#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/liqngliz/Browser-Coding-Agent/issues"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"openai",
|
|
27
|
+
"copilot",
|
|
28
|
+
"m365",
|
|
29
|
+
"playwright",
|
|
30
|
+
"chat-completions",
|
|
31
|
+
"proxy"
|
|
32
|
+
],
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
}
|
|
36
|
+
}
|