mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 16:55:05 +00:00
* feat(geolocation): resolve client addresses to a coarse city via a bundled plugin The Activity identity card could show a client's IP address but not where it was, so an operator still had to look the address up by hand. Add a bundled `geolocation` plugin that owns address-to-place resolution behind one authenticated route, `GET /plugins/geolocation/lookup?ip=`. It downloads a MaxMind-format database on first lookup into the state directory, answers from that local copy, and refreshes it monthly, so a lookup never sends an address to a third party. The Control UI renders the resolved city on the device row next to the address and the client-reported time zone. The default source is DB-IP City Lite under CC BY 4.0. That license requires attribution, so every response carries the credit and the UI renders it next to the value; the database is downloaded at runtime and never redistributed. Plugin code and the `maxmind` reader are MIT. No free city-level IP database is MIT-licensed, so the obligation lives with the data rather than the code, and `databaseUrl` plus the attribution fields make the source swappable. No new core provider kind: with one implementation the plugin owns everything through the existing HTTP-route seam, keeping core plugin-agnostic. A second provider is what would justify promoting this to a registry contract. Availability and lookup failure stay distinguishable: a missing or still downloading database answers 503, never `found: false`. A failed refresh serves the cached copy, and a body that does not parse as an MMDB is discarded without replacing a working database. * fix(docs): correct geolocation config examples and add zh-CN glossary entries The config examples used `plugins.<id>` instead of the real `plugins.entries.<id>.config` shape, which the docs config-example validator and src/config/docs-config-examples.test.ts both reject. New doc labels also need zh-CN glossary entries. * chore(labeler): cover the geolocation extension directory AGENTS.md requires a labeler entry plus a GitHub label for every new plugin surface; test/scripts/labeler-extension-coverage.test.ts enforces the labeler half. * fix(geolocation): address review findings on caching, download bounds, and scope Cold-start lookups were permanently suppressed. The loader cached one promise per address including failures, so the 15s browser deadline expiring against a first download that takes ~46s cached a blank forever, and a mounted row only looks up again when its IP changes. Lookups now return a discriminated located/absent/unavailable result: only definitive answers are cached, and the element retries an unavailable one on a widening 5s/15s/45s schedule. Download limits ran after allocation. The size check happened only after `response.arrayBuffer()` had buffered the whole body, and gunzip had no output ceiling, so a replaced source or a compression bomb could exhaust Gateway memory before rejection. The body now streams against a compressed ceiling enforced per chunk, and inflation uses zlib's maxOutputLength. Cached placements were not scoped to the Gateway. The cache keyed only by address while endpoint and credentials come from the shared Gateway context, so a switch could render the previous Gateway's answer. The shared reset hook now supports multiple subscribers - a single slot silently dropped whichever registered first - and the geolocation cache subscribes. Unresolvable ranges no longer trigger a download. Only loopback suppresses `ip` at connect, so Tailscale carrier-grade-NAT and LAN addresses are recorded and displayed. No geolocation database contains them, so a tailnet-only or LAN-only Gateway was downloading 125 MB to answer nothing. The route now answers those ranges without loading the database, using the already-public `isPrivateOrLoopbackHost` seam so the SDK surface budget is unchanged. The quickstart queried a reserved documentation range while showing a located response, which cannot happen; it now uses a routable address and documents the not-found case. * fix(deps): resync the lockfile after dropping the net-policy dependency The geolocation plugin briefly depended on @openclaw/net-policy before switching to the already-public isPrivateOrLoopbackHost SDK seam. The package.json entry was removed without regenerating the lockfile, so the frozen-lockfile install failed and every downstream CI job failed with it. |
||
|---|---|---|
| .. | ||
| reference | ||
| adding-capabilities.md | ||
| admin-http-rpc.md | ||
| agent-tools.md | ||
| architecture-internals.md | ||
| architecture.md | ||
| beam.md | ||
| building-extensions.md | ||
| building-plugins.md | ||
| bundles.md | ||
| cli-backend-plugins.md | ||
| codex-computer-use.md | ||
| codex-harness-reference.md | ||
| codex-harness-runtime.md | ||
| codex-harness.md | ||
| codex-native-plugins.md | ||
| codex-supervision.md | ||
| community.md | ||
| compatibility.md | ||
| copilot.md | ||
| dependency-resolution.md | ||
| geolocation.md | ||
| google-meet.md | ||
| hooks.md | ||
| install-overrides.md | ||
| llama-cpp.md | ||
| logbook.md | ||
| manage-plugins.md | ||
| manifest.md | ||
| meeting-plugins.md | ||
| memory-lancedb.md | ||
| memory-wiki.md | ||
| message-presentation.md | ||
| oc-path.md | ||
| onepassword.md | ||
| plugin-inventory.md | ||
| plugin-permission-requests.md | ||
| reference.md | ||
| sdk-agent-harness.md | ||
| sdk-channel-inbound.md | ||
| sdk-channel-ingress.md | ||
| sdk-channel-message.md | ||
| sdk-channel-outbound.md | ||
| sdk-channel-plugins.md | ||
| sdk-channel-turn.md | ||
| sdk-entrypoints.md | ||
| sdk-migration.md | ||
| sdk-overview.md | ||
| sdk-provider-plugins.md | ||
| sdk-runtime.md | ||
| sdk-setup.md | ||
| sdk-subpaths.md | ||
| sdk-testing.md | ||
| teams-meetings.md | ||
| tool-plugins.md | ||
| vault.md | ||
| voice-call.md | ||
| webhooks.md | ||
| workboard.md | ||
| zalouser.md | ||
| zoom-meetings.md | ||