chore(release): unify all versions to v2.6.1 with single-source APP_VERSION

This commit is contained in:
Amirul Islam Redwan71
2026-11-13 01:32:48 +06:00
parent 5e552ee743
commit e6c63ce9fa
26 changed files with 108 additions and 58 deletions
+7 -6
View File
@@ -17,6 +17,7 @@ import {
} from "./middleware/auth.js";
import { McpToolError, wrapError, wrapSuccess, maskPhone } from "./envelope.js";
import { SupportedCourier } from "./types.js";
import { APP_VERSION } from "./version.js";
import path from "node:path";
import { fileURLToPath } from "node:url";
import pg from "pg";
@@ -728,12 +729,12 @@ app.get("/health", (req, res) => {
if (!isAdmin) {
if (req.query.ui === "1" && req.headers.accept?.includes("text/html")) {
return res.sendFile(HEALTH_HTML, (err) => {
if (err && !res.headersSent) res.json({ ok: true, version: "2.6.0" });
if (err && !res.headersSent) res.json({ ok: true, version: APP_VERSION });
});
}
return res.json({
ok: true,
version: "2.6.0",
version: APP_VERSION,
});
}
@@ -741,7 +742,7 @@ app.get("/health", (req, res) => {
const detailed = {
ok: true,
service: "aura-courier-mcp",
version: "2.6.0",
version: APP_VERSION,
tools_count: TOOLS.length,
spatial_engine: "Google Maps Platform (gmp_git_agentskills_v1)",
fraud_engine: "Pathao Nationwide v2 + Steadfast Nationwide API + BD Prefix Validator",
@@ -765,7 +766,7 @@ app.get("/health", (req, res) => {
app.get("/health.html", (_req, res) => {
res.sendFile(HEALTH_HTML, (err) => {
if (err && !res.headersSent) res.json({ ok: true, version: "2.6.0" });
if (err && !res.headersSent) res.json({ ok: true, version: APP_VERSION });
});
});
@@ -801,7 +802,7 @@ app.get("/", (_req, res) => {
.send(
`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Aura Courier MCP</title>` +
`<style>body{font-family:system-ui,sans-serif;background:#07080a;color:#f4f5f7;margin:0;display:grid;place-items:center;min-height:100vh}.b{max-width:640px;padding:40px;text-align:center}h1{font-size:28px;margin:0 0 10px}code{background:#0f1115;padding:2px 8px;border-radius:6px;color:#00d4ff;font-size:13px}a{color:#00d4ff}p{line-height:1.6;color:#a4a8b3}</style></head>` +
`<body><div class="b"><h1>🚚 Aura Courier MCP v2.6.0</h1><p>Enterprise Bangladesh courier MCP &amp; Google Maps Platform spatial hub.</p>` +
`<body><div class="b"><h1>🚚 Aura Courier MCP v${APP_VERSION}</h1><p>Enterprise Bangladesh courier MCP &amp; Google Maps Platform spatial hub.</p>` +
`<p>Connect your AI to <code>POST /mcp</code> with Streamable-HTTP.</p>` +
`<p>Webhooks: <code>POST /webhooks/steadfast</code> · <code>POST /webhooks/pathao</code></p>` +
`<p>By <a href="https://auraajenticai.cloud">Aura Ajentic AI</a> · <a href="https://courier.auraajenticai.cloud">docs &amp; setup</a></p></div></body></html>`
@@ -812,6 +813,6 @@ app.get("/", (_req, res) => {
if (process.env.NODE_ENV !== "test") {
app.listen(PORT, () => {
console.log(`Aura Courier MCP v2.6.0 (HTTP) listening on :${PORT} — POST /mcp`);
console.log(`Aura Courier MCP v${APP_VERSION} (HTTP) listening on :${PORT} — POST /mcp`);
});
}
+2 -1
View File
@@ -2,6 +2,7 @@
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { CourierRegistry } from "./registry.js";
import { buildMcpServer } from "./server.js";
import { APP_VERSION } from "./version.js";
// STDIO / npx entrypoint (Claude Desktop, Cursor, Antigravity).
// Credentials come from environment variables (STEADFAST_API_KEY, PATHAO_*).
@@ -9,7 +10,7 @@ async function run() {
const server = buildMcpServer(new CourierRegistry());
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("Aura Courier MCP v2.6.0 running on STDIO");
console.error(`Aura Courier MCP v${APP_VERSION} running on STDIO`);
}
run().catch((error) => {
+2 -1
View File
@@ -7,6 +7,7 @@ import {
import { CourierRegistry } from "./registry.js";
import { SupportedCourier } from "./types.js";
import { EnvelopeSource, McpToolError, wrapError, wrapSuccess } from "./envelope.js";
import { APP_VERSION } from "./version.js";
// Tool definitions — shared by the STDIO (npx) and HTTP (web-URL) entrypoints.
export const TOOLS: Tool[] = [
@@ -386,7 +387,7 @@ export function buildMcpServer(
tenantId: string = "default"
): Server {
const server = new Server(
{ name: "aura-courier-mcp", version: "2.6.0" },
{ name: "aura-courier-mcp", version: APP_VERSION },
{ capabilities: { tools: {} } }
);
+17
View File
@@ -0,0 +1,17 @@
import { readFileSync } from "node:fs";
function readPackageVersion(): string {
try {
const pkgUrl = new URL("../package.json", import.meta.url);
const raw = readFileSync(pkgUrl, "utf8");
const parsed = JSON.parse(raw);
if (typeof parsed?.version === "string" && parsed.version.trim()) {
return parsed.version.trim();
}
} catch {
// Fallback if package.json is unavailable at runtime
}
return "2.6.1";
}
export const APP_VERSION: string = readPackageVersion();