On Windows magpie's window is http://wails.localhost (WebView2). page/boot.js counted only localhost, 127.0.0.1 and an empty host as this computer, so the Windows window got the "remote browser" message (#1024). It now counts *.localhost, ::1 and 127.* too, the same rule as chat, fingerprint, kimi-desktop, page-model-quota and window-warmup. magpie.service still wins. What was run at 84a6a812739b96191e9d63805cd408e0abef717a (mote, macOS): - boot.js in a node vm with a mocked location and magpie bridge, new and old side by side. wails.localhost, WAILS.LOCALHOST, 127.0.0.2 and [::1]: old shows the remote message, new opens http://127.0.0.1:3497/. localhost, 127.0.0.1 and an empty host open it in both. 192.168.1.5, evil.com and localhost.evil.com show the remote message in both. A magpie.service is used in both. - packages/amp-usage: node --test test/*.test.mjs, 48 pass, 0 fail. bun scripts/check.mjs amp-usage passed. Not tried: a real magpie window on Windows. No test of boot.js in the package yet. Co-authored-by: overstarry <overstarry@users.noreply.github.com>
59 lines
1.2 KiB
JSON
59 lines
1.2 KiB
JSON
{
|
|
"name": "@magpie-community/page-amp-usage",
|
|
"version": "0.1.1",
|
|
"description": "An Amp usage board in Magpie's window, with a local background service that can sync Amp usage into Magpie's usage ledger.",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"files": [
|
|
"index.mjs",
|
|
"lib",
|
|
"page",
|
|
"ui",
|
|
"README.md",
|
|
"LICENSE",
|
|
"NOTICE"
|
|
],
|
|
"scripts": {
|
|
"test": "node --test test/*.test.mjs"
|
|
},
|
|
"engines": {
|
|
"magpie": ">=0.1.3681",
|
|
"node": ">=20"
|
|
},
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/amp-usage"
|
|
},
|
|
"keywords": [
|
|
"magpie",
|
|
"magpie-page",
|
|
"amp",
|
|
"usage"
|
|
],
|
|
"magpie": {
|
|
"page": {
|
|
"title": "Amp usage",
|
|
"file": "page/index.html",
|
|
"icon": "page/icon.svg",
|
|
"service": {
|
|
"port": 3497,
|
|
"option": "port"
|
|
}
|
|
},
|
|
"permissions": [],
|
|
"options": {
|
|
"port": 3497,
|
|
"sync": true,
|
|
"gatewayURL": "http://127.0.0.1:3425",
|
|
"intervalSeconds": 300,
|
|
"settleSeconds": 120,
|
|
"ampPath": "",
|
|
"threadDirs": [],
|
|
"excludedThreadIds": [],
|
|
"excludedModels": []
|
|
}
|
|
}
|
|
}
|