Commit Graph
4 Commits
Author SHA1 Message Date
mozdemir 0a9f24d323 GAIA-431: add enroute tools and a precipitation geometry tool that returns GeoJSON
Adds enroute_register_route and enroute_get_route_weather for the BE-Enroute endpoints /v1/enroute/register and /v1/enroute/weather, with zod validation that matches the REST request (geometry needs an encodedPolyline or coordinates, routeId must be a UUID, timestamps are epoch milliseconds).

Adds get_precipitation_geometry for POST /v1/precipitations/geometry. That endpoint answers with a protobuf PrecipitationFeatureCollection, which an AI client cannot read, so the response is decoded with protobufjs and returned as a GeoJSON FeatureCollection of MultiPolygons with intensity, radarTimestamp and forecast properties. The needed subset of geojson.proto is embedded as text in src/geojson-proto.ts because only dist is shipped in the release package; it must be kept in sync with BE-GeoCommons.

client.ts gets apiPostBinary, which reads the body as bytes and logs only its length so binary responses are neither corrupted nor dumped into the HTTP log. README and package files are updated accordingly (60 tools in 10 categories).
2026-10-05 17:47:47 +03:00
mozdemir 8b151ae4c4 Adds comprehensive HTTP logging and token persistence
Introduces robust HTTP request and tool invocation logging with sensitive data sanitization and configurable file rotation. This improves debuggability and operational oversight.

Implements token state persistence to disk, allowing the server to maintain authenticated sessions across restarts.

Adds `_with_webhook` variants for alarm registration tools, enabling explicit webhook configuration. Corrects spelling inconsistencies in geographical alarm tools (e.g., 'neighbourhood' to 'neighborhood').

Includes a new build and packaging script.
2026-03-25 15:22:59 +03:00
mozdemir 02e8c2a89b Improves API client response handling and idempotency
Extends `X-Idempotency-Key` header usage to `DELETE` and `PUT` requests, ensuring idempotent behavior for a wider range of modifying API operations. Updates the documentation and client implementation for `DELETE` requests.

Refactors `handleResponse` to robustly parse API responses. It now reads the response body once as text, enabling graceful handling of non-JSON error bodies and consistent processing of successful or empty responses.
2026-03-24 19:08:22 +03:00
mozdemir 28c24d8cb1 first commit 2026-03-24 16:24:16 +03:00