openclaw/docs/plugins
Peter Steinberger 295809df98
feat(geolocation): resolve client addresses to a coarse city via a bundled plugin (#128546)
* 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.
2026-08-24 04:56:03 -07:00
..
reference feat(geolocation): resolve client addresses to a coarse city via a bundled plugin (#128546) 2026-08-24 04:56:03 -07:00
adding-capabilities.md refactor: retire August compat windows (embedding API, pi aliases, target parser, spawning hook, setup exports, WhatsApp inbound aliases) (#124416) 2026-08-15 22:43:47 -07:00
admin-http-rpc.md
agent-tools.md
architecture-internals.md refactor(providers): return prepared dynamic models directly (#126574) 2026-08-21 11:40:52 -07:00
architecture.md
beam.md fix: add ssrf protection to Beam fetches (#123848) 2026-08-18 18:00:58 -07:00
building-extensions.md
building-plugins.md fix(plugins): bind tool delivery to current turn (#127098) 2026-08-21 23:16:04 +05:30
bundles.md
cli-backend-plugins.md refactor(anthropic): replace handwritten Claude sessions with Agent SDK (#128131) 2026-08-24 01:59:16 -07:00
codex-computer-use.md fix(codex): unblock Computer Use after plugin install (#126699) 2026-08-20 08:26:41 -07:00
codex-harness-reference.md feat: run Codex sessions on approved paired devices (#127202) 2026-08-21 12:50:26 -07:00
codex-harness-runtime.md feat: run Codex sessions on approved paired devices (#127202) 2026-08-21 12:50:26 -07:00
codex-harness.md Revert "fix(codex): preserve child hooks across turns (#128485)" (#128493) 2026-08-24 00:55:28 -04:00
codex-native-plugins.md fix(codex): unblock Computer Use after plugin install (#126699) 2026-08-20 08:26:41 -07:00
codex-supervision.md
community.md
compatibility.md fix(auth): surface revoked OAuth state without masking provider failures (#125515) 2026-08-18 00:35:06 -07:00
copilot.md
dependency-resolution.md fix(update): support npm before lifecycle allowlists (#125452) 2026-08-17 17:01:23 -07:00
geolocation.md feat(geolocation): resolve client addresses to a coarse city via a bundled plugin (#128546) 2026-08-24 04:56:03 -07:00
google-meet.md
hooks.md fix(memory): honor turn tool policy during automatic recall (#126482) 2026-08-19 19:21:51 -07:00
install-overrides.md
llama-cpp.md fix(llama-cpp): make endpoint auth transitions reproducible (#126498) 2026-08-19 18:37:28 -07:00
logbook.md
manage-plugins.md
manifest.md feat(ui): add a Claude CLI 200K/1M context-window switch to the model picker (#127951) 2026-08-22 23:25:23 +05:30
meeting-plugins.md docs: consolidate setup and plugin references (#126132) 2026-08-18 20:00:05 -07:00
memory-lancedb.md fix(memory): bound LanceDB prompts and reload embedding config (#125567) 2026-08-17 22:55:20 -07:00
memory-wiki.md
message-presentation.md
oc-path.md
onepassword.md
plugin-inventory.md feat(geolocation): resolve client addresses to a coarse city via a bundled plugin (#128546) 2026-08-24 04:56:03 -07:00
plugin-permission-requests.md
reference.md feat(geolocation): resolve client addresses to a coarse city via a bundled plugin (#128546) 2026-08-24 04:56:03 -07:00
sdk-agent-harness.md feat(audit): explain plugin and remote actions (#126027) 2026-08-22 14:06:54 -07:00
sdk-channel-inbound.md
sdk-channel-ingress.md
sdk-channel-message.md
sdk-channel-outbound.md fix: stop routing IDs from masquerading as delivery receipts (#126385) 2026-08-19 11:33:16 -07:00
sdk-channel-plugins.md fix gateway conversation route ownership (#126424) 2026-08-21 12:20:21 -07:00
sdk-channel-turn.md
sdk-entrypoints.md refactor(plugin-sdk): consolidate session catalog families (#124801) 2026-08-16 13:25:11 -07:00
sdk-migration.md fix(talk): isolate cancellation ownership contract (#127186) 2026-08-23 03:58:00 -07:00
sdk-overview.md fix(claude-cli): apply thinking and keep live sessions warm (#125528) 2026-08-20 06:44:49 -07:00
sdk-provider-plugins.md refactor(providers): return prepared dynamic models directly (#126574) 2026-08-21 11:40:52 -07:00
sdk-runtime.md feat(audit): explain plugin and remote actions (#126027) 2026-08-22 14:06:54 -07:00
sdk-setup.md
sdk-subpaths.md refactor: share media and process runtime helpers (#126490) 2026-08-19 17:48:49 -07:00
sdk-testing.md
teams-meetings.md docs: consolidate setup and plugin references (#126132) 2026-08-18 20:00:05 -07:00
tool-plugins.md docs(plugins): note the factory tool execute signature (#120097) 2026-08-23 16:08:08 -07:00
vault.md
voice-call.md fix(voice-call): keep Funnel off occupied HTTPS ports (#125552) 2026-08-17 21:04:17 -07:00
webhooks.md
workboard.md fix(workboard): prevent orphaned runs and overwritten cards (#125951) 2026-08-18 13:50:17 -07:00
zalouser.md
zoom-meetings.md docs: consolidate setup and plugin references (#126132) 2026-08-18 20:00:05 -07:00