feat(logistics): add Smart Auto-Courier cascading router, OSM Nominatim + 64-District spatial gazetteer fallback, NDR phone tag, and JSON guard

This commit is contained in:
Aura Autonomous Engine
2026-10-11 17:48:11 +00:00
parent caa1a0c81e
commit 55795a3e02
7 changed files with 297 additions and 51 deletions
+11
View File
@@ -50,6 +50,17 @@ function keysFromRequest(req) {
}
const app = express();
app.use(express.json({ limit: "1mb" }));
// Robust Malformed JSON Syntax Error Guard
app.use((err, req, res, next) => {
if (err && (err.type === "entity.parse.failed" || err.status === 400)) {
return res.status(400).json({
error: "Malformed JSON payload in request body",
details: err.message,
timestamp: new Date().toISOString()
});
}
next(err);
});
// Allow browser-based and cross-origin MCP clients.
app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*");