{"_id":"@bbqin/registration-workbench-local","_rev":"4-eb0840ae912def3e1e7276293258a8ae","name":"@bbqin/registration-workbench-local","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@bbqin/registration-workbench-local","version":"0.1.0","license":"MIT","_id":"@bbqin/registration-workbench-local@0.1.0","maintainers":[{"name":"bbqin","email":"1572928352@qq.com"}],"bin":{"registration-workbench-local":"bin/registration-workbench-local.js"},"dist":{"shasum":"54f092ac65801ba50fb0101524b98bbdb5fbc8f0","tarball":"https://registry.npmjs.org/@bbqin/registration-workbench-local/-/registration-workbench-local-0.1.0.tgz","fileCount":27,"integrity":"sha512-usH+GqDh4OvYGNp9w0FVqGAZtIrzjhbmdE+QxyokcYPdtCqb/RRH6s1n8lXAQIe7Izp7xbD9Z555A3mOWpRTlg==","signatures":[{"sig":"MEYCIQCMirHjUZajSqpbrw3USXRdi1k3sl9nTq7taCqc1FZQSQIhAJOqAkp6ycsZ94xb2l351emgCPeFUlyN7g23lWGzn/a2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96762},"main":"server.js","engines":{"node":">=20"},"gitHead":"3072ddc853dd1a869a0b1a6f68ee11ac56b87ad4","scripts":{"logs":"node scripts/logs.js","stop":"node scripts/stop.js","test":"node --test","setup":"node scripts/install.js","start":"node server.js","status":"node scripts/status.js","bootstrap":"node scripts/bootstrap.js","daemon-start":"node scripts/start.js"},"_npmUser":{"name":"bbqin","email":"1572928352@qq.com"},"_npmVersion":"10.9.2","description":"Local host for registration workbench","directories":{},"_nodeVersion":"22.14.0","dependencies":{"express":"^5.2.1","playwright-core":"^1.54.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/registration-workbench-local_0.1.0_1778264032229_0.4510082370049979","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bbqin/registration-workbench-local","version":"0.1.1","license":"MIT","_id":"@bbqin/registration-workbench-local@0.1.1","maintainers":[{"name":"bbqin","email":"1572928352@qq.com"}],"bin":{"registration-workbench-local":"bin/registration-workbench-local.js"},"dist":{"shasum":"65e48a6e1c2246a56b9da434c6fef7f382b072ac","tarball":"https://registry.npmjs.org/@bbqin/registration-workbench-local/-/registration-workbench-local-0.1.1.tgz","fileCount":38,"integrity":"sha512-MFZFqd5msYdvNqJ2Ll927u8rLDVB3nFUEOkwhuDL6fLFiXu+5d5Vo3/ug1EllecWAh1OsQrkwAgiUWamy9rXsA==","signatures":[{"sig":"MEQCIENG0herR7zYC13uAIJ5rpNjrE5BoW/alKCQ0bY8s+mZAiBlLg8RBASOkTeC6kPqOUQOM4YVINsjrlBWwVI7NcGIiw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":162881},"main":"server.js","engines":{"node":">=20"},"gitHead":"2f7d80dc31cb4be30a5d5593a8ce06e1189a35ff","scripts":{"logs":"node scripts/logs.js","stop":"node scripts/stop.js","test":"node --test","setup":"node scripts/install.js","start":"node server.js","status":"node scripts/status.js","bootstrap":"node scripts/bootstrap.js","daemon-start":"node scripts/start.js"},"_npmUser":{"name":"bbqin","email":"1572928352@qq.com"},"_npmVersion":"10.9.2","description":"Local host for registration workbench","directories":{},"_nodeVersion":"22.14.0","dependencies":{"axios":"^1.16.0","express":"^5.2.1","playwright-core":"^1.54.2","socks-proxy-agent":"^10.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/registration-workbench-local_0.1.1_1778437819906_0.1673815826734284","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bbqin/registration-workbench-local","version":"0.1.2","keywords":[],"author":"","license":"MIT","_id":"@bbqin/registration-workbench-local@0.1.2","maintainers":[{"name":"bbqin","email":"1572928352@qq.com"}],"bin":{"registration-workbench-local":"bin/registration-workbench-local.js"},"dist":{"shasum":"cbe9206d578efcd19255a244b46d6041cf9cdcb3","tarball":"https://registry.npmjs.org/@bbqin/registration-workbench-local/-/registration-workbench-local-0.1.2.tgz","fileCount":38,"integrity":"sha512-41fdsAJuvxtf4IA1y2Cqc8TDICnLnWCKBR4eDpjrruKO0KBhGiKUcayrvJ7QiI5f3gKZuPXWfj4ua2yJQ6AENg==","signatures":[{"sig":"MEYCIQDXgfyQSVO+It5qWtnRJ8cdsftWvaqHHAX6f8J0QhWmQwIhAOVT+ZDlMf7UIszqcdgM4ru9HyvB2u6IhssCFeSsPGiF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":175188},"main":"server.js","engines":{"node":">=20"},"gitHead":"ba470b7ff44052fda5935d8ef926bebb525c9719","scripts":{"logs":"node scripts/logs.js","stop":"node scripts/stop.js","test":"node --test","setup":"node scripts/install.js","start":"node server.js","status":"node scripts/status.js","bootstrap":"node scripts/bootstrap.js","daemon-start":"node scripts/start.js"},"_npmUser":{"name":"bbqin","email":"1572928352@qq.com"},"_npmVersion":"10.8.2","description":"Local host for registration workbench","directories":{"test":"test"},"_nodeVersion":"20.19.0","dependencies":{"axios":"^1.16.0","express":"^5.2.1","playwright-core":"^1.54.2","http-proxy-agent":"^9.0.0","https-proxy-agent":"^9.0.0","socks-proxy-agent":"^10.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/registration-workbench-local_0.1.2_1778474296239_0.7917555447727385","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bbqin/registration-workbench-local","version":"0.1.3","description":"Local host for registration workbench","license":"MIT","main":"server.js","publishConfig":{"access":"public"},"bin":{"registration-workbench-local":"bin/registration-workbench-local.js"},"engines":{"node":">=20"},"scripts":{"bootstrap":"node scripts/bootstrap.js","setup":"node scripts/install.js","start":"node server.js","daemon-start":"node scripts/start.js","status":"node scripts/status.js","logs":"node scripts/logs.js","stop":"node scripts/stop.js","test":"node --test"},"dependencies":{"axios":"^1.16.0","express":"^5.2.1","http-proxy-agent":"^9.0.0","https-proxy-agent":"^9.0.0","playwright-core":"^1.54.2","socks-proxy-agent":"^10.0.0"},"directories":{"test":"test"},"devDependencies":{},"keywords":[],"author":"","_id":"@bbqin/registration-workbench-local@0.1.3","gitHead":"ba470b7ff44052fda5935d8ef926bebb525c9719","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-/w0WxmcU21FybG9vYTrAkFFb901BOx77RbFPELmxRmNIlOv2XTd9tC4qtL3VLDxyZTy1pAhPsqkxHq8HhAky3Q==","shasum":"4acfa6272a831e4be2974c08d6dc9feb5438216b","tarball":"https://registry.npmjs.org/@bbqin/registration-workbench-local/-/registration-workbench-local-0.1.3.tgz","fileCount":38,"unpackedSize":175846,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD+Ja8vtpc9DVGkfRqyC+BIgkYYA4/dHWHPvnNbM+rm5AIgMCya+1rcznvr6KHVcCDrh3oiLE0S04A4V69w2JSauhs="}]},"_npmUser":{"name":"bbqin","email":"1572928352@qq.com"},"maintainers":[{"name":"bbqin","email":"1572928352@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/registration-workbench-local_0.1.3_1778474899036_0.9005063905415929"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-08T18:13:52.166Z","modified":"2026-05-11T04:48:19.309Z","0.1.0":"2026-05-08T18:13:52.410Z","0.1.1":"2026-05-10T18:30:20.045Z","0.1.2":"2026-05-11T04:38:16.367Z","0.1.3":"2026-05-11T04:48:19.174Z"},"license":"MIT","keywords":[],"description":"Local host for registration workbench","maintainers":[{"name":"bbqin","email":"1572928352@qq.com"}],"readme":"# Registration Workbench Local\n\n本目录是独立的 Node.js 本地工具包，可作为公开 npm CLI 包发布。\n\n推荐使用方式：\n\n```bash\nnpx @bbqin/registration-workbench-local\n```\n\n或全局安装：\n\n```bash\nnpm install -g @bbqin/registration-workbench-local\nregistration-workbench-local\n```\n\nCLI 命令：\n\n```bash\nregistration-workbench-local          # 启动本地服务并打开页面\nregistration-workbench-local start    # 后台启动服务\nregistration-workbench-local status   # 查看状态\nregistration-workbench-local logs 20  # 查看最近日志\nregistration-workbench-local stop     # 停止服务\nregistration-workbench-local config   # 生成并显示本地配置路径\n```\n\n脚本分层：\n\n- 仓库根 `scripts/registration-workbench-local-*.{cmd,ps1,sh}` 是项目级入口，供 AI 和仓库协作脚本统一调用。\n- 包内 `scripts/*.js` 是实际实现层。\n- 包内 `bootstrap.cmd/.ps1/.command` 是面向人工双击启动的便捷入口，不作为 AI 默认入口；如需非交互执行，可设置 `WORKBENCH_LOCAL_SKIP_OPEN=1` 跳过自动打开浏览器，并设置 `WORKBENCH_LOCAL_NO_PAUSE=1` 跳过窗口暂停。\n\n最小使用方式：\n\n```bash\nnpm install\nnpm run setup\nnpm start\n```\n\n默认行为：\n\n- 远程地址默认使用 `https://assistant.lqjqc.com`，模板写在 `config.example.json` 中。\n- `config.json` 是本机运行配置，首次运行或执行 `registration-workbench-local config` 会自动生成；后续 `install/start/open` 也会自动按最新模板补齐新增字段与空值默认项，不提交到仓库。\n- `GoPay` 自动支付页位于 `http://127.0.0.1:<port>/tools/gopay-auto-pay`，也是当前唯一页面入口。\n- 配置、日志、pid 和 runtime 文件存放在用户数据目录，避免写入 npm 包安装目录。\n  - Windows：`%APPDATA%\\registration-workbench-local`\n  - macOS：`~/Library/Application Support/registration-workbench-local`\n  - Linux：`~/.config/registration-workbench-local`\n- daemon 实际运行的是用户目录下的 `runtime/app` 快照，不依赖 `npx` 临时安装目录；同版本源码有变化时也会自动刷新快照。\n- 如果 `config.json` 中未配置 `remote.basicAuth.user/password`，首次访问页面时浏览器会弹出原生 Basic Auth 输入框；输入一次后，本地服务会把这组凭据写回同一个 `config.json`，后续直接复用。\n- 端口同样写在 `config.json` 的 `server.port` 中，默认 `17810`。\n\n生命周期命令：\n\n```bash\nnpm run setup\nnpm run daemon-start\nnpm run status\nnpm run logs -- 20\nnpm run stop\n```\n\n默认行为：\n\n- GoPay 自动支付任务采用混合链路：`checkout`、`checkout approve`、`midtrans linking` 固定走本机 Chrome，其余 Stripe/GoPay API 步骤继续走本地服务端请求。\n- 本地 Chrome 与服务端请求都会读取 `config.json` 里的 `gopay.localProxyUrl`；支持 `http://` 和 `socks5://` 代理。\n- 如果未找到 Chrome，会返回 `未找到本机 Chrome，请安装 Chrome 后重试`。\n- 邮箱、TG 等接口由本地服务转发到 `config.json` 中的 `remote.baseUrl`。\n- GoPay 自动支付任务默认复用远端 `Telegram` 配置和消息查询接口，本地只保存 `PIN`、代理和 GoPay 相关 endpoint/cookie。\n- 配置优先级为：`环境变量 > config.json > 模板默认值`；环境变量空值会被忽略，不回写到文件。\n\n核心配置模板：\n\n```json\n{\n  \"server\": {\n    \"port\": 17810\n  },\n  \"remote\": {\n    \"baseUrl\": \"https://assistant.lqjqc.com\",\n    \"basicAuth\": {\n      \"user\": \"\",\n      \"password\": \"\"\n    }\n  },\n  \"gopay\": {\n    \"pin\": \"789789\",\n    \"localProxyUrl\": \"http://127.0.0.1:10808\",\n    \"checkoutEndpoint\": \"https://chatgpt.com/backend-api/payments/checkout\",\n    \"checkoutApproveEndpoint\": \"https://chatgpt.com/backend-api/payments/checkout/approve\",\n    \"midtransBaseUrl\": \"https://app.midtrans.com\",\n    \"gopayGwaBaseUrl\": \"https://gwa.gopayapi.com\",\n    \"gopayCustomerBaseUrl\": \"https://customer.gopayapi.com\",\n    \"midtransLinkingAuthorization\": \"\",\n    \"midtransLinkingCookie\": \"\",\n    \"midtransChargeCookie\": \"\",\n    \"otp\": {\n      \"pollIntervalMs\": 5000,\n      \"timeoutMs\": 120000\n    },\n    \"verify\": {\n      \"pollIntervalMs\": 2000,\n      \"timeoutMs\": 120000\n    }\n  }\n}\n```\n","readmeFilename":"README.md"}