{"owner":"docmirror","repo":"dev-sidecar","hasSkills":true,"totalSkillsCount":3,"totalTokensCount":1916,"categories":["copilot-instructions","plugin-manifest","anthropic-skill"],"hasMcp":false,"mcpConfig":null,"found":[".github/copilot-instructions.md","packages/gui/README.md","packages/gui/package.json"],"skills":{".github/copilot-instructions.md":"# Copilot instructions for dev-sidecar\n\n## Commands\n\n- Dependency management:\n  - Install dependencies for the entire workspace from the repository root using `pnpm install`. Avoid using `npm install` for dependency installation in this project.\n  - If `pnpm install` reports dependency conflicts or version mismatches, update the relevant `package.json` entries to compatible versions (or adjust `peerDependencies`), then re-run `pnpm install`.\n\n- Linting:\n  - Lint the repository from the root with `pnpm lint`.\n  - Auto-fix lint issues from the root with `pnpm lint:fix`.\n  - If `pnpm lint` or `pnpm lint:fix` fails, review the reported errors and manually fix the files indicated by the linter, then re-run the command.\n\n- Testing:\n  - Run package tests where they live:\n    - `pnpm --filter @blue-frontier/dev-sidecar test`\n    - `pnpm --filter @blue-frontier/mitmproxy test`\n  - Run a single test file by passing it after `--`, for example:\n    - `pnpm --filter @blue-frontier/dev-sidecar test -- test/regex.test.js`\n    - `pnpm --filter @blue-frontier/mitmproxy test -- test/proxyTest.js`\n\n- GUI development and packaging (from `packages/gui`):\n  - `npm run electron`\n  - `npm run electron:build`\n  - `npm run serve`\n  - `npm run lint`\n  - For GUI debugging: run `npm run electron` and open the Electron developer tools (application menu View → Toggle Developer Tools or the platform shortcut) to inspect renderer pages, console logs, and IPC traffic.\n\n## High-level architecture\n\n- This is a pnpm workspace monorepo with three packages (the CLI has moved out to https://github.com/Blue-Frontier/ds-cli):\n  - `packages/core`: shared app logic, config, shell helpers, system proxy handling, and plugin/module code.\n  - `packages/mitmproxy`: the HTTP(S) proxy, DNS, interception, PAC, and response/request rewrite layer.\n  - `packages/gui`: the Electron + Vue 2 desktop app.\n- `packages/core/src/index.js` exposes the main API and owns process-level error handling plus config/state wiring.\n- `packages/mitmproxy/src/index.js` creates the proxy server(s), applies proxy options, and reports status/errors back to the host process.\n- `packages/gui/src/background.js` is the Electron main process: it loads config, creates the main window, tray, IPC bridges, and Windows-specific power-monitor behavior.\n- Renderer code lives under `packages/gui/src/view/`; IPC/bridge code lives under `packages/gui/src/bridge/`.\n- The CLI is no longer part of this repo: it lives at https://github.com/Blue-Frontier/ds-cli, which embeds this core via a git submodule.\n\n## Repo-specific conventions\n\n- Most runtime code in `core` and `mitmproxy` uses CommonJS; GUI code is the Electron/Vue app and is organized around the Electron main process plus renderer/bridge split.\n- Keep GUI source imports aligned with the existing file layout and `.js` module naming used in the Electron entrypoints.\n- Preserve the startup/shutdown flow: ensure the sequence remains where `core` initializes and manages the proxy lifecycle, `mitmproxy` performs network interception, and the GUI communicates exclusively through IPC bridges and the `core` API; avoid direct cross-component calls that bypass these boundaries.\n- Native/module setup matters here: the repo uses a root `.npmrc` with a PhantomJS mirror and C++17 build flags for native modules.\n- The project documents Node 22.x, Python 3.11/setuptools, and VS 2022 C++ tooling as the expected local environment for Windows builds.\n","packages/gui/README.md":"# dev-sidecar-gui\n\n## Project setup\n\nYou should always refer to the [main README](../../README.md) for instructions on how to set up the project.\n\n### Customize configuration\n\nSee [Configuration Reference](https://cli.vuejs.org/config/).\n","packages/gui/package.json":"{\n  \"name\": \"@docmirror/dev-sidecar-gui\",\n  \"version\": \"2.3.2\",\n  \"private\": false,\n  \"type\": \"module\",\n  \"main\": \"src/background.js\",\n  \"author\": {\n    \"email\": \"xiaojunnuo@qq.com\",\n    \"name\": \"Greper\"\n  },\n  \"description\": \"开发者边车辅助工具 — 加速 GitHub/NPM/Docker Hub 等站点的本地 MITM 代理\",\n  \"license\": \"MPL-2.0\",\n  \"homepage\": \"https://github.com/docmirror/dev-sidecar\",\n  \"scripts\": {\n    \"gen:tray-plugins\": \"node scripts/gen-tray-plugins.mjs\",\n    \"serve\": \"pnpm exec vue-cli-service serve\",\n    \"prebuild\": \"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs && node ../../_script/sync-official-config.mjs\",\n    \"build\": \"pnpm exec vue-cli-service build\",\n    \"lint\": \"pnpm exec vue-cli-service lint\",\n    \"preelectron\": \"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs\",\n    \"electron\": \"node ../../_script/electron-dev.mjs\",\n    \"electron:build\": \"node scripts/local-build-version.mjs\",\n    \"electron:build:ci\": \"npm run build && npm exec electron-builder -- --config electron-builder.config.cjs\",\n    \"version:local\": \"node scripts/local-build-version.mjs --print\",\n    \"postinstall\": \"node -e \\\"if (!process.env.CI) { try { require('node:child_process').execFileSync(process.execPath, ['node_modules/electron-builder/cli.js', 'install-app-deps'], { stdio: 'inherit' }) } catch (e) { console.warn('[postinstall] install-app-deps 失败，已跳过（可手动重跑）:', e.message) } }\\\"\",\n    \"postuninstall\": \"pnpm exec electron-builder install-app-deps\",\n    \"gen:kernel-info\": \"node scripts/gen-kernel-info.mjs\"\n  },\n  \"dependencies\": {\n    \"@ant-design/icons-vue\": \"^7.0.1\",\n    \"@blue-frontier/dev-sidecar\": \"workspace:*\",\n    \"@blue-frontier/mitmproxy\": \"workspace:*\",\n    \"@starknt/shutdown-handler-napi\": \"^0.0.3\",\n    \"@starknt/shutdown-handler-napi-win32-x64-msvc\": \"^0.0.3\",\n    \"@starknt/sysproxy\": \"^0.0.3\",\n    \"@starknt/sysproxy-win32-x64-msvc\": \"^0.0.3\",\n    \"@vscode/sudo-prompt\": \"^9.3.2\",\n    \"adm-zip\": \"^0.5.18\",\n    \"ant-design-vue\": \"^4.2.6\",\n    \"archiver\": \"^7.0.1\",\n    \"core-js\": \"^3.51.0\",\n    \"electron-baidu-tongji\": \"^1.0.5\",\n    \"electron-updater\": \"^6.8.9\",\n    \"json5\": \"^2.2.3\",\n    \"jsoneditor\": \"^10.4.3\",\n    \"lodash\": \"^4.18.1\",\n    \"minimist\": \"^1.2.8\",\n    \"request\": \"^2.88.2\",\n    \"request-progress\": \"^3.0.0\",\n    \"sass\": \"^1.106.0\",\n    \"sass-loader\": \"^16.0.8\",\n    \"tiny-emitter\": \"^2.1.0\",\n    \"vue\": \"^3.5.44\",\n    \"vue-router\": \"^4.6.4\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.29.7\",\n    \"@babel/plugin-syntax-jsx\": \"^7.29.7\",\n    \"@vue/babel-helper-vue-jsx-merge-props\": \"^1.4.0\",\n    \"@vue/babel-preset-jsx\": \"^1.4.0\",\n    \"@vue/cli-plugin-babel\": \"^5.0.9\",\n    \"@vue/cli-service\": \"^5.0.9\",\n    \"concurrently\": \"^8.2.2\",\n    \"cross-env\": \"^7.0.3\",\n    \"electron\": \"^42.11.16\",\n    \"electron-builder\": \"26.17.0\",\n    \"electron-builder-squirrel-windows\": \"26.17.0\",\n    \"json5-loader\": \"^4.0.1\",\n    \"path-browserify\": \"^1.0.1\",\n    \"wait-on\": \"^7.2.0\",\n    \"webpack\": \"5.106.2\"\n  },\n  \"browserslist\": [\n    \"> 1%\",\n    \"last 2 versions\",\n    \"not dead\"\n  ]\n}\n"},"files":{".github/copilot-instructions.md":"# Copilot instructions for dev-sidecar\n\n## Commands\n\n- Dependency management:\n  - Install dependencies for the entire workspace from the repository root using `pnpm install`. Avoid using `npm install` for dependency installation in this project.\n  - If `pnpm install` reports dependency conflicts or version mismatches, update the relevant `package.json` entries to compatible versions (or adjust `peerDependencies`), then re-run `pnpm install`.\n\n- Linting:\n  - Lint the repository from the root with `pnpm lint`.\n  - Auto-fix lint issues from the root with `pnpm lint:fix`.\n  - If `pnpm lint` or `pnpm lint:fix` fails, review the reported errors and manually fix the files indicated by the linter, then re-run the command.\n\n- Testing:\n  - Run package tests where they live:\n    - `pnpm --filter @blue-frontier/dev-sidecar test`\n    - `pnpm --filter @blue-frontier/mitmproxy test`\n  - Run a single test file by passing it after `--`, for example:\n    - `pnpm --filter @blue-frontier/dev-sidecar test -- test/regex.test.js`\n    - `pnpm --filter @blue-frontier/mitmproxy test -- test/proxyTest.js`\n\n- GUI development and packaging (from `packages/gui`):\n  - `npm run electron`\n  - `npm run electron:build`\n  - `npm run serve`\n  - `npm run lint`\n  - For GUI debugging: run `npm run electron` and open the Electron developer tools (application menu View → Toggle Developer Tools or the platform shortcut) to inspect renderer pages, console logs, and IPC traffic.\n\n## High-level architecture\n\n- This is a pnpm workspace monorepo with three packages (the CLI has moved out to https://github.com/Blue-Frontier/ds-cli):\n  - `packages/core`: shared app logic, config, shell helpers, system proxy handling, and plugin/module code.\n  - `packages/mitmproxy`: the HTTP(S) proxy, DNS, interception, PAC, and response/request rewrite layer.\n  - `packages/gui`: the Electron + Vue 2 desktop app.\n- `packages/core/src/index.js` exposes the main API and owns process-level error handling plus config/state wiring.\n- `packages/mitmproxy/src/index.js` creates the proxy server(s), applies proxy options, and reports status/errors back to the host process.\n- `packages/gui/src/background.js` is the Electron main process: it loads config, creates the main window, tray, IPC bridges, and Windows-specific power-monitor behavior.\n- Renderer code lives under `packages/gui/src/view/`; IPC/bridge code lives under `packages/gui/src/bridge/`.\n- The CLI is no longer part of this repo: it lives at https://github.com/Blue-Frontier/ds-cli, which embeds this core via a git submodule.\n\n## Repo-specific conventions\n\n- Most runtime code in `core` and `mitmproxy` uses CommonJS; GUI code is the Electron/Vue app and is organized around the Electron main process plus renderer/bridge split.\n- Keep GUI source imports aligned with the existing file layout and `.js` module naming used in the Electron entrypoints.\n- Preserve the startup/shutdown flow: ensure the sequence remains where `core` initializes and manages the proxy lifecycle, `mitmproxy` performs network interception, and the GUI communicates exclusively through IPC bridges and the `core` API; avoid direct cross-component calls that bypass these boundaries.\n- Native/module setup matters here: the repo uses a root `.npmrc` with a PhantomJS mirror and C++17 build flags for native modules.\n- The project documents Node 22.x, Python 3.11/setuptools, and VS 2022 C++ tooling as the expected local environment for Windows builds.\n","packages/gui/README.md":"# dev-sidecar-gui\n\n## Project setup\n\nYou should always refer to the [main README](../../README.md) for instructions on how to set up the project.\n\n### Customize configuration\n\nSee [Configuration Reference](https://cli.vuejs.org/config/).\n","packages/gui/package.json":"{\n  \"name\": \"@docmirror/dev-sidecar-gui\",\n  \"version\": \"2.3.2\",\n  \"private\": false,\n  \"type\": \"module\",\n  \"main\": \"src/background.js\",\n  \"author\": {\n    \"email\": \"xiaojunnuo@qq.com\",\n    \"name\": \"Greper\"\n  },\n  \"description\": \"开发者边车辅助工具 — 加速 GitHub/NPM/Docker Hub 等站点的本地 MITM 代理\",\n  \"license\": \"MPL-2.0\",\n  \"homepage\": \"https://github.com/docmirror/dev-sidecar\",\n  \"scripts\": {\n    \"gen:tray-plugins\": \"node scripts/gen-tray-plugins.mjs\",\n    \"serve\": \"pnpm exec vue-cli-service serve\",\n    \"prebuild\": \"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs && node ../../_script/sync-official-config.mjs\",\n    \"build\": \"pnpm exec vue-cli-service build\",\n    \"lint\": \"pnpm exec vue-cli-service lint\",\n    \"preelectron\": \"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs\",\n    \"electron\": \"node ../../_script/electron-dev.mjs\",\n    \"electron:build\": \"node scripts/local-build-version.mjs\",\n    \"electron:build:ci\": \"npm run build && npm exec electron-builder -- --config electron-builder.config.cjs\",\n    \"version:local\": \"node scripts/local-build-version.mjs --print\",\n    \"postinstall\": \"node -e \\\"if (!process.env.CI) { try { require('node:child_process').execFileSync(process.execPath, ['node_modules/electron-builder/cli.js', 'install-app-deps'], { stdio: 'inherit' }) } catch (e) { console.warn('[postinstall] install-app-deps 失败，已跳过（可手动重跑）:', e.message) } }\\\"\",\n    \"postuninstall\": \"pnpm exec electron-builder install-app-deps\",\n    \"gen:kernel-info\": \"node scripts/gen-kernel-info.mjs\"\n  },\n  \"dependencies\": {\n    \"@ant-design/icons-vue\": \"^7.0.1\",\n    \"@blue-frontier/dev-sidecar\": \"workspace:*\",\n    \"@blue-frontier/mitmproxy\": \"workspace:*\",\n    \"@starknt/shutdown-handler-napi\": \"^0.0.3\",\n    \"@starknt/shutdown-handler-napi-win32-x64-msvc\": \"^0.0.3\",\n    \"@starknt/sysproxy\": \"^0.0.3\",\n    \"@starknt/sysproxy-win32-x64-msvc\": \"^0.0.3\",\n    \"@vscode/sudo-prompt\": \"^9.3.2\",\n    \"adm-zip\": \"^0.5.18\",\n    \"ant-design-vue\": \"^4.2.6\",\n    \"archiver\": \"^7.0.1\",\n    \"core-js\": \"^3.51.0\",\n    \"electron-baidu-tongji\": \"^1.0.5\",\n    \"electron-updater\": \"^6.8.9\",\n    \"json5\": \"^2.2.3\",\n    \"jsoneditor\": \"^10.4.3\",\n    \"lodash\": \"^4.18.1\",\n    \"minimist\": \"^1.2.8\",\n    \"request\": \"^2.88.2\",\n    \"request-progress\": \"^3.0.0\",\n    \"sass\": \"^1.106.0\",\n    \"sass-loader\": \"^16.0.8\",\n    \"tiny-emitter\": \"^2.1.0\",\n    \"vue\": \"^3.5.44\",\n    \"vue-router\": \"^4.6.4\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.29.7\",\n    \"@babel/plugin-syntax-jsx\": \"^7.29.7\",\n    \"@vue/babel-helper-vue-jsx-merge-props\": \"^1.4.0\",\n    \"@vue/babel-preset-jsx\": \"^1.4.0\",\n    \"@vue/cli-plugin-babel\": \"^5.0.9\",\n    \"@vue/cli-service\": \"^5.0.9\",\n    \"concurrently\": \"^8.2.2\",\n    \"cross-env\": \"^7.0.3\",\n    \"electron\": \"^42.11.16\",\n    \"electron-builder\": \"26.17.0\",\n    \"electron-builder-squirrel-windows\": \"26.17.0\",\n    \"json5-loader\": \"^4.0.1\",\n    \"path-browserify\": \"^1.0.1\",\n    \"wait-on\": \"^7.2.0\",\n    \"webpack\": \"5.106.2\"\n  },\n  \"browserslist\": [\n    \"> 1%\",\n    \"last 2 versions\",\n    \"not dead\"\n  ]\n}\n"},"items":[{"name":"package.json","path":"packages/gui/package.json","rawUrl":"https://raw.githubusercontent.com/docmirror/dev-sidecar/HEAD/packages/gui/package.json","title":"@docmirror/dev-sidecar-gui","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"@docmirror/dev-sidecar-gui\",\n  \"version\": \"2.3.2\",\n  \"private\": false,\n  \"type\": \"module\",\n  \"main\": \"src/background.js\",\n  \"author\": {\n    \"email\": \"xiaojunnuo@qq.com\",\n    \"name\": \"Greper\"\n  },\n  \"description\": \"开发者边车辅助工具 — 加速 GitHub/NPM/Docker Hub 等站点的本地 MITM 代理\",\n  \"license\": \"MPL-2.0\",\n  \"homepage\": \"https://github.com/docmirror/dev-sidecar\",\n  \"scripts\": {\n    \"gen:tray-plugins\": \"node scripts/gen-tray-plugins.mjs\",\n    \"serve\": \"pnpm exec vue-cli-service serve\",\n    \"prebuild\": \"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs && node ../../_script/sync-official-config.mjs\",\n    \"build\": \"pnpm exec vue-cli-service build\",\n    \"lint\": \"pnpm exec vue-cli-service lint\",\n    \"preelectron\": \"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs\",\n    \"electron\": \"node ../../_script/electron-dev.mjs\",\n    \"electron:build\": \"node scripts/local-build-version.mjs\",\n    \"electron:build:ci\": \"npm run build && npm exec electron-builder -- --config electron-builder.config.cjs\",\n    \"version:local\": \"node scripts/local-build-version.mjs --print\",\n    \"postinstall\": \"node -e \\\"if (!process.env.CI) { try { require('node:child_process').execFileSync(process.execPath, ['node_modules/electron-builder/cli.js', 'install-app-deps'], { stdio: 'inherit' }) } catch (e) { console.warn('[postinstall] install-app-deps 失败，已跳过（可手动重跑）:', e.message) } }\\\"\",\n    \"postuninstall\": \"pnpm exec electron-builder install-app-deps\",\n    \"gen:kernel-info\": \"node scripts/gen-kernel-info.mjs\"\n  },\n  \"dependencies\": {\n    \"@ant-design/icons-vue\": \"^7.0.1\",\n    \"@blue-frontier/dev-sidecar\": \"workspace:*\",\n    \"@blue-frontier/mitmproxy\": \"workspace:*\",\n    \"@starknt/shutdown-handler-napi\": \"^0.0.3\",\n    \"@starknt/shutdown-handler-napi-win32-x64-msvc\": \"^0.0.3\",\n    \"@starknt/sysproxy\": \"^0.0.3\",\n    \"@starknt/sysproxy-win32-x64-msvc\": \"^0.0.3\",\n    \"@vscode/sudo-prompt\": \"^9.3.2\",\n    \"adm-zip\": \"^0.5.18\",\n    \"ant-design-vue\": \"^4.2.6\",\n    \"archiver\": \"^7.0.1\",\n    \"core-js\": \"^3.51.0\",\n    \"electron-baidu-tongji\": \"^1.0.5\",\n    \"electron-updater\": \"^6.8.9\",\n    \"json5\": \"^2.2.3\",\n    \"jsoneditor\": \"^10.4.3\",\n    \"lodash\": \"^4.18.1\",\n    \"minimist\": \"^1.2.8\",\n    \"request\": \"^2.88.2\",\n    \"request-progress\": \"^3.0.0\",\n    \"sass\": \"^1.106.0\",\n    \"sass-loader\": \"^16.0.8\",\n    \"tiny-emitter\": \"^2.1.0\",\n    \"vue\": \"^3.5.44\",\n    \"vue-router\": \"^4.6.4\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.29.7\",\n    \"@babel/plugin-syntax-jsx\": \"^7.29.7\",\n    \"@vue/babel-helper-vue-jsx-merge-props\": \"^1.4.0\",\n    \"@vue/babel-preset-jsx\": \"^1.4.0\",\n    \"@vue/cli-plugin-babel\": \"^5.0.9\",\n    \"@vue/cli-service\": \"^5.0.9\",\n    \"concurrently\": \"^8.2.2\",\n    \"cross-env\": \"^7.0.3\",\n    \"electron\": \"^42.11.16\",\n    \"electron-builder\": \"26.17.0\",\n    \"electron-builder-squirrel-windows\": \"26.17.0\",\n    \"json5-loader\": \"^4.0.1\",\n    \"path-browserify\": \"^1.0.1\",\n    \"wait-on\": \"^7.2.0\",\n    \"webpack\": \"5.106.2\"\n  },\n  \"browserslist\": [\n    \"> 1%\",\n    \"last 2 versions\",\n    \"not dead\"\n  ]\n}\n","frontmatter":{"name":"@docmirror/dev-sidecar-gui","version":"2.3.2","private":false,"type":"module","main":"src/background.js","author":{"email":"xiaojunnuo@qq.com","name":"Greper"},"description":"开发者边车辅助工具 — 加速 GitHub/NPM/Docker Hub 等站点的本地 MITM 代理","license":"MPL-2.0","homepage":"https://github.com/docmirror/dev-sidecar","scripts":{"gen:tray-plugins":"node scripts/gen-tray-plugins.mjs","serve":"pnpm exec vue-cli-service serve","prebuild":"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs && node ../../_script/sync-official-config.mjs","build":"pnpm exec vue-cli-service build","lint":"pnpm exec vue-cli-service lint","preelectron":"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs","electron":"node ../../_script/electron-dev.mjs","electron:build":"node scripts/local-build-version.mjs","electron:build:ci":"npm run build && npm exec electron-builder -- --config electron-builder.config.cjs","version:local":"node scripts/local-build-version.mjs --print","postinstall":"node -e \"if (!process.env.CI) { try { require('node:child_process').execFileSync(process.execPath, ['node_modules/electron-builder/cli.js', 'install-app-deps'], { stdio: 'inherit' }) } catch (e) { console.warn('[postinstall] install-app-deps 失败，已跳过（可手动重跑）:', e.message) } }\"","postuninstall":"pnpm exec electron-builder install-app-deps","gen:kernel-info":"node scripts/gen-kernel-info.mjs"},"dependencies":{"@ant-design/icons-vue":"^7.0.1","@blue-frontier/dev-sidecar":"workspace:*","@blue-frontier/mitmproxy":"workspace:*","@starknt/shutdown-handler-napi":"^0.0.3","@starknt/shutdown-handler-napi-win32-x64-msvc":"^0.0.3","@starknt/sysproxy":"^0.0.3","@starknt/sysproxy-win32-x64-msvc":"^0.0.3","@vscode/sudo-prompt":"^9.3.2","adm-zip":"^0.5.18","ant-design-vue":"^4.2.6","archiver":"^7.0.1","core-js":"^3.51.0","electron-baidu-tongji":"^1.0.5","electron-updater":"^6.8.9","json5":"^2.2.3","jsoneditor":"^10.4.3","lodash":"^4.18.1","minimist":"^1.2.8","request":"^2.88.2","request-progress":"^3.0.0","sass":"^1.106.0","sass-loader":"^16.0.8","tiny-emitter":"^2.1.0","vue":"^3.5.44","vue-router":"^4.6.4"},"devDependencies":{"@babel/core":"^7.29.7","@babel/plugin-syntax-jsx":"^7.29.7","@vue/babel-helper-vue-jsx-merge-props":"^1.4.0","@vue/babel-preset-jsx":"^1.4.0","@vue/cli-plugin-babel":"^5.0.9","@vue/cli-service":"^5.0.9","concurrently":"^8.2.2","cross-env":"^7.0.3","electron":"^42.11.16","electron-builder":"26.17.0","electron-builder-squirrel-windows":"26.17.0","json5-loader":"^4.0.1","path-browserify":"^1.0.1","wait-on":"^7.2.0","webpack":"5.106.2"},"browserslist":["> 1%","last 2 versions","not dead"]},"isInternal":false,"tokens":1061,"sizeBytes":3104},{"name":"copilot-instructions.md","path":".github/copilot-instructions.md","rawUrl":"https://raw.githubusercontent.com/docmirror/dev-sidecar/HEAD/.github/copilot-instructions.md","title":"GitHub Copilot Instructions","category":"copilot-instructions","format":"markdown","content":"# Copilot instructions for dev-sidecar\n\n## Commands\n\n- Dependency management:\n  - Install dependencies for the entire workspace from the repository root using `pnpm install`. Avoid using `npm install` for dependency installation in this project.\n  - If `pnpm install` reports dependency conflicts or version mismatches, update the relevant `package.json` entries to compatible versions (or adjust `peerDependencies`), then re-run `pnpm install`.\n\n- Linting:\n  - Lint the repository from the root with `pnpm lint`.\n  - Auto-fix lint issues from the root with `pnpm lint:fix`.\n  - If `pnpm lint` or `pnpm lint:fix` fails, review the reported errors and manually fix the files indicated by the linter, then re-run the command.\n\n- Testing:\n  - Run package tests where they live:\n    - `pnpm --filter @blue-frontier/dev-sidecar test`\n    - `pnpm --filter @blue-frontier/mitmproxy test`\n  - Run a single test file by passing it after `--`, for example:\n    - `pnpm --filter @blue-frontier/dev-sidecar test -- test/regex.test.js`\n    - `pnpm --filter @blue-frontier/mitmproxy test -- test/proxyTest.js`\n\n- GUI development and packaging (from `packages/gui`):\n  - `npm run electron`\n  - `npm run electron:build`\n  - `npm run serve`\n  - `npm run lint`\n  - For GUI debugging: run `npm run electron` and open the Electron developer tools (application menu View → Toggle Developer Tools or the platform shortcut) to inspect renderer pages, console logs, and IPC traffic.\n\n## High-level architecture\n\n- This is a pnpm workspace monorepo with three packages (the CLI has moved out to https://github.com/Blue-Frontier/ds-cli):\n  - `packages/core`: shared app logic, config, shell helpers, system proxy handling, and plugin/module code.\n  - `packages/mitmproxy`: the HTTP(S) proxy, DNS, interception, PAC, and response/request rewrite layer.\n  - `packages/gui`: the Electron + Vue 2 desktop app.\n- `packages/core/src/index.js` exposes the main API and owns process-level error handling plus config/state wiring.\n- `packages/mitmproxy/src/index.js` creates the proxy server(s), applies proxy options, and reports status/errors back to the host process.\n- `packages/gui/src/background.js` is the Electron main process: it loads config, creates the main window, tray, IPC bridges, and Windows-specific power-monitor behavior.\n- Renderer code lives under `packages/gui/src/view/`; IPC/bridge code lives under `packages/gui/src/bridge/`.\n- The CLI is no longer part of this repo: it lives at https://github.com/Blue-Frontier/ds-cli, which embeds this core via a git submodule.\n\n## Repo-specific conventions\n\n- Most runtime code in `core` and `mitmproxy` uses CommonJS; GUI code is the Electron/Vue app and is organized around the Electron main process plus renderer/bridge split.\n- Keep GUI source imports aligned with the existing file layout and `.js` module naming used in the Electron entrypoints.\n- Preserve the startup/shutdown flow: ensure the sequence remains where `core` initializes and manages the proxy lifecycle, `mitmproxy` performs network interception, and the GUI communicates exclusively through IPC bridges and the `core` API; avoid direct cross-component calls that bypass these boundaries.\n- Native/module setup matters here: the repo uses a root `.npmrc` with a PhantomJS mirror and C++17 build flags for native modules.\n- The project documents Node 22.x, Python 3.11/setuptools, and VS 2022 C++ tooling as the expected local environment for Windows builds.\n","isInternal":false,"tokens":802,"sizeBytes":3461},{"name":"README.md","path":"packages/gui/README.md","rawUrl":"https://raw.githubusercontent.com/docmirror/dev-sidecar/HEAD/packages/gui/README.md","title":"gui Documentation","category":"plugin-manifest","format":"markdown","content":"# dev-sidecar-gui\n\n## Project setup\n\nYou should always refer to the [main README](../../README.md) for instructions on how to set up the project.\n\n### Customize configuration\n\nSee [Configuration Reference](https://cli.vuejs.org/config/).\n","isInternal":false,"tokens":53,"sizeBytes":238}],"systemPromptSnippet":"<yakaai_skills repo=\"docmirror/dev-sidecar\">\n<!-- File: packages/gui/package.json (Tokens: ~1061 | Category: anthropic-skill) -->\n{\n  \"name\": \"@docmirror/dev-sidecar-gui\",\n  \"version\": \"2.3.2\",\n  \"private\": false,\n  \"type\": \"module\",\n  \"main\": \"src/background.js\",\n  \"author\": {\n    \"email\": \"xiaojunnuo@qq.com\",\n    \"name\": \"Greper\"\n  },\n  \"description\": \"开发者边车辅助工具 — 加速 GitHub/NPM/Docker Hub 等站点的本地 MITM 代理\",\n  \"license\": \"MPL-2.0\",\n  \"homepage\": \"https://github.com/docmirror/dev-sidecar\",\n  \"scripts\": {\n    \"gen:tray-plugins\": \"node scripts/gen-tray-plugins.mjs\",\n    \"serve\": \"pnpm exec vue-cli-service serve\",\n    \"prebuild\": \"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs && node ../../_script/sync-official-config.mjs\",\n    \"build\": \"pnpm exec vue-cli-service build\",\n    \"lint\": \"pnpm exec vue-cli-service lint\",\n    \"preelectron\": \"node scripts/gen-tray-plugins.mjs && node scripts/gen-kernel-info.mjs\",\n    \"electron\": \"node ../../_script/electron-dev.mjs\",\n    \"electron:build\": \"node scripts/local-build-version.mjs\",\n    \"electron:build:ci\": \"npm run build && npm exec electron-builder -- --config electron-builder.config.cjs\",\n    \"version:local\": \"node scripts/local-build-version.mjs --print\",\n    \"postinstall\": \"node -e \\\"if (!process.env.CI) { try { require('node:child_process').execFileSync(process.execPath, ['node_modules/electron-builder/cli.js', 'install-app-deps'], { stdio: 'inherit' }) } catch (e) { console.warn('[postinstall] install-app-deps 失败，已跳过（可手动重跑）:', e.message) } }\\\"\",\n    \"postuninstall\": \"pnpm exec electron-builder install-app-deps\",\n    \"gen:kernel-info\": \"node scripts/gen-kernel-info.mjs\"\n  },\n  \"dependencies\": {\n    \"@ant-design/icons-vue\": \"^7.0.1\",\n    \"@blue-frontier/dev-sidecar\": \"workspace:*\",\n    \"@blue-frontier/mitmproxy\": \"workspace:*\",\n    \"@starknt/shutdown-handler-napi\": \"^0.0.3\",\n    \"@starknt/shutdown-handler-napi-win32-x64-msvc\": \"^0.0.3\",\n    \"@starknt/sysproxy\": \"^0.0.3\",\n    \"@starknt/sysproxy-win32-x64-msvc\": \"^0.0.3\",\n    \"@vscode/sudo-prompt\": \"^9.3.2\",\n    \"adm-zip\": \"^0.5.18\",\n    \"ant-design-vue\": \"^4.2.6\",\n    \"archiver\": \"^7.0.1\",\n    \"core-js\": \"^3.51.0\",\n    \"electron-baidu-tongji\": \"^1.0.5\",\n    \"electron-updater\": \"^6.8.9\",\n    \"json5\": \"^2.2.3\",\n    \"jsoneditor\": \"^10.4.3\",\n    \"lodash\": \"^4.18.1\",\n    \"minimist\": \"^1.2.8\",\n    \"request\": \"^2.88.2\",\n    \"request-progress\": \"^3.0.0\",\n    \"sass\": \"^1.106.0\",\n    \"sass-loader\": \"^16.0.8\",\n    \"tiny-emitter\": \"^2.1.0\",\n    \"vue\": \"^3.5.44\",\n    \"vue-router\": \"^4.6.4\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.29.7\",\n    \"@babel/plugin-syntax-jsx\": \"^7.29.7\",\n    \"@vue/babel-helper-vue-jsx-merge-props\": \"^1.4.0\",\n    \"@vue/babel-preset-jsx\": \"^1.4.0\",\n    \"@vue/cli-plugin-babel\": \"^5.0.9\",\n    \"@vue/cli-service\": \"^5.0.9\",\n    \"concurrently\": \"^8.2.2\",\n    \"cross-env\": \"^7.0.3\",\n    \"electron\": \"^42.11.16\",\n    \"electron-builder\": \"26.17.0\",\n    \"electron-builder-squirrel-windows\": \"26.17.0\",\n    \"json5-loader\": \"^4.0.1\",\n    \"path-browserify\": \"^1.0.1\",\n    \"wait-on\": \"^7.2.0\",\n    \"webpack\": \"5.106.2\"\n  },\n  \"browserslist\": [\n    \"> 1%\",\n    \"last 2 versions\",\n    \"not dead\"\n  ]\n}\n\n<!-- File: .github/copilot-instructions.md (Tokens: ~802 | Category: copilot-instructions) -->\n# Copilot instructions for dev-sidecar\n\n## Commands\n\n- Dependency management:\n  - Install dependencies for the entire workspace from the repository root using `pnpm install`. Avoid using `npm install` for dependency installation in this project.\n  - If `pnpm install` reports dependency conflicts or version mismatches, update the relevant `package.json` entries to compatible versions (or adjust `peerDependencies`), then re-run `pnpm install`.\n\n- Linting:\n  - Lint the repository from the root with `pnpm lint`.\n  - Auto-fix lint issues from the root with `pnpm lint:fix`.\n  - If `pnpm lint` or `pnpm lint:fix` fails, review the reported errors and manually fix the files indicated by the linter, then re-run the command.\n\n- Testing:\n  - Run package tests where they live:\n    - `pnpm --filter @blue-frontier/dev-sidecar test`\n    - `pnpm --filter @blue-frontier/mitmproxy test`\n  - Run a single test file by passing it after `--`, for example:\n    - `pnpm --filter @blue-frontier/dev-sidecar test -- test/regex.test.js`\n    - `pnpm --filter @blue-frontier/mitmproxy test -- test/proxyTest.js`\n\n- GUI development and packaging (from `packages/gui`):\n  - `npm run electron`\n  - `npm run electron:build`\n  - `npm run serve`\n  - `npm run lint`\n  - For GUI debugging: run `npm run electron` and open the Electron developer tools (application menu View → Toggle Developer Tools or the platform shortcut) to inspect renderer pages, console logs, and IPC traffic.\n\n## High-level architecture\n\n- This is a pnpm workspace monorepo with three packages (the CLI has moved out to https://github.com/Blue-Frontier/ds-cli):\n  - `packages/core`: shared app logic, config, shell helpers, system proxy handling, and plugin/module code.\n  - `packages/mitmproxy`: the HTTP(S) proxy, DNS, interception, PAC, and response/request rewrite layer.\n  - `packages/gui`: the Electron + Vue 2 desktop app.\n- `packages/core/src/index.js` exposes the main API and owns process-level error handling plus config/state wiring.\n- `packages/mitmproxy/src/index.js` creates the proxy server(s), applies proxy options, and reports status/errors back to the host process.\n- `packages/gui/src/background.js` is the Electron main process: it loads config, creates the main window, tray, IPC bridges, and Windows-specific power-monitor behavior.\n- Renderer code lives under `packages/gui/src/view/`; IPC/bridge code lives under `packages/gui/src/bridge/`.\n- The CLI is no longer part of this repo: it lives at https://github.com/Blue-Frontier/ds-cli, which embeds this core via a git submodule.\n\n## Repo-specific conventions\n\n- Most runtime code in `core` and `mitmproxy` uses CommonJS; GUI code is the Electron/Vue app and is organized around the Electron main process plus renderer/bridge split.\n- Keep GUI source imports aligned with the existing file layout and `.js` module naming used in the Electron entrypoints.\n- Preserve the startup/shutdown flow: ensure the sequence remains where `core` initializes and manages the proxy lifecycle, `mitmproxy` performs network interception, and the GUI communicates exclusively through IPC bridges and the `core` API; avoid direct cross-component calls that bypass these boundaries.\n- Native/module setup matters here: the repo uses a root `.npmrc` with a PhantomJS mirror and C++17 build flags for native modules.\n- The project documents Node 22.x, Python 3.11/setuptools, and VS 2022 C++ tooling as the expected local environment for Windows builds.\n\n<!-- File: packages/gui/README.md (Tokens: ~53 | Category: plugin-manifest) -->\n# dev-sidecar-gui\n\n## Project setup\n\nYou should always refer to the [main README](../../README.md) for instructions on how to set up the project.\n\n### Customize configuration\n\nSee [Configuration Reference](https://cli.vuejs.org/config/).\n</yakaai_skills>"}