37 tok/s from Qwen3-Next-80B (48 GB) on a 32 GB laptop, 24 without drafts vs 2.8 for llama.cpp; reading 62 vs 16 tok/s. Faster than llama.cpp on all 13 models compared in Q4_K_M. LLMs bigger than your RAM, pure C, CPU or GPU.
C avx2ccpu-inferenceggufinference-enginelinuxllmlocal-llmmixture-of-expertsmoenvmequantizationqwen3simdspeculative-decodingvulkan
Release 2026-10-02: the MCP services under src/services/, what they share in src/services/common/
camaurif1ea26910b07
diff --git a/ChangeLog.md b/ChangeLog.mdindex 5e5e126..d751ef6 100644--- a/ChangeLog.md+++ b/ChangeLog.md@@ -2,6 +2,10 @@> Curated, user-facing summary of completed work, newest first.+## [2026-10-02] - The services under one directory++- **The MCP services in `src/services/`**: each in `src/services/<service>/` (flights, git, github, maps, prices, weather, wiki), what they share in `src/services/common/` (the geography's tables, the GET over HTTPS, where the user is, the layouts of the answers). The programs keep their names.+## [2026-10-02] - janas-prices: prices and finance, for information- **janas-prices**, an MCP service for information only: an amount in other currencies at the ECB's reference rates (Frankfurter; the ECB's file when it does not answer), a crypto-asset's price (CoinGecko's keyless API; Coinbase when it does not answer), a share's (Alpha Vantage, with a free key of the user's: the only tool that needs one), inflation (Eurostat monthly for the EU, Iceland and Norway, the World Bank yearly for every other country), the rates of the ECB, the Fed, the Bank of England and the SNB, the wholesale price of electricity hour by hour (energy-charts, only the bidding zones it gives under CC BY: northern Italy yes, Sicily no), the cheapest fuel near a place (Italy's MIMIT, France's live flow, Spain's ministry, Austria's E-Control; another country is said not to be covered; a price not told for over eight days is left out and counted: a station's of two months before had come first in Palermo). Every answer says its source, its date, and "for information only, not advice". Layouts for every answer; `tests/test_prices_parse.c` on answers of 2 October.diff --git a/build.sh b/build.shindex b7d2d38..3f65c5b 100755--- a/build.sh+++ b/build.sh@@ -55,7 +55,8 @@ ActionsOutputObjects and the static library go to lib/<cpu>-<os>-<variant>/,programs to bin/<cpu>-<os>/, with a -<variant> suffix for every- variant but release. Each src/<tool>/main.c becomes janas-<tool>, with+ variant but release. Each src/<tool>/main.c and each+ src/services/<tool>/main.c becomes janas-<tool>, withthe other .c files of its directory; the libraries of others insrc/third_party/ go into the programs that use them; every other .cunder src/ goes into the library. The release build@@ -312,7 +313,7 @@ MBEDTLS_INC=($(tp_flags mbedtls))# A directory with a main.c is a program: its other .c files are its own.# Every other .c under src/ goes into the library.-tool_dirs=$(for m in src/*/main.c; do dirname "$m"; done)+tool_dirs=$(for m in src/*/main.c src/services/*/main.c; do dirname "$m"; done)objs=()while IFS= read -r src; dogrep -qx "$(dirname "$src")" <<<"$tool_dirs" && continue@@ -336,10 +337,8 @@ if [ "$VARIANT" = release ]; thencase "$o" in*/common_mcp_*.o) mcp_objs+=("$o") ;;*/common_hf_*.o) ;; # for the tools, with libjanas.a only- # the services': the geography's tables, the GET over HTTPS,- # where the user is and the layouts of their answers- */common_geo.o | */common_https_get.o | */common_locate.o | \- */common_template.o) ;;+ # what the services share (src/services/common/): theirs only+ */services_*.o) ;;*/llm_json.o) mcp_objs+=("$o") llm_objs+=("$o") ;;*) llm_objs+=("$o") ;;esac@@ -356,7 +355,7 @@ THIRD=()[ -f "$OBJ/libjanas_third.a" ] && THIRD=("$OBJ/libjanas_third.a")# test and benchmark programs, and the C tools-for src in tests/*.c tools/*.c src/*/main.c; do+for src in tests/*.c tools/*.c src/*/main.c src/services/*/main.c; doexe="$BIN/$(basename "${src%.c}")$SUFFIX"own=()if [ "$(basename "$src")" = main.c ]; thendiff --git a/docs/services/weather.md b/docs/services/weather.mdindex a33d2ce..2495922 100644--- a/docs/services/weather.md+++ b/docs/services/weather.md@@ -19,7 +19,7 @@ A place is a name in Italian or English ("Trapani", "Firenze", "Florence"), with2. **The internet connection's position**, from [GeoJS](https://www.geojs.io), or [ipwho.is](https://ipwho.is) when it does not answer: free and with no key, but the address seen is the connection's, so the town can be the provider's rather than yours (a town nearby, more often than not). Asked once an hour at most.3. **The city of the computer's time zone** (`Europe/Rome`: Rome), a rough guess, when neither answers.-The same applies to `janas-flights`' `flights_nearby`; the code is shared (`src/common/locate.c`), for the services to come. `janas-chat` passes its environment to the services it starts, so `JANAS_LOCATION` set for the chat reaches them.+The same applies to `janas-flights`' `flights_nearby`; the code is shared (`src/services/common/locate.c`), for the services to come. `janas-chat` passes its environment to the services it starts, so `JANAS_LOCATION` set for the chat reaches them.## Where the data comes fromdiff --git a/src/chat/layout.c b/src/chat/layout.cindex e216298..7983c80 100644--- a/src/chat/layout.c+++ b/src/chat/layout.c@@ -14,7 +14,7 @@#include <string.h>#include <sys/stat.h>-#include "common/template.h"+#include "services/common/template.h"#include "glossary.h"#define META "dev.prabanta.janas/layout"diff --git a/src/chat/layout.h b/src/chat/layout.hindex 33c5949..61c80b6 100644--- a/src/chat/layout.h+++ b/src/chat/layout.h@@ -2,7 +2,7 @@Copyright (C) 2026 Maurizio Cammalleri *//** layout.h - the layouts of the services' answers in janas-chat- * (common/template.h): an answer that brings its data and an English+ * (services/common/template.h): an answer that brings its data and an English* layout is shown to the user filled in the user's language, and the model* reads only its brief. The layout in another language is asked of the* model once, checked against the English one and kept indiff --git a/src/common/mcp_server.c b/src/common/mcp_server.cindex a19906e..98b75f9 100644--- a/src/common/mcp_server.c+++ b/src/common/mcp_server.c@@ -34,7 +34,7 @@ static void result(struct janas_mcps *s, const struct janas_json *id,janas_json_write(&b, id);janas_buf_puts(&b, ",\"result\":{");/* the server's own _meta, and the tool's when it gave one (a layout,- common/template.h): one object, a key may not come twice */+ services/common/template.h): one object, a key may not come twice */struct janas_buf all = {0};janas_buf_puts(&all, "{");janas_buf_put(&all, members, n);diff --git a/src/common/geo.c b/src/services/common/geo.csimilarity index 100%rename from src/common/geo.crename to src/services/common/geo.cdiff --git a/src/common/geo.h b/src/services/common/geo.hsimilarity index 96%rename from src/common/geo.hrename to src/services/common/geo.hindex 04b8a5b..275773e 100644--- a/src/common/geo.h+++ b/src/services/common/geo.h@@ -99,8 +99,8 @@ int geo_area_has(const struct geo_area *a, double lat, double lon);/* The position in words, appended to b. */void geo_describe(double lat, double lon, struct janas_buf *b);-/* The same as a JSON object, for a layout (common/template.h): "sea" when- over one, "region" ("Sicily, Italy": the region over, or the first of+/* The same as a JSON object, for a layout (services/common/template.h): "sea"+ when over one, "region" ("Sicily, Italy": the region over, or the first ofthe two a sea lies between), "and" (the second), "city", and "km" and"dir" from it when 3 km or more away. */void geo_describe_json(double lat, double lon, struct janas_buf *b);diff --git a/src/common/geo_data.h b/src/services/common/geo_data.hsimilarity index 100%rename from src/common/geo_data.hrename to src/services/common/geo_data.hdiff --git a/src/common/https_get.c b/src/services/common/https_get.csimilarity index 100%rename from src/common/https_get.crename to src/services/common/https_get.cdiff --git a/src/common/https_get.h b/src/services/common/https_get.hsimilarity index 100%rename from src/common/https_get.hrename to src/services/common/https_get.hdiff --git a/src/common/locate.c b/src/services/common/locate.csimilarity index 98%rename from src/common/locate.crename to src/services/common/locate.cindex fc56756..17acab9 100644--- a/src/common/locate.c+++ b/src/services/common/locate.c@@ -13,9 +13,9 @@#include <time.h>#include <unistd.h>-#include "common/geo.h"-#include "common/https_get.h"-#include "common/locate.h"+#include "services/common/geo.h"+#include "services/common/https_get.h"+#include "services/common/locate.h"#define DEG(x) ((x) * 1e-5)#define KEEP_S 3600 /* a connection seldom moves within the hour */diff --git a/src/common/locate.h b/src/services/common/locate.hsimilarity index 100%rename from src/common/locate.hrename to src/services/common/locate.hdiff --git a/src/common/template.c b/src/services/common/template.csimilarity index 99%rename from src/common/template.crename to src/services/common/template.cindex f83ddbc..c65b226 100644--- a/src/common/template.c+++ b/src/services/common/template.c@@ -7,7 +7,7 @@#include <stdlib.h>#include <string.h>-#include "common/template.h"+#include "services/common/template.h"#define DEPTH 32diff --git a/src/common/template.h b/src/services/common/template.hsimilarity index 100%rename from src/common/template.hrename to src/services/common/template.hdiff --git a/src/flights/adsb.c b/src/services/flights/adsb.csimilarity index 100%rename from src/flights/adsb.crename to src/services/flights/adsb.cdiff --git a/src/flights/flights.h b/src/services/flights/flights.hsimilarity index 93%rename from src/flights/flights.hrename to src/services/flights/flights.hindex 86aeb07..f64a0d2 100644--- a/src/flights/flights.h+++ b/src/services/flights/flights.h@@ -2,8 +2,8 @@Copyright (C) 2026 Maurizio Cammalleri *//** flights.h - janas-flights, flights as an MCP service: what its parts- * share. common/https_get.c fetches, adsb.c reads the community ADS-B networks- * (adsb.lol, adsb.fi as the fallback), route.c asks adsbdb for a+ * share. services/common/https_get.c fetches, adsb.c reads the community ADS-B+ * networks (adsb.lol, adsb.fi as the fallback), route.c asks adsbdb for a* callsign's route and an airline's codes, schedule.c asks AviationStack* for the times (with a key of the user's), tools.c offers the tools.*/@@ -13,7 +13,7 @@#include <stddef.h>#include <time.h>-#include "common/https_get.h"+#include "services/common/https_get.h"#include "llm/json.h"/* ---- adsb.c ---- */@@ -100,7 +100,7 @@ void fl_sched_free(void);/* ---- layouts.c ---- */-/* flights_over's layout and brief (common/template.h). */+/* flights_over's layout and brief (services/common/template.h). */extern const char FL_OVER_LAYOUT[], FL_OVER_BRIEF[];/* flights_nearby's */extern const char FL_NEAR_LAYOUT[], FL_NEAR_BRIEF[];diff --git a/src/flights/layouts.c b/src/services/flights/layouts.csimilarity index 98%rename from src/flights/layouts.crename to src/services/flights/layouts.cindex 538c6b6..ccd878d 100644--- a/src/flights/layouts.c+++ b/src/services/flights/layouts.c@@ -2,7 +2,7 @@Copyright (C) 2026 Maurizio Cammalleri *//** layouts.c - the layouts of janas-flights' answers (see flights.h and- * common/template.h): the text the user reads, filled with the data in+ * services/common/template.h): the text the user reads, filled with the data in* English here and in the user's language by a client that translates the* layout once (janas-chat), and the brief, all the model reads of it.*/diff --git a/src/flights/main.c b/src/services/flights/main.csimilarity index 100%rename from src/flights/main.crename to src/services/flights/main.cdiff --git a/src/flights/route.c b/src/services/flights/route.csimilarity index 100%rename from src/flights/route.crename to src/services/flights/route.cdiff --git a/src/flights/schedule.c b/src/services/flights/schedule.csimilarity index 100%rename from src/flights/schedule.crename to src/services/flights/schedule.cdiff --git a/src/flights/tools.c b/src/services/flights/tools.csimilarity index 99%rename from src/flights/tools.crename to src/services/flights/tools.cindex d4dd116..a31a214 100644--- a/src/flights/tools.c+++ b/src/services/flights/tools.c@@ -21,11 +21,11 @@#include <time.h>#include <unistd.h>-#include "common/locate.h"+#include "services/common/locate.h"#include "common/mcp_server.h"#include "flights.h"-#include "common/geo.h"-#include "common/template.h"+#include "services/common/geo.h"+#include "services/common/template.h"#define DEG(x) ((x) * 1e-5)#define KM_PER_NM 1.852diff --git a/src/git/data.c b/src/services/git/data.csimilarity index 97%rename from src/git/data.crename to src/services/git/data.cindex 346fae7..4f68dac 100644--- a/src/git/data.c+++ b/src/services/git/data.c@@ -2,8 +2,8 @@Copyright (C) 2026 Maurizio Cammalleri *//** data.c - what janas-git read, as the data of its layouts (see git.h,- * layouts.c and common/template.h). Every field is written, even empty: a- * layout looks a name up in the item, then in what holds it.+ * layouts.c and services/common/template.h). Every field is written, even+ * empty: a layout looks a name up in the item, then in what holds it.*/#include <stdio.h>#include <string.h>diff --git a/src/git/git.h b/src/services/git/git.hsimilarity index 100%rename from src/git/git.hrename to src/services/git/git.hdiff --git a/src/git/layouts.c b/src/services/git/layouts.csimilarity index 98%rename from src/git/layouts.crename to src/services/git/layouts.cindex 2dec7c6..c2b2165 100644--- a/src/git/layouts.c+++ b/src/services/git/layouts.c@@ -2,7 +2,7 @@Copyright (C) 2026 Maurizio Cammalleri *//** layouts.c - the layouts of janas-git's answers (see git.h and- * common/template.h): the text the user reads, filled with the data in+ * services/common/template.h): the text the user reads, filled with the data in* English here and in the user's language by a client that translates the* layout once (janas-chat), and the brief, all the model reads of it.* Paths, messages and diffs stay as they are; git's own output, after adiff --git a/src/git/main.c b/src/services/git/main.csimilarity index 100%rename from src/git/main.crename to src/services/git/main.cdiff --git a/src/git/read.c b/src/services/git/read.csimilarity index 100%rename from src/git/read.crename to src/services/git/read.cdiff --git a/src/git/repo.c b/src/services/git/repo.csimilarity index 100%rename from src/git/repo.crename to src/services/git/repo.cdiff --git a/src/git/run.c b/src/services/git/run.csimilarity index 100%rename from src/git/run.crename to src/services/git/run.cdiff --git a/src/git/tools.c b/src/services/git/tools.csimilarity index 99%rename from src/git/tools.crename to src/services/git/tools.cindex cbf7a91..4efada4 100644--- a/src/git/tools.c+++ b/src/services/git/tools.c@@ -12,7 +12,7 @@#include <string.h>#include "common/mcp_server.h"-#include "common/template.h"+#include "services/common/template.h"#include "git.h"#define LOCAL_MS 15000diff --git a/src/git/write.c b/src/services/git/write.csimilarity index 100%rename from src/git/write.crename to src/services/git/write.cdiff --git a/src/github/data.c b/src/services/github/data.csimilarity index 97%rename from src/github/data.crename to src/services/github/data.cindex b4bda77..c490e37 100644--- a/src/github/data.c+++ b/src/services/github/data.c@@ -2,8 +2,8 @@Copyright (C) 2026 Maurizio Cammalleri *//** data.c - what janas-github read, as the data of its layouts (see- * github.h, layouts.c and common/template.h). Every field is written, even- * empty: a layout looks a name up in the item, then in what holds it, and+ * github.h, layouts.c and services/common/template.h). Every field is written,+ * even empty: a layout looks a name up in the item, then in what holds it, and* an issue without labels would show another's.*/#include <stdio.h>diff --git a/src/github/fetch.c b/src/services/github/fetch.csimilarity index 99%rename from src/github/fetch.crename to src/services/github/fetch.cindex 858cceb..face1ff 100644--- a/src/github/fetch.c+++ b/src/services/github/fetch.c@@ -14,7 +14,7 @@#include <string.h>#include <time.h>-#include "common/https_get.h"+#include "services/common/https_get.h"#include "github.h"#ifndef JANAS_VERSIONdiff --git a/src/github/github.h b/src/services/github/github.hsimilarity index 100%rename from src/github/github.hrename to src/services/github/github.hdiff --git a/src/github/layouts.c b/src/services/github/layouts.csimilarity index 98%rename from src/github/layouts.crename to src/services/github/layouts.cindex 15b29fe..ffa9297 100644--- a/src/github/layouts.c+++ b/src/services/github/layouts.c@@ -2,7 +2,7 @@Copyright (C) 2026 Maurizio Cammalleri *//** layouts.c - the layouts of janas-github's answers (see github.h and- * common/template.h): the text the user reads, filled with the data in+ * services/common/template.h): the text the user reads, filled with the data in* English here and in the user's language by a client that translates the* layout once (janas-chat), and the brief, all the model reads of it.* Titles, messages and notes stay as their authors wrote them.diff --git a/src/github/main.c b/src/services/github/main.csimilarity index 100%rename from src/github/main.crename to src/services/github/main.cdiff --git a/src/github/read.c b/src/services/github/read.csimilarity index 100%rename from src/github/read.crename to src/services/github/read.cdiff --git a/src/github/repo.c b/src/services/github/repo.csimilarity index 100%rename from src/github/repo.crename to src/services/github/repo.cdiff --git a/src/github/seen.c b/src/services/github/seen.csimilarity index 100%rename from src/github/seen.crename to src/services/github/seen.cdiff --git a/src/github/tools.c b/src/services/github/tools.csimilarity index 99%rename from src/github/tools.crename to src/services/github/tools.cindex af0bf84..bda14d3 100644--- a/src/github/tools.c+++ b/src/services/github/tools.c@@ -10,7 +10,7 @@#include <time.h>#include "common/mcp_server.h"-#include "common/template.h"+#include "services/common/template.h"#include "github.h"#define DAY 86400diff --git a/src/maps/data.c b/src/services/maps/data.csimilarity index 96%rename from src/maps/data.crename to src/services/maps/data.cindex e08fdc2..f127d39 100644--- a/src/maps/data.c+++ b/src/services/maps/data.c@@ -2,8 +2,8 @@Copyright (C) 2026 Maurizio Cammalleri *//** data.c - what janas-maps read, as the data of its layouts (see maps.h,- * layouts.c and common/template.h): JSON objects whose fields the layouts- * name. Distances and times are numbers, the words around them the+ * layouts.c and services/common/template.h): JSON objects whose fields the+ * layouts name. Distances and times are numbers, the words around them the* layout's, so that a client shows them in the user's language.*/#include <math.h>@@ -12,12 +12,12 @@#include <string.h>#include <time.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "maps.h"/* A field is written even when empty: a layout looks a name up in the- item, then in what holds it (common/template.h), and a step without its- own distance would show the whole route's. */+ item, then in what holds it (services/common/template.h), and a step without+ its own distance would show the whole route's. */void mp_jstr(struct janas_buf *b, const char *key, const char *v){if (!v)diff --git a/src/maps/fetch.c b/src/services/maps/fetch.csimilarity index 99%rename from src/maps/fetch.crename to src/services/maps/fetch.cindex 44a2831..1f2bf97 100644--- a/src/maps/fetch.c+++ b/src/services/maps/fetch.c@@ -13,7 +13,7 @@#include <string.h>#include <time.h>-#include "common/https_get.h"+#include "services/common/https_get.h"#include "maps.h"#ifndef JANAS_VERSIONdiff --git a/src/maps/layouts.c b/src/services/maps/layouts.csimilarity index 99%rename from src/maps/layouts.crename to src/services/maps/layouts.cindex f7c9e84..dc1367b 100644--- a/src/maps/layouts.c+++ b/src/services/maps/layouts.c@@ -2,7 +2,7 @@Copyright (C) 2026 Maurizio Cammalleri *//** layouts.c - the layouts of janas-maps' answers (see maps.h and- * common/template.h): the text the user reads, filled with the data in+ * services/common/template.h): the text the user reads, filled with the data in* English here and in the user's language by a client that translates the* layout once (janas-chat), and the brief, all the model reads of it. A* route's steps come from Valhalla already in the computer's language.diff --git a/src/maps/main.c b/src/services/maps/main.csimilarity index 100%rename from src/maps/main.crename to src/services/maps/main.cdiff --git a/src/maps/maps.h b/src/services/maps/maps.hsimilarity index 100%rename from src/maps/maps.hrename to src/services/maps/maps.hdiff --git a/src/maps/nearby.c b/src/services/maps/nearby.csimilarity index 100%rename from src/maps/nearby.crename to src/services/maps/nearby.cdiff --git a/src/maps/place.c b/src/services/maps/place.csimilarity index 99%rename from src/maps/place.crename to src/services/maps/place.cindex 116e38f..2d072b9 100644--- a/src/maps/place.c+++ b/src/services/maps/place.c@@ -11,7 +11,7 @@#include <stdlib.h>#include <string.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "maps.h"#define DEG(x) ((x) * 1e-5)diff --git a/src/maps/read.c b/src/services/maps/read.csimilarity index 99%rename from src/maps/read.crename to src/services/maps/read.cindex 6639f93..89e9af2 100644--- a/src/maps/read.c+++ b/src/services/maps/read.c@@ -13,7 +13,7 @@#include <string.h>#include <time.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "maps.h"static void copy(char *to, size_t cap, const char *s)diff --git a/src/maps/route.c b/src/services/maps/route.csimilarity index 100%rename from src/maps/route.crename to src/services/maps/route.cdiff --git a/src/maps/tools.c b/src/services/maps/tools.csimilarity index 99%rename from src/maps/tools.crename to src/services/maps/tools.cindex a00941d..ac81b2f 100644--- a/src/maps/tools.c+++ b/src/services/maps/tools.c@@ -10,9 +10,9 @@#include <stdio.h>#include <string.h>-#include "common/locate.h"+#include "services/common/locate.h"#include "common/mcp_server.h"-#include "common/template.h"+#include "services/common/template.h"#include "maps.h"/* The model reads all of it before it can use a tool: every word costs. */diff --git a/src/maps/transit.c b/src/services/maps/transit.csimilarity index 99%rename from src/maps/transit.crename to src/services/maps/transit.cindex 3a6984f..13574f2 100644--- a/src/maps/transit.c+++ b/src/services/maps/transit.c@@ -13,7 +13,7 @@#include <string.h>#include <time.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "maps.h"#define TRANSIT_KEEP_S 120diff --git a/src/prices/data.c b/src/services/prices/data.csimilarity index 98%rename from src/prices/data.crename to src/services/prices/data.cindex 1bb1737..69f11e2 100644--- a/src/prices/data.c+++ b/src/services/prices/data.c@@ -2,7 +2,7 @@Copyright (C) 2026 Maurizio Cammalleri *//** data.c - what janas-prices read, as the data of its layouts (see- * prices.h, layouts.c and common/template.h). Every field is written,+ * prices.h, layouts.c and services/common/template.h). Every field is written,* even empty: a layout looks a name up in the item, then in what holds it.* Numbers keep the decimals a price of their size needs.*/@@ -11,7 +11,7 @@#include <string.h>#include <time.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "prices.h"void pr_jstr(struct janas_buf *b, const char *key, const char *v)diff --git a/src/prices/fetch.c b/src/services/prices/fetch.csimilarity index 99%rename from src/prices/fetch.crename to src/services/prices/fetch.cindex 5c6a106..581bd8f 100644--- a/src/prices/fetch.c+++ b/src/services/prices/fetch.c@@ -14,7 +14,7 @@#include <string.h>#include <time.h>-#include "common/https_get.h"+#include "services/common/https_get.h"#include "prices.h"#ifndef JANAS_VERSIONdiff --git a/src/prices/fuel.c b/src/services/prices/fuel.csimilarity index 100%rename from src/prices/fuel.crename to src/services/prices/fuel.cdiff --git a/src/prices/layouts.c b/src/services/prices/layouts.csimilarity index 99%rename from src/prices/layouts.crename to src/services/prices/layouts.cindex a1873ce..01a3297 100644--- a/src/prices/layouts.c+++ b/src/services/prices/layouts.c@@ -2,7 +2,7 @@Copyright (C) 2026 Maurizio Cammalleri *//** layouts.c - the layouts of janas-prices' answers (see prices.h and- * common/template.h): the text the user reads, filled with the data in+ * services/common/template.h): the text the user reads, filled with the data in* English here and in the user's language by a client that translates the* layout once (janas-chat), and the brief, all the model reads of it.* Every answer says where its figures come from, how old they are, anddiff --git a/src/prices/macro.c b/src/services/prices/macro.csimilarity index 99%rename from src/prices/macro.crename to src/services/prices/macro.cindex c1bee2f..ba871ad 100644--- a/src/prices/macro.c+++ b/src/services/prices/macro.c@@ -15,8 +15,8 @@#include <string.h>#include <time.h>-#include "common/geo.h"-#include "common/locate.h"+#include "services/common/geo.h"+#include "services/common/locate.h"#include "prices.h"#define DAY_KEEP_S 3600diff --git a/src/prices/main.c b/src/services/prices/main.csimilarity index 100%rename from src/prices/main.crename to src/services/prices/main.cdiff --git a/src/prices/money.c b/src/services/prices/money.csimilarity index 100%rename from src/prices/money.crename to src/services/prices/money.cdiff --git a/src/prices/place.c b/src/services/prices/place.csimilarity index 98%rename from src/prices/place.crename to src/services/prices/place.cindex 51442c7..3e82408 100644--- a/src/prices/place.c+++ b/src/services/prices/place.c@@ -13,8 +13,8 @@#include <stdlib.h>#include <string.h>-#include "common/geo.h"-#include "common/locate.h"+#include "services/common/geo.h"+#include "services/common/locate.h"#include "prices.h"#define GEO_KEEP_S (7 * 86400)diff --git a/src/prices/prices.h b/src/services/prices/prices.hsimilarity index 100%rename from src/prices/prices.hrename to src/services/prices/prices.hdiff --git a/src/prices/read.c b/src/services/prices/read.csimilarity index 100%rename from src/prices/read.crename to src/services/prices/read.cdiff --git a/src/prices/read_fuel.c b/src/services/prices/read_fuel.csimilarity index 99%rename from src/prices/read_fuel.crename to src/services/prices/read_fuel.cindex f4b48d0..60c8de0 100644--- a/src/prices/read_fuel.c+++ b/src/services/prices/read_fuel.c@@ -17,7 +17,7 @@#include <strings.h>#include <time.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "prices.h"#define ALL_MAX 4096 /* stations within a radius, at most */diff --git a/src/prices/tools.c b/src/services/prices/tools.csimilarity index 99%rename from src/prices/tools.crename to src/services/prices/tools.cindex e67cc74..e91cb1c 100644--- a/src/prices/tools.c+++ b/src/services/prices/tools.c@@ -11,7 +11,7 @@#include <string.h>#include "common/mcp_server.h"-#include "common/template.h"+#include "services/common/template.h"#include "prices.h"#define READS \diff --git a/src/weather/alerts.c b/src/services/weather/alerts.csimilarity index 100%rename from src/weather/alerts.crename to src/services/weather/alerts.cdiff --git a/src/weather/fetch.c b/src/services/weather/fetch.csimilarity index 98%rename from src/weather/fetch.crename to src/services/weather/fetch.cindex c578c21..d5303bf 100644--- a/src/weather/fetch.c+++ b/src/services/weather/fetch.c@@ -12,7 +12,7 @@#include <string.h>#include <time.h>-#include "common/https_get.h"+#include "services/common/https_get.h"#include "weather.h"#ifndef JANAS_VERSIONdiff --git a/src/weather/layouts.c b/src/services/weather/layouts.csimilarity index 99%rename from src/weather/layouts.crename to src/services/weather/layouts.cindex 4dc414c..d966e98 100644--- a/src/weather/layouts.c+++ b/src/services/weather/layouts.c@@ -2,8 +2,8 @@Copyright (C) 2026 Maurizio Cammalleri *//** layouts.c - the layouts of janas-weather's answers (see weather.h and- * common/template.h): the report the user reads, filled in English here- * and in the user's language by a client that translates the layout once+ * services/common/template.h): the report the user reads, filled in English+ * here and in the user's language by a client that translates the layout once* (janas-chat), and the brief, the figures the model reads to answer.*/#include "weather.h"diff --git a/src/weather/main.c b/src/services/weather/main.csimilarity index 100%rename from src/weather/main.crename to src/services/weather/main.cdiff --git a/src/weather/metar.c b/src/services/weather/metar.csimilarity index 99%rename from src/weather/metar.crename to src/services/weather/metar.cindex 5835013..4be8985 100644--- a/src/weather/metar.c+++ b/src/services/weather/metar.c@@ -13,7 +13,7 @@#include <stdlib.h>#include <string.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "weather.h"#define METAR_KEEP_S 600 /* a METAR comes every half hour or hour */diff --git a/src/weather/metno.c b/src/services/weather/metno.csimilarity index 100%rename from src/weather/metno.crename to src/services/weather/metno.cdiff --git a/src/weather/openmeteo.c b/src/services/weather/openmeteo.csimilarity index 100%rename from src/weather/openmeteo.crename to src/services/weather/openmeteo.cdiff --git a/src/weather/place.c b/src/services/weather/place.csimilarity index 99%rename from src/weather/place.crename to src/services/weather/place.cindex 127c4e2..41df270 100644--- a/src/weather/place.c+++ b/src/services/weather/place.c@@ -16,7 +16,7 @@#include <string.h>#include <strings.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "weather.h"#define DEG(x) ((x) * 1e-5)diff --git a/src/weather/report.c b/src/services/weather/report.csimilarity index 98%rename from src/weather/report.crename to src/services/weather/report.cindex fe84772..6df028c 100644--- a/src/weather/report.c+++ b/src/services/weather/report.c@@ -7,7 +7,7 @@* a cell of its grid and a station's is a measure at a known place and* minute: both are given, said for what they are, and when they disagree* it is said too, so that the model telling them need not guess which.- * The answers are data with a layout (layouts.c, common/template.h).+ * The answers are data with a layout (layouts.c, services/common/template.h).*/#define _GNU_SOURCE /* timegm */#include <math.h>@@ -16,8 +16,8 @@#include <string.h>#include <time.h>-#include "common/geo.h"-#include "common/template.h"+#include "services/common/geo.h"+#include "services/common/template.h"#include "weather.h"#define STATION_KM 40 /* the nearest station, within this */diff --git a/src/weather/sea.c b/src/services/weather/sea.csimilarity index 99%rename from src/weather/sea.crename to src/services/weather/sea.cindex f0d2bd9..ccc17ba 100644--- a/src/weather/sea.c+++ b/src/services/weather/sea.c@@ -13,7 +13,7 @@#include <stdlib.h>#include <string.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "weather.h"#define DEG(x) ((x) * 1e-5)diff --git a/src/weather/tools.c b/src/services/weather/tools.csimilarity index 99%rename from src/weather/tools.crename to src/services/weather/tools.cindex 302f6b0..5b6b45b 100644--- a/src/weather/tools.c+++ b/src/services/weather/tools.c@@ -13,7 +13,7 @@#include <string.h>#include <time.h>-#include "common/locate.h"+#include "services/common/locate.h"#include "common/mcp_server.h"#include "weather.h"diff --git a/src/weather/warn.c b/src/services/weather/warn.csimilarity index 100%rename from src/weather/warn.crename to src/services/weather/warn.cdiff --git a/src/weather/weather.h b/src/services/weather/weather.hsimilarity index 99%rename from src/weather/weather.hrename to src/services/weather/weather.hindex 99918c9..30af341 100644--- a/src/weather/weather.h+++ b/src/services/weather/weather.h@@ -257,7 +257,7 @@ int wx_tool_forecast(const struct janas_json *args, struct janas_buf *b);int wx_tool_sea(const struct janas_json *args, struct janas_buf *b);int wx_tool_alerts(const struct janas_json *args, struct janas_buf *b);-/* ---- report.c: data for a layout (common/template.h) ---- */+/* ---- report.c: data for a layout (services/common/template.h) ---- *//* , "key": value, as JSON: a text; a number with that many decimals,nothing when NAN; the wind's force and where it blows from; a date's@@ -275,7 +275,7 @@ int wx_answer(struct janas_buf *b, const char *name, struct janas_buf *d,/* ---- layouts.c ---- *//* The layouts and briefs of weather_now and weather_forecast- (common/template.h). */+ (services/common/template.h). */extern const char WX_NOW_LAYOUT[], WX_NOW_BRIEF[];extern const char WX_FORECAST_LAYOUT[], WX_FORECAST_BRIEF[];extern const char WX_SEA_LAYOUT[], WX_SEA_BRIEF[];diff --git a/src/weather/words.c b/src/services/weather/words.csimilarity index 99%rename from src/weather/words.crename to src/services/weather/words.cindex fcce53a..37ed4c0 100644--- a/src/weather/words.c+++ b/src/services/weather/words.c@@ -10,7 +10,7 @@#include <stdio.h>#include <string.h>-#include "common/geo.h"+#include "services/common/geo.h"#include "weather.h"const char *wx_code_text(int code)diff --git a/src/wiki/fetch.c b/src/services/wiki/fetch.csimilarity index 98%rename from src/wiki/fetch.crename to src/services/wiki/fetch.cindex 246d798..eaca2d4 100644--- a/src/wiki/fetch.c+++ b/src/services/wiki/fetch.c@@ -10,7 +10,7 @@#include <string.h>#include <time.h>-#include "common/https_get.h"+#include "services/common/https_get.h"#include "wiki.h"#ifndef JANAS_VERSIONdiff --git a/src/wiki/main.c b/src/services/wiki/main.csimilarity index 100%rename from src/wiki/main.crename to src/services/wiki/main.cdiff --git a/src/wiki/read.c b/src/services/wiki/read.csimilarity index 100%rename from src/wiki/read.crename to src/services/wiki/read.cdiff --git a/src/wiki/tools.c b/src/services/wiki/tools.csimilarity index 99%rename from src/wiki/tools.crename to src/services/wiki/tools.cindex 3609801..9c6bd57 100644--- a/src/wiki/tools.c+++ b/src/services/wiki/tools.c@@ -11,8 +11,8 @@#include <stdlib.h>#include <string.h>-#include "common/geo.h"-#include "common/locate.h"+#include "services/common/geo.h"+#include "services/common/locate.h"#include "common/mcp_server.h"#include "wiki.h"diff --git a/src/wiki/wiki.h b/src/services/wiki/wiki.hsimilarity index 100%rename from src/wiki/wiki.hrename to src/services/wiki/wiki.hdiff --git a/tests/test_flights_parse.c b/tests/test_flights_parse.cindex fc4f25f..dabda3a 100644--- a/tests/test_flights_parse.c+++ b/tests/test_flights_parse.c@@ -12,7 +12,7 @@#include <string.h>#include <unistd.h>-#include "flights/schedule.c"+#include "services/flights/schedule.c"int janas_https_get(const char *url, const char *const *headers,size_t n_headers, struct janas_buf *out, char *err,diff --git a/tests/test_geo.c b/tests/test_geo.cindex f04ce8c..c73db5a 100644--- a/tests/test_geo.c+++ b/tests/test_geo.c@@ -10,7 +10,7 @@#include <string.h>#include <unistd.h>-#include "common/geo.c"+#include "services/common/geo.c"static int failures;diff --git a/tests/test_git_parse.c b/tests/test_git_parse.cindex f4c378a..ae30e93 100644--- a/tests/test_git_parse.c+++ b/tests/test_git_parse.c@@ -14,12 +14,12 @@#include <stdlib.h>#include <string.h>-#include "common/template.h"-#include "git/data.c"-#include "git/layouts.c"-#include "git/read.c"-#include "git/repo.c"-#include "git/run.c"+#include "services/common/template.h"+#include "services/git/data.c"+#include "services/git/layouts.c"+#include "services/git/read.c"+#include "services/git/repo.c"+#include "services/git/run.c"static int failures;diff --git a/tests/test_github_parse.c b/tests/test_github_parse.cindex 7504a57..286bc07 100644--- a/tests/test_github_parse.c+++ b/tests/test_github_parse.c@@ -15,11 +15,11 @@#include <string.h>#include <unistd.h>-#include "common/template.h"-#include "github/data.c"-#include "github/layouts.c"-#include "github/read.c"-#include "github/seen.c"+#include "services/common/template.h"+#include "services/github/data.c"+#include "services/github/layouts.c"+#include "services/github/read.c"+#include "services/github/seen.c"static int failures;diff --git a/tests/test_locate.c b/tests/test_locate.cindex d8d1a3f..9fc32f5 100644--- a/tests/test_locate.c+++ b/tests/test_locate.c@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-3.0-or-laterCopyright (C) 2026 Maurizio Cammalleri *//*- * test_locate.c - where the user is (src/common/locate.c), without the+ * test_locate.c - where the user is (src/services/common/locate.c), without the* network: the answers of GeoJS and ipwho.is as they come (numbers as* strings in the first, a nested zone in the second), the broken ones, and* JANAS_LOCATION as a city, a point, "off" and nonsense.@@ -11,7 +11,7 @@#include <stdlib.h>#include <string.h>-#include "common/locate.h"+#include "services/common/locate.h"static int failures;diff --git a/tests/test_maps_parse.c b/tests/test_maps_parse.cindex 1f28751..79583df 100644--- a/tests/test_maps_parse.c+++ b/tests/test_maps_parse.c@@ -13,11 +13,11 @@#include <stdio.h>#include <string.h>-#include "common/template.h"-#include "maps/data.c"-#include "maps/layouts.c"-#include "maps/nearby.c"-#include "maps/read.c"+#include "services/common/template.h"+#include "services/maps/data.c"+#include "services/maps/layouts.c"+#include "services/maps/nearby.c"+#include "services/maps/read.c"static int failures;diff --git a/tests/test_prices_parse.c b/tests/test_prices_parse.cindex eed248f..dfd95fc 100644--- a/tests/test_prices_parse.c+++ b/tests/test_prices_parse.c@@ -16,11 +16,11 @@#include <stdlib.h>#include <string.h>-#include "common/template.h"-#include "prices/data.c"-#include "prices/layouts.c"-#include "prices/read.c"-#include "prices/read_fuel.c"+#include "services/common/template.h"+#include "services/prices/data.c"+#include "services/prices/layouts.c"+#include "services/prices/read.c"+#include "services/prices/read_fuel.c"static int failures;diff --git a/tests/test_template.c b/tests/test_template.cindex 101d481..36eeb31 100644--- a/tests/test_template.c+++ b/tests/test_template.c@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-3.0-or-laterCopyright (C) 2026 Maurizio Cammalleri *//*- * test_template.c - layouts filled with data (src/common/template.c):+ * test_template.c - layouts filled with data (src/services/common/template.c):* fields, words, lists and their numbers, parts shown or not, lines of a* part's tag left out, the decimal point of the words, what is wrong in a* layout, and a translation's shape against its original.@@ -9,7 +9,7 @@#include <stdio.h>#include <string.h>-#include "common/template.h"+#include "services/common/template.h"static int failures;diff --git a/tests/test_weather_parse.c b/tests/test_weather_parse.cindex 87cd6c7..81a430e 100644--- a/tests/test_weather_parse.c+++ b/tests/test_weather_parse.c@@ -17,12 +17,12 @@#include <time.h>#include <unistd.h>-#include "weather/alerts.c"-#include "weather/fetch.c"-#include "weather/metar.c"-#include "weather/metno.c"-#include "weather/openmeteo.c"-#include "weather/words.c"+#include "services/weather/alerts.c"+#include "services/weather/fetch.c"+#include "services/weather/metar.c"+#include "services/weather/metno.c"+#include "services/weather/openmeteo.c"+#include "services/weather/words.c"static int failures;diff --git a/tests/test_wiki_parse.c b/tests/test_wiki_parse.cindex 26bdbd7..6490a77 100644--- a/tests/test_wiki_parse.c+++ b/tests/test_wiki_parse.c@@ -12,7 +12,7 @@#include <stdio.h>#include <string.h>-#include "wiki/read.c"+#include "services/wiki/read.c"static int failures;diff --git a/tools/gen_geo.c b/tools/gen_geo.cindex 6e014d2..d6a1b87 100644--- a/tools/gen_geo.c+++ b/tools/gen_geo.c@@ -1,10 +1,10 @@/* SPDX-License-Identifier: GPL-3.0-or-laterCopyright (C) 2026 Maurizio Cammalleri *//*- * gen_geo.c - generates src/common/geo_data.h, the tables of Janas's- * services' geography (src/common/geo.h): countries, first-level regions, time- * zones, cities of 30,000 people or more and every capital, the airports- * with an IATA code and scheduled flights, and the seas as polygons.+ * gen_geo.c - generates src/services/common/geo_data.h, the tables of Janas's+ * services' geography (src/services/common/geo.h): countries, first-level+ * regions, time zones, cities of 30,000 people or more and every capital, the+ * airports with an IATA code and scheduled flights, and the seas as polygons.** It reads, from one directory:* airports.csv OurAirports, public domain@@ -19,7 +19,7 @@* An airport's time zone is that of the nearest city. The seas' outlines* are simplified to about a kilometre (Douglas-Peucker, 0.01 degree).*- * Usage: gen_geo <data-directory> > src/common/geo_data.h+ * Usage: gen_geo <data-directory> > src/services/common/geo_data.h*/#include <math.h>#include <stdint.h>@@ -482,8 +482,9 @@ static int read_seas(void)int main(int argc, char **argv){if (argc != 2) {- fprintf(stderr,- "usage: gen_geo <data-directory> > src/common/geo_data.h\n");+ fprintf(+ stderr,+ "usage: gen_geo <data-directory> > src/services/common/geo_data.h\n");return 2;}snprintf(dir, sizeof dir, "%s", argv[1]);