Files
flynn/docs/plans/2026-02-16-location-access-checklist.md
2026-02-16 12:30:55 -08:00

54 lines
1.8 KiB
Markdown

# Location Access Checklist
**Date:** 2026-02-16
**Scope:** Close OpenClaw "Location access" gap using Flynn's node capability foundation.
## Goal
Provide a safe, node-scoped location API so companion clients can publish last-known location and operators can inspect it.
## Implemented
- Added node location protocol parsing:
- `parseNodeLocationSetParams()`
- `parseNodeLocationGetParams()`
- Added node RPC methods:
- `node.location.set`
- `node.location.get`
- Added operator visibility method:
- `system.location`
- Extended node state model with stored location payload.
- Added explicit location feature gate in config:
- `server.nodes.location.enabled` (default `false`)
- Wired daemon config to gateway runtime and node handlers.
- Added runtime patch support for:
- `config.patch` key `server.nodes.location.enabled`
- Updated docs:
- `README.md` gateway node section
- `docs/api/PROTOCOL.md` node/system method docs
## Tests
- `src/gateway/protocol.test.ts`
- Added validation tests for `node.location.set/get` params parsing.
- `src/gateway/handlers/node.test.ts`
- Added location set/get lifecycle tests.
- Added disabled-gate rejection test.
- `src/gateway/handlers/handlers.test.ts`
- Added `system.location` handler tests.
- Added config patch test for `server.nodes.location.enabled`.
- `src/gateway/server.test.ts`
- Added integration test for node registration + location set/get flow.
- `src/config/schema.test.ts`
- Added default/custom tests for `server.nodes.location.enabled`.
- `src/gateway/auth.test.ts`
- Added role-scope authorization test for `node.location.set`.
## Validation Run
```bash
pnpm test:run src/gateway/protocol.test.ts src/gateway/auth.test.ts src/gateway/handlers/node.test.ts src/gateway/handlers/handlers.test.ts src/gateway/server.test.ts src/config/schema.test.ts
pnpm typecheck
pnpm build
```