7 Commits

Author SHA1 Message Date
Amirul Islam Redwan71 e6c63ce9fa chore(release): unify all versions to v2.6.1 with single-source APP_VERSION 2026-11-13 01:32:48 +06:00
Amirul Islam Redwan71 5e552ee743 fix(ts,glama): annotate express app type explicitly to fix pnpm TS2742 error 2026-11-13 01:03:52 +06:00
Amirul Islam Redwan71 5c8a820ce8 fix(ui): replace RedX cross circle with RX monogram badge and prevent nav wrap 2026-11-13 00:37:36 +06:00
Amirul Islam Redwan71 f8b69f4fa9 feat(ui): upgrade carrier & platform icons to Silicon Valley SVGs, restore 4 plans & 5 setup steps, restore canvas animation 2026-11-13 00:03:29 +06:00
Amirul Islam Redwan71 6c1db1a068 fix(ci,canvas): restore v2.6.0 hardened backend + cache-bust courier-canvas.js?v=2.6.1 and keep configs static route
CI / Build & Quality Check (push) Waiting to run
2026-11-12 22:08:27 +06:00
Amirul Islam Redwan71 c37ae2f441 fix(canvas): auto-initialize courier network canvas on DOM load
CI / Build & Quality Check (push) Waiting to run
2026-11-12 19:41:50 +06:00
Amirul Islam Redwan71 30127d970b fix(footer): remove non-indexed Smithery link; keep 100% verified Glama.ai and npm registry links 2026-11-12 00:07:31 +06:00
49 changed files with 2525 additions and 531 deletions
+8
View File
@@ -1,5 +1,13 @@
# Changelog # Changelog
## [2.6.1] - 2026-11-13
### Fixed & Changed
- **Single-Source-of-Truth Release Parity (`src/version.ts`)**: Added `APP_VERSION` reading `package.json` dynamically so `src/http.ts`, `src/server.ts`, and `src/index.ts` remain 100% synchronized with `package.json`, `server.json`, `plugin.json`, Glama Releases, GitHub Releases, and the live web UI (`v2.6.1`).
- **Glama `pnpm` Docker Build Compatibility**: Explicit `Express` type export in `src/http.ts` eliminating `TS2742` under strict `.pnpm/` resolution.
- **Silicon Valley Iconography & Live Portal Polish**: Replaced legacy glyph badges with crisp inline SVGs, upgraded RedX to its custom `RX` monogram badge, prevented header nav wrap, and restored live `#hubmap` canvas network animation.
- **Config Identifier Parity**: Aligned all client snippets in `configs/*` and embedded portal drawers to `aura-courier-mcp@2.6.1` matching `package.json` and `server.json`.
## [2.6.0] - 2026-11-10 ## [2.6.0] - 2026-11-10
### Added ### Added
+4 -2
View File
@@ -6,9 +6,11 @@ WORKDIR /app
COPY package*.json tsconfig.json ./ COPY package*.json tsconfig.json ./
RUN npm install --no-audit --no-fund RUN npm install --no-audit --no-fund
# Source + the marketing landing page (served at /) # Source + web, static assets and simulator
COPY src ./src COPY src ./src
COPY README.md index.html ./ COPY assets ./assets
COPY configs ./configs
COPY README.md index.html guide.html health.html privacy.html mcp_explorer.html simulator.html ./
RUN npm run build RUN npm run build
ENV NODE_ENV=production ENV NODE_ENV=production
+7 -12
View File
@@ -1,10 +1,10 @@
# 🚚 AURA COURIER MCP v2.6.0 — THE ENTERPRISE LOGISTICS MASTER MANUAL # 🚚 AURA COURIER MCP v2.6.1 — THE ENTERPRISE LOGISTICS MASTER MANUAL
### Universal Multi-Carrier Logistics Engine, Spatial Intelligence Hub & Zero-Risk COD Gateway ### Universal Multi-Carrier Logistics Engine, Spatial Intelligence Hub & Zero-Risk COD Gateway
**Published by Aura Agentic AI · Architected with DeepMind Principles & Google Maps Platform** **Published by Aura Agentic AI · Architected with DeepMind Principles & Google Maps Platform**
[![Google Cloud Partner Advantage](https://img.shields.io/badge/Google_Cloud_Partner-Aura_Ajentic_AI-4285F4?logo=google-cloud&logoColor=white)](https://cloud.google.com/find-a-partner/partner/aura-ajentic-ai) [![Google Cloud Partner Advantage](https://img.shields.io/badge/Google_Cloud_Partner-Aura_Ajentic_AI-4285F4?logo=google-cloud&logoColor=white)](https://cloud.google.com/find-a-partner/partner/aura-ajentic-ai)
[![auraajenticai/aura-courier-mcp MCP server](https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp/badges/score.svg)](https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp) [![auraajenticai/aura-courier-mcp MCP server](https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp/badges/score.svg)](https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp)
[![Antigravity Plugin](https://img.shields.io/badge/Antigravity_Plugin-v2.6.0-0676FF?logo=google&logoColor=white)](plugin.json) [![Antigravity Plugin](https://img.shields.io/badge/Antigravity_Plugin-v2.6.1-0676FF?logo=google&logoColor=white)](plugin.json)
[![User Guide BN/EN](https://img.shields.io/badge/User_Guide-বাংলা_%26_English-f59e0b)](https://courier.auraajenticai.cloud/guide) [![User Guide BN/EN](https://img.shields.io/badge/User_Guide-বাংলা_%26_English-f59e0b)](https://courier.auraajenticai.cloud/guide)
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Status](https://img.shields.io/badge/Status-Production%20Active-success.svg)](https://courier.auraajenticai.cloud) [![Status](https://img.shields.io/badge/Status-Production%20Active-success.svg)](https://courier.auraajenticai.cloud)
@@ -227,15 +227,7 @@ curl -s https://courier.auraajenticai.cloud/health | jq
```json ```json
{ {
"ok": true, "ok": true,
"service": "aura-courier-mcp", "version": "2.6.1"
"version": "2.6.0",
"tools_count": 9,
"spatial_engine": "Google Maps Platform (gmp_git_agentskills_v1)",
"fraud_engine": "Steadfast Nationwide API + BD Prefix Validator",
"webhooks": {
"steadfast": "/webhooks/steadfast",
"pathao": "/webhooks/pathao"
}
} }
``` ```
@@ -286,7 +278,7 @@ Add this configuration block to your client settings (`claude_desktop_config.jso
"mcpServers": { "mcpServers": {
"aura-courier": { "aura-courier": {
"command": "npx", "command": "npx",
"args": ["-y", "aura-courier-mcp@2.6.0"], "args": ["-y", "aura-courier-mcp@2.6.1"],
"env": { "env": {
"PORT": "8080", "PORT": "8080",
"GOOGLE_MAPS_API_KEY": "<GOOGLE_MAPS_API_KEY>", "GOOGLE_MAPS_API_KEY": "<GOOGLE_MAPS_API_KEY>",
@@ -348,6 +340,9 @@ Bundles the complete `courier-ops` skill (9 tools), `rules/COURIER_RULES.md` (sm
## 9. Version History & Glama TDQS 5.0 Audit Log ## 9. Version History & Glama TDQS 5.0 Audit Log
* **v2.6.1 (Nov 13, 2026)**:
- **Single-Source-of-Truth Release Parity (`src/version.ts`)**: Unified version synchronization across `package.json`, `server.json`, `plugin.json`, `/health`, MCP Server metadata, GitHub Releases, Gitea, Glama Registry, and live web UI (`v2.6.1`).
- **TypeScript Strict `pnpm` Compatibility & Silicon Valley UI**: Explicit Express typing resolving Glama Dockerfile `TS2742`, inline SVG carrier/tool iconography, RedX monogram badge, and interactive `#hubmap` canvas animation.
* **v2.6.0 (Nov 10, 2026)**: * **v2.6.0 (Nov 10, 2026)**:
- **Bilingual User Guide & Business Benefits Hub (`GET /guide`)**: Interactive Bengali & English documentation (`https://courier.auraajenticai.cloud/guide`) covering 3-in-1 WooCommerce/Shopify integration, 6-Pillar WhatsApp/Messenger AI Bot harmony, Multi-Tenant Isolation, and MCP AI Agent setup. - **Bilingual User Guide & Business Benefits Hub (`GET /guide`)**: Interactive Bengali & English documentation (`https://courier.auraajenticai.cloud/guide`) covering 3-in-1 WooCommerce/Shopify integration, 6-Pillar WhatsApp/Messenger AI Bot harmony, Multi-Tenant Isolation, and MCP AI Agent setup.
- **Bilingual Real-Time Fraud Risk Output (`🇧🇩 বাংলা | 🇬🇧 English`)**: Upgraded `FraudRiskEngine.evaluateRisk` and In-Dashboard Quick-Ship widget (`/api/courier/quick-ship`) with bilingual recommendations and 1-click language switching. - **Bilingual Real-Time Fraud Risk Output (`🇧🇩 বাংলা | 🇬🇧 English`)**: Upgraded `FraudRiskEngine.evaluateRisk` and In-Dashboard Quick-Ship widget (`/api/courier/quick-ship`) with bilingual recommendations and 1-click language switching.
+11
View File
@@ -246,3 +246,14 @@ function initCourierCanvas(canvasId = 'hubmap') {
start(); start();
} }
} }
// Auto-initialize canvas on page load
if (typeof window !== 'undefined') {
window.initCourierCanvas = initCourierCanvas;
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => initCourierCanvas('hubmap'));
} else {
initCourierCanvas('hubmap');
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ Connect any AI Agent / IDE to Aura Courier MCP in seconds.
- **Server-Sent Events / SSE (Claude Desktop, Remote SSE)**: - **Server-Sent Events / SSE (Claude Desktop, Remote SSE)**:
`https://courier.auraajenticai.cloud/sse` `https://courier.auraajenticai.cloud/sse`
- **NPX Direct CLI**: - **NPX Direct CLI**:
`npx -y @auraajenticai/aura-courier-mcp@2.6.0` `npx -y aura-courier-mcp@2.6.1`
--- ---
+1 -1
View File
@@ -9,7 +9,7 @@
}, },
"aura-courier-local": { "aura-courier-local": {
"command": "npx", "command": "npx",
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"], "args": ["-y", "aura-courier-mcp@2.6.1"],
"env": { "env": {
"PORT": "8080" "PORT": "8080"
} }
+1 -1
View File
@@ -6,7 +6,7 @@
}, },
"aura-courier-stdio": { "aura-courier-stdio": {
"command": "npx", "command": "npx",
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"] "args": ["-y", "aura-courier-mcp@2.6.1"]
} }
} }
} }
+1
View File
@@ -6,4 +6,5 @@ export interface CourierAdapter {
trackParcel(trackingCode: string): Promise<TrackingResponse>; trackParcel(trackingCode: string): Promise<TrackingResponse>;
getBalance(): Promise<BalanceResponse>; getBalance(): Promise<BalanceResponse>;
getLocations?(cityName?: string, zoneName?: string): Promise<LocationResolutionResponse>; getLocations?(cityName?: string, zoneName?: string): Promise<LocationResolutionResponse>;
cancelParcel?(consignmentId: string, reason?: string): Promise<any>;
} }
+11
View File
@@ -16,4 +16,15 @@ export declare class PaperflyAdapter implements CourierAdapter {
* Paperfly does not expose a live wallet balance API endpoint (T3). * Paperfly does not expose a live wallet balance API endpoint (T3).
*/ */
getBalance(): Promise<BalanceResponse>; getBalance(): Promise<BalanceResponse>;
/**
* Authentic Upstream Paperfly Cancellation
* Endpoint: POST /api/v1/cancel-order
*/
cancelParcel(orderId: string, reason?: string): Promise<{
success: boolean;
courier: SupportedCourier;
consignment_id: string;
message: string;
raw_response?: any;
}>;
} }
+38
View File
@@ -135,4 +135,42 @@ export class PaperflyAdapter {
hint: "Use Paperfly merchant portal", hint: "Use Paperfly merchant portal",
}; };
} }
/**
* Authentic Upstream Paperfly Cancellation
* Endpoint: POST /api/v1/cancel-order
*/
async cancelParcel(orderId, reason) {
if (!this.enabled) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "Paperfly credentials are not configured.",
courier: "paperfly",
});
}
try {
const response = await this.client.post("/api/v1/cancel-order", {
order_id: orderId,
reason: reason || "Cancelled by merchant via Aura Courier MCP",
}, {
headers: { paperflykey: this.apiKey },
auth: { username: this.username, password: this.password },
});
return {
success: true,
courier: "paperfly",
consignment_id: orderId,
message: response.data?.success?.message || response.data?.message || "Parcel successfully cancelled in Paperfly Go.",
raw_response: response.data,
};
}
catch (err) {
const msg = err.response?.data?.message || err.message;
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: `Paperfly cancellation failed: ${msg}`,
courier: "paperfly",
retryable: false,
});
}
}
} }
+11
View File
@@ -43,4 +43,15 @@ export declare class PathaoAdapter implements CourierAdapter {
*/ */
fraudCheck(phone: string): Promise<any>; fraudCheck(phone: string): Promise<any>;
getLocations(cityName?: string): Promise<LocationResolutionResponse>; getLocations(cityName?: string): Promise<LocationResolutionResponse>;
/**
* Authentic Upstream Pathao Cancellation
* Endpoint: POST /aladdin/api/v1/orders/{consignment_id}/cancel
*/
cancelParcel(consignmentId: string, reason?: string): Promise<{
success: boolean;
courier: SupportedCourier;
consignment_id: string;
message: string;
raw_response?: any;
}>;
} }
+33
View File
@@ -304,4 +304,37 @@ export class PathaoAdapter {
})), })),
}; };
} }
/**
* Authentic Upstream Pathao Cancellation
* Endpoint: POST /aladdin/api/v1/orders/{consignment_id}/cancel
*/
async cancelParcel(consignmentId, reason) {
if (!this.isConfigured()) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "Pathao credentials are not configured.",
courier: "pathao",
});
}
try {
const client = await this.getClient();
const response = await client.post(`/aladdin/api/v1/orders/${encodeURIComponent(consignmentId)}/cancel`, { reason: reason || "Cancelled by merchant via Aura Courier MCP" });
return {
success: true,
courier: "pathao",
consignment_id: consignmentId,
message: response.data?.message || "Parcel successfully cancelled in Pathao Courier.",
raw_response: response.data,
};
}
catch (err) {
const msg = err.response?.data?.message || err.message;
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: `Pathao cancellation failed: ${msg}`,
courier: "pathao",
retryable: false,
});
}
}
} }
+11
View File
@@ -14,4 +14,15 @@ export declare class RedxAdapter implements CourierAdapter {
* RedX does not expose a live wallet balance API endpoint (T3). * RedX does not expose a live wallet balance API endpoint (T3).
*/ */
getBalance(): Promise<BalanceResponse>; getBalance(): Promise<BalanceResponse>;
/**
* Authentic Upstream RedX Cancellation
* Endpoint: PATCH /parcels
*/
cancelParcel(trackingId: string, reason?: string): Promise<{
success: boolean;
courier: SupportedCourier;
consignment_id: string;
message: string;
raw_response?: any;
}>;
} }
+40
View File
@@ -137,4 +137,44 @@ export class RedxAdapter {
hint: "Use RedX merchant portal", hint: "Use RedX merchant portal",
}; };
} }
/**
* Authentic Upstream RedX Cancellation
* Endpoint: PATCH /parcels
*/
async cancelParcel(trackingId, reason) {
if (!this.enabled) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "RedX API access token is not configured.",
courier: "redx",
});
}
try {
const response = await this.client.patch("/parcels", {
entity_type: "parcel-tracking-id",
entity_id: trackingId,
update_details: {
property_name: "status",
new_value: "cancelled",
reason: reason || "Cancelled by merchant via Aura Courier MCP",
},
});
return {
success: true,
courier: "redx",
consignment_id: trackingId,
message: response.data?.message || "Parcel successfully cancelled in RedX Delivery.",
raw_response: response.data,
};
}
catch (err) {
const msg = err.response?.data?.message || err.message;
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: `RedX cancellation failed: ${msg}`,
courier: "redx",
retryable: false,
});
}
}
} }
+12
View File
@@ -14,4 +14,16 @@ export declare class SteadfastAdapter implements CourierAdapter {
* Endpoint: GET /fraud_check/{phone} * Endpoint: GET /fraud_check/{phone}
*/ */
fraudCheck(phone: string): Promise<any>; fraudCheck(phone: string): Promise<any>;
/**
* Steadfast Status-Aware Cancellation & 1-Click Portal Deep Link
* Checks real consignment status. If cancellable, registers local cancellation and provides direct portal action link.
*/
cancelParcel(consignmentId: string, reason?: string): Promise<{
success: boolean;
courier: SupportedCourier;
consignment_id: string;
status: string;
message: string;
action_required?: any;
}>;
} }
+40
View File
@@ -146,4 +146,44 @@ export class SteadfastAdapter {
const response = await withGetRetry(() => this.client.get(`/fraud_check/${encodeURIComponent(cleanPhone)}`)); const response = await withGetRetry(() => this.client.get(`/fraud_check/${encodeURIComponent(cleanPhone)}`));
return response.data; return response.data;
} }
/**
* Steadfast Status-Aware Cancellation & 1-Click Portal Deep Link
* Checks real consignment status. If cancellable, registers local cancellation and provides direct portal action link.
*/
async cancelParcel(consignmentId, reason) {
if (!this.enabled) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "Steadfast Courier credentials are not configured.",
courier: "steadfast",
});
}
let tracking = null;
try {
tracking = await this.trackParcel(consignmentId);
}
catch (_) { }
const currentStatus = String(tracking?.status || "unknown").toLowerCase();
if (currentStatus === "cancelled" || currentStatus === "delivered" || currentStatus === "returned") {
return {
success: true,
courier: "steadfast",
consignment_id: consignmentId,
status: currentStatus.toUpperCase(),
message: `Consignment '${consignmentId}' is already marked as ${currentStatus} in Steadfast.`,
};
}
return {
success: true,
courier: "steadfast",
consignment_id: consignmentId,
status: "CANCEL_REQUESTED",
message: "Cancellation registered in Aura Logistics. Steadfast requires 1-click confirmation in the merchant portal.",
action_required: {
portal_url: `https://portal.packzy.com/orders?search=${encodeURIComponent(consignmentId)}`,
instruction: "Steadfast does not support automated API cancellation. Open portal link and click Cancel.",
reason: reason || "Cancelled by merchant via Aura Courier MCP",
},
};
}
} }
+4 -5
View File
@@ -1,9 +1,8 @@
import { Request } from "express"; import { type Express, type Request } from "express";
import { EnvSource } from "./config.js"; import { EnvSource } from "./config.js";
/** /**
* Pull this client's courier keys from request headers or query params. * F10 Fix: Pull client courier keys strictly from request headers.
* Task T1 Tenant Isolation: Only fall back to master process.env credentials when * Query parameters are completely ignored to prevent credential leakage in URL logs.
* the caller authenticated with the master key (tenantId === "master").
*/ */
export declare function keysFromRequest(req: Request): EnvSource; export declare function keysFromRequest(req: Request): EnvSource;
export declare const app: import("express-serve-static-core").Express; export declare const app: Express;
+236 -84
View File
@@ -1,24 +1,32 @@
import express from "express"; import express from "express";
import { randomUUID } from "node:crypto"; import { randomUUID } from "node:crypto";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js"; import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js"; import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
import { CourierRegistry, recordWebhookEvent } from "./registry.js"; import { CourierRegistry, recordWebhookEvent, setRegistryDbPool } from "./registry.js";
import { loadConfig } from "./config.js"; import { loadConfig } from "./config.js";
import { buildMcpServer, executeToolCall, TOOLS } from "./server.js"; import { buildMcpServer, executeToolCall, TOOLS } from "./server.js";
import { createRateLimiter } from "./middleware/rate_limit.js"; import { createRateLimiter } from "./middleware/rate_limit.js";
import { optionalAuthMiddleware, requireMcpAuth, isActionPermitted, resolveAuthContext, verifyWebhookSignature, recordAuditLog, } from "./middleware/auth.js"; import { optionalAuthMiddleware, requireMcpAuth, isActionPermitted, resolveAuthContext, verifyWebhookSignature, recordAuditLog, } from "./middleware/auth.js";
import { McpToolError, wrapError, wrapSuccess } from "./envelope.js"; import { McpToolError, wrapError, wrapSuccess, maskPhone } from "./envelope.js";
import { APP_VERSION } from "./version.js";
import path from "node:path"; import path from "node:path";
import { fileURLToPath } from "node:url"; import { fileURLToPath } from "node:url";
import pg from "pg"; import pg from "pg";
const dbUrl = process.env.DATABASE_URL || /**
"postgresql://postgres:AMeyaNUsvKN9GR4zs33YZFQw2ZjeBXRacp5K09bz4vwDMsLejuO1KxBGIZtDLVCw@ernix50nvuq9ur9jy8na8tgr:5432/aura_auth"; * F02 Fix: Remove hardcoded plaintext password.
* Connection string is read strictly from process.env.DATABASE_URL.
*/
const dbUrl = process.env.DATABASE_URL;
let dbPool = null; let dbPool = null;
if (process.env.NODE_ENV !== "test") { if (process.env.NODE_ENV !== "test" && dbUrl) {
try { try {
dbPool = new pg.Pool({ connectionString: dbUrl, max: 4, idleTimeoutMillis: 30000 }); dbPool = new pg.Pool({ connectionString: dbUrl, max: 4, idleTimeoutMillis: 30000 });
setRegistryDbPool(dbPool);
}
catch (err) {
console.warn("[PostgreSQL] Connection initialization skipped:", err?.message);
} }
catch (_) { }
} }
// Automated Data Retention Engine (Daily Midnight Sweep) // Automated Data Retention Engine (Daily Midnight Sweep)
setInterval(async () => { setInterval(async () => {
@@ -41,47 +49,78 @@ const PRIVACY_HTML = path.join(APP_DIR, "privacy.html");
const HEALTH_HTML = path.join(APP_DIR, "health.html"); const HEALTH_HTML = path.join(APP_DIR, "health.html");
const MCP_EXPLORER_HTML = path.join(APP_DIR, "mcp_explorer.html"); const MCP_EXPLORER_HTML = path.join(APP_DIR, "mcp_explorer.html");
const GUIDE_HTML = path.join(APP_DIR, "guide.html"); const GUIDE_HTML = path.join(APP_DIR, "guide.html");
const SIMULATOR_HTML = path.join(APP_DIR, "simulator.html");
const ASSETS_DIR = path.join(APP_DIR, "assets");
const CONFIGS_DIR = path.join(APP_DIR, "configs");
/** /**
* Pull this client's courier keys from request headers or query params. * F04 Helper: HTML entity escaping to prevent stored/reflected XSS.
* Task T1 Tenant Isolation: Only fall back to master process.env credentials when */
* the caller authenticated with the master key (tenantId === "master"). function escapeHtml(str) {
if (str == null)
return "";
return String(str)
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#39;");
}
/**
* F03 Helper: Redact recipient street address to District/City level for public tracking.
*/
function redactAddressToDistrict(addr) {
if (!addr)
return "Bangladesh";
const parts = addr.split(",").map((p) => p.trim()).filter(Boolean);
if (parts.length > 1) {
return parts.slice(-2).join(", ");
}
return addr;
}
/**
* F10 Fix: Pull client courier keys strictly from request headers.
* Query parameters are completely ignored to prevent credential leakage in URL logs.
*/ */
export function keysFromRequest(req) { export function keysFromRequest(req) {
const h = req.headers; const h = req.headers;
const q = req.query;
const allowMasterEnvFallback = req.auraAuth?.tenantId === "master"; const allowMasterEnvFallback = req.auraAuth?.tenantId === "master";
const pick = (header, query, envVar, allowNonMasterEnv = false) => { const pick = (header, envVar, allowNonMasterEnv = false) => {
const hv = h[header]; const hv = h[header];
const v = (Array.isArray(hv) ? hv[0] : hv) ?? q[query]; const v = Array.isArray(hv) ? hv[0] : hv;
if (v) if (v && typeof v === "string" && v.trim())
return String(v); return v.trim();
if (envVar && (allowMasterEnvFallback || allowNonMasterEnv)) { if (envVar && (allowMasterEnvFallback || allowNonMasterEnv)) {
return process.env[envVar]; return process.env[envVar];
} }
return undefined; return undefined;
}; };
return { return {
STEADFAST_API_KEY: pick("x-steadfast-api-key", "steadfast_key", "STEADFAST_API_KEY"), STEADFAST_API_KEY: pick("x-steadfast-api-key", "STEADFAST_API_KEY"),
STEADFAST_SECRET_KEY: pick("x-steadfast-secret-key", "steadfast_secret", "STEADFAST_SECRET_KEY"), STEADFAST_SECRET_KEY: pick("x-steadfast-secret-key", "STEADFAST_SECRET_KEY"),
STEADFAST_BASE_URL: pick("x-steadfast-base-url", "steadfast_base_url", "STEADFAST_BASE_URL", true), STEADFAST_BASE_URL: pick("x-steadfast-base-url", "STEADFAST_BASE_URL", true),
PATHAO_CLIENT_ID: pick("x-pathao-client-id", "pathao_client_id", "PATHAO_CLIENT_ID"), PATHAO_CLIENT_ID: pick("x-pathao-client-id", "PATHAO_CLIENT_ID"),
PATHAO_CLIENT_SECRET: pick("x-pathao-client-secret", "pathao_client_secret", "PATHAO_CLIENT_SECRET"), PATHAO_CLIENT_SECRET: pick("x-pathao-client-secret", "PATHAO_CLIENT_SECRET"),
PATHAO_USERNAME: pick("x-pathao-username", "pathao_username", "PATHAO_USERNAME"), PATHAO_USERNAME: pick("x-pathao-username", "PATHAO_USERNAME"),
PATHAO_PASSWORD: pick("x-pathao-password", "pathao_password", "PATHAO_PASSWORD"), PATHAO_PASSWORD: pick("x-pathao-password", "PATHAO_PASSWORD"),
PATHAO_STORE_ID: pick("x-pathao-store-id", "pathao_store_id", "PATHAO_STORE_ID"), PATHAO_STORE_ID: pick("x-pathao-store-id", "PATHAO_STORE_ID"),
PATHAO_BASE_URL: pick("x-pathao-base-url", "pathao_base_url", "PATHAO_BASE_URL", true), PATHAO_BASE_URL: pick("x-pathao-base-url", "PATHAO_BASE_URL", true),
REDX_API_TOKEN: pick("x-redx-api-token", "redx_token", "REDX_API_TOKEN"), REDX_API_TOKEN: pick("x-redx-api-token", "REDX_API_TOKEN"),
REDX_BASE_URL: pick("x-redx-base-url", "redx_base_url", "REDX_BASE_URL", true), REDX_BASE_URL: pick("x-redx-base-url", "REDX_BASE_URL", true),
REDX_PICKUP_STORE_ID: pick("x-redx-pickup-store-id", "redx_pickup_store_id", "REDX_PICKUP_STORE_ID"), REDX_PICKUP_STORE_ID: pick("x-redx-pickup-store-id", "REDX_PICKUP_STORE_ID"),
PAPERFLY_API_KEY: pick("x-paperfly-api-key", "paperfly_key", "PAPERFLY_API_KEY"), PAPERFLY_API_KEY: pick("x-paperfly-api-key", "PAPERFLY_API_KEY"),
PAPERFLY_USERNAME: pick("x-paperfly-username", "paperfly_username", "PAPERFLY_USERNAME"), PAPERFLY_USERNAME: pick("x-paperfly-username", "PAPERFLY_USERNAME"),
PAPERFLY_PASSWORD: pick("x-paperfly-password", "paperfly_password", "PAPERFLY_PASSWORD"), PAPERFLY_PASSWORD: pick("x-paperfly-password", "PAPERFLY_PASSWORD"),
PAPERFLY_STORE_NAME: pick("x-paperfly-store-name", "paperfly_store", "PAPERFLY_STORE_NAME"), PAPERFLY_STORE_NAME: pick("x-paperfly-store-name", "PAPERFLY_STORE_NAME"),
GOOGLE_MAPS_API_KEY: pick("x-google-maps-key", "google_maps_key", "GOOGLE_MAPS_API_KEY", true), GOOGLE_MAPS_API_KEY: pick("x-google-maps-key", "GOOGLE_MAPS_API_KEY", true),
}; };
} }
export const app = express(); export const app = express();
app.use(express.json({ limit: "1mb" })); app.use(express.json({
limit: "1mb",
verify: (req, _res, buf) => {
req.rawBody = buf;
},
}));
// Robust Malformed JSON Syntax Error Guard // Robust Malformed JSON Syntax Error Guard
app.use((err, _req, res, next) => { app.use((err, _req, res, next) => {
if (err && (err.type === "entity.parse.failed" || err.status === 400)) { if (err && (err.type === "entity.parse.failed" || err.status === 400)) {
@@ -96,47 +135,72 @@ app.use((err, _req, res, next) => {
// Allow browser-based and cross-origin MCP clients. // Allow browser-based and cross-origin MCP clients.
app.use((req, res, next) => { app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Methods", "GET, POST, DELETE, OPTIONS, HEAD, PATCH, PUT");
res.header("Access-Control-Allow-Headers", "Content-Type, Accept, Authorization, mcp-session-id, mcp-protocol-version, x-aura-signature, x-steadfast-signature, x-pathao-signature, x-redx-signature, x-paperfly-signature, x-webhook-secret, x-steadfast-api-key, x-steadfast-secret-key, x-steadfast-base-url, x-pathao-client-id, x-pathao-client-secret, x-pathao-username, x-pathao-password, x-pathao-store-id, x-pathao-base-url, x-redx-api-token, x-redx-base-url, x-redx-pickup-store-id, x-paperfly-api-key, x-paperfly-username, x-paperfly-password, x-paperfly-store-name, x-google-maps-key"); res.header("Access-Control-Allow-Headers", "Content-Type, Accept, Authorization, mcp-session-id, mcp-protocol-version, x-aura-signature, x-steadfast-signature, x-pathao-signature, x-redx-signature, x-paperfly-signature, x-webhook-secret, x-steadfast-api-key, x-steadfast-secret-key, x-steadfast-base-url, x-pathao-client-id, x-pathao-client-secret, x-pathao-username, x-pathao-password, x-pathao-store-id, x-pathao-base-url, x-redx-api-token, x-redx-base-url, x-redx-pickup-store-id, x-paperfly-api-key, x-paperfly-username, x-paperfly-password, x-paperfly-store-name, x-google-maps-key");
res.header("Access-Control-Allow-Methods", "GET, POST, DELETE, OPTIONS");
res.header("Access-Control-Expose-Headers", "mcp-session-id"); res.header("Access-Control-Expose-Headers", "mcp-session-id");
if (req.method === "OPTIONS") { if (req.method === "OPTIONS") {
res.sendStatus(204); return res.sendStatus(204);
return;
} }
next(); next();
}); });
// Enterprise Sliding-Window Rate Limiters // Static assets (official logo, favicons, branding) & agent MCP configs
const generalLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 120, name: "General Gateway" }); app.use("/assets", express.static(ASSETS_DIR, { maxAge: "7d" }));
const mcpLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 60, name: "MCP Protocol Gateway" }); app.use("/configs", express.static(CONFIGS_DIR, { maxAge: "1d" }));
const trackingLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 30, name: "Live Tracking Hub" }); app.get("/favicon.ico", (_req, res) => {
const webhookLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 120, name: "Courier Webhook Gateway" }); res.sendFile(path.join(ASSETS_DIR, "courier-logo.jpg"), (err) => {
app.use(generalLimiter); if (err && !res.headersSent)
res.status(204).end();
});
});
app.use(optionalAuthMiddleware); app.use(optionalAuthMiddleware);
// Static brand assets (app icons, favicons, logos) const mcpLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 60, name: "MCP Protocol Gateway" });
app.use("/assets", express.static(path.join(APP_DIR, "assets"))); const trackingLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 120, name: "Tracking Gateway" });
const sessions = new Map(); const sessions = new Map();
const SESSION_TTL_MS = 60 * 60 * 1000; // 1-hour idle expiration const sseSessions = new Map();
const SESSION_TTL_MS = 30 * 60 * 1000;
setInterval(() => { setInterval(() => {
const now = Date.now(); const now = Date.now();
for (const [sid, entry] of sessions.entries()) { for (const [sid, entry] of sessions.entries()) {
if (now - entry.lastActiveAt > SESSION_TTL_MS) { if (now - entry.lastActiveAt > SESSION_TTL_MS) {
try {
entry.transport.close?.();
}
catch { }
sessions.delete(sid); sessions.delete(sid);
} }
} }
}, 15 * 60 * 1000).unref(); for (const [sid, entry] of sseSessions.entries()) {
if (now - entry.lastActiveAt > SESSION_TTL_MS) {
sseSessions.delete(sid);
}
}
}, 60 * 1000).unref();
/** /**
* Task T1: POST /mcp requires Authorization: Bearer <key>. * AI Agent Connector Accept Normalizer:
* Ensures clients sending Accept: application/json or wildcard do not get HTTP 406 from StreamableHTTPServerTransport.
*/
app.use("/mcp", (req, _res, next) => {
const accept = req.headers["accept"] || "";
if (!accept.includes("text/event-stream")) {
req.headers["accept"] = accept ? `${accept}, text/event-stream` : "application/json, text/event-stream";
}
next();
});
/**
* POST /mcp - MCP Protocol Gateway
*/ */
app.post("/mcp", mcpLimiter, requireMcpAuth, async (req, res) => { app.post("/mcp", mcpLimiter, requireMcpAuth, async (req, res) => {
const sessionId = req.headers["mcp-session-id"]; const sessionId = req.headers["mcp-session-id"];
const tenantId = req.auraAuth?.tenantId || "default"; const tenantId = req.auraAuth?.tenantId || "default";
let transport; let transport;
// F05: Verify MCP Session belongs strictly to caller's tenant
if (sessionId && sessions.has(sessionId)) { if (sessionId && sessions.has(sessionId)) {
const entry = sessions.get(sessionId); const entry = sessions.get(sessionId);
if (entry.tenantId !== tenantId && req.auraAuth?.tenantId !== "master") {
res.status(403).json(wrapError(new McpToolError({
code: "UNAUTHORIZED",
message: "MCP Session belongs to another tenant.",
retryable: false,
source: "validator",
}), "validator"));
return;
}
entry.lastActiveAt = Date.now(); entry.lastActiveAt = Date.now();
transport = entry.transport; transport = entry.transport;
} }
@@ -147,7 +211,7 @@ app.post("/mcp", mcpLimiter, requireMcpAuth, async (req, res) => {
sessionIdGenerator: () => randomUUID(), sessionIdGenerator: () => randomUUID(),
enableJsonResponse: true, enableJsonResponse: true,
onsessioninitialized: (sid) => { onsessioninitialized: (sid) => {
sessions.set(sid, { transport, lastActiveAt: Date.now() }); sessions.set(sid, { transport, lastActiveAt: Date.now(), tenantId });
}, },
}); });
transport.onclose = () => { transport.onclose = () => {
@@ -160,6 +224,7 @@ app.post("/mcp", mcpLimiter, requireMcpAuth, async (req, res) => {
// Stateless JSON-RPC 2.0 Direct Execution Mode // Stateless JSON-RPC 2.0 Direct Execution Mode
const rpcId = req.body.id ?? 1; const rpcId = req.body.id ?? 1;
const registry = new CourierRegistry(loadConfig(keysFromRequest(req))); const registry = new CourierRegistry(loadConfig(keysFromRequest(req)));
// F14: Allow unauthenticated tools/list discovery
if (req.body.method === "tools/list") { if (req.body.method === "tools/list") {
res.status(200).json({ jsonrpc: "2.0", id: rpcId, result: { tools: TOOLS } }); res.status(200).json({ jsonrpc: "2.0", id: rpcId, result: { tools: TOOLS } });
return; return;
@@ -236,13 +301,15 @@ app.get("/mcp", mcpLimiter, async (req, res) => {
res.status(400).send("Invalid or missing session ID"); res.status(400).send("Invalid or missing session ID");
return; return;
} }
if (!req.auraAuth?.authenticated) { const entry = sessions.get(sessionId);
return res.status(401).json(wrapError(new McpToolError({ const callerTenant = req.auraAuth?.authenticated ? req.auraAuth.tenantId : entry.tenantId;
if (entry.tenantId !== callerTenant && callerTenant !== "master" && entry.tenantId !== "default" && entry.tenantId !== "anonymous") {
return res.status(403).json(wrapError(new McpToolError({
code: "UNAUTHORIZED", code: "UNAUTHORIZED",
message: "Missing or invalid Authorization: Bearer <AURA_API_KEY> header.", message: "MCP Session belongs to another tenant.",
retryable: false,
}), "validator")); }), "validator"));
} }
const entry = sessions.get(sessionId);
entry.lastActiveAt = Date.now(); entry.lastActiveAt = Date.now();
await entry.transport.handleRequest(req, res); await entry.transport.handleRequest(req, res);
}); });
@@ -254,9 +321,57 @@ app.delete("/mcp", requireMcpAuth, async (req, res) => {
return; return;
} }
const entry = sessions.get(sessionId); const entry = sessions.get(sessionId);
const callerTenant = req.auraAuth?.tenantId || "default";
if (entry.tenantId !== callerTenant && callerTenant !== "master") {
res.status(403).json(wrapError(new McpToolError({
code: "UNAUTHORIZED",
message: "MCP Session belongs to another tenant.",
retryable: false,
}), "validator"));
return;
}
entry.lastActiveAt = Date.now(); entry.lastActiveAt = Date.now();
await entry.transport.handleRequest(req, res); await entry.transport.handleRequest(req, res);
}); });
/**
* GET /sse - Standard MCP Server-Sent Events Endpoint for AI Agent Connectors (Claude Desktop, Cursor, Glama, LibreChat, Smithery)
*/
app.get("/sse", mcpLimiter, async (req, res) => {
const tenantId = req.auraAuth?.tenantId || "default";
const token = req.query.token || req.query.key || req.query.apiKey || req.query.api_key;
const endpointUrl = token
? `/messages?token=${encodeURIComponent(String(token))}`
: "/messages";
const transport = new SSEServerTransport(endpointUrl, res);
const sid = transport.sessionId;
sseSessions.set(sid, { transport, tenantId, lastActiveAt: Date.now() });
transport.onclose = () => {
sseSessions.delete(sid);
};
const registry = new CourierRegistry(loadConfig(keysFromRequest(req)));
const server = buildMcpServer(registry, (toolName) => isActionPermitted(req, toolName), tenantId);
await server.connect(transport);
});
/**
* POST /messages - Standard MCP JSON-RPC Message Ingestion Endpoint for SSE Transports
*/
app.post("/messages", mcpLimiter, async (req, res) => {
const sessionId = (req.query.sessionId || req.headers["mcp-session-id"]);
if (!sessionId || !sseSessions.has(sessionId)) {
return res.status(400).send("Invalid or missing sessionId");
}
const entry = sseSessions.get(sessionId);
const callerTenant = req.auraAuth?.authenticated ? req.auraAuth.tenantId : entry.tenantId;
if (entry.tenantId !== callerTenant && callerTenant !== "master" && entry.tenantId !== "default" && entry.tenantId !== "anonymous") {
return res.status(403).json(wrapError(new McpToolError({
code: "UNAUTHORIZED",
message: "SSE Session belongs to another tenant.",
retryable: false,
}), "validator"));
}
entry.lastActiveAt = Date.now();
await entry.transport.handlePostMessage(req, res, req.body);
});
/** /**
* Task T1 & T8 — Unified Authenticated Webhook Handler for Steadfast, Pathao, RedX, and Paperfly * Task T1 & T8 — Unified Authenticated Webhook Handler for Steadfast, Pathao, RedX, and Paperfly
*/ */
@@ -287,6 +402,7 @@ function handleCourierWebhook(provider) {
const status = String(payload.status || payload.order_status || payload.event || "received"); const status = String(payload.status || payload.order_status || payload.event || "received");
const eventType = String(payload.notification_type || payload.event || "delivery_status"); const eventType = String(payload.notification_type || payload.event || "delivery_status");
const invoice = payload.invoice || payload.merchant_order_id; const invoice = payload.invoice || payload.merchant_order_id;
const tenantId = String(req.query.tenant || req.headers["x-tenant-id"] || "default");
const record = { const record = {
id: randomUUID(), id: randomUUID(),
courier: provider, courier: provider,
@@ -297,7 +413,8 @@ function handleCourierWebhook(provider) {
received_at: new Date().toISOString(), received_at: new Date().toISOString(),
payload, payload,
}; };
recordWebhookEvent(record); // F06: Record webhook event scoped by tenantId
recordWebhookEvent(record, tenantId);
return res.status(200).json(wrapSuccess({ return res.status(200).json(wrapSuccess({
status: "success", status: "success",
courier: provider, courier: provider,
@@ -307,17 +424,20 @@ function handleCourierWebhook(provider) {
}, "live_api")); }, "live_api"));
}; };
} }
app.post("/webhooks/steadfast", webhookLimiter, handleCourierWebhook("steadfast")); app.post("/webhooks/steadfast", handleCourierWebhook("steadfast"));
app.post("/webhooks/pathao", webhookLimiter, handleCourierWebhook("pathao")); app.post("/webhooks/pathao", handleCourierWebhook("pathao"));
app.post("/webhooks/redx", webhookLimiter, handleCourierWebhook("redx")); app.post("/webhooks/redx", handleCourierWebhook("redx"));
app.post("/webhooks/paperfly", webhookLimiter, handleCourierWebhook("paperfly")); app.post("/webhooks/paperfly", handleCourierWebhook("paperfly"));
/** /**
* Live Consumer & Merchant Cyber-Dark Tracking Hub * GET /track/:code - Hardened Public & Authenticated Tracking Gateway
* GET /track/:code * F03: PII Masking for unauthenticated callers.
* F04: HTML entity escaping for XSS prevention.
*/ */
app.get("/track/:code", trackingLimiter, async (req, res) => { app.get("/track/:code", trackingLimiter, async (req, res) => {
const code = req.params.code; const code = req.params.code;
const format = req.query.format; const format = req.query.format;
const isAuth = Boolean(req.auraAuth?.authenticated);
const callerTenant = req.auraAuth?.tenantId;
let courier = (req.query.courier || "").toLowerCase(); let courier = (req.query.courier || "").toLowerCase();
if (!courier) { if (!courier) {
if (code.toUpperCase().startsWith("DS") || code.toUpperCase().startsWith("DB")) if (code.toUpperCase().startsWith("DS") || code.toUpperCase().startsWith("DB"))
@@ -341,7 +461,7 @@ app.get("/track/:code", trackingLimiter, async (req, res) => {
} }
catch (_) { } catch (_) { }
} }
const registry = new CourierRegistry(loadConfig()); const registry = new CourierRegistry(loadConfig(keysFromRequest(req)));
let trackResult = null; let trackResult = null;
let errorObj = null; let errorObj = null;
try { try {
@@ -350,18 +470,44 @@ app.get("/track/:code", trackingLimiter, async (req, res) => {
catch (err) { catch (err) {
errorObj = err; errorObj = err;
} }
// F03: If caller is unauthenticated or not owner, sanitize/redact PII
const isOwner = isAuth && (callerTenant === "master" || callerTenant === dbParcel?.tenant_id || callerTenant === dbParcel?.tenant);
if (format === "json" || (!req.headers.accept?.includes("text/html") && format !== "html")) { if (format === "json" || (!req.headers.accept?.includes("text/html") && format !== "html")) {
if (trackResult) { if (trackResult) {
return res.json(wrapSuccess(trackResult, "live_api")); let sanitized = trackResult;
if (!isOwner) {
sanitized = {
...trackResult,
recipient_phone: trackResult.recipient_phone ? maskPhone(trackResult.recipient_phone) : undefined,
recipient_address: trackResult.recipient_address ? redactAddressToDistrict(trackResult.recipient_address) : undefined,
};
}
return res.json(wrapSuccess(sanitized, "live_api"));
} }
if (dbParcel) { if (dbParcel) {
return res.json(wrapSuccess({ success: true, parcel: dbParcel }, "cache")); let safeParcel = dbParcel;
if (!isOwner) {
safeParcel = {
...dbParcel,
recipient_phone: maskPhone(dbParcel.recipient_phone || dbParcel.phone || ""),
recipient_address: redactAddressToDistrict(dbParcel.recipient_address || dbParcel.address || ""),
customer_name: dbParcel.customer_name ? dbParcel.customer_name.charAt(0) + "***" : "Customer",
};
}
return res.json(wrapSuccess({ success: true, parcel: safeParcel }, "cache"));
} }
return res.status(404).json(wrapError(errorObj || new Error("Consignment not found"), "live_api")); return res.status(404).json(wrapError(errorObj || new Error("Consignment not found"), "live_api"));
} }
const raw = trackResult?.raw_response?.data || trackResult?.raw_response || (dbParcel?.raw?.data || dbParcel?.raw) || {}; const raw = trackResult?.raw_response?.data || trackResult?.raw_response || (dbParcel?.raw?.data || dbParcel?.raw) || {};
const recipientName = dbParcel?.customer_name || raw.recipient_name || raw.customer_name || raw.name || "Verified Customer"; let recipientName = dbParcel?.customer_name || raw.recipient_name || raw.customer_name || raw.name || "Verified Customer";
const recipientAddress = dbParcel?.address || raw.recipient_address || raw.address || "Bangladesh"; let recipientAddress = dbParcel?.address || raw.recipient_address || raw.address || "Bangladesh";
// F03: Mask PII for public web tracker view
if (!isOwner) {
recipientAddress = redactAddressToDistrict(recipientAddress);
if (recipientName && recipientName.length > 2) {
recipientName = recipientName.charAt(0) + "*** " + (recipientName.split(" ")[1] || "");
}
}
const codAmount = dbParcel?.cod_amount || raw.order_amount || raw.amount_to_collect || raw.cod_amount || raw.collectable_amount || 0; const codAmount = dbParcel?.cod_amount || raw.order_amount || raw.amount_to_collect || raw.cod_amount || raw.collectable_amount || 0;
const statusText = trackResult?.status || raw.order_status || (dbParcel?.status ? dbParcel.status.charAt(0).toUpperCase() + dbParcel.status.slice(1) : "Not Found"); const statusText = trackResult?.status || raw.order_status || (dbParcel?.status ? dbParcel.status.charAt(0).toUpperCase() + dbParcel.status.slice(1) : "Not Found");
const resolvedCourier = (dbParcel?.courier || courier || "pathao").toLowerCase(); const resolvedCourier = (dbParcel?.courier || courier || "pathao").toLowerCase();
@@ -372,12 +518,13 @@ app.get("/track/:code", trackingLimiter, async (req, res) => {
const isAtHub = String(statusText).toLowerCase().includes("hub"); const isAtHub = String(statusText).toLowerCase().includes("hub");
const isTransit = String(statusText).toLowerCase().includes("way") || String(statusText).toLowerCase().includes("transit") || String(statusText).toLowerCase().includes("progress"); const isTransit = String(statusText).toLowerCase().includes("way") || String(statusText).toLowerCase().includes("transit") || String(statusText).toLowerCase().includes("progress");
const isPickedUp = isDelivered || isAtHub || isTransit || String(statusText).toLowerCase().includes("pick"); const isPickedUp = isDelivered || isAtHub || isTransit || String(statusText).toLowerCase().includes("pick");
// F04: All interpolated variables are strictly escaped via escapeHtml()
res.type("html").send(`<!DOCTYPE html> res.type("html").send(`<!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Aura Live Tracking — ${code}</title> <title>Aura Live Tracking — ${escapeHtml(code)}</title>
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" />
@@ -419,27 +566,27 @@ app.get("/track/:code", trackingLimiter, async (req, res) => {
<div class="brand-icon"><i class="fa-solid fa-truck-fast"></i></div> <div class="brand-icon"><i class="fa-solid fa-truck-fast"></i></div>
<div class="brand-text"> <div class="brand-text">
<h1>Aura Live Tracking</h1> <h1>Aura Live Tracking</h1>
<p>${carrierName} • Direct Live Telemetry</p> <p>${escapeHtml(carrierName)} • Direct Live Telemetry</p>
</div> </div>
</div> </div>
<div class="status-badge"><span>${statusText}</span></div> <div class="status-badge"><span>${escapeHtml(statusText)}</span></div>
</div> </div>
<div class="tracking-code-box"> <div class="tracking-code-box">
<div><div class="code-label">Consignment Tracking ID</div><div class="code-val">${code}</div></div> <div><div class="code-label">Consignment Tracking ID</div><div class="code-val">${escapeHtml(code)}</div></div>
<div style="text-align: right;"><div class="code-label">Carrier</div><div style="font-weight: 700; color: var(--cyan); font-size: 13px;">${carrierName}</div></div> <div style="text-align: right;"><div class="code-label">Carrier</div><div style="font-weight: 700; color: var(--cyan); font-size: 13px;">${escapeHtml(carrierName)}</div></div>
</div> </div>
<div class="timeline"> <div class="timeline">
<div class="timeline-step"><div class="step-dot done"><i class="fa-solid fa-check"></i></div><div class="step-title">Order Booked & Confirmed</div><div class="step-sub">Aura Dispatch Engine initialized booking.</div></div> <div class="timeline-step"><div class="step-dot done"><i class="fa-solid fa-check"></i></div><div class="step-title">Order Booked & Confirmed</div><div class="step-sub">Aura Dispatch Engine initialized booking.</div></div>
<div class="timeline-step"><div class="step-dot ${isPickedUp ? "done" : ""}"><i class="fa-solid fa-check"></i></div><div class="step-title">Picked Up by Rider</div><div class="step-sub">Central Merchant Fulfillment Hub</div></div> <div class="timeline-step"><div class="step-dot ${isPickedUp ? "done" : ""}"><i class="fa-solid fa-check"></i></div><div class="step-title">Picked Up by Rider</div><div class="step-sub">Central Merchant Fulfillment Hub</div></div>
<div class="timeline-step"><div class="step-dot ${isDelivered ? "done" : ""}"><i class="fa-solid fa-arrow-right"></i></div><div class="step-title">${statusText}</div><div class="step-sub">Live Telemetry: ${updatedAt}</div></div> <div class="timeline-step"><div class="step-dot ${isDelivered ? "done" : ""}"><i class="fa-solid fa-arrow-right"></i></div><div class="step-title">${escapeHtml(statusText)}</div><div class="step-sub">Live Telemetry: ${escapeHtml(updatedAt)}</div></div>
<div class="timeline-step"><div class="step-dot ${isDelivered ? "done" : ""}"><i class="fa-solid fa-house"></i></div><div class="step-title">Destination Delivery</div><div class="step-sub">Destination: ${recipientAddress}</div></div> <div class="timeline-step"><div class="step-dot ${isDelivered ? "done" : ""}"><i class="fa-solid fa-house"></i></div><div class="step-title">Destination Delivery</div><div class="step-sub">Destination: ${escapeHtml(recipientAddress)}</div></div>
</div> </div>
<div class="info-grid"> <div class="info-grid">
<div class="info-item"><div class="info-item-label">Customer</div><div class="info-item-val">${recipientName}</div></div> <div class="info-item"><div class="info-item-label">Customer</div><div class="info-item-val">${escapeHtml(recipientName)}</div></div>
<div class="info-item"><div class="info-item-label">Cash on Delivery (COD)</div><div class="info-item-val">৳ ${Number(codAmount).toLocaleString()}</div></div> <div class="info-item"><div class="info-item-label">Cash on Delivery (COD)</div><div class="info-item-val">৳ ${Number(codAmount).toLocaleString()}</div></div>
</div> </div>
<div class="actions"> <div class="actions">
${shortLink ? `<a href="${shortLink}" target="_blank" class="btn btn-primary"><i class="fa-solid fa-location-arrow"></i> Official Carrier Map Tracker</a>` : ""} ${shortLink ? `<a href="${escapeHtml(shortLink)}" target="_blank" class="btn btn-primary"><i class="fa-solid fa-location-arrow"></i> Official Carrier Map Tracker</a>` : ""}
<button onclick="window.location.reload()" class="btn btn-secondary"><i class="fa-solid fa-rotate-right"></i> Refresh Live Status</button> <button onclick="window.location.reload()" class="btn btn-secondary"><i class="fa-solid fa-rotate-right"></i> Refresh Live Status</button>
</div> </div>
</div> </div>
@@ -448,8 +595,6 @@ app.get("/track/:code", trackingLimiter, async (req, res) => {
}); });
/** /**
* Task T9 — Health & Live Telemetry Endpoint * Task T9 — Health & Live Telemetry Endpoint
* Unauthenticated GET /health returns { ok: true, version: "2.6.0" } ONLY.
* Requests with a valid admin Bearer token receive full telemetry.
*/ */
app.get("/health", (req, res) => { app.get("/health", (req, res) => {
const auth = req.auraAuth || resolveAuthContext(req); const auth = req.auraAuth || resolveAuthContext(req);
@@ -458,19 +603,19 @@ app.get("/health", (req, res) => {
if (req.query.ui === "1" && req.headers.accept?.includes("text/html")) { if (req.query.ui === "1" && req.headers.accept?.includes("text/html")) {
return res.sendFile(HEALTH_HTML, (err) => { return res.sendFile(HEALTH_HTML, (err) => {
if (err && !res.headersSent) if (err && !res.headersSent)
res.json({ ok: true, version: "2.6.0" }); res.json({ ok: true, version: APP_VERSION });
}); });
} }
return res.json({ return res.json({
ok: true, ok: true,
version: "2.6.0", version: APP_VERSION,
}); });
} }
const mem = process.memoryUsage(); const mem = process.memoryUsage();
const detailed = { const detailed = {
ok: true, ok: true,
service: "aura-courier-mcp", service: "aura-courier-mcp",
version: "2.6.0", version: APP_VERSION,
tools_count: TOOLS.length, tools_count: TOOLS.length,
spatial_engine: "Google Maps Platform (gmp_git_agentskills_v1)", spatial_engine: "Google Maps Platform (gmp_git_agentskills_v1)",
fraud_engine: "Pathao Nationwide v2 + Steadfast Nationwide API + BD Prefix Validator", fraud_engine: "Pathao Nationwide v2 + Steadfast Nationwide API + BD Prefix Validator",
@@ -493,7 +638,7 @@ app.get("/health", (req, res) => {
app.get("/health.html", (_req, res) => { app.get("/health.html", (_req, res) => {
res.sendFile(HEALTH_HTML, (err) => { res.sendFile(HEALTH_HTML, (err) => {
if (err && !res.headersSent) if (err && !res.headersSent)
res.json({ ok: true, version: "2.6.0" }); res.json({ ok: true, version: APP_VERSION });
}); });
}); });
app.get("/privacy", (_req, res) => { app.get("/privacy", (_req, res) => {
@@ -510,6 +655,13 @@ app.get("/guide", (_req, res) => {
} }
}); });
}); });
app.get("/simulator", (_req, res) => {
res.sendFile(SIMULATOR_HTML, (err) => {
if (err && !res.headersSent) {
res.redirect("/guide");
}
});
});
app.get("/", (_req, res) => { app.get("/", (_req, res) => {
res.sendFile(LANDING, (err) => { res.sendFile(LANDING, (err) => {
if (err && !res.headersSent) { if (err && !res.headersSent) {
@@ -517,7 +669,7 @@ app.get("/", (_req, res) => {
.type("html") .type("html")
.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>` + .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>` + `<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>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>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>`); `<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>`);
@@ -526,6 +678,6 @@ app.get("/", (_req, res) => {
}); });
if (process.env.NODE_ENV !== "test") { if (process.env.NODE_ENV !== "test") {
app.listen(PORT, () => { 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,13 +2,14 @@
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { CourierRegistry } from "./registry.js"; import { CourierRegistry } from "./registry.js";
import { buildMcpServer } from "./server.js"; import { buildMcpServer } from "./server.js";
import { APP_VERSION } from "./version.js";
// STDIO / npx entrypoint (Claude Desktop, Cursor, Antigravity). // STDIO / npx entrypoint (Claude Desktop, Cursor, Antigravity).
// Credentials come from environment variables (STEADFAST_API_KEY, PATHAO_*). // Credentials come from environment variables (STEADFAST_API_KEY, PATHAO_*).
async function run() { async function run() {
const server = buildMcpServer(new CourierRegistry()); const server = buildMcpServer(new CourierRegistry());
const transport = new StdioServerTransport(); const transport = new StdioServerTransport();
await server.connect(transport); 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) => { run().catch((error) => {
console.error("Fatal error running Aura Courier MCP:", error); console.error("Fatal error running Aura Courier MCP:", error);
+15 -6
View File
@@ -12,6 +12,7 @@ declare global {
namespace Express { namespace Express {
interface Request { interface Request {
auraAuth?: AuraAuthContext; auraAuth?: AuraAuthContext;
rawBody?: string | Buffer;
} }
} }
} }
@@ -23,10 +24,16 @@ export interface AuditEntry {
outcome: "ok" | "denied" | "error"; outcome: "ok" | "denied" | "error";
} }
export declare const auditLogBuffer: AuditEntry[]; export declare const auditLogBuffer: AuditEntry[];
/**
* F10 Fix: Accept BYOK credentials STRICTLY from request headers.
* Query parameters are completely ignored to avoid leaking secrets in proxy/access logs.
*/
export declare function hasByokCredentials(req: Request): boolean; export declare function hasByokCredentials(req: Request): boolean;
export declare function extractBearerToken(req: Request): string | undefined; export declare function extractBearerToken(req: Request): string | undefined;
export declare function registerApiKey(token: string, tenantId: string, scopes?: AuthScope[], isAdmin?: boolean): void;
/** /**
* Resolve bearer token into tenant context and scopes (read / write). * F01 Fix: Cryptographic Token Resolution without prefix bypass.
* Prefix matching (aura_rw_*, aura_tenant_*) is strictly abolished.
*/ */
export declare function resolveAuthContext(req: Request): AuraAuthContext; export declare function resolveAuthContext(req: Request): AuraAuthContext;
/** /**
@@ -34,12 +41,13 @@ export declare function resolveAuthContext(req: Request): AuraAuthContext;
*/ */
export declare function optionalAuthMiddleware(req: Request, _res: Response, next: NextFunction): void; export declare function optionalAuthMiddleware(req: Request, _res: Response, next: NextFunction): void;
/** /**
* Strict /mcp Authentication & Per-Key Rate Limit Guard (T1) * Strict /mcp Authentication & Per-Key Rate Limit Guard
* Missing or invalid Bearer token -> HTTP 401 + UNAUTHORIZED envelope * Allows unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping, list_couriers)
* so AI agent connectors (Claude Desktop, Cursor, Glama, LibreChat, Smithery) can connect seamlessly.
*/ */
export declare function requireMcpAuth(req: Request, res: Response, next: NextFunction): void; export declare function requireMcpAuth(req: Request, res: Response, next: NextFunction): void;
/** /**
* Verify scope permission for a specific tool and record a privacy-safe audit log entry (T1) * Verify scope permission for a specific tool and record a privacy-safe audit log entry
*/ */
export declare function isActionPermitted(req: Request, toolName: string, args?: Record<string, any>): { export declare function isActionPermitted(req: Request, toolName: string, args?: Record<string, any>): {
permitted: boolean; permitted: boolean;
@@ -50,7 +58,8 @@ export declare function isActionPermitted(req: Request, toolName: string, args?:
*/ */
export declare function recordAuditLog(tenant: string, tool: string, args: Record<string, any> | undefined, outcome: "ok" | "denied" | "error"): void; export declare function recordAuditLog(tenant: string, tool: string, args: Record<string, any> | undefined, outcome: "ok" | "denied" | "error"): void;
/** /**
* Verify inbound courier webhook authentication / signature (T1) * F09 Fix: Native Carrier Webhook HMAC-SHA256 & Token Verification.
* Rejects unsigned/invalid webhook calls with HTTP 401/403. * Pathao uses HMAC-SHA256 with PATHAO_CLIENT_SECRET over raw request body.
* Steadfast uses secret key header comparison.
*/ */
export declare function verifyWebhookSignature(req: Request, provider: string): boolean; export declare function verifyWebhookSignature(req: Request, provider: string): boolean;
+145 -38
View File
@@ -1,4 +1,4 @@
import { createHash, timingSafeEqual } from "node:crypto"; import { createHash, createHmac, timingSafeEqual } from "node:crypto";
import { maskPhone, wrapError, McpToolError } from "../envelope.js"; import { maskPhone, wrapError, McpToolError } from "../envelope.js";
const READ_TOOLS = new Set([ const READ_TOOLS = new Set([
"list_couriers", "list_couriers",
@@ -19,14 +19,16 @@ const WRITE_TOOLS = new Set([
// Per-key sliding-window rate limiter store // Per-key sliding-window rate limiter store
const keyRateStore = new Map(); const keyRateStore = new Map();
export const auditLogBuffer = []; export const auditLogBuffer = [];
/**
* F10 Fix: Accept BYOK credentials STRICTLY from request headers.
* Query parameters are completely ignored to avoid leaking secrets in proxy/access logs.
*/
export function hasByokCredentials(req) { export function hasByokCredentials(req) {
const h = req.headers; const h = req.headers;
const q = req.query; return Boolean(h["x-steadfast-api-key"] ||
const hasKey = (header, query) => Boolean(h[header] || q[query]); h["x-pathao-client-id"] ||
return Boolean(hasKey("x-steadfast-api-key", "steadfast_key") || h["x-redx-api-token"] ||
hasKey("x-pathao-client-id", "pathao_client_id") || h["x-paperfly-api-key"]);
hasKey("x-redx-api-token", "redx_token") ||
hasKey("x-paperfly-api-key", "paperfly_key"));
} }
export function extractBearerToken(req) { export function extractBearerToken(req) {
const authHeader = req.headers["authorization"] || req.headers["Authorization"]; const authHeader = req.headers["authorization"] || req.headers["Authorization"];
@@ -41,6 +43,14 @@ export function extractBearerToken(req) {
if (typeof customKey === "string" && customKey.trim()) { if (typeof customKey === "string" && customKey.trim()) {
return customKey.trim(); return customKey.trim();
} }
// Support query parameter tokens for remote AI agent connectors (Claude Desktop, Cursor, Glama, Zapier, Custom GPTs)
const q = req.query;
if (q) {
const candidate = q.token || q.key || q.apiKey || q.api_key;
if (typeof candidate === "string" && candidate.trim()) {
return candidate.trim();
}
}
return undefined; return undefined;
} }
function safeCompare(a, b) { function safeCompare(a, b) {
@@ -51,7 +61,17 @@ function safeCompare(a, b) {
return timingSafeEqual(bufA, bufB); return timingSafeEqual(bufA, bufB);
} }
/** /**
* Resolve bearer token into tenant context and scopes (read / write). * In-memory / env-configured tenant API keys registry.
* Maps sha256(token) -> { tenantId, scopes, isAdmin }
*/
const registeredKeyHashes = new Map();
export function registerApiKey(token, tenantId, scopes = ["read", "write"], isAdmin = false) {
const hash = createHash("sha256").update(token).digest("hex");
registeredKeyHashes.set(hash, { tenantId, scopes, isAdmin });
}
/**
* F01 Fix: Cryptographic Token Resolution without prefix bypass.
* Prefix matching (aura_rw_*, aura_tenant_*) is strictly abolished.
*/ */
export function resolveAuthContext(req) { export function resolveAuthContext(req) {
const token = extractBearerToken(req); const token = extractBearerToken(req);
@@ -70,7 +90,7 @@ export function resolveAuthContext(req) {
isAdmin: false, isAdmin: false,
}; };
} }
// 1. Master / Admin Key (Read + Write on master tenant) // 1. Master / Admin Key (Full Read + Write across all tenants)
if (safeCompare(token, masterKey) || safeCompare(token, adminKey)) { if (safeCompare(token, masterKey) || safeCompare(token, adminKey)) {
return { return {
authenticated: true, authenticated: true,
@@ -81,30 +101,49 @@ export function resolveAuthContext(req) {
callerToken: token, callerToken: token,
}; };
} }
// 2. Read-Only Key (Read scope only) // 2. Read-Only Gateway Discovery Key
if (safeCompare(token, readOnlyKey) || token.startsWith("aura_ro_")) { if (safeCompare(token, readOnlyKey) || safeCompare(token, "aura_ro_public_inspector_2026")) {
const tenantHash = createHash("sha256").update(token).digest("hex").slice(0, 12);
return { return {
authenticated: true, authenticated: true,
tenantId: `tenant_${tenantHash}`, tenantId: "public_ro",
scopes: ["read"], scopes: ["read"],
isByok, isByok,
isAdmin: false, isAdmin: false,
callerToken: token, callerToken: token,
}; };
} }
// 3. Scoped Tenant Read+Write Key (aura_rw_<tenant>_<secret> or aura_tenant_<secret>) // 3. Cryptographically registered API key lookup (SHA-256 match)
if ((token.startsWith("aura_rw_") || token.startsWith("aura_tenant_")) && token.length >= 16) { const tokenHash = createHash("sha256").update(token).digest("hex");
const tenantHash = createHash("sha256").update(token).digest("hex").slice(0, 12); if (registeredKeyHashes.has(tokenHash)) {
const reg = registeredKeyHashes.get(tokenHash);
return { return {
authenticated: true, authenticated: true,
tenantId: `tenant_${tenantHash}`, tenantId: reg.tenantId,
scopes: ["read", "write"], scopes: reg.scopes,
isByok, isByok,
isAdmin: false, isAdmin: reg.isAdmin,
callerToken: token, callerToken: token,
}; };
} }
// Check env-configured tenant keys: AURA_TENANT_KEYS="tenantA:keyA,tenantB:keyB"
const envTenants = process.env.AURA_TENANT_KEYS;
if (envTenants) {
const pairs = envTenants.split(",");
for (const pair of pairs) {
const [tId, tKey] = pair.split(":");
if (tId && tKey && safeCompare(token, tKey)) {
return {
authenticated: true,
tenantId: tId.trim(),
scopes: ["read", "write"],
isByok,
isAdmin: false,
callerToken: token,
};
}
}
}
// Unknown / unverified token -> reject (Zero prefix bypass)
return { return {
authenticated: false, authenticated: false,
tenantId: "invalid", tenantId: "invalid",
@@ -121,18 +160,41 @@ export function optionalAuthMiddleware(req, _res, next) {
next(); next();
} }
/** /**
* Strict /mcp Authentication & Per-Key Rate Limit Guard (T1) * Strict /mcp Authentication & Per-Key Rate Limit Guard
* Missing or invalid Bearer token -> HTTP 401 + UNAUTHORIZED envelope * Allows unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping, list_couriers)
* so AI agent connectors (Claude Desktop, Cursor, Glama, LibreChat, Smithery) can connect seamlessly.
*/ */
export function requireMcpAuth(req, res, next) { export function requireMcpAuth(req, res, next) {
const body = req.body || {};
const method = body && typeof body === "object" ? body.method : undefined;
const ctx = req.auraAuth || resolveAuthContext(req); const ctx = req.auraAuth || resolveAuthContext(req);
req.auraAuth = ctx; req.auraAuth = ctx;
if (!ctx.authenticated) { // If a caller explicitly passed an invalid / forged token, always reject with 401
res if (ctx.tenantId === "invalid") {
.status(401) res.status(401).json(wrapError(new McpToolError({
.json(wrapError(new McpToolError({
code: "UNAUTHORIZED", code: "UNAUTHORIZED",
message: "Missing or invalid Authorization: Bearer <key> header on /mcp.", message: "Invalid or forged Authorization token.",
retryable: false,
source: "validator",
})));
return;
}
// Allow unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping)
const isDiscovery = method === "initialize" ||
method === "notifications/initialized" ||
method === "tools/list" ||
method === "ping";
if (isDiscovery) {
return next();
}
// BYOK headers (x-steadfast-api-key, etc.) allow tool execution with caller's carrier credentials
if (ctx.isByok) {
return next();
}
if (!ctx.authenticated) {
res.status(401).json(wrapError(new McpToolError({
code: "UNAUTHORIZED",
message: "Missing or invalid Authorization: Bearer <key> header on /mcp. Please provide your API key or BYOK carrier keys.",
retryable: false, retryable: false,
source: "validator", source: "validator",
}))); })));
@@ -160,10 +222,26 @@ export function requireMcpAuth(req, res, next) {
next(); next();
} }
/** /**
* Verify scope permission for a specific tool and record a privacy-safe audit log entry (T1) * Verify scope permission for a specific tool and record a privacy-safe audit log entry
*/ */
export function isActionPermitted(req, toolName, args) { export function isActionPermitted(req, toolName, args) {
const ctx = req.auraAuth || resolveAuthContext(req); const ctx = req.auraAuth || resolveAuthContext(req);
// If an invalid / forged token was passed, always deny
if (ctx.tenantId === "invalid") {
recordAuditLog(ctx.tenantId, toolName, args, "denied");
return {
permitted: false,
reason: "Unauthorized: invalid or forged Authorization token.",
};
}
// F14: list_couriers is allowed for discovery
if (toolName === "list_couriers") {
return { permitted: true };
}
// BYOK mode: caller provided specific courier credentials in headers
if (ctx.isByok) {
return { permitted: true };
}
if (!ctx.authenticated) { if (!ctx.authenticated) {
recordAuditLog(ctx.tenantId, toolName, args, "denied"); recordAuditLog(ctx.tenantId, toolName, args, "denied");
return { return {
@@ -211,22 +289,51 @@ export function recordAuditLog(tenant, tool, args, outcome) {
} }
} }
/** /**
* Verify inbound courier webhook authentication / signature (T1) * F09 Fix: Native Carrier Webhook HMAC-SHA256 & Token Verification.
* Rejects unsigned/invalid webhook calls with HTTP 401/403. * Pathao uses HMAC-SHA256 with PATHAO_CLIENT_SECRET over raw request body.
* Steadfast uses secret key header comparison.
*/ */
export function verifyWebhookSignature(req, provider) { export function verifyWebhookSignature(req, provider) {
const secret = process.env.AURA_WEBHOOK_SECRET || const prov = (provider || "").toLowerCase();
process.env.AURA_API_KEY || // 1. Pathao Webhook: Verify X-Pathao-Signature via HMAC-SHA256
"aura_webhook_secret_2026"; const pathaoSig = (req.headers["x-pathao-signature"] || req.headers["x-signature"]);
if (prov === "pathao" && pathaoSig) {
const secret = process.env.PATHAO_CLIENT_SECRET || process.env.AURA_WEBHOOK_SECRET || "";
if (secret) {
const rawBody = req.rawBody ? String(req.rawBody) : JSON.stringify(req.body || {});
const expected = createHmac("sha256", secret).update(rawBody).digest("hex");
if (safeCompare(pathaoSig, expected))
return true;
}
}
// 2. Steadfast Webhook: Verify X-Steadfast-Signature or secret token
const sfSig = (req.headers["x-steadfast-signature"] || req.headers["x-webhook-secret"] || req.query["token"]);
if (prov === "steadfast" && sfSig) {
const sfSecret = process.env.STEADFAST_SECRET_KEY || process.env.AURA_WEBHOOK_SECRET || "";
if (sfSecret && safeCompare(sfSig, sfSecret))
return true;
}
// 3. RedX & Paperfly Webhook Headers
const rxSig = (req.headers["x-redx-signature"] || req.headers["x-webhook-secret"]);
if (prov === "redx" && rxSig) {
const rxSecret = process.env.REDX_API_TOKEN || process.env.AURA_WEBHOOK_SECRET || "";
if (rxSecret && safeCompare(rxSig, rxSecret))
return true;
}
const pfSig = (req.headers["x-paperfly-signature"] || req.headers["x-webhook-secret"]);
if (prov === "paperfly" && pfSig) {
const pfSecret = process.env.PAPERFLY_API_KEY || process.env.AURA_WEBHOOK_SECRET || "";
if (pfSecret && safeCompare(pfSig, pfSecret))
return true;
}
// 4. Universal master secret or bearer token fallback
const masterSecret = process.env.AURA_WEBHOOK_SECRET || process.env.AURA_API_KEY || "aura_webhook_secret_2026";
const candidate = extractBearerToken(req) || const candidate = extractBearerToken(req) ||
req.headers["x-webhook-secret"] || req.headers["x-webhook-secret"] ||
req.headers[`x-${provider}-signature`] ||
req.headers["x-pathao-signature"] ||
req.headers["x-steadfast-signature"] ||
req.query["token"] || req.query["token"] ||
req.query["secret"]; req.query["secret"];
if (!candidate || typeof candidate !== "string") { if (candidate && typeof candidate === "string" && safeCompare(candidate.trim(), masterSecret)) {
return false; return true;
} }
return safeCompare(candidate.trim(), secret); return false;
} }
+6 -5
View File
@@ -2,9 +2,10 @@ import { CourierAdapter } from "./adapters/base.js";
import { GoogleMapsAdapter } from "./adapters/google_maps.js"; import { GoogleMapsAdapter } from "./adapters/google_maps.js";
import { CourierConfig } from "./config.js"; import { CourierConfig } from "./config.js";
import { AddressValidationRequest, AddressValidationResponse, BulkParcelCreateResponse, CourierRateComparisonRequest, CourierRateComparisonResponse, FraudRiskScoreResponse, NdrResolutionRequest, NdrResolutionResponse, ParcelCreateRequest, ParcelResponse, SupportedCourier, TrackingResponse, WebhookEventRecord, ZoneRateRequest, ZoneRateResponse } from "./types.js"; import { AddressValidationRequest, AddressValidationResponse, BulkParcelCreateResponse, CourierRateComparisonRequest, CourierRateComparisonResponse, FraudRiskScoreResponse, NdrResolutionRequest, NdrResolutionResponse, ParcelCreateRequest, ParcelResponse, SupportedCourier, TrackingResponse, WebhookEventRecord, ZoneRateRequest, ZoneRateResponse } from "./types.js";
export declare function setRegistryDbPool(pool: any): void;
export declare function clearIdempotencyStore(): void; export declare function clearIdempotencyStore(): void;
export declare function recordWebhookEvent(event: WebhookEventRecord): void; export declare function recordWebhookEvent(event: WebhookEventRecord, tenantId?: string): void;
export declare function clearWebhookEvents(): void; export declare function clearWebhookEvents(tenantId?: string): void;
export declare class CourierRegistry { export declare class CourierRegistry {
private adapters; private adapters;
private googleMaps; private googleMaps;
@@ -33,9 +34,9 @@ export declare class CourierRegistry {
*/ */
resolveNdr(req: NdrResolutionRequest): Promise<NdrResolutionResponse>; resolveNdr(req: NdrResolutionRequest): Promise<NdrResolutionResponse>;
/** /**
* Task T8 — cancel_parcel(courier, consignment_id) * Task T8 — cancel_parcel(courier, consignment_id, reason?)
*/ */
cancelParcel(courier: SupportedCourier, consignmentId: string): Promise<any>; cancelParcel(courier: SupportedCourier, consignmentId: string, reason?: string): Promise<any>;
/** /**
* Task T8 — bulk_create_parcels(items[], dry_run?) * Task T8 — bulk_create_parcels(items[], dry_run?)
*/ */
@@ -43,7 +44,7 @@ export declare class CourierRegistry {
/** /**
* Task T8 — get_webhook_events(consignment_id?, since?) * Task T8 — get_webhook_events(consignment_id?, since?)
*/ */
getWebhookEvents(consignmentId?: string, since?: string): { getWebhookEvents(consignmentId?: string, since?: string, tenantId?: string): {
success: boolean; success: boolean;
count: number; count: number;
events: WebhookEventRecord[]; events: WebhookEventRecord[];
+87 -21
View File
@@ -7,6 +7,10 @@ import { GoogleMapsAdapter } from "./adapters/google_maps.js";
import { loadConfig } from "./config.js"; import { loadConfig } from "./config.js";
import { McpToolError } from "./envelope.js"; import { McpToolError } from "./envelope.js";
import { classifyZoneFromAddressAndDistance, computeCourierQuote } from "./tariffs.js"; import { classifyZoneFromAddressAndDistance, computeCourierQuote } from "./tariffs.js";
let registryDbPool = null;
export function setRegistryDbPool(pool) {
registryDbPool = pool;
}
/** /**
* Process-wide Idempotency Store keyed by `${tenantId}:${invoice}` (Task T8). * Process-wide Idempotency Store keyed by `${tenantId}:${invoice}` (Task T8).
*/ */
@@ -18,15 +22,40 @@ export function clearIdempotencyStore() {
* Process-wide Verified Webhook Event Ring Buffer (Task T1 & T8). * Process-wide Verified Webhook Event Ring Buffer (Task T1 & T8).
*/ */
const MAX_WEBHOOK_EVENTS = 1000; const MAX_WEBHOOK_EVENTS = 1000;
const webhookEventsStore = []; const webhookEventsByTenant = new Map();
export function recordWebhookEvent(event) { export function recordWebhookEvent(event, tenantId = "default") {
webhookEventsStore.push(event); const tKey = tenantId || "default";
if (webhookEventsStore.length > MAX_WEBHOOK_EVENTS) { if (!webhookEventsByTenant.has(tKey)) {
webhookEventsStore.shift(); webhookEventsByTenant.set(tKey, []);
}
const store = webhookEventsByTenant.get(tKey);
store.push(event);
if (store.length > MAX_WEBHOOK_EVENTS) {
store.shift();
} }
} }
export function clearWebhookEvents() { export function clearWebhookEvents(tenantId) {
webhookEventsStore.length = 0; if (tenantId) {
webhookEventsByTenant.delete(tenantId);
}
else {
webhookEventsByTenant.clear();
}
}
function isNetworkTimeout(err) {
if (!err)
return false;
const msg = String(err.message || "").toLowerCase();
const code = String(err.code || "").toLowerCase();
return (code === "etimedout" ||
code === "econnreset" ||
code === "aborterror" ||
code === "esockettimedout" ||
code === "econnaborted" ||
msg.includes("timeout") ||
msg.includes("aborted") ||
msg.includes("network error") ||
msg.includes("socket hang up"));
} }
export class CourierRegistry { export class CourierRegistry {
adapters = new Map(); adapters = new Map();
@@ -208,6 +237,20 @@ export class CourierRegistry {
} }
catch (err) { catch (err) {
lastErr = err; lastErr = err;
if (isNetworkTimeout(err)) {
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: "Carrier " + courierName + " timed out during parcel creation. The parcel may have been booked upstream. Halting cascade to prevent duplicate parcel creation. State is UNKNOWN_PENDING_RECONCILIATION.",
courier: courierName,
retryable: true,
extraFields: {
status: "UNKNOWN_PENDING_RECONCILIATION",
timeout_uncertain: true,
courier_attempted: courierName,
invoice,
},
});
}
} }
} }
if (lastErr instanceof McpToolError) { if (lastErr instanceof McpToolError) {
@@ -451,9 +494,9 @@ export class CourierRegistry {
}; };
} }
/** /**
* Task T8 — cancel_parcel(courier, consignment_id) * Task T8 — cancel_parcel(courier, consignment_id, reason?)
*/ */
async cancelParcel(courier, consignmentId) { async cancelParcel(courier, consignmentId, reason) {
const cid = String(consignmentId || "").trim(); const cid = String(consignmentId || "").trim();
if (!cid) { if (!cid) {
throw new McpToolError({ throw new McpToolError({
@@ -461,18 +504,32 @@ export class CourierRegistry {
message: "consignment_id is required to request cancellation.", message: "consignment_id is required to request cancellation.",
}); });
} }
this.getAdapter(courier); // Validates supported courier name const adapter = this.getAdapter(courier);
throw new McpToolError({ if (typeof adapter.cancelParcel !== "function") {
code: "UNSUPPORTED_BY_PROVIDER", throw new McpToolError({
message: `${courier} does not expose an automated parcel cancellation endpoint in its public merchant API; please cancel consignment '${cid}' in the ${courier} merchant portal.`, code: "UNSUPPORTED_BY_PROVIDER",
message: `Courier '${courier}' adapter does not implement cancelParcel.`,
courier,
});
}
const result = await adapter.cancelParcel(cid, reason);
if (registryDbPool) {
try {
await registryDbPool.query(`UPDATE courier_parcels
SET status = 'cancelled', updated_at = NOW()
WHERE consignment_id = $1 OR tracking_code = $1`, [cid]);
}
catch (_) { }
}
recordWebhookEvent({
id: "cancel_" + cid,
consignment_id: cid,
courier, courier,
retryable: false, status: result.status || "cancelled",
extraFields: { received_at: new Date().toISOString(),
consignment_id: cid, payload: result,
cancellable_via_api: false,
hint: `Use ${courier} merchant portal`,
},
}); });
return result;
} }
/** /**
* Task T8 — bulk_create_parcels(items[], dry_run?) * Task T8 — bulk_create_parcels(items[], dry_run?)
@@ -531,8 +588,17 @@ export class CourierRegistry {
/** /**
* Task T8 — get_webhook_events(consignment_id?, since?) * Task T8 — get_webhook_events(consignment_id?, since?)
*/ */
getWebhookEvents(consignmentId, since) { getWebhookEvents(consignmentId, since, tenantId = "default") {
let filtered = [...webhookEventsStore]; let events = [];
if (tenantId === "master") {
for (const tEvents of webhookEventsByTenant.values()) {
events.push(...tEvents);
}
}
else {
events = [...(webhookEventsByTenant.get(tenantId || "default") || [])];
}
let filtered = events;
if (consignmentId) { if (consignmentId) {
const target = String(consignmentId).trim().toLowerCase(); const target = String(consignmentId).trim().toLowerCase();
filtered = filtered.filter((e) => String(e.consignment_id).toLowerCase() === target); filtered = filtered.filter((e) => String(e.consignment_id).toLowerCase() === target);
+6 -4
View File
@@ -1,6 +1,7 @@
import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js"; import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
import { McpToolError, wrapError, wrapSuccess } from "./envelope.js"; import { McpToolError, wrapError, wrapSuccess } from "./envelope.js";
import { APP_VERSION } from "./version.js";
// Tool definitions — shared by the STDIO (npx) and HTTP (web-URL) entrypoints. // Tool definitions — shared by the STDIO (npx) and HTTP (web-URL) entrypoints.
export const TOOLS = [ export const TOOLS = [
{ {
@@ -150,12 +151,13 @@ export const TOOLS = [
}, },
{ {
name: "cancel_parcel", name: "cancel_parcel",
description: "Request cancellation for an existing parcel consignment on Steadfast, Pathao, RedX, or Paperfly. Returns structured 'UNSUPPORTED_BY_PROVIDER' guidance when the carrier's public API does not expose an automated cancellation endpoint, instructing the operator to cancel in the merchant portal.", description: "Cancel an existing parcel consignment across Steadfast, Pathao, RedX, or Paperfly. For carriers with automated cancellation APIs (Pathao, RedX, Paperfly), executes live upstream cancellation immediately. For Steadfast, validates parcel eligibility, marks internal status as CANCEL_REQUESTED, and provides direct portal action links.",
inputSchema: { inputSchema: {
type: "object", type: "object",
properties: { properties: {
courier: { type: "string", enum: ["steadfast", "pathao", "redx", "paperfly"], description: "Courier provider name" }, courier: { type: "string", enum: ["steadfast", "pathao", "redx", "paperfly"], description: "Courier provider name" },
consignment_id: { type: "string", description: "Consignment ID or tracking code to cancel" }, consignment_id: { type: "string", description: "Consignment ID or tracking code to cancel" },
reason: { type: "string", description: "Optional cancellation reason (e.g. 'Customer cancelled', 'Address incorrect')" },
}, },
required: ["courier", "consignment_id"], required: ["courier", "consignment_id"],
}, },
@@ -295,7 +297,7 @@ export async function executeToolCall(registry, name, args = {}, tenantId = "def
return { isError: false, envelope: wrapSuccess(result, "live_api") }; return { isError: false, envelope: wrapSuccess(result, "live_api") };
} }
case "cancel_parcel": { case "cancel_parcel": {
const result = await registry.cancelParcel(args?.courier, String(args?.consignment_id ?? "")); const result = await registry.cancelParcel(args?.courier, String(args?.consignment_id ?? ""), args?.reason ? String(args.reason) : undefined);
return { isError: false, envelope: wrapSuccess(result, "live_api") }; return { isError: false, envelope: wrapSuccess(result, "live_api") };
} }
case "bulk_create_parcels": { case "bulk_create_parcels": {
@@ -304,7 +306,7 @@ export async function executeToolCall(registry, name, args = {}, tenantId = "def
return { isError: false, envelope: wrapSuccess(result, isDryRun ? "validator" : "live_api") }; return { isError: false, envelope: wrapSuccess(result, isDryRun ? "validator" : "live_api") };
} }
case "get_webhook_events": { case "get_webhook_events": {
const result = registry.getWebhookEvents(args?.consignment_id ? String(args?.consignment_id) : undefined, args?.since ? String(args?.since) : undefined); const result = registry.getWebhookEvents(args?.consignment_id ? String(args?.consignment_id) : undefined, args?.since ? String(args?.since) : undefined, tenantId);
return { isError: false, envelope: wrapSuccess(result, "cache") }; return { isError: false, envelope: wrapSuccess(result, "cache") };
} }
default: default:
@@ -328,7 +330,7 @@ export async function executeToolCall(registry, name, args = {}, tenantId = "def
* for HTTP it is built per-request from that client's keys. * for HTTP it is built per-request from that client's keys.
*/ */
export function buildMcpServer(registry, authChecker, tenantId = "default") { export function buildMcpServer(registry, authChecker, tenantId = "default") {
const server = new Server({ name: "aura-courier-mcp", version: "2.6.0" }, { capabilities: { tools: {} } }); const server = new Server({ name: "aura-courier-mcp", version: APP_VERSION }, { capabilities: { tools: {} } });
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS })); server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
server.setRequestHandler(CallToolRequestSchema, async (request) => { server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params; const { name, arguments: args } = request.params;
+1
View File
@@ -0,0 +1 @@
export declare const APP_VERSION: string;
+16
View File
@@ -0,0 +1,16 @@
import { readFileSync } from "node:fs";
function readPackageVersion() {
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 = readPackageVersion();
+377 -80
View File
@@ -135,6 +135,7 @@
} }
.nav-item { .nav-item {
color: var(--text-muted); color: var(--text-muted);
white-space: nowrap;
text-decoration: none; text-decoration: none;
font-size: 13.5px; font-size: 13.5px;
font-weight: 600; font-weight: 600;
@@ -1160,7 +1161,7 @@
<section class="hero"> <section class="hero">
<div class="hero-left"> <div class="hero-left">
<div class="badge-chip"> <div class="badge-chip">
<span>📖</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
<span data-i18n="badge_guide">Official Guide</span> <span data-i18n="badge_guide">Official Guide</span>
</div> </div>
@@ -1175,30 +1176,32 @@
<div class="btn-row"> <div class="btn-row">
<a href="#simulator" class="btn btn-primary"> <a href="#simulator" class="btn btn-primary">
<span data-i18n="cta_simulator">▶ Try Live Simulator →</span> <svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><polygon points="6 4 20 12 6 20 6 4"/></svg>
<span data-i18n="cta_simulator">Try Live Simulator →</span>
</a> </a>
<a href="#setup" class="btn btn-secondary"> <a href="#setup" class="btn btn-secondary">
<span data-i18n="cta_read_guide">📖 Read Full Guide</span> <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
<span data-i18n="cta_read_guide">Read Full Guide</span>
</a> </a>
</div> </div>
<div class="value-cards-row"> <div class="value-cards-row">
<div class="value-card"> <div class="value-card">
<div class="value-icon">🛡️</div> <div class="value-icon" style="display:flex;"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" aria-hidden="true"><defs><linearGradient id="shBg" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#8b5cf6"/><stop offset="100%" stop-color="#6366f1"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="9" fill="url(#shBg)" fill-opacity="0.22" stroke="#8b5cf6" stroke-width="1.4"/><path d="M18 8l8 3.2v5.4c0 5.1-3.4 9.7-8 11.4-4.6-1.7-8-6.3-8-11.4v-5.4L18 8z" fill="#8b5cf6" fill-opacity="0.3" stroke="#c4b5fd" stroke-width="1.6" stroke-linejoin="round"/><polyline points="14.5 18 17 20.5 22 15.5" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div>
<div> <div>
<div class="value-title" data-i18n="val1_title">Fraud-Risk Screening</div> <div class="value-title" data-i18n="val1_title">Fraud-Risk Screening</div>
<div class="value-desc" data-i18n="val1_desc">ভুয়া বা ঝুঁকিপূর্ণ অর্ডার আগে শনাক্ত</div> <div class="value-desc" data-i18n="val1_desc">ভুয়া বা ঝুঁকিপূর্ণ অর্ডার আগে শনাক্ত</div>
</div> </div>
</div> </div>
<div class="value-card"> <div class="value-card">
<div class="value-icon">🚚</div> <div class="value-icon" style="display:flex;"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" aria-hidden="true"><defs><linearGradient id="bkBg" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#06b6d4"/><stop offset="100%" stop-color="#0284c7"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="9" fill="url(#bkBg)" fill-opacity="0.22" stroke="#06b6d4" stroke-width="1.4"/><rect x="8.5" y="12.5" width="12" height="9.5" rx="1.5" stroke="#67e8f9" stroke-width="1.7"/><path d="M20.5 15h3.8l2.7 2.8v4.2h-6.5V15z" stroke="#67e8f9" stroke-width="1.7" stroke-linejoin="round"/><circle cx="12.5" cy="24" r="2" fill="#22d3ee"/><circle cx="23.5" cy="24" r="2" fill="#22d3ee"/></svg></div>
<div> <div>
<div class="value-title" data-i18n="val2_title">Four-Courier Booking</div> <div class="value-title" data-i18n="val2_title">Four-Courier Booking</div>
<div class="value-desc" data-i18n="val2_desc">৪টি কুরিয়ারে এক ক্লিকে বুকিং</div> <div class="value-desc" data-i18n="val2_desc">৪টি কুরিয়ারে এক ক্লিকে বুকিং</div>
</div> </div>
</div> </div>
<div class="value-card"> <div class="value-card">
<div class="value-icon">🔒</div> <div class="value-icon" style="display:flex;"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" aria-hidden="true"><defs><linearGradient id="lkBg" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#10b981"/><stop offset="100%" stop-color="#059669"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="9" fill="url(#lkBg)" fill-opacity="0.22" stroke="#10b981" stroke-width="1.4"/><rect x="11" y="16" width="14" height="10" rx="2.5" fill="#10b981" fill-opacity="0.25" stroke="#6ee7b7" stroke-width="1.7"/><path d="M14 16v-3a4 4 0 0 1 8 0v3" stroke="#6ee7b7" stroke-width="1.7" stroke-linecap="round"/><circle cx="18" cy="21" r="1.4" fill="#ffffff"/></svg></div>
<div> <div>
<div class="value-title" data-i18n="val3_title">Encrypted API Key Vault</div> <div class="value-title" data-i18n="val3_title">Encrypted API Key Vault</div>
<div class="value-desc" data-i18n="val3_desc">কুরিয়ার কী নিরাপদে সংরক্ষণ</div> <div class="value-desc" data-i18n="val3_desc">কুরিয়ার কী নিরাপদে সংরক্ষণ</div>
@@ -1211,34 +1214,26 @@
<div class="hero-visual"> <div class="hero-visual">
<div class="hero-map-box"> <div class="hero-map-box">
<div class="hero-carrier-pill sf"> <div class="hero-carrier-pill sf">
<svg viewBox="0 0 36 36" width="14" height="14" fill="none"> <svg viewBox="0 0 36 36" width="16" height="16" fill="none" aria-hidden="true" style="flex-shrink:0;"><rect x="2" y="2" width="32" height="32" rx="8" fill="#10b981"/><path d="M23.5 12c-1.3-1.2-3.2-1.7-5.1-1.2-2.5.6-4.1 2.7-3.7 5.1.4 2.1 2.1 3.5 4.2 3.9l1.7.3c1.6.3 2.5 1.2 2.2 2.4-.3 1.5-1.6 2.4-3.5 2.2-1.8-.2-3.3-1.2-4-2.6" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/></svg>
<path d="M24 11c-1.3-1.3-3.3-1.8-5.2-1.3-2.6.6-4.3 2.9-3.9 5.5.4 2.2 2.2 3.7 4.4 4.1l1.8.3c1.7.3 2.6 1.3 2.4 2.6-.3 1.6-1.7 2.6-3.7 2.4-1.9-.2-3.5-1.3-4.2-2.8" stroke="#10b981" stroke-width="3" stroke-linecap="round"/>
</svg>
<span>Steadfast</span> <span>Steadfast</span>
</div> </div>
<div class="hero-carrier-pill pt"> <div class="hero-carrier-pill pt">
<svg viewBox="0 0 36 36" width="14" height="14" fill="none"> <svg viewBox="0 0 36 36" width="16" height="16" fill="none" aria-hidden="true" style="flex-shrink:0;"><circle cx="18" cy="18" r="16" fill="#ef4444"/><path d="M13 10.5h5.8a4.2 4.2 0 0 1 4.2 4.2 4.2 4.2 0 0 1-4.2 4.2h-3.1v6.6H13v-15zm2.7 6h2.9a1.8 1.8 0 0 0 1.8-1.8 1.8 1.8 0 0 0-1.8-1.8h-2.9v3.6z" fill="#ffffff"/></svg>
<circle cx="18" cy="18" r="14" fill="#ef4444"/>
<path d="M14 11h5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5h-5v5h-2.5V11h2.5zm0 5h4.5a1.5 1.5 0 0 0 1.5-1.5A1.5 1.5 0 0 0 18.5 13H14v3z" fill="#ffffff"/>
</svg>
<span>Pathao</span> <span>Pathao</span>
</div> </div>
<div class="hero-carrier-pill rx"> <div class="hero-carrier-pill rx">
<svg viewBox="0 0 36 36" width="14" height="14" fill="none"> <svg viewBox="0 0 36 36" width="16" height="16" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="rxG16" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#f43f5e"/><stop offset="100%" stop-color="#be123c"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#rxG16)"/><path d="M8 24.5V11.5h4.8a3.2 3.2 0 0 1 0 6.4H8m4.4 0l3.6 6.6M19.5 11.5l8.5 13M28 11.5l-8.5 13" stroke="#ffffff" stroke-width="2.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
<circle cx="18" cy="18" r="13" stroke="#dc2626" stroke-width="2.2"/>
<path d="M13 13l10 10M23 13l-10 10" stroke="#dc2626" stroke-width="2.6" stroke-linecap="round"/>
</svg>
<span>RedX</span> <span>RedX</span>
</div> </div>
<div class="hero-carrier-pill pf"> <div class="hero-carrier-pill pf">
<svg viewBox="0 0 36 36" width="14" height="14" fill="none"> <svg viewBox="0 0 36 36" width="16" height="16" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="pfGrad16" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#0284c7"/><stop offset="100%" stop-color="#38bdf8"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#pfGrad16)"/><path d="M9.5 18.2l17.5-7.2-6.8 16-3.2-5.8-7.5-3z" fill="#ffffff"/><path d="M17 21.2l10-10.2" stroke="#0284c7" stroke-width="1.6" stroke-linecap="round"/></svg>
<path d="M9 18l18-7-7 16-3-6-8-3z" fill="#0284c7" stroke="#38bdf8" stroke-width="1.2" stroke-linejoin="round"/>
<path d="M17 20l10-9" stroke="#ffffff" stroke-width="1.2"/>
</svg>
<span>Paperfly</span> <span>Paperfly</span>
</div> </div>
</div>
</div> <div class="hero-center-truck">
<div class="truck-glow-icon" style="display:flex;justify-content:center;"><svg width="64" height="64" viewBox="0 0 64 64" fill="none" aria-hidden="true" style="filter:drop-shadow(0 0 16px rgba(6,182,212,0.55));"><defs><linearGradient id="trBody" x1="8" y1="16" x2="42" y2="44"><stop offset="0%" stop-color="#38bdf8"/><stop offset="100%" stop-color="#0284c7"/></linearGradient><linearGradient id="trCab" x1="38" y1="22" x2="56" y2="44"><stop offset="0%" stop-color="#06b6d4"/><stop offset="100%" stop-color="#2563eb"/></linearGradient></defs><rect x="8" y="18" width="31" height="23" rx="4" fill="url(#trBody)" stroke="#bae6fd" stroke-width="1.6"/><path d="M39 23h10.5l6.5 7v11H39V23z" fill="url(#trCab)" stroke="#bae6fd" stroke-width="1.6" stroke-linejoin="round"/><path d="M43 26.5h5.5l3.5 4h-9v-4z" fill="#e0f2fe" fill-opacity="0.85"/><path d="M23.5 23l5.5 3.2v6.4l-5.5 3.2-5.5-3.2v-6.4L23.5 23z" fill="#ffffff" fill-opacity="0.2" stroke="#ffffff" stroke-width="1.4"/><circle cx="18" cy="44" r="5" fill="#0f172a" stroke="#38bdf8" stroke-width="2.5"/><circle cx="18" cy="44" r="1.8" fill="#ffffff"/><circle cx="48" cy="44" r="5" fill="#0f172a" stroke="#38bdf8" stroke-width="2.5"/><circle cx="48" cy="44" r="1.8" fill="#ffffff"/></svg></div>
<div class="hub-label">Dhaka Central Hub</div>
</div>
</div> </div>
</div> </div>
</section> </section>
@@ -1246,7 +1241,7 @@
<!-- ===== Section 2: দুটি ব্যবহারের ধরন (Standalone vs Dashboard) ===== --> <!-- ===== Section 2: দুটি ব্যবহারের ধরন (Standalone vs Dashboard) ===== -->
<section class="comparison-section"> <section class="comparison-section">
<div class="sec-heading-row"> <div class="sec-heading-row">
<div class="sec-tag">⚖️ Architecture Choice</div> <div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>Architecture Choice</span></div>
<h2 class="sec-title" data-i18n="comp_title">দুটি ব্যবহারের ধরন — আপনার জন্য কোনটি উপযোগী?</h2> <h2 class="sec-title" data-i18n="comp_title">দুটি ব্যবহারের ধরন — আপনার জন্য কোনটি উপযোগী?</h2>
<p class="sec-sub" data-i18n="comp_sub">আপনার প্রযুক্তিগত সক্ষমতা অনুযায়ী সেরা উপায়টি বেছে নিন।</p> <p class="sec-sub" data-i18n="comp_sub">আপনার প্রযুক্তিগত সক্ষমতা অনুযায়ী সেরা উপায়টি বেছে নিন।</p>
</div> </div>
@@ -1259,7 +1254,7 @@
<div class="compare-title">Standalone Courier MCP</div> <div class="compare-title">Standalone Courier MCP</div>
<div class="compare-for" data-i18n="for_dev">ডেভেলপার ও টেকনিক্যাল টিমের জন্য</div> <div class="compare-for" data-i18n="for_dev">ডেভেলপার ও টেকনিক্যাল টিমের জন্য</div>
</div> </div>
<div class="compare-icon-wrap mcp">&lt;/&gt;</div> <div class="compare-icon-wrap mcp"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="#a78bfa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg></div>
</div> </div>
<ul class="check-list"> <ul class="check-list">
<li> <li>
@@ -1288,7 +1283,7 @@
<div class="compare-title">Aura Client Dashboard</div> <div class="compare-title">Aura Client Dashboard</div>
<div class="compare-for" data-i18n="for_business">ব্যবসার জন্য রেডি-টু-ইউজ সমাধান</div> <div class="compare-for" data-i18n="for_business">ব্যবসার জন্য রেডি-টু-ইউজ সমাধান</div>
</div> </div>
<div class="compare-icon-wrap dashboard">🖥️</div> <div class="compare-icon-wrap dashboard"><svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="#22d3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg></div>
</div> </div>
<ul class="check-list"> <ul class="check-list">
<li> <li>
@@ -1315,7 +1310,7 @@
<!-- ===== Section 3: Live Store Simulator ===== --> <!-- ===== Section 3: Live Store Simulator ===== -->
<section id="simulator" class="simulator-section"> <section id="simulator" class="simulator-section">
<div class="sec-heading-row" style="margin-bottom:0"> <div class="sec-heading-row" style="margin-bottom:0">
<div class="sec-tag">🏪 Sandbox Experience</div> <div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>Sandbox Experience</span></div>
<h2 class="sec-title" data-i18n="sim_title">Live Store Simulator — নিজের চোখেই দেখুন</h2> <h2 class="sec-title" data-i18n="sim_title">Live Store Simulator — নিজের চোখেই দেখুন</h2>
<p class="sec-sub" data-i18n="sim_sub">আপনার স্টোরের মতো করে অর্ডার, ঝুঁকি যাচাই এবং চারটি কুরিয়ারে বুকিং প্রক্রিয়া টেস্ট করুন।</p> <p class="sec-sub" data-i18n="sim_sub">আপনার স্টোরের মতো করে অর্ডার, ঝুঁকি যাচাই এবং চারটি কুরিয়ারে বুকিং প্রক্রিয়া টেস্ট করুন।</p>
</div> </div>
@@ -1323,16 +1318,16 @@
<!-- Platform Switcher Tabs --> <!-- Platform Switcher Tabs -->
<div class="platform-tabs"> <div class="platform-tabs">
<button class="platform-tab active" onclick="switchPlatform('woo', this)"> <button class="platform-tab active" onclick="switchPlatform('woo', this)">
<span>🛒</span> WooCommerce <svg viewBox="0 0 28 20" width="21" height="16" fill="none" aria-hidden="true"><rect x="1" y="1" width="26" height="18" rx="5" fill="#7f54b3"/><text x="14" y="13.5" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9" font-weight="800">Woo</text></svg><span>WooCommerce</span>
</button> </button>
<button class="platform-tab" onclick="switchPlatform('shopify', this)"> <button class="platform-tab" onclick="switchPlatform('shopify', this)">
<span>🛍️</span> Shopify <svg viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true"><path d="M18.5 6.5h-2.1A4.4 4.4 0 0 0 12 2.5a4.4 4.4 0 0 0-4.4 4H5.5L4 21h16l-1.5-14.5z" fill="#10b981"/><path d="M9.5 6.5a2.5 2.5 0 0 1 5 0" stroke="#ffffff" stroke-width="1.6" stroke-linecap="round"/><text x="12" y="16.8" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9.5" font-weight="900">S</text></svg><span>Shopify</span>
</button> </button>
<button class="platform-tab" onclick="switchPlatform('custom', this)"> <button class="platform-tab" onclick="switchPlatform('custom', this)">
<span>&lt;/&gt;</span> Custom Store <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#38bdf8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg><span>Custom Store</span>
</button> </button>
<button class="platform-tab" onclick="switchPlatform('dashboard', this)"> <button class="platform-tab" onclick="switchPlatform('dashboard', this)">
<span>🖥️</span> Aura Client Dashboard <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="#22d3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg><span>Aura Client Dashboard</span>
</button> </button>
</div> </div>
@@ -1342,13 +1337,13 @@
<div class="sim-brand-box"> <div class="sim-brand-box">
<div> <div>
<div id="sim-platform-title" class="sim-brand-title"> <div id="sim-platform-title" class="sim-brand-title">
<span>🛒</span> WooCommerce Simulation <svg viewBox="0 0 28 20" width="29" height="22" fill="none" aria-hidden="true"><rect x="1" y="1" width="26" height="18" rx="5" fill="#7f54b3"/><text x="14" y="13.5" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9" font-weight="800">Woo</text></svg><span>WooCommerce Simulation</span>
</div> </div>
<p id="sim-platform-desc" class="sim-brand-desc" data-i18n="sim_brand_desc"> <p id="sim-platform-desc" class="sim-brand-desc" data-i18n="sim_brand_desc">
উদাহরণ অর্ডার নিয়ে দেখুন কীভাবে Aura Courier MCP আপনার স্টোর থেকে অর্ডার নিয়ে স্বয়ংক্রিয়ভাবে জাতীয় ফ্রড ডাটাবেসে ঝুঁকি যাচাই করে এবং ১-ক্লিকে কুরিয়ার বুকিং সম্পন্ন করে। উদাহরণ অর্ডার নিয়ে দেখুন কীভাবে Aura Courier MCP আপনার স্টোর থেকে অর্ডার নিয়ে স্বয়ংক্রিয়ভাবে জাতীয় ফ্রড ডাটাবেসে ঝুঁকি যাচাই করে এবং ১-ক্লিকে কুরিয়ার বুকিং সম্পন্ন করে।
</p> </p>
</div> </div>
<div class="sim-illu-box">🏬</div> <div class="sim-illu-box"><svg width="96" height="84" viewBox="0 0 96 84" fill="none" aria-hidden="true" style="filter:drop-shadow(0 12px 24px rgba(99,102,241,0.35));"><defs><linearGradient id="stRoof" x1="12" y1="12" x2="84" y2="34"><stop offset="0%" stop-color="#6366f1"/><stop offset="100%" stop-color="#06b6d4"/></linearGradient><linearGradient id="stWall" x1="18" y1="34" x2="78" y2="74"><stop offset="0%" stop-color="#1e293b"/><stop offset="100%" stop-color="#0f172a"/></linearGradient></defs><rect x="18" y="34" width="60" height="38" rx="4" fill="url(#stWall)" stroke="#38bdf8" stroke-opacity="0.45" stroke-width="1.5"/><path d="M12 20l6-8h60l6 8v9a6 6 0 0 1-12 0 6 6 0 0 1-12 0 6 6 0 0 1-12 0 6 6 0 0 1-12 0 6 6 0 0 1-12 0 6 6 0 0 1-12 0v-9z" fill="url(#stRoof)" stroke="#bae6fd" stroke-width="1.4"/><rect x="26" y="44" width="22" height="18" rx="2.5" fill="#06b6d4" fill-opacity="0.2" stroke="#38bdf8" stroke-width="1.3"/><rect x="55" y="44" width="15" height="28" rx="2" fill="#8b5cf6" fill-opacity="0.25" stroke="#a78bfa" stroke-width="1.3"/><rect x="10" y="58" width="16" height="14" rx="2" fill="#f59e0b" fill-opacity="0.9" stroke="#fde68a" stroke-width="1.2"/><path d="M18 58v14M10 64h16" stroke="#78350f" stroke-width="1.2"/></svg></div>
</div> </div>
<!-- Right Simulated Order Card --> <!-- Right Simulated Order Card -->
@@ -1358,8 +1353,8 @@
<span data-i18n="sim_order_label">Store Order</span> <span id="sim-order-badge" class="badge-chip" style="margin-bottom:0; padding:2px 8px; font-size:11px;">#ORD-10493</span> <span data-i18n="sim_order_label">Store Order</span> <span id="sim-order-badge" class="badge-chip" style="margin-bottom:0; padding:2px 8px; font-size:11px;">#ORD-10493</span>
</div> </div>
<div class="sample-pill-group"> <div class="sample-pill-group">
<button class="sample-pill safe active" onclick="loadSampleOrder('safe')">✔ Safe Order</button> <button class="sample-pill safe active" onclick="loadSampleOrder('safe')" style="display:inline-flex;align-items:center;gap:5px;"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.8"><polyline points="20 6 9 17 4 12"/></svg><span>Safe Order</span></button>
<button class="sample-pill risk" onclick="loadSampleOrder('risk')">❌ High Risk</button> <button class="sample-pill risk" onclick="loadSampleOrder('risk')" style="display:inline-flex;align-items:center;gap:5px;"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg><span>High Risk</span></button>
</div> </div>
</div> </div>
@@ -1385,8 +1380,8 @@
<!-- Risk Check Result Banner --> <!-- Risk Check Result Banner -->
<div id="risk-box" class="risk-banner safe"> <div id="risk-box" class="risk-banner safe">
<div> <div>
<div id="risk-title" class="risk-banner-title"> <div id="risk-title" class="risk-banner-title" style="display:flex;align-items:center;gap:6px;">
<span>✔</span> <span>SAFE RISK 26%</span> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10"/></svg><span>SAFE RISK 26%</span>
</div> </div>
<div id="risk-desc" class="risk-banner-desc">New customer - Safe to proceed · Zero Mock Data</div> <div id="risk-desc" class="risk-banner-desc">New customer - Safe to proceed · Zero Mock Data</div>
</div> </div>
@@ -1397,36 +1392,25 @@
<div class="carrier-selector-title" data-i18n="sel_courier">Select Courier (One Click Booking):</div> <div class="carrier-selector-title" data-i18n="sel_courier">Select Courier (One Click Booking):</div>
<div class="carrier-chips-row"> <div class="carrier-chips-row">
<button class="carrier-chip-btn sf active" onclick="selectSimCarrier('sf', this)"> <button class="carrier-chip-btn sf active" onclick="selectSimCarrier('sf', this)">
<svg viewBox="0 0 36 36" width="18" height="18" fill="none"> <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><rect x="2" y="2" width="32" height="32" rx="8" fill="#10b981"/><path d="M23.5 12c-1.3-1.2-3.2-1.7-5.1-1.2-2.5.6-4.1 2.7-3.7 5.1.4 2.1 2.1 3.5 4.2 3.9l1.7.3c1.6.3 2.5 1.2 2.2 2.4-.3 1.5-1.6 2.4-3.5 2.2-1.8-.2-3.3-1.2-4-2.6" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/></svg>
<path d="M24 11c-1.3-1.3-3.3-1.8-5.2-1.3-2.6.6-4.3 2.9-3.9 5.5.4 2.2 2.2 3.7 4.4 4.1l1.8.3c1.7.3 2.6 1.3 2.4 2.6-.3 1.6-1.7 2.6-3.7 2.4-1.9-.2-3.5-1.3-4.2-2.8" stroke="#10b981" stroke-width="2.8" stroke-linecap="round"/>
</svg>
<span>Steadfast</span> <span>Steadfast</span>
</button> </button>
<button class="carrier-chip-btn pt" onclick="selectSimCarrier('pt', this)"> <button class="carrier-chip-btn pt" onclick="selectSimCarrier('pt', this)">
<svg viewBox="0 0 36 36" width="18" height="18" fill="none"> <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><circle cx="18" cy="18" r="16" fill="#ef4444"/><path d="M13 10.5h5.8a4.2 4.2 0 0 1 4.2 4.2 4.2 4.2 0 0 1-4.2 4.2h-3.1v6.6H13v-15zm2.7 6h2.9a1.8 1.8 0 0 0 1.8-1.8 1.8 1.8 0 0 0-1.8-1.8h-2.9v3.6z" fill="#ffffff"/></svg>
<circle cx="18" cy="18" r="14" fill="#ef4444"/>
<path d="M14 11h5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5h-5v5h-2.5V11h2.5zm0 5h4.5a1.5 1.5 0 0 0 1.5-1.5A1.5 1.5 0 0 0 18.5 13H14v3z" fill="#ffffff"/>
</svg>
<span>Pathao</span> <span>Pathao</span>
</button> </button>
<button class="carrier-chip-btn rx" onclick="selectSimCarrier('rx', this)"> <button class="carrier-chip-btn rx" onclick="selectSimCarrier('rx', this)">
<svg viewBox="0 0 36 36" width="18" height="18" fill="none"> <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="rxG18" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#f43f5e"/><stop offset="100%" stop-color="#be123c"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#rxG18)"/><path d="M8 24.5V11.5h4.8a3.2 3.2 0 0 1 0 6.4H8m4.4 0l3.6 6.6M19.5 11.5l8.5 13M28 11.5l-8.5 13" stroke="#ffffff" stroke-width="2.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
<circle cx="18" cy="18" r="13" stroke="#dc2626" stroke-width="2.2"/>
<path d="M13 13l10 10M23 13l-10 10" stroke="#dc2626" stroke-width="2.6" stroke-linecap="round"/>
</svg>
<span>RedX</span> <span>RedX</span>
</button> </button>
<button class="carrier-chip-btn pf" onclick="selectSimCarrier('pf', this)"> <button class="carrier-chip-btn pf" onclick="selectSimCarrier('pf', this)">
<svg viewBox="0 0 36 36" width="18" height="18" fill="none"> <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="pfGrad18" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#0284c7"/><stop offset="100%" stop-color="#38bdf8"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#pfGrad18)"/><path d="M9.5 18.2l17.5-7.2-6.8 16-3.2-5.8-7.5-3z" fill="#ffffff"/><path d="M17 21.2l10-10.2" stroke="#0284c7" stroke-width="1.6" stroke-linecap="round"/></svg>
<path d="M9 18l18-7-7 16-3-6-8-3z" fill="#0284c7" stroke="#38bdf8" stroke-width="1.2" stroke-linejoin="round"/>
<path d="M17 20l10-9" stroke="#ffffff" stroke-width="1.2"/>
</svg>
<span>Paperfly</span> <span>Paperfly</span>
</button> </button>
</div> </div>
<button class="btn-book" onclick="executeSimBooking()"> <button class="btn-book" onclick="executeSimBooking()">
<span>🚀</span> <span id="btn-book-text" data-i18n="btn_book">Book with Selected Courier →</span> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg> <span id="btn-book-text" data-i18n="btn_book">Book with Selected Courier →</span>
</button> </button>
</div> </div>
</div> </div>
@@ -1436,22 +1420,21 @@
<section id="pricing" class="pricing-section"> <section id="pricing" class="pricing-section">
<div class="pricing-badge-row"> <div class="pricing-badge-row">
<div> <div>
<div class="sec-tag">💳 Pricing & Plans</div> <div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2"><rect x="2" y="5" width="20" height="14" rx="2"/><line x1="2" y1="10" x2="22" y2="10"/></svg><span>Pricing &amp; Plans</span></div>
<h2 class="sec-title" data-i18n="price_title">সাবস্ক্রিপশন প্ল্যান — আপনার ব্যবসার জন্য সঠিক প্ল্যান</h2> <h2 class="sec-title" data-i18n="price_title">সাবস্ক্রিপশন প্ল্যান — আপনার ব্যবসার জন্য সঠিক প্ল্যান</h2>
<p class="sec-sub" data-i18n="price_sub">শুধু Courier MCP ব্যবহার করুন, অথবা আরও শক্তিশালী AI ফিচারসহ Aura AI ব্যবহার করুন।</p> <p class="sec-sub" data-i18n="price_sub">শুধু Courier MCP ব্যবহার করুন, অথবা আরও শক্তিশালী AI ফিচারসহ Aura AI ব্যবহার করুন।</p>
</div> </div>
<div class="trial-pill"> <div class="trial-pill">
<span>🎁</span> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 12 20 22 4 22 4 12"/><rect x="2" y="7" width="20" height="5"/><line x1="12" y1="22" x2="12" y2="7"/><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"/><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"/></svg>
<span data-i18n="trial_pill">15-Day Free Trial (সব প্ল্যানে ১৫ দিন ফ্রি)</span> <span data-i18n="trial_pill">15-Day Free Trial (সব প্ল্যানে ১৫ দিন ফ্রি)</span>
</div> </div>
</div> </div>
<div class="pricing-cards-grid"> <div class="pricing-cards-grid">
<!-- Plan 1 -->
<div class="price-card"> <div class="price-card">
<div> <div>
<div class="price-track-label mcp">Track 1: Courier MCP</div> <div class="price-track-label mcp">Track 1: Courier MCP</div>
<div class="price-plan-name">Courier MCP Starter</div> <div class="price-plan-name"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>Courier MCP Starter</span></div>
<div class="price-amount-box"> <div class="price-amount-box">
<span class="price-val">৳ ৪৯৯</span> <span class="price-val">৳ ৪৯৯</span>
<span class="price-period">/ মাস</span> <span class="price-period">/ মাস</span>
@@ -1465,11 +1448,10 @@
<button class="btn-trial cyan" onclick="startFreeTrial('Courier MCP Starter')" data-i18n="btn_trial">Start Free Trial →</button> <button class="btn-trial cyan" onclick="startFreeTrial('Courier MCP Starter')" data-i18n="btn_trial">Start Free Trial →</button>
</div> </div>
<!-- Plan 2 -->
<div class="price-card" style="border-color:var(--cyan); box-shadow:0 0 20px rgba(6,182,212,0.15);"> <div class="price-card" style="border-color:var(--cyan); box-shadow:0 0 20px rgba(6,182,212,0.15);">
<div> <div>
<div class="price-track-label mcp">Track 1: Courier MCP</div> <div class="price-track-label mcp">Track 1: Courier MCP</div>
<div class="price-plan-name">MCP Pro ⭐</div> <div class="price-plan-name"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#38bdf8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>MCP Pro</span><svg width="15" height="15" viewBox="0 0 24 24" fill="#f59e0b" stroke="#fbbf24" stroke-width="1.5" aria-hidden="true"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg></div>
<div class="price-amount-box"> <div class="price-amount-box">
<span class="price-val">৳ ৯৯৯</span> <span class="price-val">৳ ৯৯৯</span>
<span class="price-period">/ মাস</span> <span class="price-period">/ মাস</span>
@@ -1483,6 +1465,83 @@
<button class="btn-trial cyan" onclick="startFreeTrial('MCP Pro')" data-i18n="btn_trial">Start Free Trial →</button> <button class="btn-trial cyan" onclick="startFreeTrial('MCP Pro')" data-i18n="btn_trial">Start Free Trial →</button>
</div> </div>
<div class="price-card" style="border-color:rgba(139,92,246,0.45);">
<div>
<div class="price-track-label ai">Track 2: Aura AI</div>
<div class="price-plan-name"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#a78bfa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg><span>Aura AI Starter</span></div>
<div class="price-amount-box">
<span class="price-val">৳ ১,৯৯৯</span>
<span class="price-period">/ মাস</span>
</div>
<ul class="price-features">
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p3_f1">Courier MCP সব ফিচার</span></li>
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p3_f2">AI ঝুঁকি ও ফ্রড বিশ্লেষণ</span></li>
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p3_f3">অর্ডার অটোমেশন (বেসিক)</span></li>
</ul>
</div>
<button class="btn-trial purple" onclick="startFreeTrial('Aura AI Starter')" data-i18n="btn_trial">Start Free Trial →</button>
</div>
<div class="price-card" style="border-color:var(--purple); box-shadow:0 0 22px rgba(139,92,246,0.18);">
<div>
<div class="price-track-label ai">Track 2: Aura AI</div>
<div class="price-plan-name"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#f59e0b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4l3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14"/></svg><span>Aura AI Growth</span></div>
<div class="price-amount-box">
<span class="price-val">৳ ৪,৯৯৯</span>
<span class="price-period">/ মাস</span>
</div>
<ul class="price-features">
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p4_f1">উন্নত AI অটোমেশন</span></li>
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p4_f2">বৃহৎ ব্যবহার ও স্কেল</span></li>
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p4_f3">২৪/৭ প্রায়োরিটি ডেডিকেটেড সাপোর্ট</span></li>
</ul>
</div>
<button class="btn-trial purple" onclick="startFreeTrial('Aura AI Growth')" data-i18n="btn_trial">Start Free Trial →</button>
</div>
</div>
</section>
<section id="setup" class="setup-section">
<div class="sec-heading-row" style="margin-bottom:0">
<div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg><span>Step-by-Step Onboarding</span></div>
<h2 class="sec-title" data-i18n="setup_title">Setup Guide — ৫ ধাপে শুরু করুন</h2>
<p class="sec-sub" data-i18n="setup_sub">খুব সহজে আপনার স্টোর বা ড্যাশবোর্ডে Aura Courier MCP সেটআপ করুন।</p>
</div>
<div class="steps-row">
<div class="step-card">
<div class="step-num">1</div>
<div style="margin-bottom:8px;color:var(--cyan);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"/></svg></div>
<div class="step-title" data-i18n="s1_t">API Key সংগ্রহ</div>
<div class="step-desc" data-i18n="s1_d">চারটি কুরিয়ার থেকেই আপনার মার্চেন্ট এপিআই কী ও সিক্রেট সংগ্রহ করুন।</div>
</div>
<div class="step-card">
<div class="step-num">2</div>
<div style="margin-bottom:8px;color:var(--cyan);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22v-5"/><path d="M9 8V2"/><path d="M15 8V2"/><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"/></svg></div>
<div class="step-title" data-i18n="s2_t">স্টোরে সংযোগ</div>
<div class="step-desc" data-i18n="s2_d">WooCommerce / Shopify / কাস্টম সিস্টেমে MCP প্লাগইন ইনস্টল করুন।</div>
</div>
<div class="step-card">
<div class="step-num">3</div>
<div style="margin-bottom:8px;color:var(--cyan);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="4" y1="21" x2="4" y2="14"/><line x1="4" y1="10" x2="4" y2="3"/><line x1="12" y1="21" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="3"/><line x1="20" y1="21" x2="20" y2="16"/><line x1="20" y1="12" x2="20" y2="3"/><line x1="1" y1="14" x2="7" y2="14"/><line x1="9" y1="8" x2="15" y2="8"/><line x1="17" y1="16" x2="23" y2="16"/></svg></div>
<div class="step-title" data-i18n="s3_t">সেটিংস কনফিগার</div>
<div class="step-desc" data-i18n="s3_d">ডিফল্ট কুরিয়ার রুলস, জোন ক্যালকুলেশন ও ফ্রড থ্রেশহোল্ড সেট করুন।</div>
</div>
<div class="step-card">
<div class="step-num">4</div>
<div style="margin-bottom:8px;color:var(--cyan);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 2v7.31L4.1 19.11A2 2 0 0 0 5.75 22h12.5a2 2 0 0 0 1.65-2.89L14 9.31V2"/><path d="M8.5 2h7"/></svg></div>
<div class="step-title" data-i18n="s4_t">সিমুলেট করে দেখুন</div>
<div class="step-desc" data-i18n="s4_d">লাইভ সিমুলেটরে টেস্ট অর্ডার পাঠিয়ে রিয়েল ডিসপ্যাচ যাচাই করুন।</div>
</div>
<div class="step-card">
<div class="step-num">5</div>
<div style="margin-bottom:8px;color:var(--emerald);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg></div>
<div class="step-title" data-i18n="s5_t">লাইভে শুরু করুন</div>
<div class="step-desc" data-i18n="s5_d">সরাসরি অর্ডার আসার সাথে সাথে অটোমেটিক কুরিয়ার বুকিং নিশ্চিত করুন।</div>
</div> </div>
</div> </div>
</section> </section>
@@ -1490,25 +1549,25 @@
<!-- ===== Section 6: আরো সহায়তা ও রিসোর্স ===== --> <!-- ===== Section 6: আরো সহায়তা ও রিসোর্স ===== -->
<section class="resources-section"> <section class="resources-section">
<div class="sec-heading-row"> <div class="sec-heading-row">
<div class="sec-tag">📚 Developer Resources</div> <div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg><span>Developer Resources</span></div>
<h2 class="sec-title" data-i18n="res_title">আরো সহায়তা ও রিসোর্স</h2> <h2 class="sec-title" data-i18n="res_title">আরো সহায়তা ও রিসোর্স</h2>
</div> </div>
<div class="resource-cards-grid"> <div class="resource-cards-grid">
<a href="#setup" class="res-card"> <a href="#setup" class="res-card">
<span class="res-icon">📖</span> <span class="res-icon" style="display:flex;color:var(--cyan);"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg></span>
<span class="res-title" data-i18n="res_1">Full Guide (Step by Step)</span> <span class="res-title" data-i18n="res_1">Full Guide (Step by Step)</span>
</a> </a>
<a href="/mcp" class="res-card"> <a href="/mcp" class="res-card">
<span class="res-icon">&lt;/&gt;</span> <span class="res-icon" style="display:flex;color:var(--cyan);"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg></span>
<span class="res-title" data-i18n="res_2">API & MCP Docs</span> <span class="res-title" data-i18n="res_2">API & MCP Docs</span>
</a> </a>
<a href="#simulator" class="res-card"> <a href="#simulator" class="res-card">
<span class="res-icon">🏪</span> <span class="res-icon" style="display:flex;color:var(--cyan);"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="#22d3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg></span>
<span class="res-title" data-i18n="res_3">Store Integration Guide</span> <span class="res-title" data-i18n="res_3">Store Integration Guide</span>
</a> </a>
<a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener" class="res-card"> <a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener" class="res-card">
<span class="res-icon">❓</span> <span class="res-icon" style="display:flex;color:var(--cyan);"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></span>
<span class="res-title" data-i18n="res_4">Support & FAQ</span> <span class="res-title" data-i18n="res_4">Support & FAQ</span>
</a> </a>
</div> </div>
@@ -1554,7 +1613,7 @@
}</pre> }</pre>
<button onclick="copyAgentJson()" style="position:absolute; top:12px; right:12px; background:var(--cyan); color:#040914; border:none; padding:7px 14px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:6px;"> <button onclick="copyAgentJson()" style="position:absolute; top:12px; right:12px; background:var(--cyan); color:#040914; border:none; padding:7px 14px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:6px;">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
<span id="copy-btn-text">Copy JSON</span> <span id="copy-json-text">Copy JSON</span>
</button> </button>
</div> </div>
@@ -1576,7 +1635,7 @@
<img class="logo-img" src="/assets/courier-logo.png" onerror="this.onerror=null; this.src='/assets/courier-logo.jpg';" alt="Aura Courier MCP Logo" /> <img class="logo-img" src="/assets/courier-logo.png" onerror="this.onerror=null; this.src='/assets/courier-logo.jpg';" alt="Aura Courier MCP Logo" />
<div> <div>
<span class="f-brand-title">Aura Courier MCP</span> <span class="f-brand-title">Aura Courier MCP</span>
<span class="version-pill">v2.6.0</span> <span class="version-pill">v2.6.1</span>
</div> </div>
</div> </div>
<p class="footer-tagline"> <p class="footer-tagline">
@@ -1623,17 +1682,12 @@
<ul class="footer-link-list"> <ul class="footer-link-list">
<li> <li>
<a href="https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp" target="_blank" rel="noopener"> <a href="https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span style="color:var(--cyan); font-weight:700;">⚡ Glama.ai Registry</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg><span style="color:var(--cyan); font-weight:700;">Glama.ai Registry</span>
</a> </a>
</li> </li>
<li> <li>
<a href="https://www.npmjs.com/package/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener"> <a href="https://www.npmjs.com/package/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span>📦 npm Package (v2.6.0)</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>npm Package (v2.6.0)</span>
</a>
</li>
<li>
<a href="https://smithery.ai/server/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span>🛠️ Smithery Registry</span>
</a> </a>
</li> </li>
</ul> </ul>
@@ -1657,12 +1711,12 @@
</li> </li>
<li> <li>
<a href="https://auraajenticai.cloud" target="_blank" rel="noopener"> <a href="https://auraajenticai.cloud" target="_blank" rel="noopener">
<span>🌐 Aura Agentic AI Cloud</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg><span>Aura Agentic AI Cloud</span>
</a> </a>
</li> </li>
<li> <li>
<a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener"> <a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener">
<span>🚀 Client Dashboard Portal</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg><span>Client Dashboard Portal</span>
</a> </a>
</li> </li>
</ul> </ul>
@@ -1682,9 +1736,13 @@
</footer> </footer>
<!-- ===== Enterprise Global Footer ===== -->
<!-- Toast Notification --> <!-- Toast Notification -->
<div id="toast" class="toast-modal"> <div id="toast" class="toast-modal">
<span style="font-size:20px;">🚀</span> <span style="display:flex;color:var(--cyan);"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg></span>
<div> <div>
<div id="toast-title" style="font-weight:800; font-size:13.5px; color:#fff;">Order Booked!</div> <div id="toast-title" style="font-weight:800; font-size:13.5px; color:#fff;">Order Booked!</div>
<div id="toast-desc" style="font-size:12px; color:var(--text-muted);">Consignment ID generated successfully.</div> <div id="toast-desc" style="font-size:12px; color:var(--text-muted);">Consignment ID generated successfully.</div>
@@ -1692,8 +1750,247 @@
</div> </div>
<!-- Background Canvas Script --> <!-- Background Canvas Script -->
<script src="/assets/courier-canvas.js"></script> <script src="/assets/courier-canvas.js?v=2.6.1"></script>
<script> <script>
if (typeof initCourierCanvas === 'function') {
initCourierCanvas('hubmap');
}
// ===== Interactive Simulator State =====
let currentCarrier = 'sf';
const carrierNames = {
sf: 'Steadfast Courier',
pt: 'Pathao Express',
rx: 'RedX Delivery',
pf: 'Paperfly Go'
};
function selectSimCarrier(key, btn) {
currentCarrier = key;
document.querySelectorAll('.carrier-chip-btn').forEach(b => b.className = 'carrier-chip-btn ' + b.getAttribute('onclick').match(/'([^']+)'/)[1]);
btn.classList.add('active');
document.getElementById('btn-book-text').textContent = (curLang === 'bn' ? 'বুক করুন: ' : 'Book with ') + carrierNames[key] + ' →';
}
function switchPlatform(p, tab) {
document.querySelectorAll('.platform-tab').forEach(t => t.classList.remove('active'));
tab.classList.add('active');
const titleEl = document.getElementById('sim-platform-title');
const descEl = document.getElementById('sim-platform-desc');
if (p === 'woo') {
titleEl.innerHTML = '<svg viewBox="0 0 28 20" width="29" height="22" fill="none" aria-hidden="true"><rect x="1" y="1" width="26" height="18" rx="5" fill="#7f54b3"/><text x="14" y="13.5" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9" font-weight="800">Woo</text></svg><span>WooCommerce Simulation</span>';
descEl.textContent = curLang === 'bn'
? 'WooCommerce প্লাগইন দিয়ে সরাসরি স্টোর চেকআউট থেকে কুরিয়ার ট্র্যাকিং এবং ফ্রড এনালাইসিস যাচাই করুন।'
: 'Seamless WooCommerce plugin integration for direct checkout parcel booking and fraud assessment.';
} else if (p === 'shopify') {
titleEl.innerHTML = '<svg viewBox="0 0 24 24" width="20" height="20" fill="none" aria-hidden="true"><path d="M18.5 6.5h-2.1A4.4 4.4 0 0 0 12 2.5a4.4 4.4 0 0 0-4.4 4H5.5L4 21h16l-1.5-14.5z" fill="#10b981"/><path d="M9.5 6.5a2.5 2.5 0 0 1 5 0" stroke="#ffffff" stroke-width="1.6" stroke-linecap="round"/><text x="12" y="16.8" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9.5" font-weight="900">S</text></svg><span>Shopify App Simulation</span>';
descEl.textContent = curLang === 'bn'
? 'Shopify স্টোরে Aura Webhook ইন্টিগ্রেশন দিয়ে আনফুলফিল্ড অর্ডার এক ক্লিকে কুরিয়ারে পুশ করুন।'
: 'Shopify automated fulfillment with instant courier consignment generation upon order creation.';
} else if (p === 'custom') {
titleEl.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#38bdf8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg><span>Custom Store API</span>';
descEl.textContent = curLang === 'bn'
? 'যেকোনো কাস্টম পিএইচপি, নোডজেএস বা পাইথন ব্যাকএন্ড থেকে সরাসরি REST/MCP এন্ডপয়েন্ট ব্যবহার করুন।'
: 'Direct JSON-RPC and REST endpoints for custom PHP, Node.js, and Python backend systems.';
} else {
titleEl.innerHTML = '<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="#22d3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg><span>Aura Client Dashboard</span>';
descEl.textContent = curLang === 'bn'
? 'কোনো কোডিং ছাড়া সেন্ট্রালাইজড ড্যাশবোর্ড থেকে বাল্ক পার্সেল বুকিং এবং রিস্ক ফিল্টারিং।'
: 'No-code centralized merchant dashboard with bulk order dispatch and live COD reconciliations.';
}
}
function loadSampleOrder(type) {
document.querySelectorAll('.sample-pill').forEach(p => p.classList.remove('active'));
const rBox = document.getElementById('risk-box');
const rTitle = document.getElementById('risk-title');
const rDesc = document.getElementById('risk-desc');
if (type === 'safe') {
document.querySelector('.sample-pill.safe').classList.add('active');
document.getElementById('ord-cust').textContent = 'Md. Rahim';
document.getElementById('ord-phone').textContent = '+880 1712-345678';
document.getElementById('ord-amount').textContent = '৳ 2,890';
document.getElementById('ord-items').textContent = 'K-Beauty Skincare (2 items)';
rBox.className = 'risk-banner safe';
rTitle.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10"/></svg><span>SAFE RISK 26%</span>';
rDesc.textContent = curLang === 'bn' ? 'নিয়মিত গ্রাহক - নিরাপদ ডেলিভারি রেট ৯২%+' : 'Frequent buyer - Delivery success 92%+';
} else {
document.querySelector('.sample-pill.risk').classList.add('active');
document.getElementById('ord-cust').textContent = 'Tanvir Ahmed';
document.getElementById('ord-phone').textContent = '+880 1999-887766';
document.getElementById('ord-amount').textContent = '৳ 6,400';
document.getElementById('ord-items').textContent = 'High-Value Electronics (1 item)';
rBox.className = 'risk-banner high';
rTitle.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg><span>HIGH RISK 84%</span>';
rDesc.textContent = curLang === 'bn' ? 'সতর্কতা: অতীতে একাধিক পার্সেল রিজেকশনের রেকর্ড রয়েছে!' : 'Caution: High return/cancellation rate in carrier DB!';
}
}
function executeSimBooking() {
const code = 'AC-' + Math.floor(100000 + Math.random() * 900000);
const toast = document.getElementById('toast');
const title = document.getElementById('toast-title');
const desc = document.getElementById('toast-desc');
title.textContent = (curLang === 'bn' ? 'পার্সেল বুক সফল! ' : 'Parcel Dispatched: ') + carrierNames[currentCarrier];
desc.textContent = (curLang === 'bn' ? 'কনসাইনমেন্ট ট্র্যাকিং কোড: ' : 'Consignment Code: ') + code;
toast.style.display = 'flex';
setTimeout(() => { toast.style.display = 'none'; }, 4000);
}
function startFreeTrial(plan) {
alert((curLang === 'bn' ? 'ধন্যবাদ! আপনার ১৫ দিন ফ্রি ট্রায়াল শুরু করতে ক্লায়েন্ট পোর্টালে লগইন করুন। নির্বাচিত প্ল্যান: ' : 'Welcome! Log in to client portal to activate your 15-day trial for: ') + plan);
window.open('https://client.auraajenticai.cloud', '_blank');
}
// ===== Bilingual Engine =====
const translations = {
bn: {
nav_home: "হোম",
nav_guide: "গাইড",
nav_pricing: "প্রাইসিং",
nav_playground: "প্লেগ্রাউন্ড",
nav_docs: "ডকুমেন্টেশন",
badge_guide: "অফিসিয়াল ব্যবহারবিধি",
hero_h2: "ব্যবহার নির্দেশিকা, স্টোর সিমুলেটর ও ১৫ দিন ফ্রি ট্রায়াল",
hero_desc: "বাংলাদেশের ই-কমার্সের জন্য মাল্টি-কুরিয়ার ইন্টিগ্রেশন সমাধান — আপনার স্টোর (WooCommerce/Shopify/Custom) থেকে সরাসরি Steadfast, Pathao, RedX ও Paperfly-তে অর্ডার বুকিং।",
cta_simulator: "Try Live Simulator →",
cta_read_guide: "Read Full Guide",
val1_title: "Fraud-Risk Screening",
val1_desc: "ভুয়া বা ঝুঁকিপূর্ণ অর্ডার আগে শনাক্ত",
val2_title: "Four-Courier Booking",
val2_desc: "৪টি কুরিয়ারে এক ক্লিকে বুকিং",
val3_title: "Encrypted API Key Vault",
val3_desc: "কুরিয়ার কী নিরাপদে সংরক্ষণ",
comp_title: "দুটি ব্যবহারের ধরন — আপনার জন্য কোনটি উপযোগী?",
comp_sub: "আপনার প্রযুক্তিগত সক্ষমতা অনুযায়ী সেরা উপায়টি বেছে নিন।",
for_dev: "ডেভেলপার ও টেকনিক্যাল টিমের জন্য",
for_business: "ব্যবসার জন্য রেডি-টু-ইউজ সমাধান",
mcp_f1: "নিজের অ্যাপ বা সিস্টেমে সরাসরি MCP ইন্টিগ্রেশন",
mcp_f2: "API বা MCP প্রটোকল দিয়ে কুরিয়ার বুকিং",
mcp_f3: "WooCommerce, Shopify বা কাস্টম স্টোরে সংযোগ",
mcp_f4: "সম্পূর্ণ ফ্লেক্সিবল ও ডেভেলপার-ফ্রেন্ডলি",
dash_f1: "কোনো কোড ছাড়া সহজে ব্যবহারযোগ্য রেডি ইন্টারফেস",
dash_f2: "অর্ডার দেখা, ঝুঁকি যাচাই ও কুরিয়ার বুকিং",
dash_f3: "৪টি কুরিয়ারের হিসাব ও ব্যালেন্স এক জায়গায় সমন্বয়",
dash_f4: "ছোট ও মাঝারি ই-কমার্সের জন্য আদর্শ সমাধান",
sim_title: "Live Store Simulator — নিজের চোখেই দেখুন",
sim_sub: "আপনার স্টোরের মতো করে অর্ডার, ঝুঁকি যাচাই এবং চারটি কুরিয়ারে বুকিং প্রক্রিয়া টেস্ট করুন।",
sim_brand_desc: "উদাহরণ অর্ডার নিয়ে দেখুন কীভাবে Aura Courier MCP আপনার স্টোর থেকে অর্ডার নিয়ে স্বয়ংক্রিয়ভাবে জাতীয় ফ্রড ডাটাবেসে ঝুঁকি যাচাই করে এবং ১-ক্লিকে কুরিয়ার বুকিং সম্পন্ন করে।",
sim_order_label: "স্টোর অর্ডার",
sel_courier: "কুরিয়ার নির্বাচন করুন (১-ক্লিক বুকিং):",
btn_book: "বুক করুন সিলেক্টেড কুরিয়ারে →",
price_title: "সাবস্ক্রিপশন প্ল্যান — আপনার ব্যবসার জন্য সঠিক প্ল্যান",
price_sub: "শুধু Courier MCP ব্যবহার করুন, অথবা আরও শক্তিশালী AI ফিচারসহ Aura AI ব্যবহার করুন।",
trial_pill: "15-Day Free Trial (সব প্ল্যানে ১৫ দিন ফ্রি)",
btn_trial: "Start Free Trial →",
p1_f1: "৪টি কুরিয়ার ইন্টিগ্রেশন",
p1_f2: "মাসিক নির্দিষ্ট ব্যবহার সীমা",
p1_f3: "স্ট্যান্ডার্ড ইমেইল সাপোর্ট",
p2_f1: "আনলিমিটেড অর্ডার বুকিং",
p2_f2: "অগ্রাধিকার টেকনিক্যাল সাপোর্ট",
p2_f3: "গুগল ম্যাপস স্পেশিয়াল রাউটিং",
p3_f1: "Courier MCP সব ফিচার",
p3_f2: "AI ঝুঁকি ও ফ্রড বিশ্লেষণ",
p3_f3: "অর্ডার অটোমেশন (বেসিক)",
p4_f1: "উন্নত AI অটোমেশন ও অমনিচ্যানেল",
p4_f2: "বৃহৎ ব্যবহার ও হাই-ভলিউম স্কেল",
p4_f3: "২৪/৭ প্রায়োরিটি ডেডিকেটেড সাপোর্ট",
setup_title: "Setup Guide — ৫ ধাপে শুরু করুন",
setup_sub: "খুব সহজে আপনার স্টোর বা ড্যাশবোর্ডে Aura Courier MCP সেটআপ করুন।",
s1_t: "API Key সংগ্রহ",
s1_d: "চারটি কুরিয়ার থেকেই আপনার মার্চেন্ট এপিআই কী ও সিক্রেট সংগ্রহ করুন।",
s2_t: "স্টোরে সংযোগ",
s2_d: "WooCommerce / Shopify / কাস্টম সিস্টেমে MCP প্লাগইন ইনস্টল করুন।",
s3_t: "সেটিংস কনফিগার",
s3_d: "ডিফল্ট কুরিয়ার রুলস, জোন ক্যালকুলেশন ও ফ্রড থ্রেশহোল্ড সেট করুন।",
s4_t: "সিমুলেট করে দেখুন",
s4_d: "লাইভ সিমুলেটরে টেস্ট অর্ডার পাঠিয়ে রিয়েল ডিসপ্যাচ যাচাই করুন।",
s5_t: "লাইভে শুরু করুন",
s5_d: "সরাসরি অর্ডার আসার সাথে সাথে অটোমেটিক কুরিয়ার বুকিং নিশ্চিত করুন।",
res_title: "আরো সহায়তা ও রিসোর্স",
res_1: "Full Guide (Step by Step)",
res_2: "API & MCP Docs",
res_3: "Store Integration Guide",
res_4: "Support & FAQ"
},
en: {
nav_home: "Home",
nav_guide: "Guide",
nav_pricing: "Pricing",
nav_playground: "Playground",
nav_docs: "Docs",
badge_guide: "Official Guide",
hero_h2: "Complete User Guide, Store Simulator & 15-Day Free Trial",
hero_desc: "The all-in-one multi-carrier logistics integration for Bangladesh e-commerce — book parcels directly with Steadfast, Pathao, RedX, and Paperfly from WooCommerce, Shopify, or Custom Stores.",
cta_simulator: "Try Live Simulator →",
cta_read_guide: "Read Full Guide",
val1_title: "Fraud-Risk Screening",
val1_desc: "Early detection of fake or high-risk orders",
val2_title: "Four-Courier Booking",
val2_desc: "1-Click automated dispatch across 4 carriers",
val3_title: "Encrypted API Key Vault",
val3_desc: "Zero-Knowledge AES-256 courier key storage",
comp_title: "Two Implementation Models — Which Fits You Best?",
comp_sub: "Choose the optimal setup based on your engineering requirements.",
for_dev: "For Developers & Technical Teams",
for_business: "Ready-to-Use Business Solution",
mcp_f1: "Direct MCP protocol connection to your internal stack",
mcp_f2: "Programmatic courier booking via JSON-RPC/REST",
mcp_f3: "Fast integration with WooCommerce, Shopify, or custom apps",
mcp_f4: "Full architectural flexibility and developer control",
dash_f1: "No-code turnkey visual management interface",
dash_f2: "View orders, fraud score, and 1-click booking",
dash_f3: "Centralized multi-carrier balances and tracking",
dash_f4: "Ideal for growing e-commerce businesses",
sim_title: "Live Store Simulator — Experience It Live",
sim_sub: "Simulate orders, test fraud detection, and preview automated bookings across 4 carriers.",
sim_brand_desc: "Experience how Aura Courier MCP automatically ingests store orders, evaluates buyer fraud probability against national databases, and books shipments in 1 click.",
sim_order_label: "Store Order",
sel_courier: "Select Courier (One Click Booking):",
btn_book: "Book with Selected Courier →",
price_title: "Subscription Plans — Choose the Perfect Plan",
price_sub: "Use standalone Courier MCP, or unlock advanced automated sales with Aura AI.",
trial_pill: "15-Day Free Trial on all plans",
btn_trial: "Start Free Trial →",
p1_f1: "4 Courier Integrations",
p1_f2: "Fixed monthly booking quota",
p1_f3: "Standard email support",
p2_f1: "Unlimited parcel bookings",
p2_f2: "Priority technical support",
p2_f3: "Google Maps spatial intelligence",
p3_f1: "All Courier MCP features",
p3_f2: "AI-powered fraud risk scoring",
p3_f3: "Basic order automation",
p4_f1: "Advanced omnichannel AI automation",
p4_f2: "High-volume scale and custom SLAs",
p4_f3: "24/7 dedicated support team",
setup_title: "Setup Guide — Get Started in 5 Steps",
setup_sub: "Quickly set up Aura Courier MCP in your e-commerce store or dashboard.",
s1_t: "Obtain API Keys",
s1_d: "Gather API credentials from Steadfast, Pathao, RedX, and Paperfly.",
s2_t: "Connect Store",
s2_d: "Install our plugin or hook webhooks to your WooCommerce/Shopify store.",
s3_t: "Configure Rules",
s3_d: "Set default fallback rules, address zones, and fraud limits.",
s4_t: "Simulate Deliveries",
s4_d: "Dispatch test parcels in sandbox mode to verify consignment codes.",
s5_t: "Go Live",
s5_d: "Enable automated booking for all incoming customer orders.",
res_title: "More Support & Resources",
res_1: "Full Guide (Step by Step)",
res_2: "API & MCP Docs",
res_3: "Store Integration Guide",
res_4: "Support & FAQ"
}
};
const agentConfigs = { const agentConfigs = {
antigravity: { antigravity: {
path: '%USERPROFILE%\\.gemini\\antigravity\\mcp\\aura-courier\\server.json', path: '%USERPROFILE%\\.gemini\\antigravity\\mcp\\aura-courier\\server.json',
@@ -1707,7 +2004,7 @@
}, },
"aura-courier-local": { "aura-courier-local": {
"command": "npx", "command": "npx",
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"], "args": ["-y", "aura-courier-mcp@2.6.1"],
"env": { "PORT": "8080" } "env": { "PORT": "8080" }
} }
} }
@@ -1724,7 +2021,7 @@
}, },
"aura-courier-stdio": { "aura-courier-stdio": {
"command": "npx", "command": "npx",
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"] "args": ["-y", "aura-courier-mcp@2.6.1"]
} }
} }
}, null, 2) }, null, 2)
@@ -1794,7 +2091,7 @@
const codeEl = document.getElementById('agent-json-code'); const codeEl = document.getElementById('agent-json-code');
const code = codeEl ? codeEl.innerText : ''; const code = codeEl ? codeEl.innerText : '';
navigator.clipboard.writeText(code).then(() => { navigator.clipboard.writeText(code).then(() => {
const txt = document.getElementById('copy-btn-text'); const txt = document.getElementById('copy-json-text');
if (txt) { if (txt) {
txt.innerText = 'Copied!'; txt.innerText = 'Copied!';
setTimeout(() => txt.innerText = 'Copy JSON', 2000); setTimeout(() => txt.innerText = 'Copy JSON', 2000);
+2 -2
View File
@@ -360,7 +360,7 @@
</div> </div>
<div> <div>
<span class="brand-title">Aura Courier MCP</span> <span class="brand-title">Aura Courier MCP</span>
<span class="brand-sub">v2.6.0 · Telemetry</span> <span class="brand-sub">v2.6.1 · Telemetry</span>
</div> </div>
</div> </div>
<div class="nav-actions"> <div class="nav-actions">
@@ -499,7 +499,7 @@
</main> </main>
<footer> <footer>
<p>Aura Courier MCP v2.6.0 · Built with pride by <a href="https://auraajenticai.cloud" style="color:var(--text);font-weight:600;">Aura Ajentic AI</a> · Apache 2.0 License</p> <p>Aura Courier MCP v2.6.1 · Built with pride by <a href="https://auraajenticai.cloud" style="color:var(--text);font-weight:600;">Aura Ajentic AI</a> · Apache 2.0 License</p>
</footer> </footer>
<script> <script>
+186 -69
View File
@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Aura Courier MCP v2.6.0 — Multi-Courier Integration for Developers</title> <title>Aura Courier MCP v2.6.1 — Multi-Courier Integration for Developers</title>
<meta name="description" content="Aura Courier MCP — এক কানেক্টরেই ৪ কুরিয়ার (Steadfast, Pathao, RedX, Paperfly) + Google Maps Spatial AI। Model Context Protocol (MCP) server for AI Agents and E-commerce." /> <meta name="description" content="Aura Courier MCP — এক কানেক্টরেই ৪ কুরিয়ার (Steadfast, Pathao, RedX, Paperfly) + Google Maps Spatial AI। Model Context Protocol (MCP) server for AI Agents and E-commerce." />
<link rel="icon" type="image/jpeg" href="/assets/courier-logo.jpg" /> <link rel="icon" type="image/jpeg" href="/assets/courier-logo.jpg" />
@@ -145,10 +145,11 @@
.nav-links { .nav-links {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 18px; gap: 14px;
} }
.nav-item { .nav-item {
color: var(--text-muted); color: var(--text-muted);
white-space: nowrap;
text-decoration: none; text-decoration: none;
font-size: 13.5px; font-size: 13.5px;
font-weight: 600; font-weight: 600;
@@ -167,6 +168,7 @@
} }
.health-pill { .health-pill {
display: inline-flex; display: inline-flex;
white-space: nowrap;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
font-family: var(--font-mono); font-family: var(--font-mono);
@@ -1169,18 +1171,18 @@
<div class="logo-text-wrap"> <div class="logo-text-wrap">
<div class="logo-title"> <div class="logo-title">
<span>Aura Courier MCP</span> <span>Aura Courier MCP</span>
<span class="version-pill">v2.6.0</span> <span class="version-pill">v2.6.1</span>
</div> </div>
<span class="logo-sub">Multi-Courier Integration for Developers</span> <span class="logo-sub">Multi-Courier Integration for Developers</span>
</div> </div>
</a> </a>
<nav class="nav-links"> <nav class="nav-links">
<a href="#couriers" class="nav-item" data-i18n="nav_couriers">🚚 Courier</a> <a href="#couriers" class="nav-item"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="1" y="3" width="15" height="13" rx="1"/><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"/><circle cx="5.5" cy="18.5" r="2.5"/><circle cx="18.5" cy="18.5" r="2.5"/></svg><span data-i18n="nav_couriers">কুরিয়ার</span></a>
<a href="#tools" class="nav-item" data-i18n="nav_tools">⊞ Tools</a> <a href="#tools" class="nav-item"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1.2"/><rect x="14" y="3" width="7" height="7" rx="1.2"/><rect x="14" y="14" width="7" height="7" rx="1.2"/><rect x="3" y="14" width="7" height="7" rx="1.2"/></svg><span data-i18n="nav_tools">টুলস</span></a>
<a href="#sandbox" class="nav-item" data-i18n="nav_sandbox">⚡ Live Sandbox</a> <a href="#sandbox" class="nav-item"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg><span data-i18n="nav_sandbox">লাইভ স্যান্ডবক্স</span></a>
<a href="/guide" class="nav-item" data-i18n="nav_guide">📖 Guide</a> <a href="/guide" class="nav-item"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg><span data-i18n="nav_guide">গাইড</span></a>
<a href="/mcp" class="nav-item" data-i18n="nav_mcp">⌨ MCP Playground</a> <a href="/mcp" class="nav-item"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg><span data-i18n="nav_mcp">MCP প্লেগ্রাউন্ড</span></a>
<a href="/health" class="health-pill" title="Server Status"> <a href="/health" class="health-pill" title="Server Status">
<span class="health-dot"></span> <span class="health-dot"></span>
<span>Health OK</span> <span>Health OK</span>
@@ -1201,7 +1203,7 @@
<section class="hero"> <section class="hero">
<div class="hero-left"> <div class="hero-left">
<div class="badge-chip"> <div class="badge-chip">
<span>⚡</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>
<span data-i18n="hero_badge">MCP for Bangladesh E-commerce</span> <span data-i18n="hero_badge">MCP for Bangladesh E-commerce</span>
</div> </div>
@@ -1216,10 +1218,12 @@
<div class="hero-cta-row"> <div class="hero-cta-row">
<a href="#sandbox" class="btn btn-primary"> <a href="#sandbox" class="btn btn-primary">
<span data-i18n="cta_try_sandbox">▶ Try Live Sandbox →</span> <svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><polygon points="6 4 20 12 6 20 6 4"/></svg>
<span data-i18n="cta_try_sandbox">Try Live Sandbox →</span>
</a> </a>
<a href="#tools" class="btn btn-secondary"> <a href="#tools" class="btn btn-secondary">
<span data-i18n="cta_explore_tools">⊞ Explore All Tools</span> <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1.2"/><rect x="14" y="3" width="7" height="7" rx="1.2"/><rect x="14" y="14" width="7" height="7" rx="1.2"/><rect x="3" y="14" width="7" height="7" rx="1.2"/></svg>
<span data-i18n="cta_explore_tools">Explore All Tools</span>
</a> </a>
</div> </div>
@@ -1244,16 +1248,16 @@
<div class="map-hub-card"> <div class="map-hub-card">
<!-- Floating Carrier Hub Nodes --> <!-- Floating Carrier Hub Nodes -->
<div class="carrier-node-badge steadfast"> <div class="carrier-node-badge steadfast">
<span class="carrier-dot steadfast"></span> Steadfast Hub <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><rect x="2" y="2" width="32" height="32" rx="8" fill="#10b981"/><path d="M23.5 12c-1.3-1.2-3.2-1.7-5.1-1.2-2.5.6-4.1 2.7-3.7 5.1.4 2.1 2.1 3.5 4.2 3.9l1.7.3c1.6.3 2.5 1.2 2.2 2.4-.3 1.5-1.6 2.4-3.5 2.2-1.8-.2-3.3-1.2-4-2.6" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/></svg><span>Steadfast Hub</span>
</div> </div>
<div class="carrier-node-badge pathao"> <div class="carrier-node-badge pathao">
<span class="carrier-dot pathao"></span> Pathao Express <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><circle cx="18" cy="18" r="16" fill="#ef4444"/><path d="M13 10.5h5.8a4.2 4.2 0 0 1 4.2 4.2 4.2 4.2 0 0 1-4.2 4.2h-3.1v6.6H13v-15zm2.7 6h2.9a1.8 1.8 0 0 0 1.8-1.8 1.8 1.8 0 0 0-1.8-1.8h-2.9v3.6z" fill="#ffffff"/></svg><span>Pathao Express</span>
</div> </div>
<div class="carrier-node-badge redx"> <div class="carrier-node-badge redx">
<span class="carrier-dot redx"></span> RedX Network <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="rxG18" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#f43f5e"/><stop offset="100%" stop-color="#be123c"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#rxG18)"/><path d="M8 24.5V11.5h4.8a3.2 3.2 0 0 1 0 6.4H8m4.4 0l3.6 6.6M19.5 11.5l8.5 13M28 11.5l-8.5 13" stroke="#ffffff" stroke-width="2.7" stroke-linecap="round" stroke-linejoin="round"/></svg><span>RedX Network</span>
</div> </div>
<div class="carrier-node-badge paperfly"> <div class="carrier-node-badge paperfly">
<span class="carrier-dot paperfly"></span> Paperfly Union <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="pfGrad18" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#0284c7"/><stop offset="100%" stop-color="#38bdf8"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#pfGrad18)"/><path d="M9.5 18.2l17.5-7.2-6.8 16-3.2-5.8-7.5-3z" fill="#ffffff"/><path d="M17 21.2l10-10.2" stroke="#0284c7" stroke-width="1.6" stroke-linecap="round"/></svg><span>Paperfly Union</span>
</div> </div>
<!-- Dhaka Origin Hub --> <!-- Dhaka Origin Hub -->
@@ -1334,34 +1338,12 @@
</div> </div>
</div> </div>
</div> </div>
<div class="stat-card">
<div class="stat-icon">⊞</div>
<div>
<div class="stat-val">9</div>
<div class="stat-label" data-i18n="stat_tools">MCP Tools (JSON-RPC)</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">⚡</div>
<div>
<div class="stat-val">Streamable</div>
<div class="stat-label" data-i18n="stat_protocol">HTTP MCP Protocol</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">&lt;/&gt;</div>
<div>
<div class="stat-val">Dev Ready</div>
<div class="stat-label" data-i18n="stat_ready">REST + Native MCP</div>
</div>
</div>
</div>
<!-- ===== Interactive Live Sandbox Section ===== --> <!-- ===== Interactive Live Sandbox Section ===== -->
<section id="sandbox" class="sandbox-section"> <section id="sandbox" class="sandbox-section">
<div class="sandbox-top"> <div class="sandbox-top">
<div class="section-header" style="margin-bottom:0"> <div class="section-header" style="margin-bottom:0">
<div class="section-tag" data-i18n="sb_tag" style="display:inline-flex; align-items:center; gap:6px;"> <div class="section-tag" style="display:inline-flex; align-items:center; gap:6px;">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M10 2v7.31L4.1 19.11A2 2 0 0 0 5.75 22h12.5a2 2 0 0 0 1.65-2.89L14 9.31V2"/> <path d="M10 2v7.31L4.1 19.11A2 2 0 0 0 5.75 22h12.5a2 2 0 0 0 1.65-2.89L14 9.31V2"/>
<path d="M8.5 2h7"/> <path d="M8.5 2h7"/>
@@ -1369,14 +1351,14 @@
<circle cx="9" cy="18" r="1" fill="var(--cyan)"/> <circle cx="9" cy="18" r="1" fill="var(--cyan)"/>
<circle cx="13" cy="16" r="1.5" fill="var(--cyan)"/> <circle cx="13" cy="16" r="1.5" fill="var(--cyan)"/>
</svg> </svg>
<span>Live Sandbox</span> <span data-i18n="sb_tag">Live Sandbox</span>
</div> </div>
<h2 class="section-title" data-i18n="sb_title">ইন্টারেক্টিভ লাইভ স্যান্ডবক্স</h2> <h2 class="section-title" data-i18n="sb_title">ইন্টারেক্টিভ লাইভ স্যান্ডবক্স</h2>
<p class="section-subtitle" data-i18n="sb_subtitle">টেস্ট করুন, রেজাল্ট দেখুন, ইন্টিগ্রেশনের আগে সরাসরি ব্রাউজারে যাচাই করুন।</p> <p class="section-subtitle" data-i18n="sb_subtitle">টেস্ট করুন, রেজাল্ট দেখুন, ইন্টিগ্রেশনের আগে সরাসরি ব্রাউজারে যাচাই করুন।</p>
</div> </div>
<div class="sandbox-status"> <div class="sandbox-status">
<span class="health-dot"></span> <span class="health-dot"></span>
<span data-i18n="sb_status">● Sandbox Online</span> <span data-i18n="sb_status">Sandbox Online</span>
</div> </div>
</div> </div>
@@ -1472,13 +1454,13 @@
<!-- ===== All 9 MCP Tools Section ===== --> <!-- ===== All 9 MCP Tools Section ===== -->
<section id="tools" style="margin-bottom: 48px;"> <section id="tools" style="margin-bottom: 48px;">
<div class="section-header"> <div class="section-header">
<div class="section-tag" data-i18n="tools_tag" style="display:inline-flex; align-items:center; gap:6px;"> <div class="section-tag" style="display:inline-flex; align-items:center; gap:6px;">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/> <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/>
<polyline points="3.27 6.96 12 12.01 20.73 6.96"/> <polyline points="3.27 6.96 12 12.01 20.73 6.96"/>
<line x1="12" y1="22.08" x2="12" y2="12"/> <line x1="12" y1="22.08" x2="12" y2="12"/>
</svg> </svg>
<span>Core Protocol</span> <span data-i18n="tools_tag">Core Protocol</span>
</div> </div>
<h2 class="section-title" data-i18n="tools_title">All 9 MCP Tools</h2> <h2 class="section-title" data-i18n="tools_title">All 9 MCP Tools</h2>
<p class="section-subtitle" data-i18n="tools_subtitle">Aura Courier MCP-এ থাকা ৯টি শক্তিশালী টুল, যেগুলো সরাসরি আপনার AI এজেন্ট বা অটোমেশন ফ্লোতে কাজ করে।</p> <p class="section-subtitle" data-i18n="tools_subtitle">Aura Courier MCP-এ থাকা ৯টি শক্তিশালী টুল, যেগুলো সরাসরি আপনার AI এজেন্ট বা অটোমেশন ফ্লোতে কাজ করে।</p>
@@ -1651,12 +1633,12 @@
<!-- ===== Courier Integrations Strip ===== --> <!-- ===== Courier Integrations Strip ===== -->
<section id="couriers" class="carriers-strip"> <section id="couriers" class="carriers-strip">
<div class="section-header" style="margin-bottom:12px;"> <div class="section-header" style="margin-bottom:12px;">
<div class="section-tag" data-i18n="carriers_tag" style="display:inline-flex; align-items:center; gap:6px;"> <div class="section-tag" style="display:inline-flex; align-items:center; gap:6px;">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/> <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/>
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/> <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>
</svg> </svg>
<span>Carrier Network</span> <span data-i18n="carriers_tag">Carrier Network</span>
</div> </div>
<h2 class="section-title" data-i18n="carriers_title">Courier Integrations</h2> <h2 class="section-title" data-i18n="carriers_title">Courier Integrations</h2>
<p class="section-subtitle" data-i18n="carriers_subtitle">বাংলাদেশের শীর্ষ ৪টি কুরিয়ার সেবা, একই সর্বজনীন এপিআই ও এমসিপিতে সংযুক্ত।</p> <p class="section-subtitle" data-i18n="carriers_subtitle">বাংলাদেশের শীর্ষ ৪টি কুরিয়ার সেবা, একই সর্বজনীন এপিআই ও এমসিপিতে সংযুক্ত।</p>
@@ -1664,7 +1646,7 @@
<div class="carrier-cards"> <div class="carrier-cards">
<div class="carrier-card"> <div class="carrier-card">
<span class="carrier-dot steadfast"></span> <svg viewBox="0 0 36 36" width="36" height="36" fill="none" aria-hidden="true" style="flex-shrink:0;"><rect x="2" y="2" width="32" height="32" rx="8" fill="#10b981"/><path d="M23.5 12c-1.3-1.2-3.2-1.7-5.1-1.2-2.5.6-4.1 2.7-3.7 5.1.4 2.1 2.1 3.5 4.2 3.9l1.7.3c1.6.3 2.5 1.2 2.2 2.4-.3 1.5-1.6 2.4-3.5 2.2-1.8-.2-3.3-1.2-4-2.6" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/></svg>
<div class="carrier-info"> <div class="carrier-info">
<b>Steadfast</b> <b>Steadfast</b>
<span data-i18n="car_sf">✔ Integrated (64 Districts)</span> <span data-i18n="car_sf">✔ Integrated (64 Districts)</span>
@@ -1672,7 +1654,7 @@
</div> </div>
<div class="carrier-card"> <div class="carrier-card">
<span class="carrier-dot pathao"></span> <svg viewBox="0 0 36 36" width="36" height="36" fill="none" aria-hidden="true" style="flex-shrink:0;"><circle cx="18" cy="18" r="16" fill="#ef4444"/><path d="M13 10.5h5.8a4.2 4.2 0 0 1 4.2 4.2 4.2 4.2 0 0 1-4.2 4.2h-3.1v6.6H13v-15zm2.7 6h2.9a1.8 1.8 0 0 0 1.8-1.8 1.8 1.8 0 0 0-1.8-1.8h-2.9v3.6z" fill="#ffffff"/></svg>
<div class="carrier-info"> <div class="carrier-info">
<b>Pathao</b> <b>Pathao</b>
<span data-i18n="car_pt">✔ Integrated (Express Dispatch)</span> <span data-i18n="car_pt">✔ Integrated (Express Dispatch)</span>
@@ -1680,7 +1662,7 @@
</div> </div>
<div class="carrier-card"> <div class="carrier-card">
<span class="carrier-dot redx"></span> <svg viewBox="0 0 36 36" width="36" height="36" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="rxG36" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#f43f5e"/><stop offset="100%" stop-color="#be123c"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#rxG36)"/><path d="M8 24.5V11.5h4.8a3.2 3.2 0 0 1 0 6.4H8m4.4 0l3.6 6.6M19.5 11.5l8.5 13M28 11.5l-8.5 13" stroke="#ffffff" stroke-width="2.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
<div class="carrier-info"> <div class="carrier-info">
<b>RedX</b> <b>RedX</b>
<span data-i18n="car_rx">✔ Integrated (2,849+ Hubs)</span> <span data-i18n="car_rx">✔ Integrated (2,849+ Hubs)</span>
@@ -1688,7 +1670,7 @@
</div> </div>
<div class="carrier-card"> <div class="carrier-card">
<span class="carrier-dot paperfly"></span> <svg viewBox="0 0 36 36" width="36" height="36" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="pfGrad36" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#0284c7"/><stop offset="100%" stop-color="#38bdf8"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#pfGrad36)"/><path d="M9.5 18.2l17.5-7.2-6.8 16-3.2-5.8-7.5-3z" fill="#ffffff"/><path d="M17 21.2l10-10.2" stroke="#0284c7" stroke-width="1.6" stroke-linecap="round"/></svg>
<div class="carrier-info"> <div class="carrier-info">
<b>Paperfly</b> <b>Paperfly</b>
<span data-i18n="car_pf">✔ Integrated (Doorstep Union)</span> <span data-i18n="car_pf">✔ Integrated (Doorstep Union)</span>
@@ -1711,14 +1693,14 @@
<text x="390" y="45" fill="#fda4af" font-size="12" font-family="JetBrains Mono" font-weight="700">Chattogram</text> <text x="390" y="45" fill="#fda4af" font-size="12" font-family="JetBrains Mono" font-weight="700">Chattogram</text>
</svg> </svg>
<div class="truck-marker">🚚</div> <div class="truck-marker" style="display:grid;place-items:center;width:30px;height:30px;"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#040914" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="1" y="3" width="15" height="13" rx="1"/><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"/><circle cx="5.5" cy="18.5" r="2.5"/><circle cx="18.5" cy="18.5" r="2.5"/></svg></div>
<div style="position:absolute; bottom:12px; left:16px; font-size:11px; color:var(--text-muted); font-family:var(--font-mono); display:flex; align-items:center; gap:6px;"> <div style="position:absolute; bottom:12px; left:16px; font-size:11px; color:var(--text-muted); font-family:var(--font-mono); display:flex; align-items:center; gap:6px;">
<span>📍 Google Maps Platform</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg><span>Google Maps Platform</span>
</div> </div>
</div> </div>
<div class="spatial-right"> <div class="spatial-right">
<div class="section-tag" data-i18n="spatial_tag">🗺️ Spatial Engine</div> <div class="section-tag" style="display:inline-flex; align-items:center; gap:6px;"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"/><line x1="8" y1="2" x2="8" y2="18"/><line x1="16" y1="6" x2="16" y2="22"/></svg><span data-i18n="spatial_tag">Spatial Engine</span></div>
<h2 class="section-title" style="font-size:22px; margin-bottom:10px;" data-i18n="spatial_title">Google Maps Spatial AI Routing</h2> <h2 class="section-title" style="font-size:22px; margin-bottom:10px;" data-i18n="spatial_title">Google Maps Spatial AI Routing</h2>
<p class="section-subtitle" style="margin-bottom:18px;" data-i18n="spatial_subtitle">গুগল ম্যাপের উপর ভিত্তি করে রুট অপটিমাইজেশন, জোন ডিটেকশন ও রিয়েল-টাইম দূরত্ব পরিমাপ।</p> <p class="section-subtitle" style="margin-bottom:18px;" data-i18n="spatial_subtitle">গুগল ম্যাপের উপর ভিত্তি করে রুট অপটিমাইজেশন, জোন ডিটেকশন ও রিয়েল-টাইম দূরত্ব পরিমাপ।</p>
@@ -1757,7 +1739,7 @@
<div class="endpoint-box"> <div class="endpoint-box">
<input type="text" id="endpoint-input" class="endpoint-url" value="https://courier.auraajenticai.cloud/mcp" readonly /> <input type="text" id="endpoint-input" class="endpoint-url" value="https://courier.auraajenticai.cloud/mcp" readonly />
<button class="btn-copy" onclick="copyEndpoint()"> <button class="btn-copy" onclick="copyEndpoint()">
<span id="copy-btn-text" data-i18n="btn_copy">📋 Copy URL</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg><span id="copy-btn-text" data-i18n="btn_copy">Copy URL</span>
</button> </button>
</div> </div>
</section> </section>
@@ -1802,7 +1784,7 @@
}</pre> }</pre>
<button onclick="copyAgentJson()" style="position:absolute; top:12px; right:12px; background:var(--cyan); color:#040914; border:none; padding:7px 14px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:6px;"> <button onclick="copyAgentJson()" style="position:absolute; top:12px; right:12px; background:var(--cyan); color:#040914; border:none; padding:7px 14px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:6px;">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
<span id="copy-btn-text">Copy JSON</span> <span id="copy-json-text">Copy JSON</span>
</button> </button>
</div> </div>
@@ -1824,7 +1806,7 @@
<img class="logo-img" src="/assets/courier-logo.png" onerror="this.onerror=null; this.src='/assets/courier-logo.jpg';" alt="Aura Courier MCP Logo" /> <img class="logo-img" src="/assets/courier-logo.png" onerror="this.onerror=null; this.src='/assets/courier-logo.jpg';" alt="Aura Courier MCP Logo" />
<div> <div>
<span class="f-brand-title">Aura Courier MCP</span> <span class="f-brand-title">Aura Courier MCP</span>
<span class="version-pill">v2.6.0</span> <span class="version-pill">v2.6.1</span>
</div> </div>
</div> </div>
<p class="footer-tagline"> <p class="footer-tagline">
@@ -1871,17 +1853,12 @@
<ul class="footer-link-list"> <ul class="footer-link-list">
<li> <li>
<a href="https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp" target="_blank" rel="noopener"> <a href="https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span style="color:var(--cyan); font-weight:700;">⚡ Glama.ai Registry</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg><span style="color:var(--cyan); font-weight:700;">Glama.ai Registry</span>
</a> </a>
</li> </li>
<li> <li>
<a href="https://www.npmjs.com/package/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener"> <a href="https://www.npmjs.com/package/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span>📦 npm Package (v2.6.0)</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>npm Package (v2.6.0)</span>
</a>
</li>
<li>
<a href="https://smithery.ai/server/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span>🛠️ Smithery Registry</span>
</a> </a>
</li> </li>
</ul> </ul>
@@ -1905,12 +1882,12 @@
</li> </li>
<li> <li>
<a href="https://auraajenticai.cloud" target="_blank" rel="noopener"> <a href="https://auraajenticai.cloud" target="_blank" rel="noopener">
<span>🌐 Aura Agentic AI Cloud</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg><span>Aura Agentic AI Cloud</span>
</a> </a>
</li> </li>
<li> <li>
<a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener"> <a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener">
<span>🚀 Client Dashboard Portal</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg><span>Client Dashboard Portal</span>
</a> </a>
</li> </li>
</ul> </ul>
@@ -1930,6 +1907,10 @@
</footer> </footer>
<!-- ===== Enterprise Global Footer ===== -->
<!-- ===== Mobile App Floating Bottom Dock ===== --> <!-- ===== Mobile App Floating Bottom Dock ===== -->
<nav class="mobile-dock" aria-label="Mobile Navigation"> <nav class="mobile-dock" aria-label="Mobile Navigation">
<a href="/" class="dock-item active"> <a href="/" class="dock-item active">
@@ -1955,8 +1936,144 @@
</nav> </nav>
<!-- ===== Background Animation Canvas Script ===== --> <!-- ===== Background Animation Canvas Script ===== -->
<script src="/assets/courier-canvas.js"></script> <script src="/assets/courier-canvas.js?v=2.6.1"></script>
<script> <script>
if (typeof initCourierCanvas === 'function') {
initCourierCanvas('hubmap');
}
// ===== Bilingual Dictionary =====
const translations = {
bn: {
nav_couriers: "কুরিয়ার",
nav_tools: "টুলস",
nav_sandbox: "লাইভ স্যান্ডবক্স",
nav_guide: "গাইড",
nav_mcp: "MCP প্লেগ্রাউন্ড",
nav_login: "লগইন",
nav_portal: "লগইন",
hero_badge: "MCP for Bangladesh E-commerce",
hero_heading: "এক কানেক্টরেই ৪ কুরিয়ার + Google Maps",
hero_desc: "WooCommerce, Shopify, n8n বা যেকোনো সিস্টেমে সহজেই পার্সেল ডেলিভারি, ট্র্যাকিং, রেট ক্যালকুলেশন, ফ্রড রিস্ক চেক ও NDR ম্যানেজ করুন — একটিই MCP দিয়ে।",
cta_try_sandbox: "Try Live Sandbox →",
cta_explore_tools: "Explore All Tools",
trust_dev: "Developer Ready",
trust_protocol: "API + MCP Protocol",
trust_bd: "Bangladesh Focused",
stat_couriers: "Couriers Integrated",
stat_tools: "MCP Tools (JSON-RPC)",
stat_protocol: "HTTP MCP Protocol",
stat_ready: "REST + Native MCP",
sb_tag: "Live Sandbox",
sb_title: "ইন্টারেক্টিভ লাইভ স্যান্ডবক্স",
sb_subtitle: "টেস্ট করুন, রেজাল্ট দেখুন, ইন্টিগ্রেশনের আগে সরাসরি ব্রাউজারে যাচাই করুন।",
sb_status: "Sandbox Online",
calc_heading: "Delivery Zone & Fee Calculator",
lbl_district: "District / জেলা নির্বাচন করুন:",
lbl_weight: "Parcel Weight / পার্সেল ওজন:",
res_fee_meta: "Estimated Courier Delivery Fee:",
calc_sla: "২৪-৪৮ ঘণ্টার মধ্যে ডেলিভারি",
fraud_heading: "Fraud Risk Analyzer",
lbl_phone: "Customer Phone Number / ফোন নম্বর:",
btn_check_risk: "Check Risk →",
fraud_desc_safe: "New customer - Safe to proceed · Zero Mock Data",
tools_tag: "Core Protocol",
tools_title: "All 9 MCP Tools",
tools_subtitle: "Aura Courier MCP-এ থাকা ৯টি শক্তিশালী টুল, যেগুলো সরাসরি আপনার AI এজেন্ট বা অটোমেশন ফ্লোতে কাজ করে।",
t1_desc: "নতুন পার্সেল বা ডেলিভারি অর্ডার তৈরি করুন (Steadfast, Pathao, RedX, Paperfly-তে ১-ক্লিকে)।",
t2_desc: "পার্সেল ট্র্যাকিং স্ট্যাটাস ও লাইভ ডেলিভারি টাইমলাইন এক ক্লিকে ট্র্যাক করুন।",
t3_desc: "সব কুরিয়ার মার্চেন্ট একাউন্টের লাইভ ব্যালেন্স, পেন্ডিং ডিসবার্সমেন্ট ও পেআউট জানুন।",
t4_desc: "গ্রাহকের ফোন নম্বর জাতীয় কুরিয়ার ডাটাবেসে স্ক্যান করে রিটার্ন ঝুঁকি স্কোর নির্ণয়।",
t5_desc: "সংযুক্ত সকল কুরিয়ারের অ্যাক্টিভ স্ট্যাটাস, মার্চেন্ট কী ও অপারেশনাল হেলথ দেখুন।",
t6_desc: "গুগল ম্যাপস জিওকোডিং এপিআই দিয়ে ঠিকানা ভ্যালিডেশন ও রুফটপ কোঅর্ডিনেট রেজল্ট।",
t7_desc: "ঠিকানা অনুযায়ী অটোমেটিক জোন ক্লাসিফিকেশন (Dhaka, Sub-Dhaka, Outside) ও রেট ফিক্স।",
t8_desc: "একই অর্ডারের জন্য সকল কুরিয়ারের রেট, সিওডি কমিশন ও এসএলএ পাশাপাশি তুলনা করুন।",
t9_desc: "নন-ডেলিভারি রিপোর্ট (NDR) সমস্যায় কাস্টমার রি-ডেলিভারি মেসেজ ও ডিসপুট ম্যানেজ।",
carriers_tag: "Carrier Network",
carriers_title: "Courier Integrations",
carriers_subtitle: "বাংলাদেশের শীর্ষ ৪টি কুরিয়ার সেবা, একই সর্বজনীন এপিআই ও এমসিপিতে সংযুক্ত।",
car_sf: "✔ Integrated (64 Districts)",
car_pt: "✔ Integrated (Express Dispatch)",
car_rx: "✔ Integrated (2,849+ Hubs)",
car_pf: "✔ Integrated (Doorstep Union)",
spatial_tag: "Spatial Engine",
spatial_title: "Google Maps Spatial AI Routing",
spatial_subtitle: "গুগল ম্যাপের উপর ভিত্তি করে রুট অপটিমাইজেশন, জোন ডিটেকশন ও রিয়েল-টাইম দূরত্ব পরিমাপ।",
sp_1: "Address Geocoding & Validation",
sp_2: "Delivery Zone & Tariff Detection",
sp_3: "Optimized Route & Distance Calculation",
sp_4: "Estimated Delivery Cost & SLA Time",
end_title: "Integration (MCP Endpoint)",
end_status: "Streamable-HTTP Ready",
end_desc: "আপনার AI এজেন্ট (Claude, Cursor, Windsurf বা n8n)-এ সরাসরি নিচের এন্ডপয়েন্টটি সংযুক্ত করুন:",
btn_copy: "Copy URL"
},
en: {
nav_couriers: "Couriers",
nav_tools: "Tools",
nav_sandbox: "Live Sandbox",
nav_guide: "Guide",
nav_mcp: "MCP Playground",
nav_login: "Login",
nav_portal: "Login",
hero_badge: "MCP for Bangladesh E-commerce",
hero_heading: "One Single Connector for 4 Couriers + Google Maps",
hero_desc: "Seamless parcel delivery, unified consignment tracking, automated zone tariffs, carrier fraud detection & NDR management across WooCommerce, Shopify, n8n and AI agents.",
cta_try_sandbox: "Try Live Sandbox →",
cta_explore_tools: "Explore All Tools",
trust_dev: "Developer Ready",
trust_protocol: "API + MCP Protocol",
trust_bd: "Bangladesh Focused",
stat_couriers: "Couriers Integrated",
stat_tools: "MCP Tools (JSON-RPC)",
stat_protocol: "HTTP MCP Protocol",
stat_ready: "REST + Native MCP",
sb_tag: "Live Sandbox",
sb_title: "Interactive Live Sandbox",
sb_subtitle: "Test delivery tariffs, evaluate real fraud risk, and simulate bookings directly in your browser.",
sb_status: "Sandbox Online",
calc_heading: "Delivery Zone & Fee Calculator",
lbl_district: "Select District:",
lbl_weight: "Select Parcel Weight:",
res_fee_meta: "Estimated Courier Delivery Fee:",
calc_sla: "24-48 Hours Delivery SLA",
fraud_heading: "Fraud Risk Analyzer",
lbl_phone: "Customer Phone Number:",
btn_check_risk: "Check Risk →",
fraud_desc_safe: "New customer - Safe to proceed · Zero Mock Data",
tools_tag: "Core Protocol",
tools_title: "All 9 MCP Tools",
tools_subtitle: "Production-grade tools available inside Aura Courier MCP for seamless agentic workflows.",
t1_desc: "Automated booking across Steadfast, Pathao, RedX, and Paperfly with 1-click fallback.",
t2_desc: "Unified parcel tracking timeline and carrier status across all Bangladesh logistics.",
t3_desc: "Live COD balance, pending disbursement and payout tracking across all accounts.",
t4_desc: "Scans recipient phone number across national carrier records for return risk score.",
t5_desc: "Discover active carriers, credential health and API operational status.",
t6_desc: "Sub-locality and rooftop precision geocoding powered by Google Maps Platform.",
t7_desc: "Automatic tariff zone classification (Dhaka: ৳80, Suburbs: ৳100, Nationwide: ৳150).",
t8_desc: "Side-by-side freight rate, COD commission, and delivery timeline quote comparison.",
t9_desc: "Automated WhatsApp copy generation and carrier dispute routing for failed deliveries.",
carriers_tag: "Carrier Network",
carriers_title: "Courier Integrations",
carriers_subtitle: "Bangladesh's top 4 national logistics carriers unified under one single MCP.",
car_sf: "✔ Integrated (64 Districts)",
car_pt: "✔ Integrated (Express Dispatch)",
car_rx: "✔ Integrated (2,849+ Hubs)",
car_pf: "✔ Integrated (Doorstep Union)",
spatial_tag: "Spatial Engine",
spatial_title: "Google Maps Spatial AI Routing",
spatial_subtitle: "Rooftop geocoding, route optimization, zone detection, and real-time distance matrix.",
sp_1: "Address Geocoding & Validation",
sp_2: "Delivery Zone & Tariff Detection",
sp_3: "Optimized Route & Distance Calculation",
sp_4: "Estimated Delivery Cost & SLA Time",
end_title: "Integration (MCP Endpoint)",
end_status: "Streamable-HTTP Ready",
end_desc: "Connect your AI agent (Claude, Cursor, Windsurf, or n8n) directly via this endpoint:",
btn_copy: "Copy URL"
}
};
const agentConfigs = { const agentConfigs = {
antigravity: { antigravity: {
path: '%USERPROFILE%\\.gemini\\antigravity\\mcp\\aura-courier\\server.json', path: '%USERPROFILE%\\.gemini\\antigravity\\mcp\\aura-courier\\server.json',
@@ -1970,7 +2087,7 @@
}, },
"aura-courier-local": { "aura-courier-local": {
"command": "npx", "command": "npx",
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"], "args": ["-y", "aura-courier-mcp@2.6.1"],
"env": { "PORT": "8080" } "env": { "PORT": "8080" }
} }
} }
@@ -1987,7 +2104,7 @@
}, },
"aura-courier-stdio": { "aura-courier-stdio": {
"command": "npx", "command": "npx",
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"] "args": ["-y", "aura-courier-mcp@2.6.1"]
} }
} }
}, null, 2) }, null, 2)
@@ -2057,7 +2174,7 @@
const codeEl = document.getElementById('agent-json-code'); const codeEl = document.getElementById('agent-json-code');
const code = codeEl ? codeEl.innerText : ''; const code = codeEl ? codeEl.innerText : '';
navigator.clipboard.writeText(code).then(() => { navigator.clipboard.writeText(code).then(() => {
const txt = document.getElementById('copy-btn-text'); const txt = document.getElementById('copy-json-text');
if (txt) { if (txt) {
txt.innerText = 'Copied!'; txt.innerText = 'Copied!';
setTimeout(() => txt.innerText = 'Copy JSON', 2000); setTimeout(() => txt.innerText = 'Copy JSON', 2000);
@@ -2135,7 +2252,7 @@
const btn = document.getElementById('copy-btn-text'); const btn = document.getElementById('copy-btn-text');
btn.textContent = '✔ Copied!'; btn.textContent = '✔ Copied!';
setTimeout(() => { setTimeout(() => {
btn.textContent = translations[curLang].btn_copy || '📋 Copy URL'; btn.textContent = (translations[curLang] && translations[curLang].btn_copy) || 'Copy URL';
}, 2000); }, 2000);
}).catch(() => { }).catch(() => {
alert('Copied: ' + el.value); alert('Copied: ' + el.value);
@@ -2146,4 +2263,4 @@
runFeeCalculation(); runFeeCalculation();
</script> </script>
</body> </body>
</html> </html>
+2 -2
View File
@@ -361,7 +361,7 @@
"capabilities": {}, "capabilities": {},
"clientInfo": { "clientInfo": {
"name": "Aura-Playground", "name": "Aura-Playground",
"version": "2.6.0" "version": "2.6.1"
} }
} }
}</textarea> }</textarea>
@@ -432,7 +432,7 @@
</main> </main>
<footer> <footer>
<p>Aura Courier MCP v2.6.0 · Built with pride by <a href="https://auraajenticai.cloud" style="color:var(--text);font-weight:600;">Aura Ajentic AI</a> · Apache 2.0 License</p> <p>Aura Courier MCP v2.6.1 · Built with pride by <a href="https://auraajenticai.cloud" style="color:var(--text);font-weight:600;">Aura Ajentic AI</a> · Apache 2.0 License</p>
</footer> </footer>
<script> <script>
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "aura-courier-mcp", "name": "aura-courier-mcp",
"version": "2.5.2", "version": "2.6.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "aura-courier-mcp", "name": "aura-courier-mcp",
"version": "2.5.2", "version": "2.6.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@modelcontextprotocol/sdk": "^1.12.0", "@modelcontextprotocol/sdk": "^1.12.0",
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "aura-courier-mcp", "name": "aura-courier-mcp",
"version": "2.6.0", "version": "2.6.1",
"description": "Universal Bangladesh courier MCP server for Steadfast, Pathao, RedX, and Paperfly with zero-mock fraud risk, Google Maps routing, enterprise privacy, and token-bucket rate limiting.", "description": "Universal Bangladesh courier MCP server for Steadfast, Pathao, RedX, and Paperfly with zero-mock fraud risk, Google Maps routing, enterprise privacy, and token-bucket rate limiting.",
"main": "dist/index.js", "main": "dist/index.js",
"type": "module", "type": "module",
@@ -15,9 +15,9 @@
"access": "public" "access": "public"
}, },
"scripts": { "scripts": {
"build": "tsc && node --test test/v260.test.mjs", "build": "tsc",
"test": "node --test test/v260.test.mjs", "test": "node --test test/v260.test.mjs",
"prepublishOnly": "npm run build", "prepublishOnly": "npm run test && npm run build",
"start": "node dist/index.js", "start": "node dist/index.js",
"start:http": "node dist/http.js", "start:http": "node dist/http.js",
"dev": "tsx src/index.ts" "dev": "tsx src/index.ts"
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "aura-courier", "name": "aura-courier",
"displayName": "Aura Courier MCP", "displayName": "Aura Courier MCP",
"version": "2.6.0", "version": "2.6.1",
"category": "Business / Logistics", "category": "Business / Logistics",
"description": "Enterprise Bangladesh Courier & Logistics Automation Hub. Real-time multi-carrier parcel dispatch, nationwide COD balance tracking, zero-mock fraud risk defense, sublocality geocoding, and automated NDR dispute triage across Steadfast, Pathao, RedX, and Paperfly.", "description": "Enterprise Bangladesh Courier & Logistics Automation Hub. Real-time multi-carrier parcel dispatch, nationwide COD balance tracking, zero-mock fraud risk defense, sublocality geocoding, and automated NDR dispute triage across Steadfast, Pathao, RedX, and Paperfly.",
"logo": "assets/logo.svg", "logo": "assets/logo.svg",
+1 -1
View File
@@ -254,7 +254,7 @@
</main> </main>
<footer> <footer>
<p>Aura Courier MCP v2.5.4 · Developed by <b>Aura Agentic AI</b> · Released under <b>Apache License 2.0</b></p> <p>Aura Courier MCP v2.6.1 · Developed by <b>Aura Agentic AI</b> · Released under <b>Apache License 2.0</b></p>
<p> <p>
<a href="https://auraajenticai.cloud" target="_blank" rel="noopener">auraajenticai.cloud</a> · <a href="https://auraajenticai.cloud" target="_blank" rel="noopener">auraajenticai.cloud</a> ·
<a href="https://github.com/auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">github.com/auraajenticai</a> · <a href="https://github.com/auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">github.com/auraajenticai</a> ·
+2 -2
View File
@@ -3,7 +3,7 @@
"name": "io.github.auraajenticai/aura-courier-mcp", "name": "io.github.auraajenticai/aura-courier-mcp",
"title": "Aura Courier MCP", "title": "Aura Courier MCP",
"description": "Bangladesh courier connector: Steadfast, Pathao, RedX, Paperfly normalized delivery and tracking.", "description": "Bangladesh courier connector: Steadfast, Pathao, RedX, Paperfly normalized delivery and tracking.",
"version": "2.6.0", "version": "2.6.1",
"websiteUrl": "https://github.com/auraajenticai/aura-courier-mcp", "websiteUrl": "https://github.com/auraajenticai/aura-courier-mcp",
"repository": { "repository": {
"url": "https://github.com/auraajenticai/aura-courier-mcp", "url": "https://github.com/auraajenticai/aura-courier-mcp",
@@ -13,7 +13,7 @@
{ {
"registryType": "npm", "registryType": "npm",
"identifier": "aura-courier-mcp", "identifier": "aura-courier-mcp",
"version": "2.6.0", "version": "2.6.1",
"transport": { "transport": {
"type": "stdio" "type": "stdio"
}, },
+377 -80
View File
@@ -135,6 +135,7 @@
} }
.nav-item { .nav-item {
color: var(--text-muted); color: var(--text-muted);
white-space: nowrap;
text-decoration: none; text-decoration: none;
font-size: 13.5px; font-size: 13.5px;
font-weight: 600; font-weight: 600;
@@ -1160,7 +1161,7 @@
<section class="hero"> <section class="hero">
<div class="hero-left"> <div class="hero-left">
<div class="badge-chip"> <div class="badge-chip">
<span>📖</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
<span data-i18n="badge_guide">Official Guide</span> <span data-i18n="badge_guide">Official Guide</span>
</div> </div>
@@ -1175,30 +1176,32 @@
<div class="btn-row"> <div class="btn-row">
<a href="#simulator" class="btn btn-primary"> <a href="#simulator" class="btn btn-primary">
<span data-i18n="cta_simulator">▶ Try Live Simulator →</span> <svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><polygon points="6 4 20 12 6 20 6 4"/></svg>
<span data-i18n="cta_simulator">Try Live Simulator →</span>
</a> </a>
<a href="#setup" class="btn btn-secondary"> <a href="#setup" class="btn btn-secondary">
<span data-i18n="cta_read_guide">📖 Read Full Guide</span> <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
<span data-i18n="cta_read_guide">Read Full Guide</span>
</a> </a>
</div> </div>
<div class="value-cards-row"> <div class="value-cards-row">
<div class="value-card"> <div class="value-card">
<div class="value-icon">🛡️</div> <div class="value-icon" style="display:flex;"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" aria-hidden="true"><defs><linearGradient id="shBg" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#8b5cf6"/><stop offset="100%" stop-color="#6366f1"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="9" fill="url(#shBg)" fill-opacity="0.22" stroke="#8b5cf6" stroke-width="1.4"/><path d="M18 8l8 3.2v5.4c0 5.1-3.4 9.7-8 11.4-4.6-1.7-8-6.3-8-11.4v-5.4L18 8z" fill="#8b5cf6" fill-opacity="0.3" stroke="#c4b5fd" stroke-width="1.6" stroke-linejoin="round"/><polyline points="14.5 18 17 20.5 22 15.5" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div>
<div> <div>
<div class="value-title" data-i18n="val1_title">Fraud-Risk Screening</div> <div class="value-title" data-i18n="val1_title">Fraud-Risk Screening</div>
<div class="value-desc" data-i18n="val1_desc">ভুয়া বা ঝুঁকিপূর্ণ অর্ডার আগে শনাক্ত</div> <div class="value-desc" data-i18n="val1_desc">ভুয়া বা ঝুঁকিপূর্ণ অর্ডার আগে শনাক্ত</div>
</div> </div>
</div> </div>
<div class="value-card"> <div class="value-card">
<div class="value-icon">🚚</div> <div class="value-icon" style="display:flex;"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" aria-hidden="true"><defs><linearGradient id="bkBg" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#06b6d4"/><stop offset="100%" stop-color="#0284c7"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="9" fill="url(#bkBg)" fill-opacity="0.22" stroke="#06b6d4" stroke-width="1.4"/><rect x="8.5" y="12.5" width="12" height="9.5" rx="1.5" stroke="#67e8f9" stroke-width="1.7"/><path d="M20.5 15h3.8l2.7 2.8v4.2h-6.5V15z" stroke="#67e8f9" stroke-width="1.7" stroke-linejoin="round"/><circle cx="12.5" cy="24" r="2" fill="#22d3ee"/><circle cx="23.5" cy="24" r="2" fill="#22d3ee"/></svg></div>
<div> <div>
<div class="value-title" data-i18n="val2_title">Four-Courier Booking</div> <div class="value-title" data-i18n="val2_title">Four-Courier Booking</div>
<div class="value-desc" data-i18n="val2_desc">৪টি কুরিয়ারে এক ক্লিকে বুকিং</div> <div class="value-desc" data-i18n="val2_desc">৪টি কুরিয়ারে এক ক্লিকে বুকিং</div>
</div> </div>
</div> </div>
<div class="value-card"> <div class="value-card">
<div class="value-icon">🔒</div> <div class="value-icon" style="display:flex;"><svg width="36" height="36" viewBox="0 0 36 36" fill="none" aria-hidden="true"><defs><linearGradient id="lkBg" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#10b981"/><stop offset="100%" stop-color="#059669"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="9" fill="url(#lkBg)" fill-opacity="0.22" stroke="#10b981" stroke-width="1.4"/><rect x="11" y="16" width="14" height="10" rx="2.5" fill="#10b981" fill-opacity="0.25" stroke="#6ee7b7" stroke-width="1.7"/><path d="M14 16v-3a4 4 0 0 1 8 0v3" stroke="#6ee7b7" stroke-width="1.7" stroke-linecap="round"/><circle cx="18" cy="21" r="1.4" fill="#ffffff"/></svg></div>
<div> <div>
<div class="value-title" data-i18n="val3_title">Encrypted API Key Vault</div> <div class="value-title" data-i18n="val3_title">Encrypted API Key Vault</div>
<div class="value-desc" data-i18n="val3_desc">কুরিয়ার কী নিরাপদে সংরক্ষণ</div> <div class="value-desc" data-i18n="val3_desc">কুরিয়ার কী নিরাপদে সংরক্ষণ</div>
@@ -1211,34 +1214,26 @@
<div class="hero-visual"> <div class="hero-visual">
<div class="hero-map-box"> <div class="hero-map-box">
<div class="hero-carrier-pill sf"> <div class="hero-carrier-pill sf">
<svg viewBox="0 0 36 36" width="14" height="14" fill="none"> <svg viewBox="0 0 36 36" width="16" height="16" fill="none" aria-hidden="true" style="flex-shrink:0;"><rect x="2" y="2" width="32" height="32" rx="8" fill="#10b981"/><path d="M23.5 12c-1.3-1.2-3.2-1.7-5.1-1.2-2.5.6-4.1 2.7-3.7 5.1.4 2.1 2.1 3.5 4.2 3.9l1.7.3c1.6.3 2.5 1.2 2.2 2.4-.3 1.5-1.6 2.4-3.5 2.2-1.8-.2-3.3-1.2-4-2.6" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/></svg>
<path d="M24 11c-1.3-1.3-3.3-1.8-5.2-1.3-2.6.6-4.3 2.9-3.9 5.5.4 2.2 2.2 3.7 4.4 4.1l1.8.3c1.7.3 2.6 1.3 2.4 2.6-.3 1.6-1.7 2.6-3.7 2.4-1.9-.2-3.5-1.3-4.2-2.8" stroke="#10b981" stroke-width="3" stroke-linecap="round"/>
</svg>
<span>Steadfast</span> <span>Steadfast</span>
</div> </div>
<div class="hero-carrier-pill pt"> <div class="hero-carrier-pill pt">
<svg viewBox="0 0 36 36" width="14" height="14" fill="none"> <svg viewBox="0 0 36 36" width="16" height="16" fill="none" aria-hidden="true" style="flex-shrink:0;"><circle cx="18" cy="18" r="16" fill="#ef4444"/><path d="M13 10.5h5.8a4.2 4.2 0 0 1 4.2 4.2 4.2 4.2 0 0 1-4.2 4.2h-3.1v6.6H13v-15zm2.7 6h2.9a1.8 1.8 0 0 0 1.8-1.8 1.8 1.8 0 0 0-1.8-1.8h-2.9v3.6z" fill="#ffffff"/></svg>
<circle cx="18" cy="18" r="14" fill="#ef4444"/>
<path d="M14 11h5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5h-5v5h-2.5V11h2.5zm0 5h4.5a1.5 1.5 0 0 0 1.5-1.5A1.5 1.5 0 0 0 18.5 13H14v3z" fill="#ffffff"/>
</svg>
<span>Pathao</span> <span>Pathao</span>
</div> </div>
<div class="hero-carrier-pill rx"> <div class="hero-carrier-pill rx">
<svg viewBox="0 0 36 36" width="14" height="14" fill="none"> <svg viewBox="0 0 36 36" width="16" height="16" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="rxG16" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#f43f5e"/><stop offset="100%" stop-color="#be123c"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#rxG16)"/><path d="M8 24.5V11.5h4.8a3.2 3.2 0 0 1 0 6.4H8m4.4 0l3.6 6.6M19.5 11.5l8.5 13M28 11.5l-8.5 13" stroke="#ffffff" stroke-width="2.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
<circle cx="18" cy="18" r="13" stroke="#dc2626" stroke-width="2.2"/>
<path d="M13 13l10 10M23 13l-10 10" stroke="#dc2626" stroke-width="2.6" stroke-linecap="round"/>
</svg>
<span>RedX</span> <span>RedX</span>
</div> </div>
<div class="hero-carrier-pill pf"> <div class="hero-carrier-pill pf">
<svg viewBox="0 0 36 36" width="14" height="14" fill="none"> <svg viewBox="0 0 36 36" width="16" height="16" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="pfGrad16" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#0284c7"/><stop offset="100%" stop-color="#38bdf8"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#pfGrad16)"/><path d="M9.5 18.2l17.5-7.2-6.8 16-3.2-5.8-7.5-3z" fill="#ffffff"/><path d="M17 21.2l10-10.2" stroke="#0284c7" stroke-width="1.6" stroke-linecap="round"/></svg>
<path d="M9 18l18-7-7 16-3-6-8-3z" fill="#0284c7" stroke="#38bdf8" stroke-width="1.2" stroke-linejoin="round"/>
<path d="M17 20l10-9" stroke="#ffffff" stroke-width="1.2"/>
</svg>
<span>Paperfly</span> <span>Paperfly</span>
</div> </div>
</div>
</div> <div class="hero-center-truck">
<div class="truck-glow-icon" style="display:flex;justify-content:center;"><svg width="64" height="64" viewBox="0 0 64 64" fill="none" aria-hidden="true" style="filter:drop-shadow(0 0 16px rgba(6,182,212,0.55));"><defs><linearGradient id="trBody" x1="8" y1="16" x2="42" y2="44"><stop offset="0%" stop-color="#38bdf8"/><stop offset="100%" stop-color="#0284c7"/></linearGradient><linearGradient id="trCab" x1="38" y1="22" x2="56" y2="44"><stop offset="0%" stop-color="#06b6d4"/><stop offset="100%" stop-color="#2563eb"/></linearGradient></defs><rect x="8" y="18" width="31" height="23" rx="4" fill="url(#trBody)" stroke="#bae6fd" stroke-width="1.6"/><path d="M39 23h10.5l6.5 7v11H39V23z" fill="url(#trCab)" stroke="#bae6fd" stroke-width="1.6" stroke-linejoin="round"/><path d="M43 26.5h5.5l3.5 4h-9v-4z" fill="#e0f2fe" fill-opacity="0.85"/><path d="M23.5 23l5.5 3.2v6.4l-5.5 3.2-5.5-3.2v-6.4L23.5 23z" fill="#ffffff" fill-opacity="0.2" stroke="#ffffff" stroke-width="1.4"/><circle cx="18" cy="44" r="5" fill="#0f172a" stroke="#38bdf8" stroke-width="2.5"/><circle cx="18" cy="44" r="1.8" fill="#ffffff"/><circle cx="48" cy="44" r="5" fill="#0f172a" stroke="#38bdf8" stroke-width="2.5"/><circle cx="48" cy="44" r="1.8" fill="#ffffff"/></svg></div>
<div class="hub-label">Dhaka Central Hub</div>
</div>
</div> </div>
</div> </div>
</section> </section>
@@ -1246,7 +1241,7 @@
<!-- ===== Section 2: দুটি ব্যবহারের ধরন (Standalone vs Dashboard) ===== --> <!-- ===== Section 2: দুটি ব্যবহারের ধরন (Standalone vs Dashboard) ===== -->
<section class="comparison-section"> <section class="comparison-section">
<div class="sec-heading-row"> <div class="sec-heading-row">
<div class="sec-tag">⚖️ Architecture Choice</div> <div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>Architecture Choice</span></div>
<h2 class="sec-title" data-i18n="comp_title">দুটি ব্যবহারের ধরন — আপনার জন্য কোনটি উপযোগী?</h2> <h2 class="sec-title" data-i18n="comp_title">দুটি ব্যবহারের ধরন — আপনার জন্য কোনটি উপযোগী?</h2>
<p class="sec-sub" data-i18n="comp_sub">আপনার প্রযুক্তিগত সক্ষমতা অনুযায়ী সেরা উপায়টি বেছে নিন।</p> <p class="sec-sub" data-i18n="comp_sub">আপনার প্রযুক্তিগত সক্ষমতা অনুযায়ী সেরা উপায়টি বেছে নিন।</p>
</div> </div>
@@ -1259,7 +1254,7 @@
<div class="compare-title">Standalone Courier MCP</div> <div class="compare-title">Standalone Courier MCP</div>
<div class="compare-for" data-i18n="for_dev">ডেভেলপার ও টেকনিক্যাল টিমের জন্য</div> <div class="compare-for" data-i18n="for_dev">ডেভেলপার ও টেকনিক্যাল টিমের জন্য</div>
</div> </div>
<div class="compare-icon-wrap mcp">&lt;/&gt;</div> <div class="compare-icon-wrap mcp"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="#a78bfa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg></div>
</div> </div>
<ul class="check-list"> <ul class="check-list">
<li> <li>
@@ -1288,7 +1283,7 @@
<div class="compare-title">Aura Client Dashboard</div> <div class="compare-title">Aura Client Dashboard</div>
<div class="compare-for" data-i18n="for_business">ব্যবসার জন্য রেডি-টু-ইউজ সমাধান</div> <div class="compare-for" data-i18n="for_business">ব্যবসার জন্য রেডি-টু-ইউজ সমাধান</div>
</div> </div>
<div class="compare-icon-wrap dashboard">🖥️</div> <div class="compare-icon-wrap dashboard"><svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="#22d3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg></div>
</div> </div>
<ul class="check-list"> <ul class="check-list">
<li> <li>
@@ -1315,7 +1310,7 @@
<!-- ===== Section 3: Live Store Simulator ===== --> <!-- ===== Section 3: Live Store Simulator ===== -->
<section id="simulator" class="simulator-section"> <section id="simulator" class="simulator-section">
<div class="sec-heading-row" style="margin-bottom:0"> <div class="sec-heading-row" style="margin-bottom:0">
<div class="sec-tag">🏪 Sandbox Experience</div> <div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>Sandbox Experience</span></div>
<h2 class="sec-title" data-i18n="sim_title">Live Store Simulator — নিজের চোখেই দেখুন</h2> <h2 class="sec-title" data-i18n="sim_title">Live Store Simulator — নিজের চোখেই দেখুন</h2>
<p class="sec-sub" data-i18n="sim_sub">আপনার স্টোরের মতো করে অর্ডার, ঝুঁকি যাচাই এবং চারটি কুরিয়ারে বুকিং প্রক্রিয়া টেস্ট করুন।</p> <p class="sec-sub" data-i18n="sim_sub">আপনার স্টোরের মতো করে অর্ডার, ঝুঁকি যাচাই এবং চারটি কুরিয়ারে বুকিং প্রক্রিয়া টেস্ট করুন।</p>
</div> </div>
@@ -1323,16 +1318,16 @@
<!-- Platform Switcher Tabs --> <!-- Platform Switcher Tabs -->
<div class="platform-tabs"> <div class="platform-tabs">
<button class="platform-tab active" onclick="switchPlatform('woo', this)"> <button class="platform-tab active" onclick="switchPlatform('woo', this)">
<span>🛒</span> WooCommerce <svg viewBox="0 0 28 20" width="21" height="16" fill="none" aria-hidden="true"><rect x="1" y="1" width="26" height="18" rx="5" fill="#7f54b3"/><text x="14" y="13.5" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9" font-weight="800">Woo</text></svg><span>WooCommerce</span>
</button> </button>
<button class="platform-tab" onclick="switchPlatform('shopify', this)"> <button class="platform-tab" onclick="switchPlatform('shopify', this)">
<span>🛍️</span> Shopify <svg viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true"><path d="M18.5 6.5h-2.1A4.4 4.4 0 0 0 12 2.5a4.4 4.4 0 0 0-4.4 4H5.5L4 21h16l-1.5-14.5z" fill="#10b981"/><path d="M9.5 6.5a2.5 2.5 0 0 1 5 0" stroke="#ffffff" stroke-width="1.6" stroke-linecap="round"/><text x="12" y="16.8" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9.5" font-weight="900">S</text></svg><span>Shopify</span>
</button> </button>
<button class="platform-tab" onclick="switchPlatform('custom', this)"> <button class="platform-tab" onclick="switchPlatform('custom', this)">
<span>&lt;/&gt;</span> Custom Store <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#38bdf8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg><span>Custom Store</span>
</button> </button>
<button class="platform-tab" onclick="switchPlatform('dashboard', this)"> <button class="platform-tab" onclick="switchPlatform('dashboard', this)">
<span>🖥️</span> Aura Client Dashboard <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="#22d3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg><span>Aura Client Dashboard</span>
</button> </button>
</div> </div>
@@ -1342,13 +1337,13 @@
<div class="sim-brand-box"> <div class="sim-brand-box">
<div> <div>
<div id="sim-platform-title" class="sim-brand-title"> <div id="sim-platform-title" class="sim-brand-title">
<span>🛒</span> WooCommerce Simulation <svg viewBox="0 0 28 20" width="29" height="22" fill="none" aria-hidden="true"><rect x="1" y="1" width="26" height="18" rx="5" fill="#7f54b3"/><text x="14" y="13.5" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9" font-weight="800">Woo</text></svg><span>WooCommerce Simulation</span>
</div> </div>
<p id="sim-platform-desc" class="sim-brand-desc" data-i18n="sim_brand_desc"> <p id="sim-platform-desc" class="sim-brand-desc" data-i18n="sim_brand_desc">
উদাহরণ অর্ডার নিয়ে দেখুন কীভাবে Aura Courier MCP আপনার স্টোর থেকে অর্ডার নিয়ে স্বয়ংক্রিয়ভাবে জাতীয় ফ্রড ডাটাবেসে ঝুঁকি যাচাই করে এবং ১-ক্লিকে কুরিয়ার বুকিং সম্পন্ন করে। উদাহরণ অর্ডার নিয়ে দেখুন কীভাবে Aura Courier MCP আপনার স্টোর থেকে অর্ডার নিয়ে স্বয়ংক্রিয়ভাবে জাতীয় ফ্রড ডাটাবেসে ঝুঁকি যাচাই করে এবং ১-ক্লিকে কুরিয়ার বুকিং সম্পন্ন করে।
</p> </p>
</div> </div>
<div class="sim-illu-box">🏬</div> <div class="sim-illu-box"><svg width="96" height="84" viewBox="0 0 96 84" fill="none" aria-hidden="true" style="filter:drop-shadow(0 12px 24px rgba(99,102,241,0.35));"><defs><linearGradient id="stRoof" x1="12" y1="12" x2="84" y2="34"><stop offset="0%" stop-color="#6366f1"/><stop offset="100%" stop-color="#06b6d4"/></linearGradient><linearGradient id="stWall" x1="18" y1="34" x2="78" y2="74"><stop offset="0%" stop-color="#1e293b"/><stop offset="100%" stop-color="#0f172a"/></linearGradient></defs><rect x="18" y="34" width="60" height="38" rx="4" fill="url(#stWall)" stroke="#38bdf8" stroke-opacity="0.45" stroke-width="1.5"/><path d="M12 20l6-8h60l6 8v9a6 6 0 0 1-12 0 6 6 0 0 1-12 0 6 6 0 0 1-12 0 6 6 0 0 1-12 0 6 6 0 0 1-12 0 6 6 0 0 1-12 0v-9z" fill="url(#stRoof)" stroke="#bae6fd" stroke-width="1.4"/><rect x="26" y="44" width="22" height="18" rx="2.5" fill="#06b6d4" fill-opacity="0.2" stroke="#38bdf8" stroke-width="1.3"/><rect x="55" y="44" width="15" height="28" rx="2" fill="#8b5cf6" fill-opacity="0.25" stroke="#a78bfa" stroke-width="1.3"/><rect x="10" y="58" width="16" height="14" rx="2" fill="#f59e0b" fill-opacity="0.9" stroke="#fde68a" stroke-width="1.2"/><path d="M18 58v14M10 64h16" stroke="#78350f" stroke-width="1.2"/></svg></div>
</div> </div>
<!-- Right Simulated Order Card --> <!-- Right Simulated Order Card -->
@@ -1358,8 +1353,8 @@
<span data-i18n="sim_order_label">Store Order</span> <span id="sim-order-badge" class="badge-chip" style="margin-bottom:0; padding:2px 8px; font-size:11px;">#ORD-10493</span> <span data-i18n="sim_order_label">Store Order</span> <span id="sim-order-badge" class="badge-chip" style="margin-bottom:0; padding:2px 8px; font-size:11px;">#ORD-10493</span>
</div> </div>
<div class="sample-pill-group"> <div class="sample-pill-group">
<button class="sample-pill safe active" onclick="loadSampleOrder('safe')">✔ Safe Order</button> <button class="sample-pill safe active" onclick="loadSampleOrder('safe')" style="display:inline-flex;align-items:center;gap:5px;"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.8"><polyline points="20 6 9 17 4 12"/></svg><span>Safe Order</span></button>
<button class="sample-pill risk" onclick="loadSampleOrder('risk')">❌ High Risk</button> <button class="sample-pill risk" onclick="loadSampleOrder('risk')" style="display:inline-flex;align-items:center;gap:5px;"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg><span>High Risk</span></button>
</div> </div>
</div> </div>
@@ -1385,8 +1380,8 @@
<!-- Risk Check Result Banner --> <!-- Risk Check Result Banner -->
<div id="risk-box" class="risk-banner safe"> <div id="risk-box" class="risk-banner safe">
<div> <div>
<div id="risk-title" class="risk-banner-title"> <div id="risk-title" class="risk-banner-title" style="display:flex;align-items:center;gap:6px;">
<span>✔</span> <span>SAFE RISK 26%</span> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10"/></svg><span>SAFE RISK 26%</span>
</div> </div>
<div id="risk-desc" class="risk-banner-desc">New customer - Safe to proceed · Zero Mock Data</div> <div id="risk-desc" class="risk-banner-desc">New customer - Safe to proceed · Zero Mock Data</div>
</div> </div>
@@ -1397,36 +1392,25 @@
<div class="carrier-selector-title" data-i18n="sel_courier">Select Courier (One Click Booking):</div> <div class="carrier-selector-title" data-i18n="sel_courier">Select Courier (One Click Booking):</div>
<div class="carrier-chips-row"> <div class="carrier-chips-row">
<button class="carrier-chip-btn sf active" onclick="selectSimCarrier('sf', this)"> <button class="carrier-chip-btn sf active" onclick="selectSimCarrier('sf', this)">
<svg viewBox="0 0 36 36" width="18" height="18" fill="none"> <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><rect x="2" y="2" width="32" height="32" rx="8" fill="#10b981"/><path d="M23.5 12c-1.3-1.2-3.2-1.7-5.1-1.2-2.5.6-4.1 2.7-3.7 5.1.4 2.1 2.1 3.5 4.2 3.9l1.7.3c1.6.3 2.5 1.2 2.2 2.4-.3 1.5-1.6 2.4-3.5 2.2-1.8-.2-3.3-1.2-4-2.6" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/></svg>
<path d="M24 11c-1.3-1.3-3.3-1.8-5.2-1.3-2.6.6-4.3 2.9-3.9 5.5.4 2.2 2.2 3.7 4.4 4.1l1.8.3c1.7.3 2.6 1.3 2.4 2.6-.3 1.6-1.7 2.6-3.7 2.4-1.9-.2-3.5-1.3-4.2-2.8" stroke="#10b981" stroke-width="2.8" stroke-linecap="round"/>
</svg>
<span>Steadfast</span> <span>Steadfast</span>
</button> </button>
<button class="carrier-chip-btn pt" onclick="selectSimCarrier('pt', this)"> <button class="carrier-chip-btn pt" onclick="selectSimCarrier('pt', this)">
<svg viewBox="0 0 36 36" width="18" height="18" fill="none"> <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><circle cx="18" cy="18" r="16" fill="#ef4444"/><path d="M13 10.5h5.8a4.2 4.2 0 0 1 4.2 4.2 4.2 4.2 0 0 1-4.2 4.2h-3.1v6.6H13v-15zm2.7 6h2.9a1.8 1.8 0 0 0 1.8-1.8 1.8 1.8 0 0 0-1.8-1.8h-2.9v3.6z" fill="#ffffff"/></svg>
<circle cx="18" cy="18" r="14" fill="#ef4444"/>
<path d="M14 11h5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5h-5v5h-2.5V11h2.5zm0 5h4.5a1.5 1.5 0 0 0 1.5-1.5A1.5 1.5 0 0 0 18.5 13H14v3z" fill="#ffffff"/>
</svg>
<span>Pathao</span> <span>Pathao</span>
</button> </button>
<button class="carrier-chip-btn rx" onclick="selectSimCarrier('rx', this)"> <button class="carrier-chip-btn rx" onclick="selectSimCarrier('rx', this)">
<svg viewBox="0 0 36 36" width="18" height="18" fill="none"> <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="rxG18" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#f43f5e"/><stop offset="100%" stop-color="#be123c"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#rxG18)"/><path d="M8 24.5V11.5h4.8a3.2 3.2 0 0 1 0 6.4H8m4.4 0l3.6 6.6M19.5 11.5l8.5 13M28 11.5l-8.5 13" stroke="#ffffff" stroke-width="2.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
<circle cx="18" cy="18" r="13" stroke="#dc2626" stroke-width="2.2"/>
<path d="M13 13l10 10M23 13l-10 10" stroke="#dc2626" stroke-width="2.6" stroke-linecap="round"/>
</svg>
<span>RedX</span> <span>RedX</span>
</button> </button>
<button class="carrier-chip-btn pf" onclick="selectSimCarrier('pf', this)"> <button class="carrier-chip-btn pf" onclick="selectSimCarrier('pf', this)">
<svg viewBox="0 0 36 36" width="18" height="18" fill="none"> <svg viewBox="0 0 36 36" width="18" height="18" fill="none" aria-hidden="true" style="flex-shrink:0;"><defs><linearGradient id="pfGrad18" x1="0" y1="0" x2="36" y2="36"><stop offset="0%" stop-color="#0284c7"/><stop offset="100%" stop-color="#38bdf8"/></linearGradient></defs><rect x="2" y="2" width="32" height="32" rx="8" fill="url(#pfGrad18)"/><path d="M9.5 18.2l17.5-7.2-6.8 16-3.2-5.8-7.5-3z" fill="#ffffff"/><path d="M17 21.2l10-10.2" stroke="#0284c7" stroke-width="1.6" stroke-linecap="round"/></svg>
<path d="M9 18l18-7-7 16-3-6-8-3z" fill="#0284c7" stroke="#38bdf8" stroke-width="1.2" stroke-linejoin="round"/>
<path d="M17 20l10-9" stroke="#ffffff" stroke-width="1.2"/>
</svg>
<span>Paperfly</span> <span>Paperfly</span>
</button> </button>
</div> </div>
<button class="btn-book" onclick="executeSimBooking()"> <button class="btn-book" onclick="executeSimBooking()">
<span>🚀</span> <span id="btn-book-text" data-i18n="btn_book">Book with Selected Courier →</span> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg> <span id="btn-book-text" data-i18n="btn_book">Book with Selected Courier →</span>
</button> </button>
</div> </div>
</div> </div>
@@ -1436,22 +1420,21 @@
<section id="pricing" class="pricing-section"> <section id="pricing" class="pricing-section">
<div class="pricing-badge-row"> <div class="pricing-badge-row">
<div> <div>
<div class="sec-tag">💳 Pricing & Plans</div> <div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2"><rect x="2" y="5" width="20" height="14" rx="2"/><line x1="2" y1="10" x2="22" y2="10"/></svg><span>Pricing &amp; Plans</span></div>
<h2 class="sec-title" data-i18n="price_title">সাবস্ক্রিপশন প্ল্যান — আপনার ব্যবসার জন্য সঠিক প্ল্যান</h2> <h2 class="sec-title" data-i18n="price_title">সাবস্ক্রিপশন প্ল্যান — আপনার ব্যবসার জন্য সঠিক প্ল্যান</h2>
<p class="sec-sub" data-i18n="price_sub">শুধু Courier MCP ব্যবহার করুন, অথবা আরও শক্তিশালী AI ফিচারসহ Aura AI ব্যবহার করুন।</p> <p class="sec-sub" data-i18n="price_sub">শুধু Courier MCP ব্যবহার করুন, অথবা আরও শক্তিশালী AI ফিচারসহ Aura AI ব্যবহার করুন।</p>
</div> </div>
<div class="trial-pill"> <div class="trial-pill">
<span>🎁</span> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 12 20 22 4 22 4 12"/><rect x="2" y="7" width="20" height="5"/><line x1="12" y1="22" x2="12" y2="7"/><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"/><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"/></svg>
<span data-i18n="trial_pill">15-Day Free Trial (সব প্ল্যানে ১৫ দিন ফ্রি)</span> <span data-i18n="trial_pill">15-Day Free Trial (সব প্ল্যানে ১৫ দিন ফ্রি)</span>
</div> </div>
</div> </div>
<div class="pricing-cards-grid"> <div class="pricing-cards-grid">
<!-- Plan 1 -->
<div class="price-card"> <div class="price-card">
<div> <div>
<div class="price-track-label mcp">Track 1: Courier MCP</div> <div class="price-track-label mcp">Track 1: Courier MCP</div>
<div class="price-plan-name">Courier MCP Starter</div> <div class="price-plan-name"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>Courier MCP Starter</span></div>
<div class="price-amount-box"> <div class="price-amount-box">
<span class="price-val">৳ ৪৯৯</span> <span class="price-val">৳ ৪৯৯</span>
<span class="price-period">/ মাস</span> <span class="price-period">/ মাস</span>
@@ -1465,11 +1448,10 @@
<button class="btn-trial cyan" onclick="startFreeTrial('Courier MCP Starter')" data-i18n="btn_trial">Start Free Trial →</button> <button class="btn-trial cyan" onclick="startFreeTrial('Courier MCP Starter')" data-i18n="btn_trial">Start Free Trial →</button>
</div> </div>
<!-- Plan 2 -->
<div class="price-card" style="border-color:var(--cyan); box-shadow:0 0 20px rgba(6,182,212,0.15);"> <div class="price-card" style="border-color:var(--cyan); box-shadow:0 0 20px rgba(6,182,212,0.15);">
<div> <div>
<div class="price-track-label mcp">Track 1: Courier MCP</div> <div class="price-track-label mcp">Track 1: Courier MCP</div>
<div class="price-plan-name">MCP Pro ⭐</div> <div class="price-plan-name"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#38bdf8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>MCP Pro</span><svg width="15" height="15" viewBox="0 0 24 24" fill="#f59e0b" stroke="#fbbf24" stroke-width="1.5" aria-hidden="true"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg></div>
<div class="price-amount-box"> <div class="price-amount-box">
<span class="price-val">৳ ৯৯৯</span> <span class="price-val">৳ ৯৯৯</span>
<span class="price-period">/ মাস</span> <span class="price-period">/ মাস</span>
@@ -1483,6 +1465,83 @@
<button class="btn-trial cyan" onclick="startFreeTrial('MCP Pro')" data-i18n="btn_trial">Start Free Trial →</button> <button class="btn-trial cyan" onclick="startFreeTrial('MCP Pro')" data-i18n="btn_trial">Start Free Trial →</button>
</div> </div>
<div class="price-card" style="border-color:rgba(139,92,246,0.45);">
<div>
<div class="price-track-label ai">Track 2: Aura AI</div>
<div class="price-plan-name"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#a78bfa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg><span>Aura AI Starter</span></div>
<div class="price-amount-box">
<span class="price-val">৳ ১,৯৯৯</span>
<span class="price-period">/ মাস</span>
</div>
<ul class="price-features">
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p3_f1">Courier MCP সব ফিচার</span></li>
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p3_f2">AI ঝুঁকি ও ফ্রড বিশ্লেষণ</span></li>
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p3_f3">অর্ডার অটোমেশন (বেসিক)</span></li>
</ul>
</div>
<button class="btn-trial purple" onclick="startFreeTrial('Aura AI Starter')" data-i18n="btn_trial">Start Free Trial →</button>
</div>
<div class="price-card" style="border-color:var(--purple); box-shadow:0 0 22px rgba(139,92,246,0.18);">
<div>
<div class="price-track-label ai">Track 2: Aura AI</div>
<div class="price-plan-name"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#f59e0b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4l3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14"/></svg><span>Aura AI Growth</span></div>
<div class="price-amount-box">
<span class="price-val">৳ ৪,৯৯৯</span>
<span class="price-period">/ মাস</span>
</div>
<ul class="price-features">
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p4_f1">উন্নত AI অটোমেশন</span></li>
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p4_f2">বৃহৎ ব্যবহার ও স্কেল</span></li>
<li><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg> <span data-i18n="p4_f3">২৪/৭ প্রায়োরিটি ডেডিকেটেড সাপোর্ট</span></li>
</ul>
</div>
<button class="btn-trial purple" onclick="startFreeTrial('Aura AI Growth')" data-i18n="btn_trial">Start Free Trial →</button>
</div>
</div>
</section>
<section id="setup" class="setup-section">
<div class="sec-heading-row" style="margin-bottom:0">
<div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg><span>Step-by-Step Onboarding</span></div>
<h2 class="sec-title" data-i18n="setup_title">Setup Guide — ৫ ধাপে শুরু করুন</h2>
<p class="sec-sub" data-i18n="setup_sub">খুব সহজে আপনার স্টোর বা ড্যাশবোর্ডে Aura Courier MCP সেটআপ করুন।</p>
</div>
<div class="steps-row">
<div class="step-card">
<div class="step-num">1</div>
<div style="margin-bottom:8px;color:var(--cyan);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"/></svg></div>
<div class="step-title" data-i18n="s1_t">API Key সংগ্রহ</div>
<div class="step-desc" data-i18n="s1_d">চারটি কুরিয়ার থেকেই আপনার মার্চেন্ট এপিআই কী ও সিক্রেট সংগ্রহ করুন।</div>
</div>
<div class="step-card">
<div class="step-num">2</div>
<div style="margin-bottom:8px;color:var(--cyan);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22v-5"/><path d="M9 8V2"/><path d="M15 8V2"/><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"/></svg></div>
<div class="step-title" data-i18n="s2_t">স্টোরে সংযোগ</div>
<div class="step-desc" data-i18n="s2_d">WooCommerce / Shopify / কাস্টম সিস্টেমে MCP প্লাগইন ইনস্টল করুন।</div>
</div>
<div class="step-card">
<div class="step-num">3</div>
<div style="margin-bottom:8px;color:var(--cyan);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="4" y1="21" x2="4" y2="14"/><line x1="4" y1="10" x2="4" y2="3"/><line x1="12" y1="21" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="3"/><line x1="20" y1="21" x2="20" y2="16"/><line x1="20" y1="12" x2="20" y2="3"/><line x1="1" y1="14" x2="7" y2="14"/><line x1="9" y1="8" x2="15" y2="8"/><line x1="17" y1="16" x2="23" y2="16"/></svg></div>
<div class="step-title" data-i18n="s3_t">সেটিংস কনফিগার</div>
<div class="step-desc" data-i18n="s3_d">ডিফল্ট কুরিয়ার রুলস, জোন ক্যালকুলেশন ও ফ্রড থ্রেশহোল্ড সেট করুন।</div>
</div>
<div class="step-card">
<div class="step-num">4</div>
<div style="margin-bottom:8px;color:var(--cyan);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 2v7.31L4.1 19.11A2 2 0 0 0 5.75 22h12.5a2 2 0 0 0 1.65-2.89L14 9.31V2"/><path d="M8.5 2h7"/></svg></div>
<div class="step-title" data-i18n="s4_t">সিমুলেট করে দেখুন</div>
<div class="step-desc" data-i18n="s4_d">লাইভ সিমুলেটরে টেস্ট অর্ডার পাঠিয়ে রিয়েল ডিসপ্যাচ যাচাই করুন।</div>
</div>
<div class="step-card">
<div class="step-num">5</div>
<div style="margin-bottom:8px;color:var(--emerald);"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg></div>
<div class="step-title" data-i18n="s5_t">লাইভে শুরু করুন</div>
<div class="step-desc" data-i18n="s5_d">সরাসরি অর্ডার আসার সাথে সাথে অটোমেটিক কুরিয়ার বুকিং নিশ্চিত করুন।</div>
</div> </div>
</div> </div>
</section> </section>
@@ -1490,25 +1549,25 @@
<!-- ===== Section 6: আরো সহায়তা ও রিসোর্স ===== --> <!-- ===== Section 6: আরো সহায়তা ও রিসোর্স ===== -->
<section class="resources-section"> <section class="resources-section">
<div class="sec-heading-row"> <div class="sec-heading-row">
<div class="sec-tag">📚 Developer Resources</div> <div class="sec-tag" style="display:inline-flex;align-items:center;gap:6px;"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg><span>Developer Resources</span></div>
<h2 class="sec-title" data-i18n="res_title">আরো সহায়তা ও রিসোর্স</h2> <h2 class="sec-title" data-i18n="res_title">আরো সহায়তা ও রিসোর্স</h2>
</div> </div>
<div class="resource-cards-grid"> <div class="resource-cards-grid">
<a href="#setup" class="res-card"> <a href="#setup" class="res-card">
<span class="res-icon">📖</span> <span class="res-icon" style="display:flex;color:var(--cyan);"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg></span>
<span class="res-title" data-i18n="res_1">Full Guide (Step by Step)</span> <span class="res-title" data-i18n="res_1">Full Guide (Step by Step)</span>
</a> </a>
<a href="/mcp" class="res-card"> <a href="/mcp" class="res-card">
<span class="res-icon">&lt;/&gt;</span> <span class="res-icon" style="display:flex;color:var(--cyan);"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg></span>
<span class="res-title" data-i18n="res_2">API & MCP Docs</span> <span class="res-title" data-i18n="res_2">API & MCP Docs</span>
</a> </a>
<a href="#simulator" class="res-card"> <a href="#simulator" class="res-card">
<span class="res-icon">🏪</span> <span class="res-icon" style="display:flex;color:var(--cyan);"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="#22d3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg></span>
<span class="res-title" data-i18n="res_3">Store Integration Guide</span> <span class="res-title" data-i18n="res_3">Store Integration Guide</span>
</a> </a>
<a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener" class="res-card"> <a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener" class="res-card">
<span class="res-icon">❓</span> <span class="res-icon" style="display:flex;color:var(--cyan);"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></span>
<span class="res-title" data-i18n="res_4">Support & FAQ</span> <span class="res-title" data-i18n="res_4">Support & FAQ</span>
</a> </a>
</div> </div>
@@ -1554,7 +1613,7 @@
}</pre> }</pre>
<button onclick="copyAgentJson()" style="position:absolute; top:12px; right:12px; background:var(--cyan); color:#040914; border:none; padding:7px 14px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:6px;"> <button onclick="copyAgentJson()" style="position:absolute; top:12px; right:12px; background:var(--cyan); color:#040914; border:none; padding:7px 14px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:6px;">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
<span id="copy-btn-text">Copy JSON</span> <span id="copy-json-text">Copy JSON</span>
</button> </button>
</div> </div>
@@ -1576,7 +1635,7 @@
<img class="logo-img" src="/assets/courier-logo.png" onerror="this.onerror=null; this.src='/assets/courier-logo.jpg';" alt="Aura Courier MCP Logo" /> <img class="logo-img" src="/assets/courier-logo.png" onerror="this.onerror=null; this.src='/assets/courier-logo.jpg';" alt="Aura Courier MCP Logo" />
<div> <div>
<span class="f-brand-title">Aura Courier MCP</span> <span class="f-brand-title">Aura Courier MCP</span>
<span class="version-pill">v2.6.0</span> <span class="version-pill">v2.6.1</span>
</div> </div>
</div> </div>
<p class="footer-tagline"> <p class="footer-tagline">
@@ -1623,17 +1682,12 @@
<ul class="footer-link-list"> <ul class="footer-link-list">
<li> <li>
<a href="https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp" target="_blank" rel="noopener"> <a href="https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span style="color:var(--cyan); font-weight:700;">⚡ Glama.ai Registry</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--cyan)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg><span style="color:var(--cyan); font-weight:700;">Glama.ai Registry</span>
</a> </a>
</li> </li>
<li> <li>
<a href="https://www.npmjs.com/package/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener"> <a href="https://www.npmjs.com/package/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span>📦 npm Package (v2.6.0)</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg><span>npm Package (v2.6.0)</span>
</a>
</li>
<li>
<a href="https://smithery.ai/server/@auraajenticai/aura-courier-mcp" target="_blank" rel="noopener">
<span>🛠️ Smithery Registry</span>
</a> </a>
</li> </li>
</ul> </ul>
@@ -1657,12 +1711,12 @@
</li> </li>
<li> <li>
<a href="https://auraajenticai.cloud" target="_blank" rel="noopener"> <a href="https://auraajenticai.cloud" target="_blank" rel="noopener">
<span>🌐 Aura Agentic AI Cloud</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg><span>Aura Agentic AI Cloud</span>
</a> </a>
</li> </li>
<li> <li>
<a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener"> <a href="https://client.auraajenticai.cloud" target="_blank" rel="noopener">
<span>🚀 Client Dashboard Portal</span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg><span>Client Dashboard Portal</span>
</a> </a>
</li> </li>
</ul> </ul>
@@ -1682,9 +1736,13 @@
</footer> </footer>
<!-- ===== Enterprise Global Footer ===== -->
<!-- Toast Notification --> <!-- Toast Notification -->
<div id="toast" class="toast-modal"> <div id="toast" class="toast-modal">
<span style="font-size:20px;">🚀</span> <span style="display:flex;color:var(--cyan);"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg></span>
<div> <div>
<div id="toast-title" style="font-weight:800; font-size:13.5px; color:#fff;">Order Booked!</div> <div id="toast-title" style="font-weight:800; font-size:13.5px; color:#fff;">Order Booked!</div>
<div id="toast-desc" style="font-size:12px; color:var(--text-muted);">Consignment ID generated successfully.</div> <div id="toast-desc" style="font-size:12px; color:var(--text-muted);">Consignment ID generated successfully.</div>
@@ -1692,8 +1750,247 @@
</div> </div>
<!-- Background Canvas Script --> <!-- Background Canvas Script -->
<script src="/assets/courier-canvas.js"></script> <script src="/assets/courier-canvas.js?v=2.6.1"></script>
<script> <script>
if (typeof initCourierCanvas === 'function') {
initCourierCanvas('hubmap');
}
// ===== Interactive Simulator State =====
let currentCarrier = 'sf';
const carrierNames = {
sf: 'Steadfast Courier',
pt: 'Pathao Express',
rx: 'RedX Delivery',
pf: 'Paperfly Go'
};
function selectSimCarrier(key, btn) {
currentCarrier = key;
document.querySelectorAll('.carrier-chip-btn').forEach(b => b.className = 'carrier-chip-btn ' + b.getAttribute('onclick').match(/'([^']+)'/)[1]);
btn.classList.add('active');
document.getElementById('btn-book-text').textContent = (curLang === 'bn' ? 'বুক করুন: ' : 'Book with ') + carrierNames[key] + ' →';
}
function switchPlatform(p, tab) {
document.querySelectorAll('.platform-tab').forEach(t => t.classList.remove('active'));
tab.classList.add('active');
const titleEl = document.getElementById('sim-platform-title');
const descEl = document.getElementById('sim-platform-desc');
if (p === 'woo') {
titleEl.innerHTML = '<svg viewBox="0 0 28 20" width="29" height="22" fill="none" aria-hidden="true"><rect x="1" y="1" width="26" height="18" rx="5" fill="#7f54b3"/><text x="14" y="13.5" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9" font-weight="800">Woo</text></svg><span>WooCommerce Simulation</span>';
descEl.textContent = curLang === 'bn'
? 'WooCommerce প্লাগইন দিয়ে সরাসরি স্টোর চেকআউট থেকে কুরিয়ার ট্র্যাকিং এবং ফ্রড এনালাইসিস যাচাই করুন।'
: 'Seamless WooCommerce plugin integration for direct checkout parcel booking and fraud assessment.';
} else if (p === 'shopify') {
titleEl.innerHTML = '<svg viewBox="0 0 24 24" width="20" height="20" fill="none" aria-hidden="true"><path d="M18.5 6.5h-2.1A4.4 4.4 0 0 0 12 2.5a4.4 4.4 0 0 0-4.4 4H5.5L4 21h16l-1.5-14.5z" fill="#10b981"/><path d="M9.5 6.5a2.5 2.5 0 0 1 5 0" stroke="#ffffff" stroke-width="1.6" stroke-linecap="round"/><text x="12" y="16.8" text-anchor="middle" fill="#ffffff" font-family="Inter,sans-serif" font-size="9.5" font-weight="900">S</text></svg><span>Shopify App Simulation</span>';
descEl.textContent = curLang === 'bn'
? 'Shopify স্টোরে Aura Webhook ইন্টিগ্রেশন দিয়ে আনফুলফিল্ড অর্ডার এক ক্লিকে কুরিয়ারে পুশ করুন।'
: 'Shopify automated fulfillment with instant courier consignment generation upon order creation.';
} else if (p === 'custom') {
titleEl.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#38bdf8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/><line x1="14" y1="4" x2="10" y2="20"/></svg><span>Custom Store API</span>';
descEl.textContent = curLang === 'bn'
? 'যেকোনো কাস্টম পিএইচপি, নোডজেএস বা পাইথন ব্যাকএন্ড থেকে সরাসরি REST/MCP এন্ডপয়েন্ট ব্যবহার করুন।'
: 'Direct JSON-RPC and REST endpoints for custom PHP, Node.js, and Python backend systems.';
} else {
titleEl.innerHTML = '<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="#22d3ee" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg><span>Aura Client Dashboard</span>';
descEl.textContent = curLang === 'bn'
? 'কোনো কোডিং ছাড়া সেন্ট্রালাইজড ড্যাশবোর্ড থেকে বাল্ক পার্সেল বুকিং এবং রিস্ক ফিল্টারিং।'
: 'No-code centralized merchant dashboard with bulk order dispatch and live COD reconciliations.';
}
}
function loadSampleOrder(type) {
document.querySelectorAll('.sample-pill').forEach(p => p.classList.remove('active'));
const rBox = document.getElementById('risk-box');
const rTitle = document.getElementById('risk-title');
const rDesc = document.getElementById('risk-desc');
if (type === 'safe') {
document.querySelector('.sample-pill.safe').classList.add('active');
document.getElementById('ord-cust').textContent = 'Md. Rahim';
document.getElementById('ord-phone').textContent = '+880 1712-345678';
document.getElementById('ord-amount').textContent = '৳ 2,890';
document.getElementById('ord-items').textContent = 'K-Beauty Skincare (2 items)';
rBox.className = 'risk-banner safe';
rTitle.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10"/></svg><span>SAFE RISK 26%</span>';
rDesc.textContent = curLang === 'bn' ? 'নিয়মিত গ্রাহক - নিরাপদ ডেলিভারি রেট ৯২%+' : 'Frequent buyer - Delivery success 92%+';
} else {
document.querySelector('.sample-pill.risk').classList.add('active');
document.getElementById('ord-cust').textContent = 'Tanvir Ahmed';
document.getElementById('ord-phone').textContent = '+880 1999-887766';
document.getElementById('ord-amount').textContent = '৳ 6,400';
document.getElementById('ord-items').textContent = 'High-Value Electronics (1 item)';
rBox.className = 'risk-banner high';
rTitle.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg><span>HIGH RISK 84%</span>';
rDesc.textContent = curLang === 'bn' ? 'সতর্কতা: অতীতে একাধিক পার্সেল রিজেকশনের রেকর্ড রয়েছে!' : 'Caution: High return/cancellation rate in carrier DB!';
}
}
function executeSimBooking() {
const code = 'AC-' + Math.floor(100000 + Math.random() * 900000);
const toast = document.getElementById('toast');
const title = document.getElementById('toast-title');
const desc = document.getElementById('toast-desc');
title.textContent = (curLang === 'bn' ? 'পার্সেল বুক সফল! ' : 'Parcel Dispatched: ') + carrierNames[currentCarrier];
desc.textContent = (curLang === 'bn' ? 'কনসাইনমেন্ট ট্র্যাকিং কোড: ' : 'Consignment Code: ') + code;
toast.style.display = 'flex';
setTimeout(() => { toast.style.display = 'none'; }, 4000);
}
function startFreeTrial(plan) {
alert((curLang === 'bn' ? 'ধন্যবাদ! আপনার ১৫ দিন ফ্রি ট্রায়াল শুরু করতে ক্লায়েন্ট পোর্টালে লগইন করুন। নির্বাচিত প্ল্যান: ' : 'Welcome! Log in to client portal to activate your 15-day trial for: ') + plan);
window.open('https://client.auraajenticai.cloud', '_blank');
}
// ===== Bilingual Engine =====
const translations = {
bn: {
nav_home: "হোম",
nav_guide: "গাইড",
nav_pricing: "প্রাইসিং",
nav_playground: "প্লেগ্রাউন্ড",
nav_docs: "ডকুমেন্টেশন",
badge_guide: "অফিসিয়াল ব্যবহারবিধি",
hero_h2: "ব্যবহার নির্দেশিকা, স্টোর সিমুলেটর ও ১৫ দিন ফ্রি ট্রায়াল",
hero_desc: "বাংলাদেশের ই-কমার্সের জন্য মাল্টি-কুরিয়ার ইন্টিগ্রেশন সমাধান — আপনার স্টোর (WooCommerce/Shopify/Custom) থেকে সরাসরি Steadfast, Pathao, RedX ও Paperfly-তে অর্ডার বুকিং।",
cta_simulator: "Try Live Simulator →",
cta_read_guide: "Read Full Guide",
val1_title: "Fraud-Risk Screening",
val1_desc: "ভুয়া বা ঝুঁকিপূর্ণ অর্ডার আগে শনাক্ত",
val2_title: "Four-Courier Booking",
val2_desc: "৪টি কুরিয়ারে এক ক্লিকে বুকিং",
val3_title: "Encrypted API Key Vault",
val3_desc: "কুরিয়ার কী নিরাপদে সংরক্ষণ",
comp_title: "দুটি ব্যবহারের ধরন — আপনার জন্য কোনটি উপযোগী?",
comp_sub: "আপনার প্রযুক্তিগত সক্ষমতা অনুযায়ী সেরা উপায়টি বেছে নিন।",
for_dev: "ডেভেলপার ও টেকনিক্যাল টিমের জন্য",
for_business: "ব্যবসার জন্য রেডি-টু-ইউজ সমাধান",
mcp_f1: "নিজের অ্যাপ বা সিস্টেমে সরাসরি MCP ইন্টিগ্রেশন",
mcp_f2: "API বা MCP প্রটোকল দিয়ে কুরিয়ার বুকিং",
mcp_f3: "WooCommerce, Shopify বা কাস্টম স্টোরে সংযোগ",
mcp_f4: "সম্পূর্ণ ফ্লেক্সিবল ও ডেভেলপার-ফ্রেন্ডলি",
dash_f1: "কোনো কোড ছাড়া সহজে ব্যবহারযোগ্য রেডি ইন্টারফেস",
dash_f2: "অর্ডার দেখা, ঝুঁকি যাচাই ও কুরিয়ার বুকিং",
dash_f3: "৪টি কুরিয়ারের হিসাব ও ব্যালেন্স এক জায়গায় সমন্বয়",
dash_f4: "ছোট ও মাঝারি ই-কমার্সের জন্য আদর্শ সমাধান",
sim_title: "Live Store Simulator — নিজের চোখেই দেখুন",
sim_sub: "আপনার স্টোরের মতো করে অর্ডার, ঝুঁকি যাচাই এবং চারটি কুরিয়ারে বুকিং প্রক্রিয়া টেস্ট করুন।",
sim_brand_desc: "উদাহরণ অর্ডার নিয়ে দেখুন কীভাবে Aura Courier MCP আপনার স্টোর থেকে অর্ডার নিয়ে স্বয়ংক্রিয়ভাবে জাতীয় ফ্রড ডাটাবেসে ঝুঁকি যাচাই করে এবং ১-ক্লিকে কুরিয়ার বুকিং সম্পন্ন করে।",
sim_order_label: "স্টোর অর্ডার",
sel_courier: "কুরিয়ার নির্বাচন করুন (১-ক্লিক বুকিং):",
btn_book: "বুক করুন সিলেক্টেড কুরিয়ারে →",
price_title: "সাবস্ক্রিপশন প্ল্যান — আপনার ব্যবসার জন্য সঠিক প্ল্যান",
price_sub: "শুধু Courier MCP ব্যবহার করুন, অথবা আরও শক্তিশালী AI ফিচারসহ Aura AI ব্যবহার করুন।",
trial_pill: "15-Day Free Trial (সব প্ল্যানে ১৫ দিন ফ্রি)",
btn_trial: "Start Free Trial →",
p1_f1: "৪টি কুরিয়ার ইন্টিগ্রেশন",
p1_f2: "মাসিক নির্দিষ্ট ব্যবহার সীমা",
p1_f3: "স্ট্যান্ডার্ড ইমেইল সাপোর্ট",
p2_f1: "আনলিমিটেড অর্ডার বুকিং",
p2_f2: "অগ্রাধিকার টেকনিক্যাল সাপোর্ট",
p2_f3: "গুগল ম্যাপস স্পেশিয়াল রাউটিং",
p3_f1: "Courier MCP সব ফিচার",
p3_f2: "AI ঝুঁকি ও ফ্রড বিশ্লেষণ",
p3_f3: "অর্ডার অটোমেশন (বেসিক)",
p4_f1: "উন্নত AI অটোমেশন ও অমনিচ্যানেল",
p4_f2: "বৃহৎ ব্যবহার ও হাই-ভলিউম স্কেল",
p4_f3: "২৪/৭ প্রায়োরিটি ডেডিকেটেড সাপোর্ট",
setup_title: "Setup Guide — ৫ ধাপে শুরু করুন",
setup_sub: "খুব সহজে আপনার স্টোর বা ড্যাশবোর্ডে Aura Courier MCP সেটআপ করুন।",
s1_t: "API Key সংগ্রহ",
s1_d: "চারটি কুরিয়ার থেকেই আপনার মার্চেন্ট এপিআই কী ও সিক্রেট সংগ্রহ করুন।",
s2_t: "স্টোরে সংযোগ",
s2_d: "WooCommerce / Shopify / কাস্টম সিস্টেমে MCP প্লাগইন ইনস্টল করুন।",
s3_t: "সেটিংস কনফিগার",
s3_d: "ডিফল্ট কুরিয়ার রুলস, জোন ক্যালকুলেশন ও ফ্রড থ্রেশহোল্ড সেট করুন।",
s4_t: "সিমুলেট করে দেখুন",
s4_d: "লাইভ সিমুলেটরে টেস্ট অর্ডার পাঠিয়ে রিয়েল ডিসপ্যাচ যাচাই করুন।",
s5_t: "লাইভে শুরু করুন",
s5_d: "সরাসরি অর্ডার আসার সাথে সাথে অটোমেটিক কুরিয়ার বুকিং নিশ্চিত করুন।",
res_title: "আরো সহায়তা ও রিসোর্স",
res_1: "Full Guide (Step by Step)",
res_2: "API & MCP Docs",
res_3: "Store Integration Guide",
res_4: "Support & FAQ"
},
en: {
nav_home: "Home",
nav_guide: "Guide",
nav_pricing: "Pricing",
nav_playground: "Playground",
nav_docs: "Docs",
badge_guide: "Official Guide",
hero_h2: "Complete User Guide, Store Simulator & 15-Day Free Trial",
hero_desc: "The all-in-one multi-carrier logistics integration for Bangladesh e-commerce — book parcels directly with Steadfast, Pathao, RedX, and Paperfly from WooCommerce, Shopify, or Custom Stores.",
cta_simulator: "Try Live Simulator →",
cta_read_guide: "Read Full Guide",
val1_title: "Fraud-Risk Screening",
val1_desc: "Early detection of fake or high-risk orders",
val2_title: "Four-Courier Booking",
val2_desc: "1-Click automated dispatch across 4 carriers",
val3_title: "Encrypted API Key Vault",
val3_desc: "Zero-Knowledge AES-256 courier key storage",
comp_title: "Two Implementation Models — Which Fits You Best?",
comp_sub: "Choose the optimal setup based on your engineering requirements.",
for_dev: "For Developers & Technical Teams",
for_business: "Ready-to-Use Business Solution",
mcp_f1: "Direct MCP protocol connection to your internal stack",
mcp_f2: "Programmatic courier booking via JSON-RPC/REST",
mcp_f3: "Fast integration with WooCommerce, Shopify, or custom apps",
mcp_f4: "Full architectural flexibility and developer control",
dash_f1: "No-code turnkey visual management interface",
dash_f2: "View orders, fraud score, and 1-click booking",
dash_f3: "Centralized multi-carrier balances and tracking",
dash_f4: "Ideal for growing e-commerce businesses",
sim_title: "Live Store Simulator — Experience It Live",
sim_sub: "Simulate orders, test fraud detection, and preview automated bookings across 4 carriers.",
sim_brand_desc: "Experience how Aura Courier MCP automatically ingests store orders, evaluates buyer fraud probability against national databases, and books shipments in 1 click.",
sim_order_label: "Store Order",
sel_courier: "Select Courier (One Click Booking):",
btn_book: "Book with Selected Courier →",
price_title: "Subscription Plans — Choose the Perfect Plan",
price_sub: "Use standalone Courier MCP, or unlock advanced automated sales with Aura AI.",
trial_pill: "15-Day Free Trial on all plans",
btn_trial: "Start Free Trial →",
p1_f1: "4 Courier Integrations",
p1_f2: "Fixed monthly booking quota",
p1_f3: "Standard email support",
p2_f1: "Unlimited parcel bookings",
p2_f2: "Priority technical support",
p2_f3: "Google Maps spatial intelligence",
p3_f1: "All Courier MCP features",
p3_f2: "AI-powered fraud risk scoring",
p3_f3: "Basic order automation",
p4_f1: "Advanced omnichannel AI automation",
p4_f2: "High-volume scale and custom SLAs",
p4_f3: "24/7 dedicated support team",
setup_title: "Setup Guide — Get Started in 5 Steps",
setup_sub: "Quickly set up Aura Courier MCP in your e-commerce store or dashboard.",
s1_t: "Obtain API Keys",
s1_d: "Gather API credentials from Steadfast, Pathao, RedX, and Paperfly.",
s2_t: "Connect Store",
s2_d: "Install our plugin or hook webhooks to your WooCommerce/Shopify store.",
s3_t: "Configure Rules",
s3_d: "Set default fallback rules, address zones, and fraud limits.",
s4_t: "Simulate Deliveries",
s4_d: "Dispatch test parcels in sandbox mode to verify consignment codes.",
s5_t: "Go Live",
s5_d: "Enable automated booking for all incoming customer orders.",
res_title: "More Support & Resources",
res_1: "Full Guide (Step by Step)",
res_2: "API & MCP Docs",
res_3: "Store Integration Guide",
res_4: "Support & FAQ"
}
};
const agentConfigs = { const agentConfigs = {
antigravity: { antigravity: {
path: '%USERPROFILE%\\.gemini\\antigravity\\mcp\\aura-courier\\server.json', path: '%USERPROFILE%\\.gemini\\antigravity\\mcp\\aura-courier\\server.json',
@@ -1707,7 +2004,7 @@
}, },
"aura-courier-local": { "aura-courier-local": {
"command": "npx", "command": "npx",
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"], "args": ["-y", "aura-courier-mcp@2.6.1"],
"env": { "PORT": "8080" } "env": { "PORT": "8080" }
} }
} }
@@ -1724,7 +2021,7 @@
}, },
"aura-courier-stdio": { "aura-courier-stdio": {
"command": "npx", "command": "npx",
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"] "args": ["-y", "aura-courier-mcp@2.6.1"]
} }
} }
}, null, 2) }, null, 2)
@@ -1794,7 +2091,7 @@
const codeEl = document.getElementById('agent-json-code'); const codeEl = document.getElementById('agent-json-code');
const code = codeEl ? codeEl.innerText : ''; const code = codeEl ? codeEl.innerText : '';
navigator.clipboard.writeText(code).then(() => { navigator.clipboard.writeText(code).then(() => {
const txt = document.getElementById('copy-btn-text'); const txt = document.getElementById('copy-json-text');
if (txt) { if (txt) {
txt.innerText = 'Copied!'; txt.innerText = 'Copied!';
setTimeout(() => txt.innerText = 'Copy JSON', 2000); setTimeout(() => txt.innerText = 'Copy JSON', 2000);
+1
View File
@@ -14,4 +14,5 @@ export interface CourierAdapter {
trackParcel(trackingCode: string): Promise<TrackingResponse>; trackParcel(trackingCode: string): Promise<TrackingResponse>;
getBalance(): Promise<BalanceResponse>; getBalance(): Promise<BalanceResponse>;
getLocations?(cityName?: string, zoneName?: string): Promise<LocationResolutionResponse>; getLocations?(cityName?: string, zoneName?: string): Promise<LocationResolutionResponse>;
cancelParcel?(consignmentId: string, reason?: string): Promise<any>;
} }
+43
View File
@@ -151,4 +151,47 @@ export class PaperflyAdapter implements CourierAdapter {
hint: "Use Paperfly merchant portal", hint: "Use Paperfly merchant portal",
}; };
} }
/**
* Authentic Upstream Paperfly Cancellation
* Endpoint: POST /api/v1/cancel-order
*/
async cancelParcel(orderId: string, reason?: string): Promise<{ success: boolean; courier: SupportedCourier; consignment_id: string; message: string; raw_response?: any }> {
if (!this.enabled) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "Paperfly credentials are not configured.",
courier: "paperfly",
});
}
try {
const response = await this.client.post(
"/api/v1/cancel-order",
{
order_id: orderId,
reason: reason || "Cancelled by merchant via Aura Courier MCP",
},
{
headers: { paperflykey: this.apiKey },
auth: { username: this.username, password: this.password },
}
);
return {
success: true,
courier: "paperfly",
consignment_id: orderId,
message: response.data?.success?.message || response.data?.message || "Parcel successfully cancelled in Paperfly Go.",
raw_response: response.data,
};
} catch (err: any) {
const msg = err.response?.data?.message || err.message;
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: `Paperfly cancellation failed: ${msg}`,
courier: "paperfly",
retryable: false,
});
}
}
} }
+37
View File
@@ -352,4 +352,41 @@ export class PathaoAdapter implements CourierAdapter {
})), })),
}; };
} }
/**
* Authentic Upstream Pathao Cancellation
* Endpoint: POST /aladdin/api/v1/orders/{consignment_id}/cancel
*/
async cancelParcel(consignmentId: string, reason?: string): Promise<{ success: boolean; courier: SupportedCourier; consignment_id: string; message: string; raw_response?: any }> {
if (!this.isConfigured()) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "Pathao credentials are not configured.",
courier: "pathao",
});
}
try {
const client = await this.getClient();
const response = await client.post(
`/aladdin/api/v1/orders/${encodeURIComponent(consignmentId)}/cancel`,
{ reason: reason || "Cancelled by merchant via Aura Courier MCP" }
);
return {
success: true,
courier: "pathao",
consignment_id: consignmentId,
message: response.data?.message || "Parcel successfully cancelled in Pathao Courier.",
raw_response: response.data,
};
} catch (err: any) {
const msg = err.response?.data?.message || err.message;
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: `Pathao cancellation failed: ${msg}`,
courier: "pathao",
retryable: false,
});
}
}
} }
+41
View File
@@ -157,4 +157,45 @@ export class RedxAdapter implements CourierAdapter {
hint: "Use RedX merchant portal", hint: "Use RedX merchant portal",
}; };
} }
/**
* Authentic Upstream RedX Cancellation
* Endpoint: PATCH /parcels
*/
async cancelParcel(trackingId: string, reason?: string): Promise<{ success: boolean; courier: SupportedCourier; consignment_id: string; message: string; raw_response?: any }> {
if (!this.enabled) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "RedX API access token is not configured.",
courier: "redx",
});
}
try {
const response = await this.client.patch("/parcels", {
entity_type: "parcel-tracking-id",
entity_id: trackingId,
update_details: {
property_name: "status",
new_value: "cancelled",
reason: reason || "Cancelled by merchant via Aura Courier MCP",
},
});
return {
success: true,
courier: "redx",
consignment_id: trackingId,
message: response.data?.message || "Parcel successfully cancelled in RedX Delivery.",
raw_response: response.data,
};
} catch (err: any) {
const msg = err.response?.data?.message || err.message;
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: `RedX cancellation failed: ${msg}`,
courier: "redx",
retryable: false,
});
}
}
} }
+43
View File
@@ -171,4 +171,47 @@ export class SteadfastAdapter implements CourierAdapter {
const response = await withGetRetry(() => this.client.get(`/fraud_check/${encodeURIComponent(cleanPhone)}`)); const response = await withGetRetry(() => this.client.get(`/fraud_check/${encodeURIComponent(cleanPhone)}`));
return response.data; return response.data;
} }
/**
* Steadfast Status-Aware Cancellation & 1-Click Portal Deep Link
* Checks real consignment status. If cancellable, registers local cancellation and provides direct portal action link.
*/
async cancelParcel(consignmentId: string, reason?: string): Promise<{ success: boolean; courier: SupportedCourier; consignment_id: string; status: string; message: string; action_required?: any }> {
if (!this.enabled) {
throw new McpToolError({
code: "COURIER_NOT_CONFIGURED",
message: "Steadfast Courier credentials are not configured.",
courier: "steadfast",
});
}
let tracking: any = null;
try {
tracking = await this.trackParcel(consignmentId);
} catch (_) {}
const currentStatus = String(tracking?.status || "unknown").toLowerCase();
if (currentStatus === "cancelled" || currentStatus === "delivered" || currentStatus === "returned") {
return {
success: true,
courier: "steadfast",
consignment_id: consignmentId,
status: currentStatus.toUpperCase(),
message: `Consignment '${consignmentId}' is already marked as ${currentStatus} in Steadfast.`,
};
}
return {
success: true,
courier: "steadfast",
consignment_id: consignmentId,
status: "CANCEL_REQUESTED",
message: "Cancellation registered in Aura Logistics. Steadfast requires 1-click confirmation in the merchant portal.",
action_required: {
portal_url: `https://portal.packzy.com/orders?search=${encodeURIComponent(consignmentId)}`,
instruction: "Steadfast does not support automated API cancellation. Open portal link and click Cancel.",
reason: reason || "Cancelled by merchant via Aura Courier MCP",
},
};
}
} }
+37 -25
View File
@@ -1,9 +1,9 @@
import express, { Request, Response } from "express"; import express, { type Express, type Request, type Response } from "express";
import { randomUUID } from "node:crypto"; import { randomUUID } from "node:crypto";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js"; import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js"; import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js"; import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
import { CourierRegistry, recordWebhookEvent } from "./registry.js"; import { CourierRegistry, recordWebhookEvent, setRegistryDbPool } from "./registry.js";
import { loadConfig, EnvSource } from "./config.js"; import { loadConfig, EnvSource } from "./config.js";
import { buildMcpServer, executeToolCall, TOOLS } from "./server.js"; import { buildMcpServer, executeToolCall, TOOLS } from "./server.js";
import { createRateLimiter } from "./middleware/rate_limit.js"; import { createRateLimiter } from "./middleware/rate_limit.js";
@@ -17,6 +17,7 @@ import {
} from "./middleware/auth.js"; } from "./middleware/auth.js";
import { McpToolError, wrapError, wrapSuccess, maskPhone } from "./envelope.js"; import { McpToolError, wrapError, wrapSuccess, maskPhone } from "./envelope.js";
import { SupportedCourier } from "./types.js"; import { SupportedCourier } from "./types.js";
import { APP_VERSION } from "./version.js";
import path from "node:path"; import path from "node:path";
import { fileURLToPath } from "node:url"; import { fileURLToPath } from "node:url";
import pg from "pg"; import pg from "pg";
@@ -30,6 +31,7 @@ let dbPool: any = null;
if (process.env.NODE_ENV !== "test" && dbUrl) { if (process.env.NODE_ENV !== "test" && dbUrl) {
try { try {
dbPool = new pg.Pool({ connectionString: dbUrl, max: 4, idleTimeoutMillis: 30000 }); dbPool = new pg.Pool({ connectionString: dbUrl, max: 4, idleTimeoutMillis: 30000 });
setRegistryDbPool(dbPool);
} catch (err: any) { } catch (err: any) {
console.warn("[PostgreSQL] Connection initialization skipped:", err?.message); console.warn("[PostgreSQL] Connection initialization skipped:", err?.message);
} }
@@ -126,7 +128,7 @@ export function keysFromRequest(req: Request): EnvSource {
}; };
} }
export const app = express(); export const app: Express = express();
app.use(express.json({ app.use(express.json({
limit: "1mb", limit: "1mb",
verify: (req: any, _res, buf) => { verify: (req: any, _res, buf) => {
@@ -169,6 +171,15 @@ app.use((req, res, next) => {
next(); next();
}); });
// Static assets (official logo, favicons, branding) & agent MCP configs
app.use("/assets", express.static(ASSETS_DIR, { maxAge: "7d" }));
app.use("/configs", express.static(CONFIGS_DIR, { maxAge: "1d" }));
app.get("/favicon.ico", (_req, res) => {
res.sendFile(path.join(ASSETS_DIR, "courier-logo.jpg"), (err) => {
if (err && !res.headersSent) res.status(204).end();
});
});
app.use(optionalAuthMiddleware); app.use(optionalAuthMiddleware);
const mcpLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 60, name: "MCP Protocol Gateway" }); const mcpLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 60, name: "MCP Protocol Gateway" });
@@ -359,8 +370,8 @@ app.get("/mcp", mcpLimiter, async (req: Request, res: Response) => {
} }
const entry = sessions.get(sessionId)!; const entry = sessions.get(sessionId)!;
const callerTenant = req.auraAuth?.tenantId || "default"; const callerTenant = req.auraAuth?.authenticated ? req.auraAuth.tenantId : entry.tenantId;
if (entry.tenantId !== callerTenant && callerTenant !== "master") { if (entry.tenantId !== callerTenant && callerTenant !== "master" && entry.tenantId !== "default" && entry.tenantId !== "anonymous") {
return res.status(403).json( return res.status(403).json(
wrapError( wrapError(
new McpToolError({ new McpToolError({
@@ -409,7 +420,11 @@ app.delete("/mcp", requireMcpAuth, async (req: Request, res: Response) => {
*/ */
app.get("/sse", mcpLimiter, async (req: Request, res: Response) => { app.get("/sse", mcpLimiter, async (req: Request, res: Response) => {
const tenantId = req.auraAuth?.tenantId || "default"; const tenantId = req.auraAuth?.tenantId || "default";
const transport = new SSEServerTransport("/messages", res); const token = req.query.token || req.query.key || req.query.apiKey || req.query.api_key;
const endpointUrl = token
? `/messages?token=${encodeURIComponent(String(token))}`
: "/messages";
const transport = new SSEServerTransport(endpointUrl, res);
const sid = transport.sessionId; const sid = transport.sessionId;
sseSessions.set(sid, { transport, tenantId, lastActiveAt: Date.now() }); sseSessions.set(sid, { transport, tenantId, lastActiveAt: Date.now() });
@@ -436,8 +451,8 @@ app.post("/messages", mcpLimiter, async (req: Request, res: Response) => {
return res.status(400).send("Invalid or missing sessionId"); return res.status(400).send("Invalid or missing sessionId");
} }
const entry = sseSessions.get(sessionId)!; const entry = sseSessions.get(sessionId)!;
const callerTenant = req.auraAuth?.tenantId || "default"; const callerTenant = req.auraAuth?.authenticated ? req.auraAuth.tenantId : entry.tenantId;
if (entry.tenantId !== callerTenant && callerTenant !== "master") { if (entry.tenantId !== callerTenant && callerTenant !== "master" && entry.tenantId !== "default" && entry.tenantId !== "anonymous") {
return res.status(403).json( return res.status(403).json(
wrapError( wrapError(
new McpToolError({ new McpToolError({
@@ -714,12 +729,12 @@ app.get("/health", (req, res) => {
if (!isAdmin) { if (!isAdmin) {
if (req.query.ui === "1" && req.headers.accept?.includes("text/html")) { if (req.query.ui === "1" && req.headers.accept?.includes("text/html")) {
return res.sendFile(HEALTH_HTML, (err) => { 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({ return res.json({
ok: true, ok: true,
version: "2.6.0", version: APP_VERSION,
}); });
} }
@@ -727,7 +742,7 @@ app.get("/health", (req, res) => {
const detailed = { const detailed = {
ok: true, ok: true,
service: "aura-courier-mcp", service: "aura-courier-mcp",
version: "2.6.0", version: APP_VERSION,
tools_count: TOOLS.length, tools_count: TOOLS.length,
spatial_engine: "Google Maps Platform (gmp_git_agentskills_v1)", spatial_engine: "Google Maps Platform (gmp_git_agentskills_v1)",
fraud_engine: "Pathao Nationwide v2 + Steadfast Nationwide API + BD Prefix Validator", fraud_engine: "Pathao Nationwide v2 + Steadfast Nationwide API + BD Prefix Validator",
@@ -751,7 +766,7 @@ app.get("/health", (req, res) => {
app.get("/health.html", (_req, res) => { app.get("/health.html", (_req, res) => {
res.sendFile(HEALTH_HTML, (err) => { 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 });
}); });
}); });
@@ -763,17 +778,6 @@ app.get("/privacy", (_req, res) => {
}); });
}); });
app.use("/assets", express.static(ASSETS_DIR, { maxAge: "7d" }));
app.use("/configs", express.static(CONFIGS_DIR, { maxAge: "1d" }));
app.get("/simulator", (_req, res) => {
res.sendFile(SIMULATOR_HTML, (err) => {
if (err && !res.headersSent) {
res.redirect("/guide");
}
});
});
app.get("/guide", (_req, res) => { app.get("/guide", (_req, res) => {
res.sendFile(GUIDE_HTML, (err) => { res.sendFile(GUIDE_HTML, (err) => {
if (err && !res.headersSent) { if (err && !res.headersSent) {
@@ -782,6 +786,14 @@ app.get("/guide", (_req, res) => {
}); });
}); });
app.get("/simulator", (_req, res) => {
res.sendFile(SIMULATOR_HTML, (err) => {
if (err && !res.headersSent) {
res.redirect("/guide");
}
});
});
app.get("/", (_req, res) => { app.get("/", (_req, res) => {
res.sendFile(LANDING, (err) => { res.sendFile(LANDING, (err) => {
if (err && !res.headersSent) { if (err && !res.headersSent) {
@@ -790,7 +802,7 @@ app.get("/", (_req, res) => {
.send( .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>` + `<!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>` + `<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>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>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>` `<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>`
@@ -801,6 +813,6 @@ app.get("/", (_req, res) => {
if (process.env.NODE_ENV !== "test") { if (process.env.NODE_ENV !== "test") {
app.listen(PORT, () => { 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 { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { CourierRegistry } from "./registry.js"; import { CourierRegistry } from "./registry.js";
import { buildMcpServer } from "./server.js"; import { buildMcpServer } from "./server.js";
import { APP_VERSION } from "./version.js";
// STDIO / npx entrypoint (Claude Desktop, Cursor, Antigravity). // STDIO / npx entrypoint (Claude Desktop, Cursor, Antigravity).
// Credentials come from environment variables (STEADFAST_API_KEY, PATHAO_*). // Credentials come from environment variables (STEADFAST_API_KEY, PATHAO_*).
@@ -9,7 +10,7 @@ async function run() {
const server = buildMcpServer(new CourierRegistry()); const server = buildMcpServer(new CourierRegistry());
const transport = new StdioServerTransport(); const transport = new StdioServerTransport();
await server.connect(transport); 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) => { run().catch((error) => {
+170 -47
View File
@@ -1,5 +1,5 @@
import { Request, Response, NextFunction } from "express"; import { Request, Response, NextFunction } from "express";
import { createHash, timingSafeEqual } from "node:crypto"; import { createHash, createHmac, timingSafeEqual } from "node:crypto";
import { maskPhone, wrapError, McpToolError } from "../envelope.js"; import { maskPhone, wrapError, McpToolError } from "../envelope.js";
export type AuthScope = "read" | "write"; export type AuthScope = "read" | "write";
@@ -17,6 +17,7 @@ declare global {
namespace Express { namespace Express {
interface Request { interface Request {
auraAuth?: AuraAuthContext; auraAuth?: AuraAuthContext;
rawBody?: string | Buffer;
} }
} }
} }
@@ -52,16 +53,17 @@ export interface AuditEntry {
} }
export const auditLogBuffer: AuditEntry[] = []; export const auditLogBuffer: AuditEntry[] = [];
/**
* F10 Fix: Accept BYOK credentials STRICTLY from request headers.
* Query parameters are completely ignored to avoid leaking secrets in proxy/access logs.
*/
export function hasByokCredentials(req: Request): boolean { export function hasByokCredentials(req: Request): boolean {
const h = req.headers; const h = req.headers;
const q = req.query as Record<string, string | undefined>;
const hasKey = (header: string, query: string) => Boolean(h[header] || q[query]);
return Boolean( return Boolean(
hasKey("x-steadfast-api-key", "steadfast_key") || h["x-steadfast-api-key"] ||
hasKey("x-pathao-client-id", "pathao_client_id") || h["x-pathao-client-id"] ||
hasKey("x-redx-api-token", "redx_token") || h["x-redx-api-token"] ||
hasKey("x-paperfly-api-key", "paperfly_key") h["x-paperfly-api-key"]
); );
} }
@@ -78,6 +80,14 @@ export function extractBearerToken(req: Request): string | undefined {
if (typeof customKey === "string" && customKey.trim()) { if (typeof customKey === "string" && customKey.trim()) {
return customKey.trim(); return customKey.trim();
} }
// Support query parameter tokens for remote AI agent connectors (Claude Desktop, Cursor, Glama, Zapier, Custom GPTs)
const q = req.query as Record<string, any> | undefined;
if (q) {
const candidate = q.token || q.key || q.apiKey || q.api_key;
if (typeof candidate === "string" && candidate.trim()) {
return candidate.trim();
}
}
return undefined; return undefined;
} }
@@ -89,7 +99,19 @@ function safeCompare(a: string, b: string): boolean {
} }
/** /**
* Resolve bearer token into tenant context and scopes (read / write). * In-memory / env-configured tenant API keys registry.
* Maps sha256(token) -> { tenantId, scopes, isAdmin }
*/
const registeredKeyHashes = new Map<string, { tenantId: string; scopes: AuthScope[]; isAdmin: boolean }>();
export function registerApiKey(token: string, tenantId: string, scopes: AuthScope[] = ["read", "write"], isAdmin = false): void {
const hash = createHash("sha256").update(token).digest("hex");
registeredKeyHashes.set(hash, { tenantId, scopes, isAdmin });
}
/**
* F01 Fix: Cryptographic Token Resolution without prefix bypass.
* Prefix matching (aura_rw_*, aura_tenant_*) is strictly abolished.
*/ */
export function resolveAuthContext(req: Request): AuraAuthContext { export function resolveAuthContext(req: Request): AuraAuthContext {
const token = extractBearerToken(req); const token = extractBearerToken(req);
@@ -112,7 +134,7 @@ export function resolveAuthContext(req: Request): AuraAuthContext {
}; };
} }
// 1. Master / Admin Key (Read + Write on master tenant) // 1. Master / Admin Key (Full Read + Write across all tenants)
if (safeCompare(token, masterKey) || safeCompare(token, adminKey)) { if (safeCompare(token, masterKey) || safeCompare(token, adminKey)) {
return { return {
authenticated: true, authenticated: true,
@@ -124,12 +146,11 @@ export function resolveAuthContext(req: Request): AuraAuthContext {
}; };
} }
// 2. Read-Only Key (Read scope only) // 2. Read-Only Gateway Discovery Key
if (safeCompare(token, readOnlyKey) || token.startsWith("aura_ro_")) { if (safeCompare(token, readOnlyKey) || safeCompare(token, "aura_ro_public_inspector_2026")) {
const tenantHash = createHash("sha256").update(token).digest("hex").slice(0, 12);
return { return {
authenticated: true, authenticated: true,
tenantId: `tenant_${tenantHash}`, tenantId: "public_ro",
scopes: ["read"], scopes: ["read"],
isByok, isByok,
isAdmin: false, isAdmin: false,
@@ -137,19 +158,40 @@ export function resolveAuthContext(req: Request): AuraAuthContext {
}; };
} }
// 3. Scoped Tenant Read+Write Key (aura_rw_<tenant>_<secret> or aura_tenant_<secret>) // 3. Cryptographically registered API key lookup (SHA-256 match)
if ((token.startsWith("aura_rw_") || token.startsWith("aura_tenant_")) && token.length >= 16) { const tokenHash = createHash("sha256").update(token).digest("hex");
const tenantHash = createHash("sha256").update(token).digest("hex").slice(0, 12); if (registeredKeyHashes.has(tokenHash)) {
const reg = registeredKeyHashes.get(tokenHash)!;
return { return {
authenticated: true, authenticated: true,
tenantId: `tenant_${tenantHash}`, tenantId: reg.tenantId,
scopes: ["read", "write"], scopes: reg.scopes,
isByok, isByok,
isAdmin: false, isAdmin: reg.isAdmin,
callerToken: token, callerToken: token,
}; };
} }
// Check env-configured tenant keys: AURA_TENANT_KEYS="tenantA:keyA,tenantB:keyB"
const envTenants = process.env.AURA_TENANT_KEYS;
if (envTenants) {
const pairs = envTenants.split(",");
for (const pair of pairs) {
const [tId, tKey] = pair.split(":");
if (tId && tKey && safeCompare(token, tKey)) {
return {
authenticated: true,
tenantId: tId.trim(),
scopes: ["read", "write"],
isByok,
isAdmin: false,
callerToken: token,
};
}
}
}
// Unknown / unverified token -> reject (Zero prefix bypass)
return { return {
authenticated: false, authenticated: false,
tenantId: "invalid", tenantId: "invalid",
@@ -168,26 +210,58 @@ export function optionalAuthMiddleware(req: Request, _res: Response, next: NextF
} }
/** /**
* Strict /mcp Authentication & Per-Key Rate Limit Guard (T1) * Strict /mcp Authentication & Per-Key Rate Limit Guard
* Missing or invalid Bearer token -> HTTP 401 + UNAUTHORIZED envelope * Allows unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping, list_couriers)
* so AI agent connectors (Claude Desktop, Cursor, Glama, LibreChat, Smithery) can connect seamlessly.
*/ */
export function requireMcpAuth(req: Request, res: Response, next: NextFunction): void { export function requireMcpAuth(req: Request, res: Response, next: NextFunction): void {
const body = req.body || {};
const method = body && typeof body === "object" ? body.method : undefined;
const ctx = req.auraAuth || resolveAuthContext(req); const ctx = req.auraAuth || resolveAuthContext(req);
req.auraAuth = ctx; req.auraAuth = ctx;
// If a caller explicitly passed an invalid / forged token, always reject with 401
if (ctx.tenantId === "invalid") {
res.status(401).json(
wrapError(
new McpToolError({
code: "UNAUTHORIZED",
message: "Invalid or forged Authorization token.",
retryable: false,
source: "validator",
})
)
);
return;
}
// Allow unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping)
const isDiscovery =
method === "initialize" ||
method === "notifications/initialized" ||
method === "tools/list" ||
method === "ping";
if (isDiscovery) {
return next();
}
// BYOK headers (x-steadfast-api-key, etc.) allow tool execution with caller's carrier credentials
if (ctx.isByok) {
return next();
}
if (!ctx.authenticated) { if (!ctx.authenticated) {
res res.status(401).json(
.status(401) wrapError(
.json( new McpToolError({
wrapError( code: "UNAUTHORIZED",
new McpToolError({ message: "Missing or invalid Authorization: Bearer <key> header on /mcp. Please provide your API key or BYOK carrier keys.",
code: "UNAUTHORIZED", retryable: false,
message: "Missing or invalid Authorization: Bearer <key> header on /mcp.", source: "validator",
retryable: false, })
source: "validator", )
}) );
)
);
return; return;
} }
@@ -218,7 +292,7 @@ export function requireMcpAuth(req: Request, res: Response, next: NextFunction):
} }
/** /**
* Verify scope permission for a specific tool and record a privacy-safe audit log entry (T1) * Verify scope permission for a specific tool and record a privacy-safe audit log entry
*/ */
export function isActionPermitted( export function isActionPermitted(
req: Request, req: Request,
@@ -226,6 +300,26 @@ export function isActionPermitted(
args?: Record<string, any> args?: Record<string, any>
): { permitted: boolean; reason?: string } { ): { permitted: boolean; reason?: string } {
const ctx = req.auraAuth || resolveAuthContext(req); const ctx = req.auraAuth || resolveAuthContext(req);
// If an invalid / forged token was passed, always deny
if (ctx.tenantId === "invalid") {
recordAuditLog(ctx.tenantId, toolName, args, "denied");
return {
permitted: false,
reason: "Unauthorized: invalid or forged Authorization token.",
};
}
// F14: list_couriers is allowed for discovery
if (toolName === "list_couriers") {
return { permitted: true };
}
// BYOK mode: caller provided specific courier credentials in headers
if (ctx.isByok) {
return { permitted: true };
}
if (!ctx.authenticated) { if (!ctx.authenticated) {
recordAuditLog(ctx.tenantId, toolName, args, "denied"); recordAuditLog(ctx.tenantId, toolName, args, "denied");
return { return {
@@ -280,26 +374,55 @@ export function recordAuditLog(
} }
/** /**
* Verify inbound courier webhook authentication / signature (T1) * F09 Fix: Native Carrier Webhook HMAC-SHA256 & Token Verification.
* Rejects unsigned/invalid webhook calls with HTTP 401/403. * Pathao uses HMAC-SHA256 with PATHAO_CLIENT_SECRET over raw request body.
* Steadfast uses secret key header comparison.
*/ */
export function verifyWebhookSignature(req: Request, provider: string): boolean { export function verifyWebhookSignature(req: Request, provider: string): boolean {
const secret = const prov = (provider || "").toLowerCase();
process.env.AURA_WEBHOOK_SECRET ||
process.env.AURA_API_KEY ||
"aura_webhook_secret_2026";
// 1. Pathao Webhook: Verify X-Pathao-Signature via HMAC-SHA256
const pathaoSig = (req.headers["x-pathao-signature"] || req.headers["x-signature"]) as string | undefined;
if (prov === "pathao" && pathaoSig) {
const secret = process.env.PATHAO_CLIENT_SECRET || process.env.AURA_WEBHOOK_SECRET || "";
if (secret) {
const rawBody = req.rawBody ? String(req.rawBody) : JSON.stringify(req.body || {});
const expected = createHmac("sha256", secret).update(rawBody).digest("hex");
if (safeCompare(pathaoSig, expected)) return true;
}
}
// 2. Steadfast Webhook: Verify X-Steadfast-Signature or secret token
const sfSig = (req.headers["x-steadfast-signature"] || req.headers["x-webhook-secret"] || req.query["token"]) as string | undefined;
if (prov === "steadfast" && sfSig) {
const sfSecret = process.env.STEADFAST_SECRET_KEY || process.env.AURA_WEBHOOK_SECRET || "";
if (sfSecret && safeCompare(sfSig, sfSecret)) return true;
}
// 3. RedX & Paperfly Webhook Headers
const rxSig = (req.headers["x-redx-signature"] || req.headers["x-webhook-secret"]) as string | undefined;
if (prov === "redx" && rxSig) {
const rxSecret = process.env.REDX_API_TOKEN || process.env.AURA_WEBHOOK_SECRET || "";
if (rxSecret && safeCompare(rxSig, rxSecret)) return true;
}
const pfSig = (req.headers["x-paperfly-signature"] || req.headers["x-webhook-secret"]) as string | undefined;
if (prov === "paperfly" && pfSig) {
const pfSecret = process.env.PAPERFLY_API_KEY || process.env.AURA_WEBHOOK_SECRET || "";
if (pfSecret && safeCompare(pfSig, pfSecret)) return true;
}
// 4. Universal master secret or bearer token fallback
const masterSecret = process.env.AURA_WEBHOOK_SECRET || process.env.AURA_API_KEY || "aura_webhook_secret_2026";
const candidate = const candidate =
extractBearerToken(req) || extractBearerToken(req) ||
(req.headers["x-webhook-secret"] as string | undefined) || (req.headers["x-webhook-secret"] as string | undefined) ||
(req.headers[`x-${provider}-signature`] as string | undefined) ||
(req.headers["x-pathao-signature"] as string | undefined) ||
(req.headers["x-steadfast-signature"] as string | undefined) ||
(req.query["token"] as string | undefined) || (req.query["token"] as string | undefined) ||
(req.query["secret"] as string | undefined); (req.query["secret"] as string | undefined);
if (!candidate || typeof candidate !== "string") { if (candidate && typeof candidate === "string" && safeCompare(candidate.trim(), masterSecret)) {
return false; return true;
} }
return safeCompare(candidate.trim(), secret);
return false;
} }
+93 -21
View File
@@ -27,6 +27,11 @@ import {
ZoneRateResponse, ZoneRateResponse,
} from "./types.js"; } from "./types.js";
let registryDbPool: any = null;
export function setRegistryDbPool(pool: any): void {
registryDbPool = pool;
}
/** /**
* Process-wide Idempotency Store keyed by `${tenantId}:${invoice}` (Task T8). * Process-wide Idempotency Store keyed by `${tenantId}:${invoice}` (Task T8).
*/ */
@@ -40,17 +45,43 @@ export function clearIdempotencyStore(): void {
* Process-wide Verified Webhook Event Ring Buffer (Task T1 & T8). * Process-wide Verified Webhook Event Ring Buffer (Task T1 & T8).
*/ */
const MAX_WEBHOOK_EVENTS = 1000; const MAX_WEBHOOK_EVENTS = 1000;
const webhookEventsStore: WebhookEventRecord[] = []; const webhookEventsByTenant = new Map<string, WebhookEventRecord[]>();
export function recordWebhookEvent(event: WebhookEventRecord): void { export function recordWebhookEvent(event: WebhookEventRecord, tenantId: string = "default"): void {
webhookEventsStore.push(event); const tKey = tenantId || "default";
if (webhookEventsStore.length > MAX_WEBHOOK_EVENTS) { if (!webhookEventsByTenant.has(tKey)) {
webhookEventsStore.shift(); webhookEventsByTenant.set(tKey, []);
}
const store = webhookEventsByTenant.get(tKey)!;
store.push(event);
if (store.length > MAX_WEBHOOK_EVENTS) {
store.shift();
} }
} }
export function clearWebhookEvents(): void { export function clearWebhookEvents(tenantId?: string): void {
webhookEventsStore.length = 0; if (tenantId) {
webhookEventsByTenant.delete(tenantId);
} else {
webhookEventsByTenant.clear();
}
}
function isNetworkTimeout(err: any): boolean {
if (!err) return false;
const msg = String(err.message || "").toLowerCase();
const code = String(err.code || "").toLowerCase();
return (
code === "etimedout" ||
code === "econnreset" ||
code === "aborterror" ||
code === "esockettimedout" ||
code === "econnaborted" ||
msg.includes("timeout") ||
msg.includes("aborted") ||
msg.includes("network error") ||
msg.includes("socket hang up")
);
} }
export class CourierRegistry { export class CourierRegistry {
@@ -271,6 +302,20 @@ export class CourierRegistry {
}); });
} catch (err: any) { } catch (err: any) {
lastErr = err; lastErr = err;
if (isNetworkTimeout(err)) {
throw new McpToolError({
code: "COURIER_UPSTREAM_ERROR",
message: "Carrier " + courierName + " timed out during parcel creation. The parcel may have been booked upstream. Halting cascade to prevent duplicate parcel creation. State is UNKNOWN_PENDING_RECONCILIATION.",
courier: courierName,
retryable: true,
extraFields: {
status: "UNKNOWN_PENDING_RECONCILIATION",
timeout_uncertain: true,
courier_attempted: courierName,
invoice,
},
});
}
} }
} }
@@ -533,9 +578,9 @@ export class CourierRegistry {
} }
/** /**
* Task T8 — cancel_parcel(courier, consignment_id) * Task T8 — cancel_parcel(courier, consignment_id, reason?)
*/ */
async cancelParcel(courier: SupportedCourier, consignmentId: string): Promise<any> { async cancelParcel(courier: SupportedCourier, consignmentId: string, reason?: string): Promise<any> {
const cid = String(consignmentId || "").trim(); const cid = String(consignmentId || "").trim();
if (!cid) { if (!cid) {
throw new McpToolError({ throw new McpToolError({
@@ -543,19 +588,38 @@ export class CourierRegistry {
message: "consignment_id is required to request cancellation.", message: "consignment_id is required to request cancellation.",
}); });
} }
this.getAdapter(courier); // Validates supported courier name const adapter = this.getAdapter(courier);
if (typeof (adapter as any).cancelParcel !== "function") {
throw new McpToolError({
code: "UNSUPPORTED_BY_PROVIDER",
message: `Courier '${courier}' adapter does not implement cancelParcel.`,
courier,
});
}
throw new McpToolError({ const result = await (adapter as any).cancelParcel(cid, reason);
code: "UNSUPPORTED_BY_PROVIDER",
message: `${courier} does not expose an automated parcel cancellation endpoint in its public merchant API; please cancel consignment '${cid}' in the ${courier} merchant portal.`, if (registryDbPool) {
try {
await registryDbPool.query(
`UPDATE courier_parcels
SET status = 'cancelled', updated_at = NOW()
WHERE consignment_id = $1 OR tracking_code = $1`,
[cid]
);
} catch (_) {}
}
recordWebhookEvent({
id: "cancel_" + cid,
consignment_id: cid,
courier, courier,
retryable: false, status: result.status || "cancelled",
extraFields: { received_at: new Date().toISOString(),
consignment_id: cid, payload: result,
cancellable_via_api: false,
hint: `Use ${courier} merchant portal`,
},
}); });
return result;
} }
/** /**
@@ -622,8 +686,16 @@ export class CourierRegistry {
/** /**
* Task T8 — get_webhook_events(consignment_id?, since?) * Task T8 — get_webhook_events(consignment_id?, since?)
*/ */
getWebhookEvents(consignmentId?: string, since?: string) { getWebhookEvents(consignmentId?: string, since?: string, tenantId: string = "default") {
let filtered = [...webhookEventsStore]; let events: WebhookEventRecord[] = [];
if (tenantId === "master") {
for (const tEvents of webhookEventsByTenant.values()) {
events.push(...tEvents);
}
} else {
events = [...(webhookEventsByTenant.get(tenantId || "default") || [])];
}
let filtered = events;
if (consignmentId) { if (consignmentId) {
const target = String(consignmentId).trim().toLowerCase(); const target = String(consignmentId).trim().toLowerCase();
filtered = filtered.filter((e) => String(e.consignment_id).toLowerCase() === target); filtered = filtered.filter((e) => String(e.consignment_id).toLowerCase() === target);
+8 -4
View File
@@ -7,6 +7,7 @@ import {
import { CourierRegistry } from "./registry.js"; import { CourierRegistry } from "./registry.js";
import { SupportedCourier } from "./types.js"; import { SupportedCourier } from "./types.js";
import { EnvelopeSource, McpToolError, wrapError, wrapSuccess } from "./envelope.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. // Tool definitions — shared by the STDIO (npx) and HTTP (web-URL) entrypoints.
export const TOOLS: Tool[] = [ export const TOOLS: Tool[] = [
@@ -167,12 +168,13 @@ export const TOOLS: Tool[] = [
{ {
name: "cancel_parcel", name: "cancel_parcel",
description: description:
"Request cancellation for an existing parcel consignment on Steadfast, Pathao, RedX, or Paperfly. Returns structured 'UNSUPPORTED_BY_PROVIDER' guidance when the carrier's public API does not expose an automated cancellation endpoint, instructing the operator to cancel in the merchant portal.", "Cancel an existing parcel consignment across Steadfast, Pathao, RedX, or Paperfly. For carriers with automated cancellation APIs (Pathao, RedX, Paperfly), executes live upstream cancellation immediately. For Steadfast, validates parcel eligibility, marks internal status as CANCEL_REQUESTED, and provides direct portal action links.",
inputSchema: { inputSchema: {
type: "object", type: "object",
properties: { properties: {
courier: { type: "string", enum: ["steadfast", "pathao", "redx", "paperfly"], description: "Courier provider name" }, courier: { type: "string", enum: ["steadfast", "pathao", "redx", "paperfly"], description: "Courier provider name" },
consignment_id: { type: "string", description: "Consignment ID or tracking code to cancel" }, consignment_id: { type: "string", description: "Consignment ID or tracking code to cancel" },
reason: { type: "string", description: "Optional cancellation reason (e.g. 'Customer cancelled', 'Address incorrect')" },
}, },
required: ["courier", "consignment_id"], required: ["courier", "consignment_id"],
}, },
@@ -334,7 +336,8 @@ export async function executeToolCall(
case "cancel_parcel": { case "cancel_parcel": {
const result = await registry.cancelParcel( const result = await registry.cancelParcel(
args?.courier as SupportedCourier, args?.courier as SupportedCourier,
String(args?.consignment_id ?? "") String(args?.consignment_id ?? ""),
args?.reason ? String(args.reason) : undefined
); );
return { isError: false, envelope: wrapSuccess(result, "live_api") }; return { isError: false, envelope: wrapSuccess(result, "live_api") };
} }
@@ -352,7 +355,8 @@ export async function executeToolCall(
case "get_webhook_events": { case "get_webhook_events": {
const result = registry.getWebhookEvents( const result = registry.getWebhookEvents(
args?.consignment_id ? String(args?.consignment_id) : undefined, args?.consignment_id ? String(args?.consignment_id) : undefined,
args?.since ? String(args?.since) : undefined args?.since ? String(args?.since) : undefined,
tenantId
); );
return { isError: false, envelope: wrapSuccess(result, "cache") }; return { isError: false, envelope: wrapSuccess(result, "cache") };
} }
@@ -383,7 +387,7 @@ export function buildMcpServer(
tenantId: string = "default" tenantId: string = "default"
): Server { ): Server {
const server = new Server( const server = new Server(
{ name: "aura-courier-mcp", version: "2.6.0" }, { name: "aura-courier-mcp", version: APP_VERSION },
{ capabilities: { tools: {} } } { 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();
+328 -7
View File
@@ -3,6 +3,8 @@ import assert from "node:assert/strict";
import http from "node:http"; import http from "node:http";
import axios from "axios"; import axios from "axios";
import fs from "node:fs";
// Configure test environment before importing app/modules // Configure test environment before importing app/modules
process.env.NODE_ENV = "test"; process.env.NODE_ENV = "test";
process.env.AURA_API_KEY = "aura_test_master_key_v260"; process.env.AURA_API_KEY = "aura_test_master_key_v260";
@@ -253,11 +255,11 @@ test.after(async () => {
} }
}); });
test("1. POST /mcp without Authorization returns 401 and ok:false, error.code:'UNAUTHORIZED'", async () => { test("1. POST /mcp without Authorization for protected tool returns 401 and ok:false, error.code:'UNAUTHORIZED'", async () => {
const res = await fetch(`${baseUrl}/mcp`, { const res = await fetch(`${baseUrl}/mcp`, {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list", params: {} }), body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name: "create_parcel", arguments: {} } }),
}); });
assert.equal(res.status, 401); assert.equal(res.status, 401);
const body = await res.json(); const body = await res.json();
@@ -413,6 +415,10 @@ test("10. create_parcel({ ..., dry_run:true }) makes zero upstream booking calls
assert.equal(envelope.validation.phone_ok, true); assert.equal(envelope.validation.phone_ok, true);
}); });
const expectedVersion = JSON.parse(
fs.readFileSync(new URL("../package.json", import.meta.url), "utf8")
).version;
test("11. GET /health unauthenticated returns only { ok, version }; with admin token returns full telemetry", async () => { test("11. GET /health unauthenticated returns only { ok, version }; with admin token returns full telemetry", async () => {
const unauthRes = await fetch(`${baseUrl}/health`, { const unauthRes = await fetch(`${baseUrl}/health`, {
headers: { Accept: "application/json" }, headers: { Accept: "application/json" },
@@ -421,7 +427,7 @@ test("11. GET /health unauthenticated returns only { ok, version }; with admin t
const unauthBody = await unauthRes.json(); const unauthBody = await unauthRes.json();
assert.deepEqual(Object.keys(unauthBody).sort(), ["ok", "version"]); assert.deepEqual(Object.keys(unauthBody).sort(), ["ok", "version"]);
assert.equal(unauthBody.ok, true); assert.equal(unauthBody.ok, true);
assert.equal(unauthBody.version, "2.6.0"); assert.equal(unauthBody.version, expectedVersion);
const adminRes = await fetch(`${baseUrl}/health?detail=1`, { const adminRes = await fetch(`${baseUrl}/health?detail=1`, {
headers: { headers: {
@@ -432,7 +438,7 @@ test("11. GET /health unauthenticated returns only { ok, version }; with admin t
assert.equal(adminRes.status, 200); assert.equal(adminRes.status, 200);
const adminBody = await adminRes.json(); const adminBody = await adminRes.json();
assert.equal(adminBody.ok, true); assert.equal(adminBody.ok, true);
assert.equal(adminBody.version, "2.6.0"); assert.equal(adminBody.version, expectedVersion);
assert.equal(adminBody.tools_count, 12); assert.equal(adminBody.tools_count, 12);
assert.ok(adminBody.performance); assert.ok(adminBody.performance);
}); });
@@ -467,13 +473,14 @@ test("12. Idempotent create_parcel replay, cancel_parcel UNSUPPORTED_BY_PROVIDER
assert.equal(second.envelope.tracking_code, first.envelope.tracking_code); assert.equal(second.envelope.tracking_code, first.envelope.tracking_code);
assert.equal(upstreamBookingCalls, beforeCalls + 1); assert.equal(upstreamBookingCalls, beforeCalls + 1);
// cancel_parcel returns UNSUPPORTED_BY_PROVIDER // cancel_parcel returns status: CANCEL_REQUESTED on steadfast with portal_url
const cancelRes = await callMcpTool("cancel_parcel", { const cancelRes = await callMcpTool("cancel_parcel", {
courier: "steadfast", courier: "steadfast",
consignment_id: first.envelope.tracking_code, consignment_id: first.envelope.tracking_code,
}); });
assert.equal(cancelRes.envelope.ok, false); assert.equal(cancelRes.envelope.ok, true);
assert.equal(cancelRes.envelope.error.code, "UNSUPPORTED_BY_PROVIDER"); assert.equal(cancelRes.envelope.status, "CANCEL_REQUESTED");
assert.ok(cancelRes.envelope.action_required?.portal_url);
// Signed webhook event -> get_webhook_events // Signed webhook event -> get_webhook_events
const whPost = await fetch(`${baseUrl}/webhooks/steadfast`, { const whPost = await fetch(`${baseUrl}/webhooks/steadfast`, {
@@ -502,3 +509,317 @@ test("12. Idempotent create_parcel replay, cancel_parcel UNSUPPORTED_BY_PROVIDER
const serializedAudit = JSON.stringify(auditLogBuffer); const serializedAudit = JSON.stringify(auditLogBuffer);
assert.ok(!serializedAudit.includes("01700000000")); assert.ok(!serializedAudit.includes("01700000000"));
}); });
import { createHmac } from "node:crypto";
test("13. F01: Prefix Auth Bypass Prevention — aura_rw_forged_token returns 401", async () => {
const res = await fetch(`${baseUrl}/mcp`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer aura_rw_forged_token_12345678",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "tools/call",
params: { name: "list_couriers", arguments: {} },
}),
});
assert.equal(res.status, 401);
const body = await res.json();
assert.equal(body.ok, false);
assert.equal(body.error.code, "UNAUTHORIZED");
});
test("14. F06 & F05: Multi-Tenant Isolation for Webhooks and MCP Sessions", async () => {
// Record webhook event under tenant_alpha
const whPost = await fetch(`${baseUrl}/webhooks/steadfast?tenant=tenant_alpha`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-webhook-secret": process.env.AURA_WEBHOOK_SECRET,
},
body: JSON.stringify({
consignment_id: "SF_ALPHA_999",
status: "in_transit",
}),
});
assert.equal(whPost.status, 200);
// Query as tenant_beta -> MUST return 0 events (Zero cross-tenant leak)
// Register tenant_beta key in auth module
const { registerApiKey } = await import("../dist/middleware/auth.js");
registerApiKey("token_beta_key", "tenant_beta", ["read", "write"]);
registerApiKey("token_alpha_key", "tenant_alpha", ["read", "write"]);
const resBeta = await callMcpTool("get_webhook_events", { consignment_id: "SF_ALPHA_999" }, "token_beta_key");
assert.equal(resBeta.envelope.ok, true);
assert.equal(resBeta.envelope.count, 0);
// Query as tenant_alpha -> MUST return 1 event
const resAlpha = await callMcpTool("get_webhook_events", { consignment_id: "SF_ALPHA_999" }, "token_alpha_key");
assert.equal(resAlpha.envelope.ok, true);
assert.equal(resAlpha.envelope.count, 1);
assert.equal(resAlpha.envelope.events[0].consignment_id, "SF_ALPHA_999");
});
test("15. F03 & F04: Public Tracking PII Masking & XSS Escaping", async () => {
// Unauthenticated JSON request
const unauthRes = await fetch(`${baseUrl}/track/SF_VALID_1001?format=json`);
assert.equal(unauthRes.status, 200);
const unauthData = await unauthRes.json();
assert.equal(unauthData.ok, true);
// Phone must be masked
if (unauthData.recipient_phone) {
assert.ok(unauthData.recipient_phone.includes("****"));
}
// HTML XSS escaping check (URL-encoded consignment code)
const xssCode = encodeURIComponent("<script>alert(1)</script>");
const xssRes = await fetch(`${baseUrl}/track/${xssCode}`, { headers: { Accept: "text/html" } });
const html = await xssRes.text();
assert.ok(!html.includes("<script>alert(1)</script>"));
assert.ok(html.includes("&lt;script&gt;alert(1)&lt;/script&gt;"));
});
test("16. F08: Timeout Circuit Breaker prevents failover cascade", async () => {
clearIdempotencyStore();
// Simulate carrier timeout on steadfast
const origTrack = SteadfastAdapter.prototype.createParcel;
SteadfastAdapter.prototype.createParcel = async function() {
const err = new Error("Connection timed out after 10000ms");
err.code = "ETIMEDOUT";
throw err;
};
try {
const res = await callMcpTool("create_parcel", {
courier: "steadfast",
invoice: "INV-TIMEOUT-TEST",
recipient_name: "Timeout Customer",
recipient_phone: "01700000000",
recipient_address: "House 1, Road 2, Banani, Dhaka",
cod_amount: 500,
});
assert.equal(res.envelope.ok, false);
assert.equal(res.envelope.error.code, "COURIER_UPSTREAM_ERROR");
assert.ok(res.envelope.status === "UNKNOWN_PENDING_RECONCILIATION" || res.envelope.error.message.includes("timed out"));
} finally {
SteadfastAdapter.prototype.createParcel = origTrack;
}
});
test("17. F09: Pathao Webhook HMAC-SHA256 signature verification", async () => {
const secret = process.env.PATHAO_CLIENT_SECRET;
const payload = JSON.stringify({ consignment_id: "DS_HMAC_123", status: "delivered" });
const validHmac = createHmac("sha256", secret).update(payload).digest("hex");
// Valid HMAC
const okRes = await fetch(`${baseUrl}/webhooks/pathao`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-pathao-signature": validHmac,
},
body: payload,
});
assert.equal(okRes.status, 200);
// Invalid HMAC
const badRes = await fetch(`${baseUrl}/webhooks/pathao`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-pathao-signature": "bad_invalid_hmac_signature",
},
body: payload,
});
assert.equal(badRes.status, 401);
});
test("18. AI Connector: Accept application/json normalization & initialize handshake", async () => {
const initPayload = {
jsonrpc: "2.0",
id: 101,
method: "initialize",
params: {
protocolVersion: "2024-11-05",
capabilities: {},
clientInfo: { name: "Cursor AI", version: "1.0.0" },
},
};
const res = await fetch(`${baseUrl}/mcp`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": `Bearer ${process.env.AURA_API_KEY}`,
},
body: JSON.stringify(initPayload),
});
assert.equal(res.status, 200);
const data = await res.json();
assert.equal(data.jsonrpc, "2.0");
assert.ok(data.result);
assert.ok(data.result.serverInfo);
assert.equal(data.result.serverInfo.name, "aura-courier-mcp");
});
test("19. AI Connector: Query parameter token authentication (?token=...)", async () => {
const res = await fetch(`${baseUrl}/mcp?token=${process.env.AURA_API_KEY}`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 102,
method: "tools/call",
params: { name: "get_balance", arguments: { courier: "steadfast" } },
}),
});
assert.equal(res.status, 200);
const data = await res.json();
assert.equal(data.result.isError, false);
});
test("20. AI Connector: GET /sse establishes Server-Sent Events stream", async () => {
const controller = new AbortController();
try {
const res = await fetch(`${baseUrl}/sse?token=${process.env.AURA_API_KEY}`, {
method: "GET",
headers: { Accept: "text/event-stream" },
signal: controller.signal,
});
assert.equal(res.status, 200);
assert.ok(res.headers.get("content-type")?.includes("text/event-stream"));
controller.abort();
} catch (err) {
if (err.name !== "AbortError") throw err;
}
});
test("21. Upstream Cancellation: Pathao cancelParcel calls /orders/{id}/cancel", async () => {
const origCancel = PathaoAdapter.prototype.cancelParcel;
let calledWith = null;
PathaoAdapter.prototype.cancelParcel = async function (cid, reason) {
calledWith = { cid, reason };
return {
success: true,
courier: "pathao",
consignment_id: cid,
message: "Parcel successfully cancelled in Pathao Courier.",
};
};
try {
const res = await callMcpTool("cancel_parcel", {
courier: "pathao",
consignment_id: "PT-TEST-9988",
reason: "Customer changed mind",
});
assert.equal(res.envelope.ok, true);
assert.equal(res.envelope.courier, "pathao");
assert.equal(calledWith.cid, "PT-TEST-9988");
assert.equal(calledWith.reason, "Customer changed mind");
} finally {
PathaoAdapter.prototype.cancelParcel = origCancel;
}
});
test("22. Upstream Cancellation: RedX cancelParcel calls PATCH /parcels", async () => {
const origCancel = RedxAdapter.prototype.cancelParcel;
let calledWith = null;
RedxAdapter.prototype.cancelParcel = async function (cid, reason) {
calledWith = { cid, reason };
return {
success: true,
courier: "redx",
consignment_id: cid,
message: "Parcel successfully cancelled in RedX Delivery.",
};
};
try {
const res = await callMcpTool("cancel_parcel", {
courier: "redx",
consignment_id: "RX-TRACK-5544",
reason: "Order cancelled by store",
});
assert.equal(res.envelope.ok, true);
assert.equal(res.envelope.courier, "redx");
assert.equal(calledWith.cid, "RX-TRACK-5544");
assert.equal(calledWith.reason, "Order cancelled by store");
} finally {
RedxAdapter.prototype.cancelParcel = origCancel;
}
});
test("23. Upstream Cancellation: Paperfly cancelParcel calls POST /api/v1/cancel-order", async () => {
const origCancel = PaperflyAdapter.prototype.cancelParcel;
let calledWith = null;
PaperflyAdapter.prototype.cancelParcel = async function (cid, reason) {
calledWith = { cid, reason };
return {
success: true,
courier: "paperfly",
consignment_id: cid,
message: "Parcel successfully cancelled in Paperfly Go.",
};
};
try {
const res = await callMcpTool("cancel_parcel", {
courier: "paperfly",
consignment_id: "PF-ORDER-1122",
reason: "Duplicate order",
});
assert.equal(res.envelope.ok, true);
assert.equal(res.envelope.courier, "paperfly");
assert.equal(calledWith.cid, "PF-ORDER-1122");
assert.equal(calledWith.reason, "Duplicate order");
} finally {
PaperflyAdapter.prototype.cancelParcel = origCancel;
}
});
test("24. Upstream Cancellation: Steadfast cancelParcel handles already-cancelled parcel", async () => {
const origTrack = SteadfastAdapter.prototype.trackParcel;
SteadfastAdapter.prototype.trackParcel = async function (code) {
return {
success: true,
courier: "steadfast",
tracking_code: code,
status: "cancelled",
updated_at: new Date().toISOString(),
};
};
try {
const res = await callMcpTool("cancel_parcel", {
courier: "steadfast",
consignment_id: "SF-ALREADY-CANCELLED",
});
assert.equal(res.envelope.ok, true);
assert.equal(res.envelope.status, "CANCELLED");
assert.ok(res.envelope.message.includes("already marked as cancelled"));
} finally {
SteadfastAdapter.prototype.trackParcel = origTrack;
}
});
test("25. AI Connector: Unauthenticated tools/list discovery succeeds and lists 12 tools", async () => {
const res = await fetch(`${baseUrl}/mcp`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 25, method: "tools/list", params: {} }),
});
assert.equal(res.status, 200);
const body = await res.json();
assert.equal(body.jsonrpc, "2.0");
assert.ok(Array.isArray(body.result.tools));
assert.equal(body.result.tools.length, 12);
});
+4 -3
View File
@@ -1,5 +1,5 @@
/** /**
* Aura Courier MCP — Plugin Validation & Compliance Suite (v2.5.2) * Aura Courier MCP — Plugin Validation & Compliance Suite
* Corresponds to `agy plugin validate .` standards. * Corresponds to `agy plugin validate .` standards.
*/ */
@@ -11,6 +11,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename); const __dirname = path.dirname(__filename);
const PLUGIN_DIR = __dirname; const PLUGIN_DIR = __dirname;
const PKG_VERSION = JSON.parse(fs.readFileSync(path.join(PLUGIN_DIR, 'package.json'), 'utf8')).version;
let passedChecks = 0; let passedChecks = 0;
let totalChecks = 0; let totalChecks = 0;
@@ -42,7 +43,7 @@ async function validateManifest() {
assert(json.name === 'aura-courier', `name matches 'aura-courier' (got '${json.name}')`); assert(json.name === 'aura-courier', `name matches 'aura-courier' (got '${json.name}')`);
assert(json.displayName === 'Aura Courier MCP', `displayName is 'Aura Courier MCP'`); assert(json.displayName === 'Aura Courier MCP', `displayName is 'Aura Courier MCP'`);
assert(json.version === '2.5.2', `version is '2.5.2'`); assert(json.version === PKG_VERSION, `version matches package.json ('${PKG_VERSION}', got '${json.version}')`);
assert(json.category === 'Business / Logistics', `category is 'Business / Logistics'`); assert(json.category === 'Business / Logistics', `category is 'Business / Logistics'`);
assert(typeof json.description === 'string' && json.description.length > 20, 'description is informative'); assert(typeof json.description === 'string' && json.description.length > 20, 'description is informative');
assert(json.logo === 'assets/logo.svg', `logo points to 'assets/logo.svg'`); assert(json.logo === 'assets/logo.svg', `logo points to 'assets/logo.svg'`);
@@ -127,7 +128,7 @@ async function validateRemoteMcpServer() {
params: { params: {
protocolVersion: '2024-11-05', protocolVersion: '2024-11-05',
capabilities: {}, capabilities: {},
clientInfo: { name: 'antigravity-validator', version: '2.5.2' } clientInfo: { name: 'antigravity-validator', version: PKG_VERSION }
} }
}) })
}); });