fix: review fixes, GitHub Releases update check (0.1.1)

- Wallet/subscription/window exhaustion skips a key for 10 minutes instead
  of disabling it; a balance read showing money brings it back. Only the
  gateway's own key refusals and a used-up key cap still disable a key.
- Classify by sub2api's exact wording; a bare 401 or upstream text no
  longer retires a key; 'No available accounts' is capacity, not coverage.
- Hosts keep only an https origin (no doubled /v1); timeouts and HTTP
  answers no longer set a host aside; hand edits are re-probed.
- Balance: inactive subscriptions, per-plan subscription pooling, key caps
  kept out of the total, rate windows shown.
- Endpoint editor no longer empties itself after Save.
- Update check reads GitHub Releases and installs the release tarball;
  release workflow replaces npm publishing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
大阔andClaude Opus 5.5 committed 2026-10-15 01:15:24 +08:00
1 parent 86b8e4d24f
commit f4f4ce55b3
34 files changed
+953 -521

No files matched your search

+2 -1
View File
@@ -30,7 +30,7 @@ const keyId = payload => String(payload?.id ?? '')
* web search controller (without one, its endpoints refuse).
* @returns a handler for `connection.rpc.handle(CHANNEL, handler)`.
*/
export function createGeek2APIRpc({ ring, balance, groups, hosts, preference, claudeRuntime, claudeCli, pluginManager, search, modelSelection }) {
export function createGeek2APIRpc({ ring, balance, groups, hosts, keys, preference, claudeRuntime, claudeCli, pluginManager, search, modelSelection }) {
const need = (service, message) => {
if (service === undefined) throw new Error(message)
return service
@@ -47,6 +47,7 @@ export function createGeek2APIRpc({ ring, balance, groups, hosts, preference, cl
writable: preference.writable === true,
defaults: { apiHosts: [...DEFAULT_API_HOSTS] },
claudeRuntime: typeof claudeRuntime === 'function' ? claudeRuntime() : 'http',
skipped: typeof keys?.skipped === 'function' ? keys.skipped() : {},
})
const writable = () => {
if (preference.writable !== true) throw new Error('Geek2API settings are not writable in this profile')