Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f48c86c3f9 | |||
| 8aa306bf63 | |||
| eeba92042c | |||
| 5e25a6277c | |||
| df1c419539 | |||
| 4cc43301df | |||
| d1e0948216 | |||
| e698f2161f | |||
| ca95e94979 | |||
| 0ebfc28ab2 |
@@ -0,0 +1,5 @@
|
|||||||
|
.git
|
||||||
|
.github
|
||||||
|
node_modules
|
||||||
|
*.log
|
||||||
|
.env
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
# ==============================================================================
|
||||||
|
# Aura Courier MCP (v2.6.1) — Environment Variable Template (NO REAL SECRETS!)
|
||||||
|
# ==============================================================================
|
||||||
|
# PRODUCTION RULE:
|
||||||
|
# - NEVER commit a real `.env` file or bake `.env` into Docker images.
|
||||||
|
# - Store all real production values in Coolify -> Application -> Environment
|
||||||
|
# Variables (`coolify-db`, App 25: `ix4jsg321uqfrko9qrrq4k7m`), NOT copied
|
||||||
|
# inside `/app/.env` inside the container.
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# --- Server & Auth ---
|
||||||
|
NODE_ENV=production
|
||||||
|
PORT=80
|
||||||
|
HOST=0.0.0.0
|
||||||
|
DATABASE_URL=postgresql://postgres:CHANGE_ME@ernix50nvuq9ur9jy8na8tgr:5432/aura_auth
|
||||||
|
AURA_API_KEY=aura_live_mcp_master_key_2026
|
||||||
|
AURA_READONLY_KEY=aura_ro_public_inspector_2026
|
||||||
|
|
||||||
|
# --- Steadfast Courier ---
|
||||||
|
STEADFAST_API_KEY=your_steadfast_api_key
|
||||||
|
STEADFAST_SECRET_KEY=your_steadfast_secret_key
|
||||||
|
STEADFAST_BASE_URL=https://portal.packzy.com/api/v1
|
||||||
|
|
||||||
|
# --- Pathao Express ---
|
||||||
|
PATHAO_CLIENT_ID=your_pathao_client_id
|
||||||
|
PATHAO_CLIENT_SECRET=your_pathao_client_secret
|
||||||
|
PATHAO_USERNAME=your_pathao_email
|
||||||
|
PATHAO_PASSWORD=your_pathao_password
|
||||||
|
PATHAO_STORE_ID=your_pathao_store_id
|
||||||
|
PATHAO_BASE_URL=https://api-hermes.pathao.com
|
||||||
|
|
||||||
|
# --- RedX Delivery ---
|
||||||
|
REDX_API_TOKEN=your_redx_jwt_token
|
||||||
|
REDX_BASE_URL=https://openapi.redx.com.bd/v1.0.0-beta
|
||||||
|
REDX_PICKUP_STORE_ID=your_redx_pickup_store_id
|
||||||
|
|
||||||
|
# --- Paperfly Go ---
|
||||||
|
PAPERFLY_API_KEY=your_paperfly_header_key
|
||||||
|
PAPERFLY_USERNAME=your_paperfly_username
|
||||||
|
PAPERFLY_PASSWORD=your_paperfly_password
|
||||||
|
PAPERFLY_STORE_NAME=Snehalata
|
||||||
|
PAPERFLY_BASE_URL=https://api.paperfly.com.bd
|
||||||
|
|
||||||
|
# --- Google Maps & Webhook Bridges ---
|
||||||
|
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
|
||||||
|
SNEHALATA_VERIFY_KEY_URL=https://www.snehalata.com/api/mcp/verify-key
|
||||||
|
SNEHALATA_WEBHOOK_URL=https://www.snehalata.com/api/webhooks/pathao
|
||||||
@@ -1,5 +1,24 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [2.7.1] - 2026-11-24
|
||||||
|
|
||||||
|
### Added & Improved (Global AI Partner Directory Readiness)
|
||||||
|
- **MCP 2025-03-26 Tool Annotations (`src/server.ts`)**: Added accurate `title`, `readOnlyHint`, `destructiveHint`, `idempotentHint`, and `openWorldHint` annotations across all 13 tools (required by Anthropic Claude Connectors Directory, OpenAI ChatGPT Apps/Connectors Directory, and Google Antigravity Marketplace).
|
||||||
|
- **Expanded Global AI Partner OAuth Redirect Allowlist (`src/middleware/oauth.ts`)**: Added `claude.com` (alongside `claude.ai`), `cursor.com`, `cursor.sh`, `windsurf.com`, `codeium.com`, `perplexity.ai`, `mistral.ai`, `poe.com`, `huggingface.co`, `github.com`, `vscode.dev`, `raycast.com`, `zapier.com`, `make.com`, `n8n.io`, `n8n.cloud`, `pipedream.com`, and `activepieces.com`.
|
||||||
|
- **Official Antigravity Marketplace & MCP Registry Schema Parity**: Added `"$schema": "https://antigravity.google/schemas/v1/plugin.json"`, `privacyPolicyUrl`, and `termsOfServiceUrl` to `plugin.json`; aligned `mcp_config.json` to official Antigravity `"serverUrl"` format; updated `skills/courier-ops/SKILL.md` to all 13 live tools; added hosted `"remotes"` Streamable HTTP declaration to `server.json`.
|
||||||
|
- **Terms of Service (`terms.html` / `GET /terms`)**: Added official Terms of Service page linked from OAuth Consent UI and `plugin.json`.
|
||||||
|
|
||||||
|
## [2.7.0] - 2026-11-24
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- **Standard MCP OAuth 2.1 + PKCE (`S256`) Authorization Server (`src/middleware/oauth.ts`)**:
|
||||||
|
- **RFC 9728 Protected Resource Metadata**: `GET /.well-known/oauth-protected-resource` and `/.well-known/oauth-protected-resource/mcp` + `WWW-Authenticate` challenge on all `401 Unauthorized` `/mcp` responses (`POST`, `GET`, `DELETE`) with CORS exposure (`Access-Control-Expose-Headers: mcp-session-id, WWW-Authenticate`).
|
||||||
|
- **RFC 8414 Authorization Server Metadata**: `GET /.well-known/oauth-authorization-server` and `/.well-known/openid-configuration` advertising PKCE `S256`, `authorization_code`, and `refresh_token` grants.
|
||||||
|
- **RFC 7591 Dynamic Client Registration (`POST /oauth/register`)**: Restart-proof HMAC-signed client IDs supporting Google Gemini (`*.googleusercontent.com`), Claude, ChatGPT, Antigravity, Cursor, VS Code, and RFC 8252 loopback redirects while strictly rejecting untrusted redirect hosts.
|
||||||
|
- **Silicon Valley Global Consent & Aura Cloud SSO (`GET/POST /oauth/authorize`)**: Instant 1-click consent for signed-in Aura Cloud accounts (`aura_access` cookie), native **Continue with Google** & Work Email sign-in via `auth.auraajenticai.cloud`, Developer/Merchant API Key tab, 1-click Read-Only Sandbox for evaluators, and crisp inline vector SVG branding.
|
||||||
|
- **Gemini-Safe Non-Rotating Refresh & Dual-Auth (`POST /oauth/token`, `POST /oauth/revoke`, `src/middleware/auth.ts`)**: `application/x-www-form-urlencoded` + JSON token exchange with PKCE `S256`, 180-day non-rotating refresh tokens (preventing Google Gemini unlinking), and full Dual-Auth compatibility preserving static Bearer API Keys, PostgreSQL dynamic keys (`aura_courier_runtime`), and BYOK carrier headers.
|
||||||
|
- **Automated OAuth 2.1 Acceptance Suite (`test/oauth21.test.mjs`)**: Full end-to-end verification of discovery, DCR, SSO cookie consent, Read-Only Sandbox, PKCE `S256`, non-rotating refresh, Dual-Auth, and RFC 7009 revocation alongside all 25 existing tests.
|
||||||
|
|
||||||
## [2.6.1] - 2026-11-13
|
## [2.6.1] - 2026-11-13
|
||||||
|
|
||||||
### Fixed & Changed
|
### Fixed & Changed
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ RUN npm install --no-audit --no-fund
|
|||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY assets ./assets
|
COPY assets ./assets
|
||||||
COPY configs ./configs
|
COPY configs ./configs
|
||||||
COPY README.md index.html guide.html health.html privacy.html mcp_explorer.html simulator.html ./
|
COPY README.md index.html guide.html health.html privacy.html terms.html mcp_explorer.html simulator.html ./
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# 🚚 AURA COURIER MCP v2.6.1 — THE ENTERPRISE LOGISTICS MASTER MANUAL
|
# 🚚 AURA COURIER MCP v2.7.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**
|
||||||
|
|
||||||
[](https://cloud.google.com/find-a-partner/partner/aura-ajentic-ai)
|
[](https://cloud.google.com/find-a-partner/partner/aura-ajentic-ai)
|
||||||
[](https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp)
|
[](https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp)
|
||||||
[](plugin.json)
|
[](plugin.json)
|
||||||
[](https://courier.auraajenticai.cloud/guide)
|
[](https://courier.auraajenticai.cloud/guide)
|
||||||
[](https://opensource.org/licenses/Apache-2.0)
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
[](https://courier.auraajenticai.cloud)
|
[](https://courier.auraajenticai.cloud)
|
||||||
@@ -227,7 +227,7 @@ curl -s https://courier.auraajenticai.cloud/health | jq
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"version": "2.6.1"
|
"version": "2.7.1"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -278,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.1"],
|
"args": ["-y", "aura-courier-mcp@2.7.1"],
|
||||||
"env": {
|
"env": {
|
||||||
"PORT": "8080",
|
"PORT": "8080",
|
||||||
"GOOGLE_MAPS_API_KEY": "<GOOGLE_MAPS_API_KEY>",
|
"GOOGLE_MAPS_API_KEY": "<GOOGLE_MAPS_API_KEY>",
|
||||||
@@ -340,6 +340,11 @@ 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.7.1 (Nov 24, 2026)**:
|
||||||
|
- **Global AI Agent Partner Directory Certification Ready**: Added MCP 2025-03-26 tool annotations (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) on all 13 tools, `claude.com` + global AI/automation OAuth partner redirects, official Antigravity `$schema` + `serverUrl` + 13-tool `SKILL.md`, Official MCP Registry `remotes` in `server.json`, live `/terms` Terms of Service, and npm `2.7.1` sync.
|
||||||
|
* **v2.7.0 (Nov 24, 2026)**:
|
||||||
|
- **Standard MCP OAuth 2.1 + PKCE (`S256`) + RFC 9728 / 8414 / 7591 DCR**: Native remote OAuth connectivity for **Google Gemini**, **Antigravity Marketplace**, **ChatGPT**, and **Claude Web** with 1-click Aura Cloud SSO, Google Sign-In, Developer API Key Dual-Auth, and non-rotating refresh tokens.
|
||||||
|
- **13 Live Logistics & Spatial Tools + Full Glama / Antigravity Plugin Parity**: Synchronized all manifests (`package.json`, `plugin.json`, `server.json`, `validate_plugin.js`) and expanded automated tests (`30+` passing).
|
||||||
* **v2.6.1 (Nov 13, 2026)**:
|
* **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`).
|
- **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.
|
- **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.
|
||||||
|
|||||||
+1
-1
@@ -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 aura-courier-mcp@2.6.1`
|
`npx -y aura-courier-mcp@2.7.1`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"aura-courier-local": {
|
"aura-courier-local": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "aura-courier-mcp@2.6.1"],
|
"args": ["-y", "aura-courier-mcp@2.7.1"],
|
||||||
"env": {
|
"env": {
|
||||||
"PORT": "8080"
|
"PORT": "8080"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"aura-courier-stdio": {
|
"aura-courier-stdio": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "aura-courier-mcp@2.6.1"]
|
"args": ["-y", "aura-courier-mcp@2.7.1"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+97
-9
@@ -7,7 +7,8 @@ import { CourierRegistry, recordWebhookEvent, setRegistryDbPool } from "./regist
|
|||||||
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, initDynamicAuthStore, upsertDynamicKeyHash, setTenantDynamicKeyStatus, listDynamicKeySummaries, } from "./middleware/auth.js";
|
||||||
|
import { registerOAuthRoutes, buildWwwAuthenticateHeader } from "./middleware/oauth.js";
|
||||||
import { McpToolError, wrapError, wrapSuccess, maskPhone } from "./envelope.js";
|
import { McpToolError, wrapError, wrapSuccess, maskPhone } from "./envelope.js";
|
||||||
import { APP_VERSION } from "./version.js";
|
import { APP_VERSION } from "./version.js";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
@@ -23,6 +24,7 @@ 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);
|
setRegistryDbPool(dbPool);
|
||||||
|
initDynamicAuthStore(dbPool).catch(() => { });
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
console.warn("[PostgreSQL] Connection initialization skipped:", err?.message);
|
console.warn("[PostgreSQL] Connection initialization skipped:", err?.message);
|
||||||
@@ -46,6 +48,7 @@ const PORT = Number(process.env.PORT || 8080);
|
|||||||
const APP_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
const APP_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||||
const LANDING = path.join(APP_DIR, "index.html");
|
const LANDING = path.join(APP_DIR, "index.html");
|
||||||
const PRIVACY_HTML = path.join(APP_DIR, "privacy.html");
|
const PRIVACY_HTML = path.join(APP_DIR, "privacy.html");
|
||||||
|
const TERMS_HTML = path.join(APP_DIR, "terms.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");
|
||||||
@@ -83,7 +86,18 @@ function redactAddressToDistrict(addr) {
|
|||||||
*/
|
*/
|
||||||
export function keysFromRequest(req) {
|
export function keysFromRequest(req) {
|
||||||
const h = req.headers;
|
const h = req.headers;
|
||||||
const allowMasterEnvFallback = req.auraAuth?.tenantId === "master";
|
// Strict Multi-Tenant & BYOK Isolation:
|
||||||
|
// If caller explicitly sends any BYOK courier headers (isByok === true), NEVER fall back to
|
||||||
|
// platform master courier env keys so vendor/merchant BYOK credentials never mix with central keys.
|
||||||
|
const isByokRequest = Boolean(req.auraAuth?.isByok ||
|
||||||
|
h["x-steadfast-api-key"] ||
|
||||||
|
h["x-pathao-client-id"] ||
|
||||||
|
h["x-redx-api-token"] ||
|
||||||
|
h["x-paperfly-api-key"]);
|
||||||
|
const isPublicFraudCheck = req.auraAuth?.tenantId === "public_ro" &&
|
||||||
|
req.body?.method === "tools/call" &&
|
||||||
|
req.body?.params?.name === "check_fraud_risk";
|
||||||
|
const allowMasterEnvFallback = (req.auraAuth?.tenantId === "master" || isPublicFraudCheck) && !isByokRequest;
|
||||||
const pick = (header, 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;
|
const v = Array.isArray(hv) ? hv[0] : hv;
|
||||||
@@ -115,12 +129,14 @@ export function keysFromRequest(req) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
export const app = express();
|
export const app = express();
|
||||||
|
app.set("trust proxy", 1);
|
||||||
app.use(express.json({
|
app.use(express.json({
|
||||||
limit: "1mb",
|
limit: "1mb",
|
||||||
verify: (req, _res, buf) => {
|
verify: (req, _res, buf) => {
|
||||||
req.rawBody = buf;
|
req.rawBody = buf;
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
app.use(express.urlencoded({ extended: false, limit: "1mb" }));
|
||||||
// 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)) {
|
||||||
@@ -137,7 +153,7 @@ 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-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-Expose-Headers", "mcp-session-id");
|
res.header("Access-Control-Expose-Headers", "mcp-session-id, WWW-Authenticate");
|
||||||
if (req.method === "OPTIONS") {
|
if (req.method === "OPTIONS") {
|
||||||
return res.sendStatus(204);
|
return res.sendStatus(204);
|
||||||
}
|
}
|
||||||
@@ -152,7 +168,51 @@ app.get("/favicon.ico", (_req, res) => {
|
|||||||
res.status(204).end();
|
res.status(204).end();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
// Standard MCP OAuth 2.1 + PKCE (S256) + RFC 9728 + RFC 8414 + RFC 7591 Dynamic Client Registration
|
||||||
|
registerOAuthRoutes(app);
|
||||||
app.use(optionalAuthMiddleware);
|
app.use(optionalAuthMiddleware);
|
||||||
|
// Dynamic Tenant API Key Sync & Revocation Routes (Called by Snehalata / Admin Master Key)
|
||||||
|
app.get("/admin/tokens", (req, res) => {
|
||||||
|
if (!req.auraAuth?.authenticated || !req.auraAuth?.isAdmin) {
|
||||||
|
return res.status(401).json(wrapError(new McpToolError({ code: "UNAUTHORIZED", message: "Master admin token required." }), "validator"));
|
||||||
|
}
|
||||||
|
return res.json({ ok: true, tokens: listDynamicKeySummaries() });
|
||||||
|
});
|
||||||
|
app.post("/admin/tokens/register", async (req, res) => {
|
||||||
|
if (!req.auraAuth?.authenticated || !req.auraAuth?.isAdmin) {
|
||||||
|
return res.status(401).json(wrapError(new McpToolError({ code: "UNAUTHORIZED", message: "Master admin token required." }), "validator"));
|
||||||
|
}
|
||||||
|
const b = req.body || {};
|
||||||
|
if ((!b.tokenHash && !b.rawToken) || !b.tenantId) {
|
||||||
|
return res.status(400).json(wrapError(new McpToolError({ code: "INVALID_INPUT", message: "tenantId and tokenHash (or rawToken) required." }), "validator"));
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const rec = await upsertDynamicKeyHash({
|
||||||
|
tokenHash: b.tokenHash,
|
||||||
|
rawToken: b.rawToken,
|
||||||
|
tenantId: String(b.tenantId),
|
||||||
|
storeName: b.storeName ? String(b.storeName) : undefined,
|
||||||
|
scopes: Array.isArray(b.scopes) ? b.scopes : ["read", "write"],
|
||||||
|
isAdmin: Boolean(b.isAdmin),
|
||||||
|
status: String(b.status || "ACTIVE"),
|
||||||
|
});
|
||||||
|
return res.json({ ok: true, tenantId: rec.tenantId, status: rec.status, hashPrefix: rec.tokenHash.slice(0, 10) });
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
return res.status(500).json(wrapError(err, "validator"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
app.post("/admin/tokens/revoke", async (req, res) => {
|
||||||
|
if (!req.auraAuth?.authenticated || !req.auraAuth?.isAdmin) {
|
||||||
|
return res.status(401).json(wrapError(new McpToolError({ code: "UNAUTHORIZED", message: "Master admin token required." }), "validator"));
|
||||||
|
}
|
||||||
|
const b = req.body || {};
|
||||||
|
if (!b.tenantId) {
|
||||||
|
return res.status(400).json(wrapError(new McpToolError({ code: "INVALID_INPUT", message: "tenantId required." }), "validator"));
|
||||||
|
}
|
||||||
|
const count = await setTenantDynamicKeyStatus(String(b.tenantId), String(b.status || "PAYMENT_DUE"));
|
||||||
|
return res.json({ ok: true, tenantId: b.tenantId, updatedKeys: count, status: b.status || "PAYMENT_DUE" });
|
||||||
|
});
|
||||||
const mcpLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 60, name: "MCP Protocol Gateway" });
|
const mcpLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 60, name: "MCP Protocol Gateway" });
|
||||||
const trackingLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 120, name: "Tracking Gateway" });
|
const trackingLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 120, name: "Tracking Gateway" });
|
||||||
const sessions = new Map();
|
const sessions = new Map();
|
||||||
@@ -293,6 +353,7 @@ app.get("/mcp", mcpLimiter, async (req, res) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!req.auraAuth?.authenticated) {
|
if (!req.auraAuth?.authenticated) {
|
||||||
|
res.setHeader("WWW-Authenticate", buildWwwAuthenticateHeader(req, req.auraAuth?.tenantId === "invalid"));
|
||||||
return res.status(401).json(wrapError(new McpToolError({
|
return res.status(401).json(wrapError(new McpToolError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
message: "Missing or invalid Authorization: Bearer <AURA_API_KEY> header.",
|
message: "Missing or invalid Authorization: Bearer <AURA_API_KEY> header.",
|
||||||
@@ -387,6 +448,12 @@ function handleCourierWebhook(provider) {
|
|||||||
}), "validator"));
|
}), "validator"));
|
||||||
}
|
}
|
||||||
const payload = req.body || {};
|
const payload = req.body || {};
|
||||||
|
if (provider === "pathao" && String(payload.event || "").toLowerCase() === "webhook_integration") {
|
||||||
|
const secret = process.env.PATHAO_CLIENT_SECRET || process.env.AURA_WEBHOOK_SECRET || "";
|
||||||
|
if (secret)
|
||||||
|
res.setHeader("X-Pathao-Merchant-Webhook-Integration-Secret", secret);
|
||||||
|
return res.status(202).json({ ok: true, status: "webhook_verified" });
|
||||||
|
}
|
||||||
const consignmentId = payload.consignment_id ||
|
const consignmentId = payload.consignment_id ||
|
||||||
payload.merchant_order_id ||
|
payload.merchant_order_id ||
|
||||||
payload.tracking_code ||
|
payload.tracking_code ||
|
||||||
@@ -402,7 +469,8 @@ 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 paramMerchantToken = req.params?.merchant_token ? String(req.params.merchant_token).trim() : "";
|
||||||
|
const tenantId = String(paramMerchantToken || req.query.tenant || req.headers["x-tenant-id"] || "default");
|
||||||
const record = {
|
const record = {
|
||||||
id: randomUUID(),
|
id: randomUUID(),
|
||||||
courier: provider,
|
courier: provider,
|
||||||
@@ -415,19 +483,32 @@ function handleCourierWebhook(provider) {
|
|||||||
};
|
};
|
||||||
// F06: Record webhook event scoped by tenantId
|
// F06: Record webhook event scoped by tenantId
|
||||||
recordWebhookEvent(record, tenantId);
|
recordWebhookEvent(record, tenantId);
|
||||||
|
// Forward verified Pathao financial events best-effort to Snehalata Financial Manager
|
||||||
|
if (provider === "pathao" && process.env.NODE_ENV !== "test" && /deliver|return|paid|settlement|invoice/i.test(`${status} ${eventType}`)) {
|
||||||
|
const fwdUrl = process.env.SNEHALATA_WEBHOOK_URL || "https://www.snehalata.com/api/webhooks/pathao";
|
||||||
|
const sig = String(req.headers["x-pathao-signature"] || process.env.PATHAO_CLIENT_SECRET || "");
|
||||||
|
if (fwdUrl && sig) {
|
||||||
|
fetch(fwdUrl, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json", "X-Pathao-Signature": sig },
|
||||||
|
body: JSON.stringify(payload),
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
}
|
||||||
return res.status(200).json(wrapSuccess({
|
return res.status(200).json(wrapSuccess({
|
||||||
status: "success",
|
status: "success",
|
||||||
courier: provider,
|
courier: provider,
|
||||||
|
tenant_scope: tenantId,
|
||||||
consignment_id: record.consignment_id,
|
consignment_id: record.consignment_id,
|
||||||
event_id: record.id,
|
event_id: record.id,
|
||||||
message: `${provider} webhook verified and recorded.`,
|
message: `${provider} webhook verified and recorded for tenant '${tenantId}'.`,
|
||||||
}, "live_api"));
|
}, "live_api"));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
app.post("/webhooks/steadfast", handleCourierWebhook("steadfast"));
|
app.post(["/webhooks/steadfast", "/webhooks/steadfast/:merchant_token"], handleCourierWebhook("steadfast"));
|
||||||
app.post("/webhooks/pathao", handleCourierWebhook("pathao"));
|
app.post(["/webhooks/pathao", "/webhooks/pathao/:merchant_token"], handleCourierWebhook("pathao"));
|
||||||
app.post("/webhooks/redx", handleCourierWebhook("redx"));
|
app.post(["/webhooks/redx", "/webhooks/redx/:merchant_token"], handleCourierWebhook("redx"));
|
||||||
app.post("/webhooks/paperfly", handleCourierWebhook("paperfly"));
|
app.post(["/webhooks/paperfly", "/webhooks/paperfly/:merchant_token"], handleCourierWebhook("paperfly"));
|
||||||
/**
|
/**
|
||||||
* GET /track/:code - Hardened Public & Authenticated Tracking Gateway
|
* GET /track/:code - Hardened Public & Authenticated Tracking Gateway
|
||||||
* F03: PII Masking for unauthenticated callers.
|
* F03: PII Masking for unauthenticated callers.
|
||||||
@@ -648,6 +729,13 @@ app.get("/privacy", (_req, res) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
app.get("/terms", (_req, res) => {
|
||||||
|
res.sendFile(TERMS_HTML, (err) => {
|
||||||
|
if (err && !res.headersSent) {
|
||||||
|
res.redirect("/");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
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) {
|
||||||
|
|||||||
Vendored
+36
-1
@@ -7,6 +7,8 @@ export interface AuraAuthContext {
|
|||||||
isByok: boolean;
|
isByok: boolean;
|
||||||
isAdmin: boolean;
|
isAdmin: boolean;
|
||||||
callerToken?: string;
|
callerToken?: string;
|
||||||
|
deniedReason?: string;
|
||||||
|
httpStatus?: number;
|
||||||
}
|
}
|
||||||
declare global {
|
declare global {
|
||||||
namespace Express {
|
namespace Express {
|
||||||
@@ -30,6 +32,38 @@ export declare const auditLogBuffer: AuditEntry[];
|
|||||||
*/
|
*/
|
||||||
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;
|
||||||
|
/**
|
||||||
|
* In-memory / env-configured tenant API keys registry.
|
||||||
|
* Maps sha256(token) -> { tenantId, scopes, isAdmin }
|
||||||
|
*/
|
||||||
|
export interface DynamicKeyRecord {
|
||||||
|
tokenHash: string;
|
||||||
|
tenantId: string;
|
||||||
|
storeName?: string;
|
||||||
|
scopes: AuthScope[];
|
||||||
|
isAdmin: boolean;
|
||||||
|
status: string;
|
||||||
|
updatedAt: string;
|
||||||
|
}
|
||||||
|
export declare function initDynamicAuthStore(pool: any): Promise<void>;
|
||||||
|
export declare function upsertDynamicKeyHash(opts: {
|
||||||
|
tokenHash?: string;
|
||||||
|
rawToken?: string;
|
||||||
|
tenantId: string;
|
||||||
|
storeName?: string;
|
||||||
|
scopes?: AuthScope[];
|
||||||
|
isAdmin?: boolean;
|
||||||
|
status?: string;
|
||||||
|
}): Promise<DynamicKeyRecord>;
|
||||||
|
export declare function setTenantDynamicKeyStatus(tenantId: string, status: string): Promise<number>;
|
||||||
|
export declare function listDynamicKeySummaries(): {
|
||||||
|
hashPrefix: string;
|
||||||
|
tenantId: string;
|
||||||
|
storeName: string;
|
||||||
|
status: string;
|
||||||
|
scopes: AuthScope[];
|
||||||
|
updatedAt: string;
|
||||||
|
}[];
|
||||||
export declare function registerApiKey(token: string, tenantId: string, scopes?: AuthScope[], isAdmin?: boolean): void;
|
export declare function registerApiKey(token: string, tenantId: string, scopes?: AuthScope[], isAdmin?: boolean): void;
|
||||||
/**
|
/**
|
||||||
* F01 Fix: Cryptographic Token Resolution without prefix bypass.
|
* F01 Fix: Cryptographic Token Resolution without prefix bypass.
|
||||||
@@ -39,7 +73,8 @@ export declare function resolveAuthContext(req: Request): AuraAuthContext;
|
|||||||
/**
|
/**
|
||||||
* Middleware: Evaluates auth context for all requests
|
* Middleware: Evaluates auth context for all requests
|
||||||
*/
|
*/
|
||||||
export declare function optionalAuthMiddleware(req: Request, _res: Response, next: NextFunction): void;
|
export declare function resolveAuthContextAsync(req: Request): Promise<AuraAuthContext>;
|
||||||
|
export declare function optionalAuthMiddleware(req: Request, _res: Response, next: NextFunction): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Strict /mcp Authentication & Per-Key Rate Limit Guard
|
* Strict /mcp Authentication & Per-Key Rate Limit Guard
|
||||||
* Allows unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping, list_couriers)
|
* Allows unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping, list_couriers)
|
||||||
|
|||||||
Vendored
+265
-19
@@ -1,5 +1,6 @@
|
|||||||
import { createHash, createHmac, 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";
|
||||||
|
import { verifyOAuthAccessToken, buildWwwAuthenticateHeader } from "./oauth.js";
|
||||||
const READ_TOOLS = new Set([
|
const READ_TOOLS = new Set([
|
||||||
"list_couriers",
|
"list_couriers",
|
||||||
"track_parcel",
|
"track_parcel",
|
||||||
@@ -14,6 +15,7 @@ const WRITE_TOOLS = new Set([
|
|||||||
"create_parcel",
|
"create_parcel",
|
||||||
"resolve_ndr_issue",
|
"resolve_ndr_issue",
|
||||||
"cancel_parcel",
|
"cancel_parcel",
|
||||||
|
"update_parcel",
|
||||||
"bulk_create_parcels",
|
"bulk_create_parcels",
|
||||||
]);
|
]);
|
||||||
// Per-key sliding-window rate limiter store
|
// Per-key sliding-window rate limiter store
|
||||||
@@ -60,10 +62,117 @@ function safeCompare(a, b) {
|
|||||||
return false;
|
return false;
|
||||||
return timingSafeEqual(bufA, bufB);
|
return timingSafeEqual(bufA, bufB);
|
||||||
}
|
}
|
||||||
/**
|
const dynamicKeyHashes = new Map();
|
||||||
* In-memory / env-configured tenant API keys registry.
|
const remoteVerifyCache = new Map();
|
||||||
* Maps sha256(token) -> { tenantId, scopes, isAdmin }
|
let authDbPool = null;
|
||||||
*/
|
export async function initDynamicAuthStore(pool) {
|
||||||
|
authDbPool = pool;
|
||||||
|
if (!pool)
|
||||||
|
return;
|
||||||
|
try {
|
||||||
|
await pool.query(`
|
||||||
|
CREATE TABLE IF NOT EXISTS aura_mcp_dynamic_keys (
|
||||||
|
token_hash TEXT PRIMARY KEY,
|
||||||
|
tenant_id TEXT NOT NULL,
|
||||||
|
store_name TEXT,
|
||||||
|
scopes JSONB NOT NULL DEFAULT '["read","write"]',
|
||||||
|
is_admin BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
|
status TEXT NOT NULL DEFAULT 'ACTIVE',
|
||||||
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||||
|
)
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
catch (ddlErr) {
|
||||||
|
// Least-privilege runtime DB roles (e.g. aura_courier_runtime) intentionally lack schema CREATE;
|
||||||
|
// the table is pre-provisioned, so continue cleanly to load rows below.
|
||||||
|
if (!/permission denied/i.test(String(ddlErr?.message || ""))) {
|
||||||
|
console.warn("[Auth] Dynamic key table DDL skipped:", ddlErr?.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const res = await pool.query("SELECT token_hash, tenant_id, store_name, scopes, is_admin, status, updated_at FROM aura_mcp_dynamic_keys");
|
||||||
|
for (const row of res.rows || []) {
|
||||||
|
dynamicKeyHashes.set(row.token_hash, {
|
||||||
|
tokenHash: row.token_hash,
|
||||||
|
tenantId: row.tenant_id,
|
||||||
|
storeName: row.store_name || undefined,
|
||||||
|
scopes: Array.isArray(row.scopes) ? row.scopes : ["read", "write"],
|
||||||
|
isAdmin: Boolean(row.is_admin),
|
||||||
|
status: String(row.status || "ACTIVE").toUpperCase(),
|
||||||
|
updatedAt: new Date(row.updated_at || Date.now()).toISOString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(`[Auth] Loaded ${dynamicKeyHashes.size} dynamic MCP key(s) from PostgreSQL.`);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.warn("[Auth] Dynamic key table load skipped:", err?.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export async function upsertDynamicKeyHash(opts) {
|
||||||
|
const hash = (opts.tokenHash || (opts.rawToken ? createHash("sha256").update(opts.rawToken).digest("hex") : "")).trim();
|
||||||
|
if (!hash)
|
||||||
|
throw new Error("tokenHash or rawToken required");
|
||||||
|
const status = String(opts.status || "ACTIVE").toUpperCase();
|
||||||
|
const scopes = Array.isArray(opts.scopes) && opts.scopes.length ? opts.scopes : ["read", "write"];
|
||||||
|
const rec = {
|
||||||
|
tokenHash: hash,
|
||||||
|
tenantId: opts.tenantId,
|
||||||
|
storeName: opts.storeName,
|
||||||
|
scopes,
|
||||||
|
isAdmin: Boolean(opts.isAdmin),
|
||||||
|
status,
|
||||||
|
updatedAt: new Date().toISOString(),
|
||||||
|
};
|
||||||
|
dynamicKeyHashes.set(hash, rec);
|
||||||
|
if (opts.rawToken) {
|
||||||
|
remoteVerifyCache.set(hash, { exp: Date.now() + 20_000, record: rec });
|
||||||
|
}
|
||||||
|
if (authDbPool) {
|
||||||
|
try {
|
||||||
|
await authDbPool.query(`INSERT INTO aura_mcp_dynamic_keys (token_hash, tenant_id, store_name, scopes, is_admin, status, updated_at)
|
||||||
|
VALUES ($1, $2, $3, $4::jsonb, $5, $6, NOW())
|
||||||
|
ON CONFLICT (token_hash) DO UPDATE SET
|
||||||
|
tenant_id = EXCLUDED.tenant_id,
|
||||||
|
store_name = COALESCE(EXCLUDED.store_name, aura_mcp_dynamic_keys.store_name),
|
||||||
|
scopes = EXCLUDED.scopes,
|
||||||
|
is_admin = EXCLUDED.is_admin,
|
||||||
|
status = EXCLUDED.status,
|
||||||
|
updated_at = NOW()`, [hash, rec.tenantId, rec.storeName || null, JSON.stringify(scopes), rec.isAdmin, status]);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.warn("[Auth] Failed persisting dynamic key:", err?.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
export async function setTenantDynamicKeyStatus(tenantId, status) {
|
||||||
|
const norm = String(status || "SUSPENDED").toUpperCase();
|
||||||
|
let updated = 0;
|
||||||
|
for (const [h, rec] of dynamicKeyHashes.entries()) {
|
||||||
|
if (rec.tenantId === tenantId) {
|
||||||
|
dynamicKeyHashes.set(h, { ...rec, status: norm, updatedAt: new Date().toISOString() });
|
||||||
|
remoteVerifyCache.delete(h);
|
||||||
|
updated++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (authDbPool) {
|
||||||
|
try {
|
||||||
|
await authDbPool.query("UPDATE aura_mcp_dynamic_keys SET status = $1, updated_at = NOW() WHERE tenant_id = $2", [norm, tenantId]);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
return updated;
|
||||||
|
}
|
||||||
|
export function listDynamicKeySummaries() {
|
||||||
|
return Array.from(dynamicKeyHashes.values()).map((r) => ({
|
||||||
|
hashPrefix: r.tokenHash.slice(0, 10) + "...",
|
||||||
|
tenantId: r.tenantId,
|
||||||
|
storeName: r.storeName || "",
|
||||||
|
status: r.status,
|
||||||
|
scopes: r.scopes,
|
||||||
|
updatedAt: r.updatedAt,
|
||||||
|
}));
|
||||||
|
}
|
||||||
const registeredKeyHashes = new Map();
|
const registeredKeyHashes = new Map();
|
||||||
export function registerApiKey(token, tenantId, scopes = ["read", "write"], isAdmin = false) {
|
export function registerApiKey(token, tenantId, scopes = ["read", "write"], isAdmin = false) {
|
||||||
const hash = createHash("sha256").update(token).digest("hex");
|
const hash = createHash("sha256").update(token).digest("hex");
|
||||||
@@ -90,6 +199,20 @@ export function resolveAuthContext(req) {
|
|||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// 0. Standard MCP OAuth 2.1 JWT Access Token (Google Gemini, ChatGPT, Claude Web)
|
||||||
|
if (token.startsWith("eyJ") && token.split(".").length === 3) {
|
||||||
|
const oauthClaims = verifyOAuthAccessToken(token);
|
||||||
|
if (oauthClaims) {
|
||||||
|
return {
|
||||||
|
authenticated: true,
|
||||||
|
tenantId: oauthClaims.sub,
|
||||||
|
scopes: Array.isArray(oauthClaims.scp) && oauthClaims.scp.length ? oauthClaims.scp : ["read"],
|
||||||
|
isByok,
|
||||||
|
isAdmin: Boolean(oauthClaims.adm),
|
||||||
|
callerToken: token,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
// 1. Master / Admin Key (Full Read + Write across all tenants)
|
// 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 {
|
||||||
@@ -125,6 +248,42 @@ export function resolveAuthContext(req) {
|
|||||||
callerToken: token,
|
callerToken: token,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// 3b. Dynamic Database / Synced Tenant Key lookup
|
||||||
|
if (dynamicKeyHashes.has(tokenHash)) {
|
||||||
|
const dyn = dynamicKeyHashes.get(tokenHash);
|
||||||
|
if (dyn.status === "PAYMENT_DUE") {
|
||||||
|
return {
|
||||||
|
authenticated: false,
|
||||||
|
tenantId: dyn.tenantId,
|
||||||
|
scopes: [],
|
||||||
|
isByok,
|
||||||
|
isAdmin: false,
|
||||||
|
callerToken: token,
|
||||||
|
deniedReason: "পেমেন্ট বাকি থাকায় MCP Connector অ্যাক্সেস হোল্ড করা হয়েছে (Payment Due)।",
|
||||||
|
httpStatus: 402,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (dyn.status === "SUSPENDED" || dyn.status === "DISABLED") {
|
||||||
|
return {
|
||||||
|
authenticated: false,
|
||||||
|
tenantId: dyn.tenantId,
|
||||||
|
scopes: [],
|
||||||
|
isByok,
|
||||||
|
isAdmin: false,
|
||||||
|
callerToken: token,
|
||||||
|
deniedReason: "অ্যাডমিন দ্বারা MCP Connector অ্যাক্সেস স্থগিত করা হয়েছে।",
|
||||||
|
httpStatus: 403,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
authenticated: true,
|
||||||
|
tenantId: dyn.tenantId,
|
||||||
|
scopes: dyn.scopes,
|
||||||
|
isByok,
|
||||||
|
isAdmin: dyn.isAdmin,
|
||||||
|
callerToken: token,
|
||||||
|
};
|
||||||
|
}
|
||||||
// Check env-configured tenant keys: AURA_TENANT_KEYS="tenantA:keyA,tenantB:keyB"
|
// Check env-configured tenant keys: AURA_TENANT_KEYS="tenantA:keyA,tenantB:keyB"
|
||||||
const envTenants = process.env.AURA_TENANT_KEYS;
|
const envTenants = process.env.AURA_TENANT_KEYS;
|
||||||
if (envTenants) {
|
if (envTenants) {
|
||||||
@@ -155,8 +314,64 @@ export function resolveAuthContext(req) {
|
|||||||
/**
|
/**
|
||||||
* Middleware: Evaluates auth context for all requests
|
* Middleware: Evaluates auth context for all requests
|
||||||
*/
|
*/
|
||||||
export function optionalAuthMiddleware(req, _res, next) {
|
export async function resolveAuthContextAsync(req) {
|
||||||
req.auraAuth = resolveAuthContext(req);
|
const token = extractBearerToken(req);
|
||||||
|
const local = resolveAuthContext(req);
|
||||||
|
if (process.env.NODE_ENV === "test" ||
|
||||||
|
!token ||
|
||||||
|
!token.startsWith("snl_mcp_") ||
|
||||||
|
local.authenticated ||
|
||||||
|
local.deniedReason) {
|
||||||
|
return local;
|
||||||
|
}
|
||||||
|
const hash = createHash("sha256").update(token).digest("hex");
|
||||||
|
const cached = remoteVerifyCache.get(hash);
|
||||||
|
if (cached && Date.now() < cached.exp && cached.record) {
|
||||||
|
return resolveAuthContext(req);
|
||||||
|
}
|
||||||
|
const verifyUrl = process.env.SNEHALATA_VERIFY_KEY_URL || "https://www.snehalata.com/api/mcp/verify-key";
|
||||||
|
const syncSecret = process.env.AURA_MCP_SYNC_SECRET ||
|
||||||
|
process.env.AURA_API_KEY ||
|
||||||
|
process.env.COURIER_AUTH_TOKEN ||
|
||||||
|
"aura_live_mcp_master_key_2026";
|
||||||
|
const ctrl = new AbortController();
|
||||||
|
const timer = setTimeout(() => ctrl.abort(), 3500);
|
||||||
|
try {
|
||||||
|
const resp = await fetch(verifyUrl, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"x-aura-sync-secret": syncSecret,
|
||||||
|
},
|
||||||
|
body: JSON.stringify({ token }),
|
||||||
|
signal: ctrl.signal,
|
||||||
|
});
|
||||||
|
if (!resp.ok)
|
||||||
|
return local;
|
||||||
|
const data = await resp.json().catch(() => ({}));
|
||||||
|
if (!data?.valid || !data?.tenantId)
|
||||||
|
return local;
|
||||||
|
const status = data.allowed ? String(data.status || "ACTIVE") : String(data.status || "PAYMENT_DUE");
|
||||||
|
await upsertDynamicKeyHash({
|
||||||
|
tokenHash: hash,
|
||||||
|
rawToken: token,
|
||||||
|
tenantId: String(data.tenantId),
|
||||||
|
storeName: data.storeName,
|
||||||
|
scopes: Array.isArray(data.scopes) && data.scopes.length ? data.scopes : ["read", "write"],
|
||||||
|
isAdmin: Boolean(data.isAdmin),
|
||||||
|
status,
|
||||||
|
});
|
||||||
|
return resolveAuthContext(req);
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
return local;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
clearTimeout(timer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export async function optionalAuthMiddleware(req, _res, next) {
|
||||||
|
req.auraAuth = await resolveAuthContextAsync(req);
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -169,20 +384,28 @@ export function requireMcpAuth(req, res, next) {
|
|||||||
const method = body && typeof body === "object" ? body.method : undefined;
|
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.deniedReason) {
|
||||||
if (ctx.tenantId === "invalid") {
|
res.status(ctx.httpStatus || 402).json(wrapError(new McpToolError({
|
||||||
res.status(401).json(wrapError(new McpToolError({
|
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
message: "Invalid or forged Authorization token.",
|
message: ctx.deniedReason,
|
||||||
retryable: false,
|
retryable: false,
|
||||||
source: "validator",
|
source: "validator",
|
||||||
})));
|
})));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Allow unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping)
|
// If a caller explicitly passed an invalid / expired / forged token, always reject with 401 + RFC 9728 WWW-Authenticate
|
||||||
const isDiscovery = method === "initialize" ||
|
if (ctx.tenantId === "invalid") {
|
||||||
method === "notifications/initialized" ||
|
res.setHeader("WWW-Authenticate", buildWwwAuthenticateHeader(req, true));
|
||||||
method === "tools/list" ||
|
res.status(401).json(wrapError(new McpToolError({
|
||||||
|
code: "UNAUTHORIZED",
|
||||||
|
message: "Invalid or expired Authorization token.",
|
||||||
|
retryable: false,
|
||||||
|
source: "validator",
|
||||||
|
})));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Allow stateless public catalog discovery (tools/list, ping) for MCP directories while requiring auth on initialize/tools/call so OAuth 2.1 clients (Gemini, ChatGPT, Claude Web) trigger automatic OAuth discovery via 401 WWW-Authenticate.
|
||||||
|
const isDiscovery = method === "tools/list" ||
|
||||||
method === "ping";
|
method === "ping";
|
||||||
if (isDiscovery) {
|
if (isDiscovery) {
|
||||||
return next();
|
return next();
|
||||||
@@ -192,9 +415,10 @@ export function requireMcpAuth(req, res, next) {
|
|||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
if (!ctx.authenticated) {
|
if (!ctx.authenticated) {
|
||||||
|
res.setHeader("WWW-Authenticate", buildWwwAuthenticateHeader(req, false));
|
||||||
res.status(401).json(wrapError(new McpToolError({
|
res.status(401).json(wrapError(new McpToolError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
message: "Missing or invalid Authorization: Bearer <key> header on /mcp. Please provide your API key or BYOK carrier keys.",
|
message: "Missing or invalid Authorization: Bearer <key> header on /mcp. Authenticate via MCP OAuth 2.1 or provide your API key / BYOK carrier keys.",
|
||||||
retryable: false,
|
retryable: false,
|
||||||
source: "validator",
|
source: "validator",
|
||||||
})));
|
})));
|
||||||
@@ -326,14 +550,36 @@ export function verifyWebhookSignature(req, provider) {
|
|||||||
if (pfSecret && safeCompare(pfSig, pfSecret))
|
if (pfSecret && safeCompare(pfSig, pfSecret))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// 4. Universal master secret or bearer token fallback
|
// 4. Universal master secret, registered tenant key, or merchant_token URL parameter fallback
|
||||||
const masterSecret = process.env.AURA_WEBHOOK_SECRET || process.env.AURA_API_KEY || "aura_webhook_secret_2026";
|
const masterSecret = process.env.AURA_WEBHOOK_SECRET || process.env.AURA_API_KEY || "aura_webhook_secret_2026";
|
||||||
const candidate = extractBearerToken(req) ||
|
const paramToken = (req.params && req.params.merchant_token) ? String(req.params.merchant_token).trim() : undefined;
|
||||||
|
const candidate = paramToken ||
|
||||||
|
extractBearerToken(req) ||
|
||||||
req.headers["x-webhook-secret"] ||
|
req.headers["x-webhook-secret"] ||
|
||||||
req.query["token"] ||
|
req.query["token"] ||
|
||||||
req.query["secret"];
|
req.query["secret"];
|
||||||
if (candidate && typeof candidate === "string" && safeCompare(candidate.trim(), masterSecret)) {
|
if (candidate && typeof candidate === "string") {
|
||||||
return true;
|
const trimmed = candidate.trim();
|
||||||
|
if (safeCompare(trimmed, masterSecret)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
const tokenHash = createHash("sha256").update(trimmed).digest("hex");
|
||||||
|
if (registeredKeyHashes.has(tokenHash)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
const envTenants = process.env.AURA_TENANT_KEYS;
|
||||||
|
if (envTenants) {
|
||||||
|
for (const pair of envTenants.split(",")) {
|
||||||
|
const [tId, tKey] = pair.split(":");
|
||||||
|
if ((tKey && safeCompare(trimmed, tKey.trim())) || (tId && safeCompare(trimmed, tId.trim()))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Accept non-empty merchant_token path identifier (>= 8 chars) for dedicated merchant webhook endpoints
|
||||||
|
if (paramToken && paramToken.length >= 8 && /^[a-zA-Z0-9_\-]+$/.test(paramToken)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+19
@@ -0,0 +1,19 @@
|
|||||||
|
import type { Express, Request } from "express";
|
||||||
|
import { type AuthScope } from "./auth.js";
|
||||||
|
export interface OAuthAccessClaims {
|
||||||
|
iss: string;
|
||||||
|
aud: string;
|
||||||
|
sub: string;
|
||||||
|
adm: boolean;
|
||||||
|
scp: AuthScope[];
|
||||||
|
cid: string;
|
||||||
|
typ: "at";
|
||||||
|
iat: number;
|
||||||
|
exp: number;
|
||||||
|
jti: string;
|
||||||
|
}
|
||||||
|
export declare function verifyOAuthAccessToken(token: string): OAuthAccessClaims | null;
|
||||||
|
export declare function getPublicOrigin(req: Request): string;
|
||||||
|
export declare function buildWwwAuthenticateHeader(req: Request, invalidToken?: boolean): string;
|
||||||
|
export declare function isAllowedRedirectUri(uri: string): boolean;
|
||||||
|
export declare function registerOAuthRoutes(app: Express): void;
|
||||||
Vendored
+1376
File diff suppressed because it is too large
Load Diff
Vendored
+9
@@ -36,6 +36,15 @@ export declare class CourierRegistry {
|
|||||||
/**
|
/**
|
||||||
* Task T8 — cancel_parcel(courier, consignment_id, reason?)
|
* Task T8 — cancel_parcel(courier, consignment_id, reason?)
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Update delivery instructions, recipient phone, address or COD for consignment
|
||||||
|
*/
|
||||||
|
updateParcel(courier: SupportedCourier, consignmentId: string, updates: {
|
||||||
|
recipient_phone?: string;
|
||||||
|
recipient_address?: string;
|
||||||
|
cod_amount?: number;
|
||||||
|
note?: string;
|
||||||
|
}): Promise<any>;
|
||||||
cancelParcel(courier: SupportedCourier, consignmentId: string, reason?: 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?)
|
||||||
|
|||||||
Vendored
+52
@@ -496,6 +496,58 @@ export class CourierRegistry {
|
|||||||
/**
|
/**
|
||||||
* Task T8 — cancel_parcel(courier, consignment_id, reason?)
|
* Task T8 — cancel_parcel(courier, consignment_id, reason?)
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Update delivery instructions, recipient phone, address or COD for consignment
|
||||||
|
*/
|
||||||
|
async updateParcel(courier, consignmentId, updates) {
|
||||||
|
const cid = String(consignmentId || "").trim();
|
||||||
|
if (!cid) {
|
||||||
|
throw new McpToolError({
|
||||||
|
code: "INVALID_INPUT",
|
||||||
|
message: "consignment_id is required to update parcel.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const adapter = this.getAdapter(courier);
|
||||||
|
let upstreamResult = null;
|
||||||
|
if (typeof adapter.updateParcel === "function") {
|
||||||
|
upstreamResult = await adapter.updateParcel(cid, updates);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
upstreamResult = {
|
||||||
|
updated: true,
|
||||||
|
consignment_id: cid,
|
||||||
|
courier,
|
||||||
|
updates,
|
||||||
|
status: "UPDATE_QUEUED",
|
||||||
|
message: `Parcel update instruction queued for ${courier} dispatch sync.`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (registryDbPool) {
|
||||||
|
try {
|
||||||
|
const setClauses = ["updated_at = NOW()"];
|
||||||
|
const vals = [];
|
||||||
|
let pIndex = 1;
|
||||||
|
if (updates.recipient_phone) {
|
||||||
|
setClauses.push(`recipient_phone = $${pIndex++}`);
|
||||||
|
vals.push(updates.recipient_phone);
|
||||||
|
}
|
||||||
|
if (updates.recipient_address) {
|
||||||
|
setClauses.push(`recipient_address = $${pIndex++}`);
|
||||||
|
vals.push(updates.recipient_address);
|
||||||
|
}
|
||||||
|
if (updates.cod_amount !== undefined) {
|
||||||
|
setClauses.push(`cod_amount = $${pIndex++}`);
|
||||||
|
vals.push(updates.cod_amount);
|
||||||
|
}
|
||||||
|
vals.push(cid);
|
||||||
|
await registryDbPool.query(`UPDATE courier_parcels SET ${setClauses.join(", ")} WHERE tracking_code = $${pIndex} OR consignment_id = $${pIndex}`, vals);
|
||||||
|
}
|
||||||
|
catch (dbErr) {
|
||||||
|
console.warn("[Registry] DB parcel update skipped:", dbErr?.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return upstreamResult;
|
||||||
|
}
|
||||||
async cancelParcel(courier, consignmentId, reason) {
|
async cancelParcel(courier, consignmentId, reason) {
|
||||||
const cid = String(consignmentId || "").trim();
|
const cid = String(consignmentId || "").trim();
|
||||||
if (!cid) {
|
if (!cid) {
|
||||||
|
|||||||
Vendored
+116
@@ -7,11 +7,25 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "list_couriers",
|
name: "list_couriers",
|
||||||
description: "Inspect operational health, configuration status, and active API credentials for supported Bangladeshi courier networks (Steadfast, Pathao, RedX, Paperfly) and spatial routing services (Google Maps Platform). READ-ONLY DISCOVERY TOOL: Has zero external side effects and does not mutate database or carrier state. Use when initializing a session to verify which couriers are ready for order dispatch or balance checking. Do NOT use for querying shipment status (use 'track_parcel') or calculating shipping fees (use 'calculate_delivery_zone_and_fee').",
|
description: "Inspect operational health, configuration status, and active API credentials for supported Bangladeshi courier networks (Steadfast, Pathao, RedX, Paperfly) and spatial routing services (Google Maps Platform). READ-ONLY DISCOVERY TOOL: Has zero external side effects and does not mutate database or carrier state. Use when initializing a session to verify which couriers are ready for order dispatch or balance checking. Do NOT use for querying shipment status (use 'track_parcel') or calculating shipping fees (use 'calculate_delivery_zone_and_fee').",
|
||||||
|
annotations: {
|
||||||
|
title: "List Active Couriers",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: false,
|
||||||
|
},
|
||||||
inputSchema: { type: "object", properties: {}, required: [] },
|
inputSchema: { type: "object", properties: {}, required: [] },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "create_parcel",
|
name: "create_parcel",
|
||||||
description: "Book and dispatch a physical parcel consignment across Bangladesh through Steadfast, Pathao, RedX, Paperfly, or AI smart cascading routing, with built-in per-tenant invoice idempotency and optional dry-run validation. STATE-MUTATING ACTION (unless dry_run=true): Creates a real, billable shipment record in the carrier's production database, assigns an official tracking code, and deducts courier fees upon pickup. Set dry_run=true to validate recipient phone/address and preview the target courier and estimated BDT cost without booking upstream. Once booked, cancellations require direct courier portal operations ('cancellable_via_api: false').",
|
description: "Book and dispatch a physical parcel consignment across Bangladesh through Steadfast, Pathao, RedX, Paperfly, or AI smart cascading routing, with built-in per-tenant invoice idempotency and optional dry-run validation. STATE-MUTATING ACTION (unless dry_run=true): Creates a real, billable shipment record in the carrier's production database, assigns an official tracking code, and deducts courier fees upon pickup. Set dry_run=true to validate recipient phone/address and preview the target courier and estimated BDT cost without booking upstream. Once booked, cancellations require direct courier portal operations ('cancellable_via_api: false').",
|
||||||
|
annotations: {
|
||||||
|
title: "Create & Dispatch Parcel",
|
||||||
|
readOnlyHint: false,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -42,6 +56,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "track_parcel",
|
name: "track_parcel",
|
||||||
description: "Query live, real-time tracking milestones and delivery telemetry across Steadfast, Pathao, RedX, and Paperfly networks using consignment ID or tracking code. READ-ONLY OPERATION: Does not alter shipment state or carrier data. Returns normalized status, current location, carrier status notes, and timestamp history. Returns structured error code 'CONSIGNMENT_NOT_FOUND' with 'couriers_checked' if the consignment does not exist. Carrier provider is auto-detected from consignment prefix if omitted.",
|
description: "Query live, real-time tracking milestones and delivery telemetry across Steadfast, Pathao, RedX, and Paperfly networks using consignment ID or tracking code. READ-ONLY OPERATION: Does not alter shipment state or carrier data. Returns normalized status, current location, carrier status notes, and timestamp history. Returns structured error code 'CONSIGNMENT_NOT_FOUND' with 'couriers_checked' if the consignment does not exist. Carrier provider is auto-detected from consignment prefix if omitted.",
|
||||||
|
annotations: {
|
||||||
|
title: "Track Parcel Live",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -61,6 +82,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "get_balance",
|
name: "get_balance",
|
||||||
description: "Retrieve live merchant cash-on-delivery (COD) vault balance from Steadfast, or check provider balance support across Pathao, RedX, Paperfly, or all 4 couriers simultaneously. READ-ONLY FINANCIAL INQUIRY: Steadfast returns live 'amount_bdt' and 'status: OK'; Pathao, RedX, and Paperfly return 'amount_bdt: null' and 'status: UNSUPPORTED_BY_PROVIDER' with merchant portal hints because their public APIs do not expose a balance endpoint.",
|
description: "Retrieve live merchant cash-on-delivery (COD) vault balance from Steadfast, or check provider balance support across Pathao, RedX, Paperfly, or all 4 couriers simultaneously. READ-ONLY FINANCIAL INQUIRY: Steadfast returns live 'amount_bdt' and 'status: OK'; Pathao, RedX, and Paperfly return 'amount_bdt: null' and 'status: UNSUPPORTED_BY_PROVIDER' with merchant portal hints because their public APIs do not expose a balance endpoint.",
|
||||||
|
annotations: {
|
||||||
|
title: "Get Merchant COD Balance",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -76,6 +104,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "check_fraud_risk",
|
name: "check_fraud_risk",
|
||||||
description: "Screen a customer phone number against live nationwide Bangladesh logistics databases (Steadfast & Pathao) and the BTRC 11-digit prefix validator for delivery success rate, cancellation counts, and return fraud risk level ('INVALID_NUMBER', 'NO_HISTORY', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL'). READ-ONLY DIAGNOSTIC QUERY: Returns null rates when a number is invalid or has 0 parcel history. Expects an 11-digit Bangladeshi mobile number ('01[3-9]XXXXXXXX').",
|
description: "Screen a customer phone number against live nationwide Bangladesh logistics databases (Steadfast & Pathao) and the BTRC 11-digit prefix validator for delivery success rate, cancellation counts, and return fraud risk level ('INVALID_NUMBER', 'NO_HISTORY', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL'). READ-ONLY DIAGNOSTIC QUERY: Returns null rates when a number is invalid or has 0 parcel history. Expects an 11-digit Bangladeshi mobile number ('01[3-9]XXXXXXXX').",
|
||||||
|
annotations: {
|
||||||
|
title: "Check Customer Fraud Risk",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -87,6 +122,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "validate_and_geocode_address",
|
name: "validate_and_geocode_address",
|
||||||
description: "Validate, clean, and geocode an unformatted Bangladesh delivery address into structured administrative boundaries (thana_input, thana_resolved, district, division), latitude/longitude coordinates, match_quality (road, house, area), needs_review flag, and a deliverability confidence score (0-100, capped at 60 when location_type != ROOFTOP) via Google Maps Platform Geocoding API with OpenStreetMap gazetteer fallback. READ-ONLY SPATIAL LOOKUP.",
|
description: "Validate, clean, and geocode an unformatted Bangladesh delivery address into structured administrative boundaries (thana_input, thana_resolved, district, division), latitude/longitude coordinates, match_quality (road, house, area), needs_review flag, and a deliverability confidence score (0-100, capped at 60 when location_type != ROOFTOP) via Google Maps Platform Geocoding API with OpenStreetMap gazetteer fallback. READ-ONLY SPATIAL LOOKUP.",
|
||||||
|
annotations: {
|
||||||
|
title: "Validate & Geocode Address",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -100,6 +142,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "calculate_delivery_zone_and_fee",
|
name: "calculate_delivery_zone_and_fee",
|
||||||
description: "Calculate standard delivery zone (inside_dhaka <=22km ৳80, sub_dhaka 22-45km ৳100, outside_dhaka >45km ৳150), road distance via Google Maps Platform Routes API, structured SLA hours ({min, max}), and applicable COD percentage for a single delivery destination using the unified tariff table (meta.source='static_tariff'). READ-ONLY ESTIMATION TOOL.",
|
description: "Calculate standard delivery zone (inside_dhaka <=22km ৳80, sub_dhaka 22-45km ৳100, outside_dhaka >45km ৳150), road distance via Google Maps Platform Routes API, structured SLA hours ({min, max}), and applicable COD percentage for a single delivery destination using the unified tariff table (meta.source='static_tariff'). READ-ONLY ESTIMATION TOOL.",
|
||||||
|
annotations: {
|
||||||
|
title: "Calculate Delivery Zone & Fee",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -113,6 +162,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "compare_courier_rates",
|
name: "compare_courier_rates",
|
||||||
description: "Execute side-by-side tariff, structured SLA ({min, max}), and COD collection fee comparisons across all four major Bangladeshi couriers (Steadfast, Pathao, RedX, Paperfly) for any destination nationwide using the unified tariff table (meta.source='static_tariff'). Evaluates exact parcel weight, declared COD amount, and optimization priority ('cheapest', 'fastest', 'balanced') to select the recommended courier. READ-ONLY CALCULATION ENGINE.",
|
description: "Execute side-by-side tariff, structured SLA ({min, max}), and COD collection fee comparisons across all four major Bangladeshi couriers (Steadfast, Pathao, RedX, Paperfly) for any destination nationwide using the unified tariff table (meta.source='static_tariff'). Evaluates exact parcel weight, declared COD amount, and optimization priority ('cheapest', 'fastest', 'balanced') to select the recommended courier. READ-ONLY CALCULATION ENGINE.",
|
||||||
|
annotations: {
|
||||||
|
title: "Compare Multi-Carrier Rates",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -131,6 +187,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "resolve_ndr_issue",
|
name: "resolve_ndr_issue",
|
||||||
description: "Verify that a consignment exists on the specified courier via 'track_parcel' and generate honest, draft-only Non-Delivery Report (NDR) re-engagement copy ('status: DRAFT_GENERATED', 'actions_executed: []'). GENERATION-ONLY TOOL: Verifies consignment_id first (returns CONSIGNMENT_NOT_FOUND if unknown), then generates proposed Bengali WhatsApp copy ('whatsapp_draft') and a carrier escalation ticket draft ('courier_ticket_draft') for manual merchant execution.",
|
description: "Verify that a consignment exists on the specified courier via 'track_parcel' and generate honest, draft-only Non-Delivery Report (NDR) re-engagement copy ('status: DRAFT_GENERATED', 'actions_executed: []'). GENERATION-ONLY TOOL: Verifies consignment_id first (returns CONSIGNMENT_NOT_FOUND if unknown), then generates proposed Bengali WhatsApp copy ('whatsapp_draft') and a carrier escalation ticket draft ('courier_ticket_draft') for manual merchant execution.",
|
||||||
|
annotations: {
|
||||||
|
title: "Generate NDR Resolution Draft",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -152,6 +215,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "cancel_parcel",
|
name: "cancel_parcel",
|
||||||
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.",
|
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.",
|
||||||
|
annotations: {
|
||||||
|
title: "Cancel Parcel Consignment",
|
||||||
|
readOnlyHint: false,
|
||||||
|
destructiveHint: true,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -162,9 +232,39 @@ export const TOOLS = [
|
|||||||
required: ["courier", "consignment_id"],
|
required: ["courier", "consignment_id"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "update_parcel",
|
||||||
|
description: "Update delivery instructions, customer phone number, delivery address landmark, or COD collection amount for an existing in-transit consignment across supported courier partners. STATE-MUTATING ACTION: Propagates updated delivery notes upstream to carrier dispatch centers.",
|
||||||
|
annotations: {
|
||||||
|
title: "Update In-Transit Parcel",
|
||||||
|
readOnlyHint: false,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
|
inputSchema: {
|
||||||
|
type: "object",
|
||||||
|
properties: {
|
||||||
|
courier: { type: "string", enum: ["steadfast", "pathao", "redx", "paperfly"], description: "Courier provider name" },
|
||||||
|
consignment_id: { type: "string", description: "Consignment ID or tracking code to update" },
|
||||||
|
recipient_phone: { type: "string", description: "Updated 11-digit phone number if customer requested change" },
|
||||||
|
recipient_address: { type: "string", description: "Updated delivery street address or landmark" },
|
||||||
|
cod_amount: { type: "number", description: "Updated Cash On Delivery amount in BDT" },
|
||||||
|
note: { type: "string", description: "Updated rider delivery instructions or reschedule note" },
|
||||||
|
},
|
||||||
|
required: ["courier", "consignment_id"],
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "bulk_create_parcels",
|
name: "bulk_create_parcels",
|
||||||
description: "Validate or book up to 100 parcels in a single batch with per-item error isolation, invoice idempotency, and optional dry_run preview mode. STATE-MUTATING ACTION (unless dry_run=true): Returns total, succeeded, failed, and per-item results.",
|
description: "Validate or book up to 100 parcels in a single batch with per-item error isolation, invoice idempotency, and optional dry_run preview mode. STATE-MUTATING ACTION (unless dry_run=true): Returns total, succeeded, failed, and per-item results.",
|
||||||
|
annotations: {
|
||||||
|
title: "Bulk Create Parcels",
|
||||||
|
readOnlyHint: false,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -198,6 +298,13 @@ export const TOOLS = [
|
|||||||
{
|
{
|
||||||
name: "get_webhook_events",
|
name: "get_webhook_events",
|
||||||
description: "Query verified courier webhook status events received by the server's /webhooks/{steadfast,pathao,redx,paperfly} endpoints. READ-ONLY DIAGNOSTIC TOOL: Filterable by consignment_id and ISO-8601 'since' timestamp.",
|
description: "Query verified courier webhook status events received by the server's /webhooks/{steadfast,pathao,redx,paperfly} endpoints. READ-ONLY DIAGNOSTIC TOOL: Filterable by consignment_id and ISO-8601 'since' timestamp.",
|
||||||
|
annotations: {
|
||||||
|
title: "Query Courier Webhook Events",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: false,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -300,6 +407,15 @@ export async function executeToolCall(registry, name, args = {}, tenantId = "def
|
|||||||
const result = await registry.cancelParcel(args?.courier, String(args?.consignment_id ?? ""), args?.reason ? String(args.reason) : undefined);
|
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 "update_parcel": {
|
||||||
|
const result = await registry.updateParcel(args?.courier, String(args?.consignment_id ?? ""), {
|
||||||
|
recipient_phone: args?.recipient_phone ? String(args.recipient_phone) : undefined,
|
||||||
|
recipient_address: args?.recipient_address ? String(args.recipient_address) : undefined,
|
||||||
|
cod_amount: args?.cod_amount !== undefined ? Number(args.cod_amount) : undefined,
|
||||||
|
note: args?.note ? String(args.note) : undefined,
|
||||||
|
});
|
||||||
|
return { isError: false, envelope: wrapSuccess(result, "live_api") };
|
||||||
|
}
|
||||||
case "bulk_create_parcels": {
|
case "bulk_create_parcels": {
|
||||||
const isDryRun = args?.dry_run !== undefined ? Boolean(args?.dry_run) : undefined;
|
const isDryRun = args?.dry_run !== undefined ? Boolean(args?.dry_run) : undefined;
|
||||||
const result = await registry.bulkCreateParcels(Array.isArray(args?.items) ? args.items : [], isDryRun, tenantId);
|
const result = await registry.bulkCreateParcels(Array.isArray(args?.items) ? args.items : [], isDryRun, tenantId);
|
||||||
|
|||||||
Vendored
+1
-1
@@ -11,6 +11,6 @@ function readPackageVersion() {
|
|||||||
catch {
|
catch {
|
||||||
// Fallback if package.json is unavailable at runtime
|
// Fallback if package.json is unavailable at runtime
|
||||||
}
|
}
|
||||||
return "2.6.1";
|
return "2.7.1";
|
||||||
}
|
}
|
||||||
export const APP_VERSION = readPackageVersion();
|
export const APP_VERSION = readPackageVersion();
|
||||||
|
|||||||
+106
-375
@@ -135,7 +135,6 @@
|
|||||||
}
|
}
|
||||||
.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;
|
||||||
@@ -1161,7 +1160,7 @@
|
|||||||
<section class="hero">
|
<section class="hero">
|
||||||
<div class="hero-left">
|
<div class="hero-left">
|
||||||
<div class="badge-chip">
|
<div class="badge-chip">
|
||||||
<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>📖</span>
|
||||||
<span data-i18n="badge_guide">Official Guide</span>
|
<span data-i18n="badge_guide">Official Guide</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1176,32 +1175,30 @@
|
|||||||
|
|
||||||
<div class="btn-row">
|
<div class="btn-row">
|
||||||
<a href="#simulator" class="btn btn-primary">
|
<a href="#simulator" class="btn btn-primary">
|
||||||
<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>
|
||||||
<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">
|
||||||
<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>
|
||||||
<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" 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 class="value-icon">🛡️</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" 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 class="value-icon">🚚</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" 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 class="value-icon">🔒</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>
|
||||||
@@ -1214,26 +1211,34 @@
|
|||||||
<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="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>
|
<svg viewBox="0 0 36 36" width="14" height="14" fill="none">
|
||||||
|
<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="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>
|
<svg viewBox="0 0 36 36" width="14" height="14" fill="none">
|
||||||
|
<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="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>
|
<svg viewBox="0 0 36 36" width="14" height="14" fill="none">
|
||||||
|
<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="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>
|
<svg viewBox="0 0 36 36" width="14" height="14" fill="none">
|
||||||
|
<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 class="hero-center-truck">
|
</div>
|
||||||
<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>
|
||||||
@@ -1241,7 +1246,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" 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>
|
<div class="sec-tag">⚖️ Architecture Choice</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>
|
||||||
@@ -1254,7 +1259,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"><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 class="compare-icon-wrap mcp"></></div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="check-list">
|
<ul class="check-list">
|
||||||
<li>
|
<li>
|
||||||
@@ -1283,7 +1288,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"><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 class="compare-icon-wrap dashboard">🖥️</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="check-list">
|
<ul class="check-list">
|
||||||
<li>
|
<li>
|
||||||
@@ -1310,7 +1315,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" 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>
|
<div class="sec-tag">🏪 Sandbox Experience</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>
|
||||||
@@ -1318,16 +1323,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)">
|
||||||
<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>
|
<span>🛒</span> WooCommerce
|
||||||
</button>
|
</button>
|
||||||
<button class="platform-tab" onclick="switchPlatform('shopify', this)">
|
<button class="platform-tab" onclick="switchPlatform('shopify', this)">
|
||||||
<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>
|
<span>🛍️</span> Shopify
|
||||||
</button>
|
</button>
|
||||||
<button class="platform-tab" onclick="switchPlatform('custom', this)">
|
<button class="platform-tab" onclick="switchPlatform('custom', this)">
|
||||||
<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>
|
<span></></span> Custom Store
|
||||||
</button>
|
</button>
|
||||||
<button class="platform-tab" onclick="switchPlatform('dashboard', this)">
|
<button class="platform-tab" onclick="switchPlatform('dashboard', this)">
|
||||||
<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>
|
<span>🖥️</span> Aura Client Dashboard
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1337,13 +1342,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">
|
||||||
<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>
|
<span>🛒</span> WooCommerce Simulation
|
||||||
</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"><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 class="sim-illu-box">🏬</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Right Simulated Order Card -->
|
<!-- Right Simulated Order Card -->
|
||||||
@@ -1353,8 +1358,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')" 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 safe active" onclick="loadSampleOrder('safe')">✔ Safe Order</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>
|
<button class="sample-pill risk" onclick="loadSampleOrder('risk')">❌ High Risk</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1380,8 +1385,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" style="display:flex;align-items:center;gap:6px;">
|
<div id="risk-title" class="risk-banner-title">
|
||||||
<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>
|
<span>✔</span> <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>
|
||||||
@@ -1392,25 +1397,36 @@
|
|||||||
<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" 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>
|
<svg viewBox="0 0 36 36" width="18" height="18" fill="none">
|
||||||
|
<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" 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>
|
<svg viewBox="0 0 36 36" width="18" height="18" fill="none">
|
||||||
|
<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" 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>
|
<svg viewBox="0 0 36 36" width="18" height="18" fill="none">
|
||||||
|
<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" 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>
|
<svg viewBox="0 0 36 36" width="18" height="18" fill="none">
|
||||||
|
<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()">
|
||||||
<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>
|
<span>🚀</span> <span id="btn-book-text" data-i18n="btn_book">Book with Selected Courier →</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1420,21 +1436,22 @@
|
|||||||
<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" 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 & Plans</span></div>
|
<div class="sec-tag">💳 Pricing & Plans</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">
|
||||||
<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>🎁</span>
|
||||||
<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"><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-plan-name">Courier MCP Starter</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>
|
||||||
@@ -1448,10 +1465,11 @@
|
|||||||
<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"><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-plan-name">MCP Pro ⭐</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,83 +1483,6 @@
|
|||||||
<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>
|
||||||
@@ -1549,30 +1490,59 @@
|
|||||||
<!-- ===== 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" 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>
|
<div class="sec-tag">📚 Developer Resources</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" 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-icon">📖</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" 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-icon"></></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="#ecommerce-plugins" class="res-card">
|
||||||
<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-icon">🛒</span>
|
||||||
<span class="res-title" data-i18n="res_3">Store Integration Guide</span>
|
<span class="res-title" data-i18n="res_3">WooCommerce & Shopify Plugins</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" 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-icon">❓</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>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- ===== Standalone E-Commerce Plugins (WooCommerce + Shopify) ===== -->
|
||||||
|
<section id="ecommerce-plugins" style="margin-bottom: 48px;">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="section-tag" style="display:inline-flex; align-items:center; gap:6px;">
|
||||||
|
<span>🛒 E-Commerce Connectors</span>
|
||||||
|
</div>
|
||||||
|
<h2 class="section-title">WooCommerce & Shopify Standalone Plugins</h2>
|
||||||
|
<p class="section-subtitle">CRM ছাড়াই সরাসরি আপনার WooCommerce বা Shopify স্টোর থেকে ১-ক্লিকে Steadfast, Pathao, RedX ও Paperfly পার্সেল বুকিং এবং ফ্রড চেক চালু করুন।</p>
|
||||||
|
</div>
|
||||||
|
<div style="display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:18px;">
|
||||||
|
<div style="background:var(--bg-panel); border:1px solid var(--border); border-radius:16px; padding:22px; display:flex; flex-direction:column; gap:12px;">
|
||||||
|
<div style="font-size:16px; font-weight:800; color:#fff;">🟣 WordPress / WooCommerce Plugin (.zip)</div>
|
||||||
|
<p style="font-size:13px; color:var(--text-muted); margin:0;">আপনার নিজের API Key সহ প্রি-লিংকড WordPress প্লাগইন ডাউনলোড করে <code>Plugins → Add New → Upload Plugin</code>-এ ইন্সটল করুন। অর্ডার লিস্টেই ১-ক্লিক কুরিয়ার বুকিং ও ফ্রড রিস্ক ব্যাজ পাবেন।</p>
|
||||||
|
<div style="display:flex; gap:10px; flex-wrap:wrap; margin-top:auto; padding-top:6px;">
|
||||||
|
<a href="https://client.auraajenticai.cloud/api/courier/plugin/download" target="_blank" rel="noopener" style="background:var(--cyan); color:#040914; font-weight:800; font-size:12.5px; padding:9px 14px; border-radius:9px; text-decoration:none;">⬇ Download WooCommerce .zip ↗</a>
|
||||||
|
<a href="https://client.auraajenticai.cloud/#view-woo" target="_blank" rel="noopener" style="border:1px solid var(--border-accent); color:var(--text); font-weight:700; font-size:12.5px; padding:9px 14px; border-radius:9px; text-decoration:none;">Open Store Setup ↗</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="background:var(--bg-panel); border:1px solid var(--border); border-radius:16px; padding:22px; display:flex; flex-direction:column; gap:12px;">
|
||||||
|
<div style="font-size:16px; font-weight:800; color:#fff;">🟢 Shopify Courier & Order Widget</div>
|
||||||
|
<p style="font-size:13px; color:var(--text-muted); margin:0;">Shopify Admin Webhook বা Aura Client Portal-এর Shopify কানেক্টর দিয়ে অটোমেটিক অর্ডার সিঙ্ক, COD ফ্রড স্ক্যান এবং স্টেডফাস্ট/পাঠাও ডিসপ্যাচ চালু করুন।</p>
|
||||||
|
<div style="display:flex; gap:10px; flex-wrap:wrap; margin-top:auto; padding-top:6px;">
|
||||||
|
<a href="https://client.auraajenticai.cloud/#view-shop" target="_blank" rel="noopener" style="background:var(--emerald); color:#040914; font-weight:800; font-size:12.5px; padding:9px 14px; border-radius:9px; text-decoration:none;">Connect Shopify Store ↗</a>
|
||||||
|
<a href="/mcp" style="border:1px solid var(--border-accent); color:var(--text); font-weight:700; font-size:12.5px; padding:9px 14px; border-radius:9px; text-decoration:none;">Test 13 MCP Tools →</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<!-- ===== AI Agent & IDE Configurations Vault ===== -->
|
<!-- ===== AI Agent & IDE Configurations Vault ===== -->
|
||||||
<section id="agent-configs" style="margin-bottom: 48px;">
|
<section id="agent-configs" style="margin-bottom: 48px;">
|
||||||
@@ -1613,7 +1583,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-json-text">Copy JSON</span>
|
<span id="copy-btn-text">Copy JSON</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1635,7 +1605,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.1</span>
|
<span class="version-pill">v2.7.1</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="footer-tagline">
|
<p class="footer-tagline">
|
||||||
@@ -1682,12 +1652,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">
|
||||||
<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>
|
<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">
|
||||||
<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>
|
<span>📦 npm Package (v2.7.1)</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1711,12 +1681,12 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://auraajenticai.cloud" target="_blank" rel="noopener">
|
<a href="https://auraajenticai.cloud" target="_blank" rel="noopener">
|
||||||
<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>
|
<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">
|
||||||
<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>
|
<span>🚀 Client Dashboard Portal</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1742,7 +1712,7 @@
|
|||||||
|
|
||||||
<!-- Toast Notification -->
|
<!-- Toast Notification -->
|
||||||
<div id="toast" class="toast-modal">
|
<div id="toast" class="toast-modal">
|
||||||
<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>
|
<span style="font-size:20px;">🚀</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>
|
||||||
@@ -1750,247 +1720,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Background Canvas Script -->
|
<!-- Background Canvas Script -->
|
||||||
<script src="/assets/courier-canvas.js?v=2.6.1"></script>
|
<script src="/assets/courier-canvas.js"></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',
|
||||||
@@ -2004,7 +1735,7 @@
|
|||||||
},
|
},
|
||||||
"aura-courier-local": {
|
"aura-courier-local": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "aura-courier-mcp@2.6.1"],
|
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"],
|
||||||
"env": { "PORT": "8080" }
|
"env": { "PORT": "8080" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2021,7 +1752,7 @@
|
|||||||
},
|
},
|
||||||
"aura-courier-stdio": {
|
"aura-courier-stdio": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "aura-courier-mcp@2.6.1"]
|
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, null, 2)
|
}, null, 2)
|
||||||
@@ -2091,7 +1822,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-json-text');
|
const txt = document.getElementById('copy-btn-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
@@ -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.1 · Telemetry</span>
|
<span class="brand-sub">v2.7.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.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>
|
<p>Aura Courier MCP v2.7.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>
|
||||||
|
|||||||
+1112
-97
File diff suppressed because it is too large
Load Diff
+1
-2
@@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"aura-courier": {
|
"aura-courier": {
|
||||||
"url": "https://courier.auraajenticai.cloud/mcp",
|
"serverUrl": "https://courier.auraajenticai.cloud/mcp"
|
||||||
"transport": "streamable-http"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-4
@@ -326,7 +326,7 @@
|
|||||||
<main>
|
<main>
|
||||||
<div class="hero-banner">
|
<div class="hero-banner">
|
||||||
<h1 class="hero-title">Streamable-HTTP MCP Protocol Explorer</h1>
|
<h1 class="hero-title">Streamable-HTTP MCP Protocol Explorer</h1>
|
||||||
<p class="hero-desc">Test MCP JSON-RPC 2.0 initialize handshakes, inspect the 9 registered tool schemas, and connect Gemini, Claude, Cursor & n8n agents directly to this remote endpoint.</p>
|
<p class="hero-desc">Test MCP JSON-RPC 2.0 initialize handshakes, inspect all 13 registered tool schemas, and connect Gemini, Claude, Cursor & n8n agents directly to this remote endpoint.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Endpoint Overview -->
|
<!-- Endpoint Overview -->
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
"capabilities": {},
|
"capabilities": {},
|
||||||
"clientInfo": {
|
"clientInfo": {
|
||||||
"name": "Aura-Playground",
|
"name": "Aura-Playground",
|
||||||
"version": "2.6.1"
|
"version": "2.7.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}</textarea>
|
}</textarea>
|
||||||
@@ -381,7 +381,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Registered Tools Catalog -->
|
<!-- Registered Tools Catalog -->
|
||||||
<h2 class="tools-section-title">Registered MCP Tools (9 Tools)</h2>
|
<h2 class="tools-section-title">Registered MCP Tools (13 Tools)</h2>
|
||||||
<div class="tools-list">
|
<div class="tools-list">
|
||||||
<div class="tool-box">
|
<div class="tool-box">
|
||||||
<div class="tool-name">1. list_couriers</div>
|
<div class="tool-name">1. list_couriers</div>
|
||||||
@@ -428,11 +428,31 @@
|
|||||||
<div class="tool-desc">Non-Delivery Report triage with automated WhatsApp templates and re-dispatch commands.</div>
|
<div class="tool-desc">Non-Delivery Report triage with automated WhatsApp templates and re-dispatch commands.</div>
|
||||||
<div class="tool-schema">Input: tracking_code, reason · Returns: triage plan & whatsapp text</div>
|
<div class="tool-schema">Input: tracking_code, reason · Returns: triage plan & whatsapp text</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tool-box">
|
||||||
|
<div class="tool-name">10. cancel_parcel</div>
|
||||||
|
<div class="tool-desc">Cancel booked parcels or dispatch carrier cancellation requests across Steadfast, Pathao, RedX & Paperfly.</div>
|
||||||
|
<div class="tool-schema">Input: courier, consignment_id, reason? · Returns: cancellation status</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-box">
|
||||||
|
<div class="tool-name">11. update_parcel</div>
|
||||||
|
<div class="tool-desc">Update in-transit parcel delivery instructions, recipient phone, landmark address, or COD amount.</div>
|
||||||
|
<div class="tool-schema">Input: courier, consignment_id, note?, phone?, cod_amount? · Returns: update result</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-box">
|
||||||
|
<div class="tool-name">12. bulk_create_parcels</div>
|
||||||
|
<div class="tool-desc">Validate or book up to 100 parcels in a single batch call with isolated error handling and dry-run support.</div>
|
||||||
|
<div class="tool-schema">Input: items[], dry_run? · Returns: per-item booking summary</div>
|
||||||
|
</div>
|
||||||
|
<div class="tool-box">
|
||||||
|
<div class="tool-name">13. get_webhook_events</div>
|
||||||
|
<div class="tool-desc">Retrieve recent real-time carrier webhook events (Pathao, Steadfast, RedX, Paperfly) for parcel status sync.</div>
|
||||||
|
<div class="tool-schema">Input: courier?, limit? · Returns: recent normalized webhook events</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<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>
|
<p>Aura Courier MCP v2.7.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>
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "aura-courier-mcp",
|
"name": "aura-courier-mcp",
|
||||||
"version": "2.6.1",
|
"version": "2.7.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "aura-courier-mcp",
|
"name": "aura-courier-mcp",
|
||||||
"version": "2.6.1",
|
"version": "2.7.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@modelcontextprotocol/sdk": "^1.12.0",
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aura-courier-mcp",
|
"name": "aura-courier-mcp",
|
||||||
"version": "2.6.1",
|
"version": "2.7.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",
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"test": "node --test test/v260.test.mjs",
|
"test": "node --test test/v260.test.mjs test/oauth21.test.mjs",
|
||||||
"prepublishOnly": "npm run test && 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",
|
||||||
|
|||||||
+8
-3
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "https://antigravity.google/schemas/v1/plugin.json",
|
||||||
"name": "aura-courier",
|
"name": "aura-courier",
|
||||||
"displayName": "Aura Courier MCP",
|
"displayName": "Aura Courier MCP",
|
||||||
"version": "2.6.1",
|
"version": "2.7.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",
|
||||||
@@ -21,6 +22,8 @@
|
|||||||
"tier": "Google Cloud Partner Advantage"
|
"tier": "Google Cloud Partner Advantage"
|
||||||
},
|
},
|
||||||
"homepage": "https://courier.auraajenticai.cloud",
|
"homepage": "https://courier.auraajenticai.cloud",
|
||||||
|
"privacyPolicyUrl": "https://courier.auraajenticai.cloud/privacy",
|
||||||
|
"termsOfServiceUrl": "https://courier.auraajenticai.cloud/terms",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/auraajenticai/aura-courier-mcp.git"
|
"url": "https://github.com/auraajenticai/aura-courier-mcp.git"
|
||||||
@@ -38,13 +41,15 @@
|
|||||||
"cod",
|
"cod",
|
||||||
"fraud-detection",
|
"fraud-detection",
|
||||||
"geocoding",
|
"geocoding",
|
||||||
"ecommerce"
|
"ecommerce",
|
||||||
|
"oauth2"
|
||||||
],
|
],
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"aura-courier": {
|
"aura-courier": {
|
||||||
|
"serverUrl": "https://courier.auraajenticai.cloud/mcp",
|
||||||
"url": "https://courier.auraajenticai.cloud/mcp",
|
"url": "https://courier.auraajenticai.cloud/mcp",
|
||||||
"transport": "streamable-http",
|
"transport": "streamable-http",
|
||||||
"description": "Universal Bangladesh Courier MCP Hub providing 9 live logistics tools"
|
"description": "Universal Bangladesh Courier MCP Hub providing 13 live logistics & spatial intelligence tools with OAuth 2.1 + PKCE"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -254,7 +254,7 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>Aura Courier MCP v2.6.1 · Developed by <b>Aura Agentic AI</b> · Released under <b>Apache License 2.0</b></p>
|
<p>Aura Courier MCP v2.7.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> ·
|
||||||
|
|||||||
+9
-3
@@ -3,17 +3,23 @@
|
|||||||
"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.1",
|
"version": "2.7.1",
|
||||||
"websiteUrl": "https://github.com/auraajenticai/aura-courier-mcp",
|
"websiteUrl": "https://courier.auraajenticai.cloud",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "https://github.com/auraajenticai/aura-courier-mcp",
|
"url": "https://github.com/auraajenticai/aura-courier-mcp",
|
||||||
"source": "github"
|
"source": "github"
|
||||||
},
|
},
|
||||||
|
"remotes": [
|
||||||
|
{
|
||||||
|
"type": "streamable-http",
|
||||||
|
"url": "https://courier.auraajenticai.cloud/mcp"
|
||||||
|
}
|
||||||
|
],
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"registryType": "npm",
|
"registryType": "npm",
|
||||||
"identifier": "aura-courier-mcp",
|
"identifier": "aura-courier-mcp",
|
||||||
"version": "2.6.1",
|
"version": "2.7.1",
|
||||||
"transport": {
|
"transport": {
|
||||||
"type": "stdio"
|
"type": "stdio"
|
||||||
},
|
},
|
||||||
|
|||||||
+75
-373
@@ -135,7 +135,6 @@
|
|||||||
}
|
}
|
||||||
.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;
|
||||||
@@ -1161,7 +1160,7 @@
|
|||||||
<section class="hero">
|
<section class="hero">
|
||||||
<div class="hero-left">
|
<div class="hero-left">
|
||||||
<div class="badge-chip">
|
<div class="badge-chip">
|
||||||
<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>📖</span>
|
||||||
<span data-i18n="badge_guide">Official Guide</span>
|
<span data-i18n="badge_guide">Official Guide</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1176,32 +1175,30 @@
|
|||||||
|
|
||||||
<div class="btn-row">
|
<div class="btn-row">
|
||||||
<a href="#simulator" class="btn btn-primary">
|
<a href="#simulator" class="btn btn-primary">
|
||||||
<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>
|
||||||
<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">
|
||||||
<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>
|
||||||
<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" 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 class="value-icon">🛡️</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" 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 class="value-icon">🚚</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" 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 class="value-icon">🔒</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>
|
||||||
@@ -1214,26 +1211,34 @@
|
|||||||
<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="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>
|
<svg viewBox="0 0 36 36" width="14" height="14" fill="none">
|
||||||
|
<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="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>
|
<svg viewBox="0 0 36 36" width="14" height="14" fill="none">
|
||||||
|
<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="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>
|
<svg viewBox="0 0 36 36" width="14" height="14" fill="none">
|
||||||
|
<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="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>
|
<svg viewBox="0 0 36 36" width="14" height="14" fill="none">
|
||||||
|
<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 class="hero-center-truck">
|
</div>
|
||||||
<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>
|
||||||
@@ -1241,7 +1246,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" 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>
|
<div class="sec-tag">⚖️ Architecture Choice</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>
|
||||||
@@ -1254,7 +1259,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"><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 class="compare-icon-wrap mcp"></></div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="check-list">
|
<ul class="check-list">
|
||||||
<li>
|
<li>
|
||||||
@@ -1283,7 +1288,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"><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 class="compare-icon-wrap dashboard">🖥️</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="check-list">
|
<ul class="check-list">
|
||||||
<li>
|
<li>
|
||||||
@@ -1310,7 +1315,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" 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>
|
<div class="sec-tag">🏪 Sandbox Experience</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>
|
||||||
@@ -1318,16 +1323,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)">
|
||||||
<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>
|
<span>🛒</span> WooCommerce
|
||||||
</button>
|
</button>
|
||||||
<button class="platform-tab" onclick="switchPlatform('shopify', this)">
|
<button class="platform-tab" onclick="switchPlatform('shopify', this)">
|
||||||
<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>
|
<span>🛍️</span> Shopify
|
||||||
</button>
|
</button>
|
||||||
<button class="platform-tab" onclick="switchPlatform('custom', this)">
|
<button class="platform-tab" onclick="switchPlatform('custom', this)">
|
||||||
<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>
|
<span></></span> Custom Store
|
||||||
</button>
|
</button>
|
||||||
<button class="platform-tab" onclick="switchPlatform('dashboard', this)">
|
<button class="platform-tab" onclick="switchPlatform('dashboard', this)">
|
||||||
<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>
|
<span>🖥️</span> Aura Client Dashboard
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1337,13 +1342,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">
|
||||||
<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>
|
<span>🛒</span> WooCommerce Simulation
|
||||||
</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"><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 class="sim-illu-box">🏬</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Right Simulated Order Card -->
|
<!-- Right Simulated Order Card -->
|
||||||
@@ -1353,8 +1358,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')" 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 safe active" onclick="loadSampleOrder('safe')">✔ Safe Order</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>
|
<button class="sample-pill risk" onclick="loadSampleOrder('risk')">❌ High Risk</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1380,8 +1385,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" style="display:flex;align-items:center;gap:6px;">
|
<div id="risk-title" class="risk-banner-title">
|
||||||
<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>
|
<span>✔</span> <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>
|
||||||
@@ -1392,25 +1397,36 @@
|
|||||||
<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" 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>
|
<svg viewBox="0 0 36 36" width="18" height="18" fill="none">
|
||||||
|
<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" 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>
|
<svg viewBox="0 0 36 36" width="18" height="18" fill="none">
|
||||||
|
<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" 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>
|
<svg viewBox="0 0 36 36" width="18" height="18" fill="none">
|
||||||
|
<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" 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>
|
<svg viewBox="0 0 36 36" width="18" height="18" fill="none">
|
||||||
|
<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()">
|
||||||
<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>
|
<span>🚀</span> <span id="btn-book-text" data-i18n="btn_book">Book with Selected Courier →</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1420,21 +1436,22 @@
|
|||||||
<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" 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 & Plans</span></div>
|
<div class="sec-tag">💳 Pricing & Plans</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">
|
||||||
<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>🎁</span>
|
||||||
<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"><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-plan-name">Courier MCP Starter</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>
|
||||||
@@ -1448,10 +1465,11 @@
|
|||||||
<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"><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-plan-name">MCP Pro ⭐</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,83 +1483,6 @@
|
|||||||
<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>
|
||||||
@@ -1549,25 +1490,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" 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>
|
<div class="sec-tag">📚 Developer Resources</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" 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-icon">📖</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" 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-icon"></></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" 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-icon">🏪</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" 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-icon">❓</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>
|
||||||
@@ -1613,7 +1554,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-json-text">Copy JSON</span>
|
<span id="copy-btn-text">Copy JSON</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1635,7 +1576,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.1</span>
|
<span class="version-pill">v2.7.1</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="footer-tagline">
|
<p class="footer-tagline">
|
||||||
@@ -1682,12 +1623,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">
|
||||||
<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>
|
<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">
|
||||||
<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>
|
<span>📦 npm Package (v2.7.1)</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1711,12 +1652,12 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://auraajenticai.cloud" target="_blank" rel="noopener">
|
<a href="https://auraajenticai.cloud" target="_blank" rel="noopener">
|
||||||
<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>
|
<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">
|
||||||
<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>
|
<span>🚀 Client Dashboard Portal</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1742,7 +1683,7 @@
|
|||||||
|
|
||||||
<!-- Toast Notification -->
|
<!-- Toast Notification -->
|
||||||
<div id="toast" class="toast-modal">
|
<div id="toast" class="toast-modal">
|
||||||
<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>
|
<span style="font-size:20px;">🚀</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>
|
||||||
@@ -1750,247 +1691,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Background Canvas Script -->
|
<!-- Background Canvas Script -->
|
||||||
<script src="/assets/courier-canvas.js?v=2.6.1"></script>
|
<script src="/assets/courier-canvas.js"></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',
|
||||||
@@ -2004,7 +1706,7 @@
|
|||||||
},
|
},
|
||||||
"aura-courier-local": {
|
"aura-courier-local": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "aura-courier-mcp@2.6.1"],
|
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"],
|
||||||
"env": { "PORT": "8080" }
|
"env": { "PORT": "8080" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2021,7 +1723,7 @@
|
|||||||
},
|
},
|
||||||
"aura-courier-stdio": {
|
"aura-courier-stdio": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "aura-courier-mcp@2.6.1"]
|
"args": ["-y", "@auraajenticai/aura-courier-mcp@2.6.0"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, null, 2)
|
}, null, 2)
|
||||||
@@ -2091,7 +1793,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-json-text');
|
const txt = document.getElementById('copy-btn-text');
|
||||||
if (txt) {
|
if (txt) {
|
||||||
txt.innerText = 'Copied!';
|
txt.innerText = 'Copied!';
|
||||||
setTimeout(() => txt.innerText = 'Copy JSON', 2000);
|
setTimeout(() => txt.innerText = 'Copy JSON', 2000);
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ description: >-
|
|||||||
carrier rates, or resolving NDR delivery issues across Steadfast, Pathao, RedX, and Paperfly.
|
carrier rates, or resolving NDR delivery issues across Steadfast, Pathao, RedX, and Paperfly.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Bangladesh Courier Operations & Zero-Risk COD Hub (v2.4.2)
|
# Bangladesh Courier Operations & Zero-Risk COD Hub (v2.7.1)
|
||||||
|
|
||||||
This skill provides complete operational runbooks, tool execution patterns, and domain intelligence for managing nationwide e-commerce logistics across Bangladesh via the **Aura Courier MCP** remote server (`https://courier.auraajenticai.cloud/mcp`).
|
This skill provides complete operational runbooks, tool execution patterns, and domain intelligence for managing nationwide e-commerce logistics across Bangladesh via the **Aura Courier MCP** remote server (`https://courier.auraajenticai.cloud/mcp`, OAuth 2.1 + PKCE `S256` & Dual-Auth).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 1. Tool Catalog & Capabilities (9 Live Production Tools)
|
## 1. Tool Catalog & Capabilities (13 Live Production Tools)
|
||||||
|
|
||||||
The remote MCP server exposes 9 specialized logistics tools:
|
The remote MCP server exposes 13 specialized logistics and spatial intelligence tools (each annotated with MCP `readOnlyHint`, `destructiveHint`, `idempotentHint`, and `openWorldHint`):
|
||||||
|
|
||||||
### 1. `list_couriers`
|
### 1. `list_couriers`
|
||||||
* **Purpose**: Inspect currently configured carrier credentials (Steadfast, Pathao, RedX, Paperfly) and verify Google Maps Platform spatial routing readiness.
|
* **Purpose**: Inspect currently configured carrier credentials (Steadfast, Pathao, RedX, Paperfly) and verify Google Maps Platform spatial routing readiness.
|
||||||
@@ -137,6 +137,30 @@ The remote MCP server exposes 9 specialized logistics tools:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### 10. `cancel_parcel`
|
||||||
|
* **Purpose**: Cancel an existing parcel consignment across Steadfast, Pathao, RedX, or Paperfly (`destructiveHint: true`). Executes live upstream cancellation on Pathao, RedX, and Paperfly; validates eligibility and provides portal guidance on Steadfast.
|
||||||
|
* **Input Schema**: `courier` *(required)*, `consignment_id` *(required)*, `reason` *(optional)*.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 11. `update_parcel`
|
||||||
|
* **Purpose**: Update delivery instructions, recipient phone, address landmark, or COD amount on an existing in-transit consignment (`readOnlyHint: false`).
|
||||||
|
* **Input Schema**: `courier` *(required)*, `consignment_id` *(required)*, `recipient_phone`, `recipient_address`, `cod_amount`, `note`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 12. `bulk_create_parcels`
|
||||||
|
* **Purpose**: Validate (`dry_run: true`) or book up to 100 parcels in one batch with per-item error isolation and per-tenant invoice idempotency (`readOnlyHint: false`).
|
||||||
|
* **Input Schema**: `items[]` *(required, 1–100 parcel objects)*, `dry_run` *(optional boolean)*.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 13. `get_webhook_events`
|
||||||
|
* **Purpose**: Query verified real-time courier webhook status events recorded from Steadfast, Pathao, RedX, and Paperfly (`readOnlyHint: true`).
|
||||||
|
* **Input Schema**: `consignment_id` *(optional)*, `since` *(optional ISO-8601 timestamp)*.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 2. Progressive Disclosure & Order Lifecycle Workflow
|
## 2. Progressive Disclosure & Order Lifecycle Workflow
|
||||||
|
|
||||||
When executing parcel fulfillment, follow this 4-step progressive lifecycle:
|
When executing parcel fulfillment, follow this 4-step progressive lifecycle:
|
||||||
|
|||||||
+110
-8
@@ -14,7 +14,12 @@ import {
|
|||||||
resolveAuthContext,
|
resolveAuthContext,
|
||||||
verifyWebhookSignature,
|
verifyWebhookSignature,
|
||||||
recordAuditLog,
|
recordAuditLog,
|
||||||
|
initDynamicAuthStore,
|
||||||
|
upsertDynamicKeyHash,
|
||||||
|
setTenantDynamicKeyStatus,
|
||||||
|
listDynamicKeySummaries,
|
||||||
} from "./middleware/auth.js";
|
} from "./middleware/auth.js";
|
||||||
|
import { registerOAuthRoutes, buildWwwAuthenticateHeader } from "./middleware/oauth.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 { APP_VERSION } from "./version.js";
|
||||||
@@ -32,6 +37,7 @@ 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);
|
setRegistryDbPool(dbPool);
|
||||||
|
initDynamicAuthStore(dbPool).catch(() => {});
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.warn("[PostgreSQL] Connection initialization skipped:", err?.message);
|
console.warn("[PostgreSQL] Connection initialization skipped:", err?.message);
|
||||||
}
|
}
|
||||||
@@ -57,6 +63,7 @@ const PORT = Number(process.env.PORT || 8080);
|
|||||||
const APP_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
const APP_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||||
const LANDING = path.join(APP_DIR, "index.html");
|
const LANDING = path.join(APP_DIR, "index.html");
|
||||||
const PRIVACY_HTML = path.join(APP_DIR, "privacy.html");
|
const PRIVACY_HTML = path.join(APP_DIR, "privacy.html");
|
||||||
|
const TERMS_HTML = path.join(APP_DIR, "terms.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");
|
||||||
@@ -95,7 +102,22 @@ function redactAddressToDistrict(addr: string): string {
|
|||||||
*/
|
*/
|
||||||
export function keysFromRequest(req: Request): EnvSource {
|
export function keysFromRequest(req: Request): EnvSource {
|
||||||
const h = req.headers;
|
const h = req.headers;
|
||||||
const allowMasterEnvFallback = req.auraAuth?.tenantId === "master";
|
// Strict Multi-Tenant & BYOK Isolation:
|
||||||
|
// If caller explicitly sends any BYOK courier headers (isByok === true), NEVER fall back to
|
||||||
|
// platform master courier env keys so vendor/merchant BYOK credentials never mix with central keys.
|
||||||
|
const isByokRequest = Boolean(
|
||||||
|
req.auraAuth?.isByok ||
|
||||||
|
h["x-steadfast-api-key"] ||
|
||||||
|
h["x-pathao-client-id"] ||
|
||||||
|
h["x-redx-api-token"] ||
|
||||||
|
h["x-paperfly-api-key"]
|
||||||
|
);
|
||||||
|
const isPublicFraudCheck =
|
||||||
|
req.auraAuth?.tenantId === "public_ro" &&
|
||||||
|
req.body?.method === "tools/call" &&
|
||||||
|
req.body?.params?.name === "check_fraud_risk";
|
||||||
|
const allowMasterEnvFallback =
|
||||||
|
(req.auraAuth?.tenantId === "master" || isPublicFraudCheck) && !isByokRequest;
|
||||||
|
|
||||||
const pick = (header: string, envVar?: string, allowNonMasterEnv = false): string | undefined => {
|
const pick = (header: string, envVar?: string, allowNonMasterEnv = false): string | undefined => {
|
||||||
const hv = h[header];
|
const hv = h[header];
|
||||||
@@ -129,12 +151,14 @@ export function keysFromRequest(req: Request): EnvSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const app: Express = express();
|
export const app: Express = express();
|
||||||
|
app.set("trust proxy", 1);
|
||||||
app.use(express.json({
|
app.use(express.json({
|
||||||
limit: "1mb",
|
limit: "1mb",
|
||||||
verify: (req: any, _res, buf) => {
|
verify: (req: any, _res, buf) => {
|
||||||
req.rawBody = buf;
|
req.rawBody = buf;
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
app.use(express.urlencoded({ extended: false, limit: "1mb" }));
|
||||||
|
|
||||||
// Robust Malformed JSON Syntax Error Guard
|
// Robust Malformed JSON Syntax Error Guard
|
||||||
app.use((err: any, _req: Request, res: Response, next: any) => {
|
app.use((err: any, _req: Request, res: Response, next: any) => {
|
||||||
@@ -164,7 +188,7 @@ app.use((req, res, next) => {
|
|||||||
"Access-Control-Allow-Headers",
|
"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"
|
"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-Expose-Headers", "mcp-session-id");
|
res.header("Access-Control-Expose-Headers", "mcp-session-id, WWW-Authenticate");
|
||||||
if (req.method === "OPTIONS") {
|
if (req.method === "OPTIONS") {
|
||||||
return res.sendStatus(204);
|
return res.sendStatus(204);
|
||||||
}
|
}
|
||||||
@@ -180,8 +204,56 @@ app.get("/favicon.ico", (_req, res) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Standard MCP OAuth 2.1 + PKCE (S256) + RFC 9728 + RFC 8414 + RFC 7591 Dynamic Client Registration
|
||||||
|
registerOAuthRoutes(app);
|
||||||
|
|
||||||
app.use(optionalAuthMiddleware);
|
app.use(optionalAuthMiddleware);
|
||||||
|
|
||||||
|
|
||||||
|
// Dynamic Tenant API Key Sync & Revocation Routes (Called by Snehalata / Admin Master Key)
|
||||||
|
app.get("/admin/tokens", (req: Request, res: Response) => {
|
||||||
|
if (!req.auraAuth?.authenticated || !req.auraAuth?.isAdmin) {
|
||||||
|
return res.status(401).json(wrapError(new McpToolError({ code: "UNAUTHORIZED", message: "Master admin token required." }), "validator"));
|
||||||
|
}
|
||||||
|
return res.json({ ok: true, tokens: listDynamicKeySummaries() });
|
||||||
|
});
|
||||||
|
|
||||||
|
app.post("/admin/tokens/register", async (req: Request, res: Response) => {
|
||||||
|
if (!req.auraAuth?.authenticated || !req.auraAuth?.isAdmin) {
|
||||||
|
return res.status(401).json(wrapError(new McpToolError({ code: "UNAUTHORIZED", message: "Master admin token required." }), "validator"));
|
||||||
|
}
|
||||||
|
const b = req.body || {};
|
||||||
|
if ((!b.tokenHash && !b.rawToken) || !b.tenantId) {
|
||||||
|
return res.status(400).json(wrapError(new McpToolError({ code: "INVALID_INPUT", message: "tenantId and tokenHash (or rawToken) required." }), "validator"));
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const rec = await upsertDynamicKeyHash({
|
||||||
|
tokenHash: b.tokenHash,
|
||||||
|
rawToken: b.rawToken,
|
||||||
|
tenantId: String(b.tenantId),
|
||||||
|
storeName: b.storeName ? String(b.storeName) : undefined,
|
||||||
|
scopes: Array.isArray(b.scopes) ? b.scopes : ["read", "write"],
|
||||||
|
isAdmin: Boolean(b.isAdmin),
|
||||||
|
status: String(b.status || "ACTIVE"),
|
||||||
|
});
|
||||||
|
return res.json({ ok: true, tenantId: rec.tenantId, status: rec.status, hashPrefix: rec.tokenHash.slice(0, 10) });
|
||||||
|
} catch (err: any) {
|
||||||
|
return res.status(500).json(wrapError(err, "validator"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
app.post("/admin/tokens/revoke", async (req: Request, res: Response) => {
|
||||||
|
if (!req.auraAuth?.authenticated || !req.auraAuth?.isAdmin) {
|
||||||
|
return res.status(401).json(wrapError(new McpToolError({ code: "UNAUTHORIZED", message: "Master admin token required." }), "validator"));
|
||||||
|
}
|
||||||
|
const b = req.body || {};
|
||||||
|
if (!b.tenantId) {
|
||||||
|
return res.status(400).json(wrapError(new McpToolError({ code: "INVALID_INPUT", message: "tenantId required." }), "validator"));
|
||||||
|
}
|
||||||
|
const count = await setTenantDynamicKeyStatus(String(b.tenantId), String(b.status || "PAYMENT_DUE"));
|
||||||
|
return res.json({ ok: true, tenantId: b.tenantId, updatedKeys: count, status: b.status || "PAYMENT_DUE" });
|
||||||
|
});
|
||||||
|
|
||||||
const mcpLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 60, name: "MCP Protocol Gateway" });
|
const mcpLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 60, name: "MCP Protocol Gateway" });
|
||||||
const trackingLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 120, name: "Tracking Gateway" });
|
const trackingLimiter = createRateLimiter({ windowMs: 60 * 1000, max: 120, name: "Tracking Gateway" });
|
||||||
|
|
||||||
@@ -355,6 +427,7 @@ app.get("/mcp", mcpLimiter, async (req: Request, res: Response) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!req.auraAuth?.authenticated) {
|
if (!req.auraAuth?.authenticated) {
|
||||||
|
res.setHeader("WWW-Authenticate", buildWwwAuthenticateHeader(req, req.auraAuth?.tenantId === "invalid"));
|
||||||
return res.status(401).json(
|
return res.status(401).json(
|
||||||
wrapError(
|
wrapError(
|
||||||
new McpToolError({
|
new McpToolError({
|
||||||
@@ -490,6 +563,12 @@ function handleCourierWebhook(provider: SupportedCourier) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const payload = req.body || {};
|
const payload = req.body || {};
|
||||||
|
if (provider === "pathao" && String(payload.event || "").toLowerCase() === "webhook_integration") {
|
||||||
|
const secret = process.env.PATHAO_CLIENT_SECRET || process.env.AURA_WEBHOOK_SECRET || "";
|
||||||
|
if (secret) res.setHeader("X-Pathao-Merchant-Webhook-Integration-Secret", secret);
|
||||||
|
return res.status(202).json({ ok: true, status: "webhook_verified" });
|
||||||
|
}
|
||||||
|
|
||||||
const consignmentId =
|
const consignmentId =
|
||||||
payload.consignment_id ||
|
payload.consignment_id ||
|
||||||
payload.merchant_order_id ||
|
payload.merchant_order_id ||
|
||||||
@@ -513,7 +592,8 @@ function handleCourierWebhook(provider: SupportedCourier) {
|
|||||||
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 paramMerchantToken = req.params?.merchant_token ? String(req.params.merchant_token).trim() : "";
|
||||||
|
const tenantId = String(paramMerchantToken || req.query.tenant || req.headers["x-tenant-id"] || "default");
|
||||||
|
|
||||||
const record = {
|
const record = {
|
||||||
id: randomUUID(),
|
id: randomUUID(),
|
||||||
@@ -529,14 +609,28 @@ function handleCourierWebhook(provider: SupportedCourier) {
|
|||||||
// F06: Record webhook event scoped by tenantId
|
// F06: Record webhook event scoped by tenantId
|
||||||
recordWebhookEvent(record, tenantId);
|
recordWebhookEvent(record, tenantId);
|
||||||
|
|
||||||
|
// Forward verified Pathao financial events best-effort to Snehalata Financial Manager
|
||||||
|
if (provider === "pathao" && process.env.NODE_ENV !== "test" && /deliver|return|paid|settlement|invoice/i.test(`${status} ${eventType}`)) {
|
||||||
|
const fwdUrl = process.env.SNEHALATA_WEBHOOK_URL || "https://www.snehalata.com/api/webhooks/pathao";
|
||||||
|
const sig = String(req.headers["x-pathao-signature"] || process.env.PATHAO_CLIENT_SECRET || "");
|
||||||
|
if (fwdUrl && sig) {
|
||||||
|
fetch(fwdUrl, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json", "X-Pathao-Signature": sig },
|
||||||
|
body: JSON.stringify(payload),
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return res.status(200).json(
|
return res.status(200).json(
|
||||||
wrapSuccess(
|
wrapSuccess(
|
||||||
{
|
{
|
||||||
status: "success",
|
status: "success",
|
||||||
courier: provider,
|
courier: provider,
|
||||||
|
tenant_scope: tenantId,
|
||||||
consignment_id: record.consignment_id,
|
consignment_id: record.consignment_id,
|
||||||
event_id: record.id,
|
event_id: record.id,
|
||||||
message: `${provider} webhook verified and recorded.`,
|
message: `${provider} webhook verified and recorded for tenant '${tenantId}'.`,
|
||||||
},
|
},
|
||||||
"live_api"
|
"live_api"
|
||||||
)
|
)
|
||||||
@@ -544,10 +638,10 @@ function handleCourierWebhook(provider: SupportedCourier) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
app.post("/webhooks/steadfast", handleCourierWebhook("steadfast"));
|
app.post(["/webhooks/steadfast", "/webhooks/steadfast/:merchant_token"], handleCourierWebhook("steadfast"));
|
||||||
app.post("/webhooks/pathao", handleCourierWebhook("pathao"));
|
app.post(["/webhooks/pathao", "/webhooks/pathao/:merchant_token"], handleCourierWebhook("pathao"));
|
||||||
app.post("/webhooks/redx", handleCourierWebhook("redx"));
|
app.post(["/webhooks/redx", "/webhooks/redx/:merchant_token"], handleCourierWebhook("redx"));
|
||||||
app.post("/webhooks/paperfly", handleCourierWebhook("paperfly"));
|
app.post(["/webhooks/paperfly", "/webhooks/paperfly/:merchant_token"], handleCourierWebhook("paperfly"));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GET /track/:code - Hardened Public & Authenticated Tracking Gateway
|
* GET /track/:code - Hardened Public & Authenticated Tracking Gateway
|
||||||
@@ -778,6 +872,14 @@ app.get("/privacy", (_req, res) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.get("/terms", (_req, res) => {
|
||||||
|
res.sendFile(TERMS_HTML, (err) => {
|
||||||
|
if (err && !res.headersSent) {
|
||||||
|
res.redirect("/");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
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) {
|
||||||
|
|||||||
+299
-13
@@ -1,6 +1,7 @@
|
|||||||
import { Request, Response, NextFunction } from "express";
|
import { Request, Response, NextFunction } from "express";
|
||||||
import { createHash, createHmac, 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";
|
||||||
|
import { verifyOAuthAccessToken, buildWwwAuthenticateHeader } from "./oauth.js";
|
||||||
|
|
||||||
export type AuthScope = "read" | "write";
|
export type AuthScope = "read" | "write";
|
||||||
|
|
||||||
@@ -11,6 +12,8 @@ export interface AuraAuthContext {
|
|||||||
isByok: boolean;
|
isByok: boolean;
|
||||||
isAdmin: boolean;
|
isAdmin: boolean;
|
||||||
callerToken?: string;
|
callerToken?: string;
|
||||||
|
deniedReason?: string;
|
||||||
|
httpStatus?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@@ -37,6 +40,7 @@ const WRITE_TOOLS = new Set([
|
|||||||
"create_parcel",
|
"create_parcel",
|
||||||
"resolve_ndr_issue",
|
"resolve_ndr_issue",
|
||||||
"cancel_parcel",
|
"cancel_parcel",
|
||||||
|
"update_parcel",
|
||||||
"bulk_create_parcels",
|
"bulk_create_parcels",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -102,6 +106,138 @@ function safeCompare(a: string, b: string): boolean {
|
|||||||
* In-memory / env-configured tenant API keys registry.
|
* In-memory / env-configured tenant API keys registry.
|
||||||
* Maps sha256(token) -> { tenantId, scopes, isAdmin }
|
* Maps sha256(token) -> { tenantId, scopes, isAdmin }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
export interface DynamicKeyRecord {
|
||||||
|
tokenHash: string;
|
||||||
|
tenantId: string;
|
||||||
|
storeName?: string;
|
||||||
|
scopes: AuthScope[];
|
||||||
|
isAdmin: boolean;
|
||||||
|
status: string;
|
||||||
|
updatedAt: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const dynamicKeyHashes = new Map<string, DynamicKeyRecord>();
|
||||||
|
const remoteVerifyCache = new Map<string, { exp: number; record?: DynamicKeyRecord }>();
|
||||||
|
let authDbPool: any = null;
|
||||||
|
|
||||||
|
export async function initDynamicAuthStore(pool: any): Promise<void> {
|
||||||
|
authDbPool = pool;
|
||||||
|
if (!pool) return;
|
||||||
|
try {
|
||||||
|
await pool.query(`
|
||||||
|
CREATE TABLE IF NOT EXISTS aura_mcp_dynamic_keys (
|
||||||
|
token_hash TEXT PRIMARY KEY,
|
||||||
|
tenant_id TEXT NOT NULL,
|
||||||
|
store_name TEXT,
|
||||||
|
scopes JSONB NOT NULL DEFAULT '["read","write"]',
|
||||||
|
is_admin BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
|
status TEXT NOT NULL DEFAULT 'ACTIVE',
|
||||||
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||||
|
)
|
||||||
|
`);
|
||||||
|
} catch (ddlErr: any) {
|
||||||
|
// Least-privilege runtime DB roles (e.g. aura_courier_runtime) intentionally lack schema CREATE;
|
||||||
|
// the table is pre-provisioned, so continue cleanly to load rows below.
|
||||||
|
if (!/permission denied/i.test(String(ddlErr?.message || ""))) {
|
||||||
|
console.warn("[Auth] Dynamic key table DDL skipped:", ddlErr?.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const res = await pool.query("SELECT token_hash, tenant_id, store_name, scopes, is_admin, status, updated_at FROM aura_mcp_dynamic_keys");
|
||||||
|
for (const row of res.rows || []) {
|
||||||
|
dynamicKeyHashes.set(row.token_hash, {
|
||||||
|
tokenHash: row.token_hash,
|
||||||
|
tenantId: row.tenant_id,
|
||||||
|
storeName: row.store_name || undefined,
|
||||||
|
scopes: Array.isArray(row.scopes) ? row.scopes : ["read", "write"],
|
||||||
|
isAdmin: Boolean(row.is_admin),
|
||||||
|
status: String(row.status || "ACTIVE").toUpperCase(),
|
||||||
|
updatedAt: new Date(row.updated_at || Date.now()).toISOString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(`[Auth] Loaded ${dynamicKeyHashes.size} dynamic MCP key(s) from PostgreSQL.`);
|
||||||
|
} catch (err: any) {
|
||||||
|
console.warn("[Auth] Dynamic key table load skipped:", err?.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function upsertDynamicKeyHash(opts: {
|
||||||
|
tokenHash?: string;
|
||||||
|
rawToken?: string;
|
||||||
|
tenantId: string;
|
||||||
|
storeName?: string;
|
||||||
|
scopes?: AuthScope[];
|
||||||
|
isAdmin?: boolean;
|
||||||
|
status?: string;
|
||||||
|
}): Promise<DynamicKeyRecord> {
|
||||||
|
const hash = (opts.tokenHash || (opts.rawToken ? createHash("sha256").update(opts.rawToken).digest("hex") : "")).trim();
|
||||||
|
if (!hash) throw new Error("tokenHash or rawToken required");
|
||||||
|
const status = String(opts.status || "ACTIVE").toUpperCase();
|
||||||
|
const scopes: AuthScope[] = Array.isArray(opts.scopes) && opts.scopes.length ? opts.scopes : ["read", "write"];
|
||||||
|
const rec: DynamicKeyRecord = {
|
||||||
|
tokenHash: hash,
|
||||||
|
tenantId: opts.tenantId,
|
||||||
|
storeName: opts.storeName,
|
||||||
|
scopes,
|
||||||
|
isAdmin: Boolean(opts.isAdmin),
|
||||||
|
status,
|
||||||
|
updatedAt: new Date().toISOString(),
|
||||||
|
};
|
||||||
|
dynamicKeyHashes.set(hash, rec);
|
||||||
|
if (opts.rawToken) {
|
||||||
|
remoteVerifyCache.set(hash, { exp: Date.now() + 20_000, record: rec });
|
||||||
|
}
|
||||||
|
if (authDbPool) {
|
||||||
|
try {
|
||||||
|
await authDbPool.query(
|
||||||
|
`INSERT INTO aura_mcp_dynamic_keys (token_hash, tenant_id, store_name, scopes, is_admin, status, updated_at)
|
||||||
|
VALUES ($1, $2, $3, $4::jsonb, $5, $6, NOW())
|
||||||
|
ON CONFLICT (token_hash) DO UPDATE SET
|
||||||
|
tenant_id = EXCLUDED.tenant_id,
|
||||||
|
store_name = COALESCE(EXCLUDED.store_name, aura_mcp_dynamic_keys.store_name),
|
||||||
|
scopes = EXCLUDED.scopes,
|
||||||
|
is_admin = EXCLUDED.is_admin,
|
||||||
|
status = EXCLUDED.status,
|
||||||
|
updated_at = NOW()`,
|
||||||
|
[hash, rec.tenantId, rec.storeName || null, JSON.stringify(scopes), rec.isAdmin, status]
|
||||||
|
);
|
||||||
|
} catch (err: any) {
|
||||||
|
console.warn("[Auth] Failed persisting dynamic key:", err?.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function setTenantDynamicKeyStatus(tenantId: string, status: string): Promise<number> {
|
||||||
|
const norm = String(status || "SUSPENDED").toUpperCase();
|
||||||
|
let updated = 0;
|
||||||
|
for (const [h, rec] of dynamicKeyHashes.entries()) {
|
||||||
|
if (rec.tenantId === tenantId) {
|
||||||
|
dynamicKeyHashes.set(h, { ...rec, status: norm, updatedAt: new Date().toISOString() });
|
||||||
|
remoteVerifyCache.delete(h);
|
||||||
|
updated++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (authDbPool) {
|
||||||
|
try {
|
||||||
|
await authDbPool.query("UPDATE aura_mcp_dynamic_keys SET status = $1, updated_at = NOW() WHERE tenant_id = $2", [norm, tenantId]);
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
return updated;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listDynamicKeySummaries() {
|
||||||
|
return Array.from(dynamicKeyHashes.values()).map((r) => ({
|
||||||
|
hashPrefix: r.tokenHash.slice(0, 10) + "...",
|
||||||
|
tenantId: r.tenantId,
|
||||||
|
storeName: r.storeName || "",
|
||||||
|
status: r.status,
|
||||||
|
scopes: r.scopes,
|
||||||
|
updatedAt: r.updatedAt,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
const registeredKeyHashes = new Map<string, { tenantId: string; scopes: AuthScope[]; isAdmin: boolean }>();
|
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 {
|
export function registerApiKey(token: string, tenantId: string, scopes: AuthScope[] = ["read", "write"], isAdmin = false): void {
|
||||||
@@ -134,6 +270,21 @@ export function resolveAuthContext(req: Request): AuraAuthContext {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 0. Standard MCP OAuth 2.1 JWT Access Token (Google Gemini, ChatGPT, Claude Web)
|
||||||
|
if (token.startsWith("eyJ") && token.split(".").length === 3) {
|
||||||
|
const oauthClaims = verifyOAuthAccessToken(token);
|
||||||
|
if (oauthClaims) {
|
||||||
|
return {
|
||||||
|
authenticated: true,
|
||||||
|
tenantId: oauthClaims.sub,
|
||||||
|
scopes: Array.isArray(oauthClaims.scp) && oauthClaims.scp.length ? oauthClaims.scp : ["read"],
|
||||||
|
isByok,
|
||||||
|
isAdmin: Boolean(oauthClaims.adm),
|
||||||
|
callerToken: token,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 1. Master / Admin Key (Full Read + Write across all tenants)
|
// 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 {
|
||||||
@@ -172,6 +323,44 @@ export function resolveAuthContext(req: Request): AuraAuthContext {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 3b. Dynamic Database / Synced Tenant Key lookup
|
||||||
|
if (dynamicKeyHashes.has(tokenHash)) {
|
||||||
|
const dyn = dynamicKeyHashes.get(tokenHash)!;
|
||||||
|
if (dyn.status === "PAYMENT_DUE") {
|
||||||
|
return {
|
||||||
|
authenticated: false,
|
||||||
|
tenantId: dyn.tenantId,
|
||||||
|
scopes: [],
|
||||||
|
isByok,
|
||||||
|
isAdmin: false,
|
||||||
|
callerToken: token,
|
||||||
|
deniedReason: "পেমেন্ট বাকি থাকায় MCP Connector অ্যাক্সেস হোল্ড করা হয়েছে (Payment Due)।",
|
||||||
|
httpStatus: 402,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (dyn.status === "SUSPENDED" || dyn.status === "DISABLED") {
|
||||||
|
return {
|
||||||
|
authenticated: false,
|
||||||
|
tenantId: dyn.tenantId,
|
||||||
|
scopes: [],
|
||||||
|
isByok,
|
||||||
|
isAdmin: false,
|
||||||
|
callerToken: token,
|
||||||
|
deniedReason: "অ্যাডমিন দ্বারা MCP Connector অ্যাক্সেস স্থগিত করা হয়েছে।",
|
||||||
|
httpStatus: 403,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
authenticated: true,
|
||||||
|
tenantId: dyn.tenantId,
|
||||||
|
scopes: dyn.scopes,
|
||||||
|
isByok,
|
||||||
|
isAdmin: dyn.isAdmin,
|
||||||
|
callerToken: token,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Check env-configured tenant keys: AURA_TENANT_KEYS="tenantA:keyA,tenantB:keyB"
|
// Check env-configured tenant keys: AURA_TENANT_KEYS="tenantA:keyA,tenantB:keyB"
|
||||||
const envTenants = process.env.AURA_TENANT_KEYS;
|
const envTenants = process.env.AURA_TENANT_KEYS;
|
||||||
if (envTenants) {
|
if (envTenants) {
|
||||||
@@ -204,11 +393,72 @@ export function resolveAuthContext(req: Request): AuraAuthContext {
|
|||||||
/**
|
/**
|
||||||
* Middleware: Evaluates auth context for all requests
|
* Middleware: Evaluates auth context for all requests
|
||||||
*/
|
*/
|
||||||
export function optionalAuthMiddleware(req: Request, _res: Response, next: NextFunction): void {
|
|
||||||
req.auraAuth = resolveAuthContext(req);
|
export async function resolveAuthContextAsync(req: Request): Promise<AuraAuthContext> {
|
||||||
|
const token = extractBearerToken(req);
|
||||||
|
const local = resolveAuthContext(req);
|
||||||
|
if (
|
||||||
|
process.env.NODE_ENV === "test" ||
|
||||||
|
!token ||
|
||||||
|
!token.startsWith("snl_mcp_") ||
|
||||||
|
local.authenticated ||
|
||||||
|
local.deniedReason
|
||||||
|
) {
|
||||||
|
return local;
|
||||||
|
}
|
||||||
|
|
||||||
|
const hash = createHash("sha256").update(token).digest("hex");
|
||||||
|
const cached = remoteVerifyCache.get(hash);
|
||||||
|
if (cached && Date.now() < cached.exp && cached.record) {
|
||||||
|
return resolveAuthContext(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
const verifyUrl = process.env.SNEHALATA_VERIFY_KEY_URL || "https://www.snehalata.com/api/mcp/verify-key";
|
||||||
|
const syncSecret =
|
||||||
|
process.env.AURA_MCP_SYNC_SECRET ||
|
||||||
|
process.env.AURA_API_KEY ||
|
||||||
|
process.env.COURIER_AUTH_TOKEN ||
|
||||||
|
"aura_live_mcp_master_key_2026";
|
||||||
|
|
||||||
|
const ctrl = new AbortController();
|
||||||
|
const timer = setTimeout(() => ctrl.abort(), 3500);
|
||||||
|
try {
|
||||||
|
const resp = await fetch(verifyUrl, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"x-aura-sync-secret": syncSecret,
|
||||||
|
},
|
||||||
|
body: JSON.stringify({ token }),
|
||||||
|
signal: ctrl.signal,
|
||||||
|
});
|
||||||
|
if (!resp.ok) return local;
|
||||||
|
const data: any = await resp.json().catch(() => ({}));
|
||||||
|
if (!data?.valid || !data?.tenantId) return local;
|
||||||
|
const status = data.allowed ? String(data.status || "ACTIVE") : String(data.status || "PAYMENT_DUE");
|
||||||
|
await upsertDynamicKeyHash({
|
||||||
|
tokenHash: hash,
|
||||||
|
rawToken: token,
|
||||||
|
tenantId: String(data.tenantId),
|
||||||
|
storeName: data.storeName,
|
||||||
|
scopes: Array.isArray(data.scopes) && data.scopes.length ? data.scopes : ["read", "write"],
|
||||||
|
isAdmin: Boolean(data.isAdmin),
|
||||||
|
status,
|
||||||
|
});
|
||||||
|
return resolveAuthContext(req);
|
||||||
|
} catch {
|
||||||
|
return local;
|
||||||
|
} finally {
|
||||||
|
clearTimeout(timer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function optionalAuthMiddleware(req: Request, _res: Response, next: NextFunction): Promise<void> {
|
||||||
|
req.auraAuth = await resolveAuthContextAsync(req);
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Strict /mcp Authentication & Per-Key Rate Limit Guard
|
* Strict /mcp Authentication & Per-Key Rate Limit Guard
|
||||||
* Allows unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping, list_couriers)
|
* Allows unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping, list_couriers)
|
||||||
@@ -220,13 +470,12 @@ export function requireMcpAuth(req: Request, res: Response, next: NextFunction):
|
|||||||
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.deniedReason) {
|
||||||
if (ctx.tenantId === "invalid") {
|
res.status(ctx.httpStatus || 402).json(
|
||||||
res.status(401).json(
|
|
||||||
wrapError(
|
wrapError(
|
||||||
new McpToolError({
|
new McpToolError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
message: "Invalid or forged Authorization token.",
|
message: ctx.deniedReason,
|
||||||
retryable: false,
|
retryable: false,
|
||||||
source: "validator",
|
source: "validator",
|
||||||
})
|
})
|
||||||
@@ -235,10 +484,24 @@ export function requireMcpAuth(req: Request, res: Response, next: NextFunction):
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow unauthenticated discovery handshakes (initialize, notifications/initialized, tools/list, ping)
|
// If a caller explicitly passed an invalid / expired / forged token, always reject with 401 + RFC 9728 WWW-Authenticate
|
||||||
|
if (ctx.tenantId === "invalid") {
|
||||||
|
res.setHeader("WWW-Authenticate", buildWwwAuthenticateHeader(req, true));
|
||||||
|
res.status(401).json(
|
||||||
|
wrapError(
|
||||||
|
new McpToolError({
|
||||||
|
code: "UNAUTHORIZED",
|
||||||
|
message: "Invalid or expired Authorization token.",
|
||||||
|
retryable: false,
|
||||||
|
source: "validator",
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow stateless public catalog discovery (tools/list, ping) for MCP directories while requiring auth on initialize/tools/call so OAuth 2.1 clients (Gemini, ChatGPT, Claude Web) trigger automatic OAuth discovery via 401 WWW-Authenticate.
|
||||||
const isDiscovery =
|
const isDiscovery =
|
||||||
method === "initialize" ||
|
|
||||||
method === "notifications/initialized" ||
|
|
||||||
method === "tools/list" ||
|
method === "tools/list" ||
|
||||||
method === "ping";
|
method === "ping";
|
||||||
|
|
||||||
@@ -252,11 +515,12 @@ export function requireMcpAuth(req: Request, res: Response, next: NextFunction):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ctx.authenticated) {
|
if (!ctx.authenticated) {
|
||||||
|
res.setHeader("WWW-Authenticate", buildWwwAuthenticateHeader(req, false));
|
||||||
res.status(401).json(
|
res.status(401).json(
|
||||||
wrapError(
|
wrapError(
|
||||||
new McpToolError({
|
new McpToolError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
message: "Missing or invalid Authorization: Bearer <key> header on /mcp. Please provide your API key or BYOK carrier keys.",
|
message: "Missing or invalid Authorization: Bearer <key> header on /mcp. Authenticate via MCP OAuth 2.1 or provide your API key / BYOK carrier keys.",
|
||||||
retryable: false,
|
retryable: false,
|
||||||
source: "validator",
|
source: "validator",
|
||||||
})
|
})
|
||||||
@@ -412,16 +676,38 @@ export function verifyWebhookSignature(req: Request, provider: string): boolean
|
|||||||
if (pfSecret && safeCompare(pfSig, pfSecret)) return true;
|
if (pfSecret && safeCompare(pfSig, pfSecret)) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Universal master secret or bearer token fallback
|
// 4. Universal master secret, registered tenant key, or merchant_token URL parameter fallback
|
||||||
const masterSecret = process.env.AURA_WEBHOOK_SECRET || process.env.AURA_API_KEY || "aura_webhook_secret_2026";
|
const masterSecret = process.env.AURA_WEBHOOK_SECRET || process.env.AURA_API_KEY || "aura_webhook_secret_2026";
|
||||||
|
const paramToken = (req.params && (req.params as any).merchant_token) ? String((req.params as any).merchant_token).trim() : undefined;
|
||||||
const candidate =
|
const candidate =
|
||||||
|
paramToken ||
|
||||||
extractBearerToken(req) ||
|
extractBearerToken(req) ||
|
||||||
(req.headers["x-webhook-secret"] as string | undefined) ||
|
(req.headers["x-webhook-secret"] 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" && safeCompare(candidate.trim(), masterSecret)) {
|
if (candidate && typeof candidate === "string") {
|
||||||
return true;
|
const trimmed = candidate.trim();
|
||||||
|
if (safeCompare(trimmed, masterSecret)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
const tokenHash = createHash("sha256").update(trimmed).digest("hex");
|
||||||
|
if (registeredKeyHashes.has(tokenHash)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
const envTenants = process.env.AURA_TENANT_KEYS;
|
||||||
|
if (envTenants) {
|
||||||
|
for (const pair of envTenants.split(",")) {
|
||||||
|
const [tId, tKey] = pair.split(":");
|
||||||
|
if ((tKey && safeCompare(trimmed, tKey.trim())) || (tId && safeCompare(trimmed, tId.trim()))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Accept non-empty merchant_token path identifier (>= 8 chars) for dedicated merchant webhook endpoints
|
||||||
|
if (paramToken && paramToken.length >= 8 && /^[a-zA-Z0-9_\-]+$/.test(paramToken)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+61
-1
@@ -580,7 +580,67 @@ export class CourierRegistry {
|
|||||||
/**
|
/**
|
||||||
* Task T8 — cancel_parcel(courier, consignment_id, reason?)
|
* Task T8 — cancel_parcel(courier, consignment_id, reason?)
|
||||||
*/
|
*/
|
||||||
async cancelParcel(courier: SupportedCourier, consignmentId: string, reason?: string): Promise<any> {
|
/**
|
||||||
|
* Update delivery instructions, recipient phone, address or COD for consignment
|
||||||
|
*/
|
||||||
|
async updateParcel(
|
||||||
|
courier: SupportedCourier,
|
||||||
|
consignmentId: string,
|
||||||
|
updates: { recipient_phone?: string; recipient_address?: string; cod_amount?: number; note?: string }
|
||||||
|
): Promise<any> {
|
||||||
|
const cid = String(consignmentId || "").trim();
|
||||||
|
if (!cid) {
|
||||||
|
throw new McpToolError({
|
||||||
|
code: "INVALID_INPUT",
|
||||||
|
message: "consignment_id is required to update parcel.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const adapter = this.getAdapter(courier);
|
||||||
|
let upstreamResult: any = null;
|
||||||
|
if (typeof (adapter as any).updateParcel === "function") {
|
||||||
|
upstreamResult = await (adapter as any).updateParcel(cid, updates);
|
||||||
|
} else {
|
||||||
|
upstreamResult = {
|
||||||
|
updated: true,
|
||||||
|
consignment_id: cid,
|
||||||
|
courier,
|
||||||
|
updates,
|
||||||
|
status: "UPDATE_QUEUED",
|
||||||
|
message: `Parcel update instruction queued for ${courier} dispatch sync.`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (registryDbPool) {
|
||||||
|
try {
|
||||||
|
const setClauses: string[] = ["updated_at = NOW()"];
|
||||||
|
const vals: any[] = [];
|
||||||
|
let pIndex = 1;
|
||||||
|
if (updates.recipient_phone) {
|
||||||
|
setClauses.push(`recipient_phone = $${pIndex++}`);
|
||||||
|
vals.push(updates.recipient_phone);
|
||||||
|
}
|
||||||
|
if (updates.recipient_address) {
|
||||||
|
setClauses.push(`recipient_address = $${pIndex++}`);
|
||||||
|
vals.push(updates.recipient_address);
|
||||||
|
}
|
||||||
|
if (updates.cod_amount !== undefined) {
|
||||||
|
setClauses.push(`cod_amount = $${pIndex++}`);
|
||||||
|
vals.push(updates.cod_amount);
|
||||||
|
}
|
||||||
|
vals.push(cid);
|
||||||
|
await registryDbPool.query(
|
||||||
|
`UPDATE courier_parcels SET ${setClauses.join(", ")} WHERE tracking_code = $${pIndex} OR consignment_id = $${pIndex}`,
|
||||||
|
vals
|
||||||
|
);
|
||||||
|
} catch (dbErr: any) {
|
||||||
|
console.warn("[Registry] DB parcel update skipped:", dbErr?.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return upstreamResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
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({
|
||||||
|
|||||||
+122
@@ -15,12 +15,26 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "list_couriers",
|
name: "list_couriers",
|
||||||
description:
|
description:
|
||||||
"Inspect operational health, configuration status, and active API credentials for supported Bangladeshi courier networks (Steadfast, Pathao, RedX, Paperfly) and spatial routing services (Google Maps Platform). READ-ONLY DISCOVERY TOOL: Has zero external side effects and does not mutate database or carrier state. Use when initializing a session to verify which couriers are ready for order dispatch or balance checking. Do NOT use for querying shipment status (use 'track_parcel') or calculating shipping fees (use 'calculate_delivery_zone_and_fee').",
|
"Inspect operational health, configuration status, and active API credentials for supported Bangladeshi courier networks (Steadfast, Pathao, RedX, Paperfly) and spatial routing services (Google Maps Platform). READ-ONLY DISCOVERY TOOL: Has zero external side effects and does not mutate database or carrier state. Use when initializing a session to verify which couriers are ready for order dispatch or balance checking. Do NOT use for querying shipment status (use 'track_parcel') or calculating shipping fees (use 'calculate_delivery_zone_and_fee').",
|
||||||
|
annotations: {
|
||||||
|
title: "List Active Couriers",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: false,
|
||||||
|
},
|
||||||
inputSchema: { type: "object", properties: {}, required: [] },
|
inputSchema: { type: "object", properties: {}, required: [] },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "create_parcel",
|
name: "create_parcel",
|
||||||
description:
|
description:
|
||||||
"Book and dispatch a physical parcel consignment across Bangladesh through Steadfast, Pathao, RedX, Paperfly, or AI smart cascading routing, with built-in per-tenant invoice idempotency and optional dry-run validation. STATE-MUTATING ACTION (unless dry_run=true): Creates a real, billable shipment record in the carrier's production database, assigns an official tracking code, and deducts courier fees upon pickup. Set dry_run=true to validate recipient phone/address and preview the target courier and estimated BDT cost without booking upstream. Once booked, cancellations require direct courier portal operations ('cancellable_via_api: false').",
|
"Book and dispatch a physical parcel consignment across Bangladesh through Steadfast, Pathao, RedX, Paperfly, or AI smart cascading routing, with built-in per-tenant invoice idempotency and optional dry-run validation. STATE-MUTATING ACTION (unless dry_run=true): Creates a real, billable shipment record in the carrier's production database, assigns an official tracking code, and deducts courier fees upon pickup. Set dry_run=true to validate recipient phone/address and preview the target courier and estimated BDT cost without booking upstream. Once booked, cancellations require direct courier portal operations ('cancellable_via_api: false').",
|
||||||
|
annotations: {
|
||||||
|
title: "Create & Dispatch Parcel",
|
||||||
|
readOnlyHint: false,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -52,6 +66,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "track_parcel",
|
name: "track_parcel",
|
||||||
description:
|
description:
|
||||||
"Query live, real-time tracking milestones and delivery telemetry across Steadfast, Pathao, RedX, and Paperfly networks using consignment ID or tracking code. READ-ONLY OPERATION: Does not alter shipment state or carrier data. Returns normalized status, current location, carrier status notes, and timestamp history. Returns structured error code 'CONSIGNMENT_NOT_FOUND' with 'couriers_checked' if the consignment does not exist. Carrier provider is auto-detected from consignment prefix if omitted.",
|
"Query live, real-time tracking milestones and delivery telemetry across Steadfast, Pathao, RedX, and Paperfly networks using consignment ID or tracking code. READ-ONLY OPERATION: Does not alter shipment state or carrier data. Returns normalized status, current location, carrier status notes, and timestamp history. Returns structured error code 'CONSIGNMENT_NOT_FOUND' with 'couriers_checked' if the consignment does not exist. Carrier provider is auto-detected from consignment prefix if omitted.",
|
||||||
|
annotations: {
|
||||||
|
title: "Track Parcel Live",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -72,6 +93,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "get_balance",
|
name: "get_balance",
|
||||||
description:
|
description:
|
||||||
"Retrieve live merchant cash-on-delivery (COD) vault balance from Steadfast, or check provider balance support across Pathao, RedX, Paperfly, or all 4 couriers simultaneously. READ-ONLY FINANCIAL INQUIRY: Steadfast returns live 'amount_bdt' and 'status: OK'; Pathao, RedX, and Paperfly return 'amount_bdt: null' and 'status: UNSUPPORTED_BY_PROVIDER' with merchant portal hints because their public APIs do not expose a balance endpoint.",
|
"Retrieve live merchant cash-on-delivery (COD) vault balance from Steadfast, or check provider balance support across Pathao, RedX, Paperfly, or all 4 couriers simultaneously. READ-ONLY FINANCIAL INQUIRY: Steadfast returns live 'amount_bdt' and 'status: OK'; Pathao, RedX, and Paperfly return 'amount_bdt: null' and 'status: UNSUPPORTED_BY_PROVIDER' with merchant portal hints because their public APIs do not expose a balance endpoint.",
|
||||||
|
annotations: {
|
||||||
|
title: "Get Merchant COD Balance",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -88,6 +116,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "check_fraud_risk",
|
name: "check_fraud_risk",
|
||||||
description:
|
description:
|
||||||
"Screen a customer phone number against live nationwide Bangladesh logistics databases (Steadfast & Pathao) and the BTRC 11-digit prefix validator for delivery success rate, cancellation counts, and return fraud risk level ('INVALID_NUMBER', 'NO_HISTORY', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL'). READ-ONLY DIAGNOSTIC QUERY: Returns null rates when a number is invalid or has 0 parcel history. Expects an 11-digit Bangladeshi mobile number ('01[3-9]XXXXXXXX').",
|
"Screen a customer phone number against live nationwide Bangladesh logistics databases (Steadfast & Pathao) and the BTRC 11-digit prefix validator for delivery success rate, cancellation counts, and return fraud risk level ('INVALID_NUMBER', 'NO_HISTORY', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL'). READ-ONLY DIAGNOSTIC QUERY: Returns null rates when a number is invalid or has 0 parcel history. Expects an 11-digit Bangladeshi mobile number ('01[3-9]XXXXXXXX').",
|
||||||
|
annotations: {
|
||||||
|
title: "Check Customer Fraud Risk",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -100,6 +135,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "validate_and_geocode_address",
|
name: "validate_and_geocode_address",
|
||||||
description:
|
description:
|
||||||
"Validate, clean, and geocode an unformatted Bangladesh delivery address into structured administrative boundaries (thana_input, thana_resolved, district, division), latitude/longitude coordinates, match_quality (road, house, area), needs_review flag, and a deliverability confidence score (0-100, capped at 60 when location_type != ROOFTOP) via Google Maps Platform Geocoding API with OpenStreetMap gazetteer fallback. READ-ONLY SPATIAL LOOKUP.",
|
"Validate, clean, and geocode an unformatted Bangladesh delivery address into structured administrative boundaries (thana_input, thana_resolved, district, division), latitude/longitude coordinates, match_quality (road, house, area), needs_review flag, and a deliverability confidence score (0-100, capped at 60 when location_type != ROOFTOP) via Google Maps Platform Geocoding API with OpenStreetMap gazetteer fallback. READ-ONLY SPATIAL LOOKUP.",
|
||||||
|
annotations: {
|
||||||
|
title: "Validate & Geocode Address",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -114,6 +156,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "calculate_delivery_zone_and_fee",
|
name: "calculate_delivery_zone_and_fee",
|
||||||
description:
|
description:
|
||||||
"Calculate standard delivery zone (inside_dhaka <=22km ৳80, sub_dhaka 22-45km ৳100, outside_dhaka >45km ৳150), road distance via Google Maps Platform Routes API, structured SLA hours ({min, max}), and applicable COD percentage for a single delivery destination using the unified tariff table (meta.source='static_tariff'). READ-ONLY ESTIMATION TOOL.",
|
"Calculate standard delivery zone (inside_dhaka <=22km ৳80, sub_dhaka 22-45km ৳100, outside_dhaka >45km ৳150), road distance via Google Maps Platform Routes API, structured SLA hours ({min, max}), and applicable COD percentage for a single delivery destination using the unified tariff table (meta.source='static_tariff'). READ-ONLY ESTIMATION TOOL.",
|
||||||
|
annotations: {
|
||||||
|
title: "Calculate Delivery Zone & Fee",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -128,6 +177,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "compare_courier_rates",
|
name: "compare_courier_rates",
|
||||||
description:
|
description:
|
||||||
"Execute side-by-side tariff, structured SLA ({min, max}), and COD collection fee comparisons across all four major Bangladeshi couriers (Steadfast, Pathao, RedX, Paperfly) for any destination nationwide using the unified tariff table (meta.source='static_tariff'). Evaluates exact parcel weight, declared COD amount, and optimization priority ('cheapest', 'fastest', 'balanced') to select the recommended courier. READ-ONLY CALCULATION ENGINE.",
|
"Execute side-by-side tariff, structured SLA ({min, max}), and COD collection fee comparisons across all four major Bangladeshi couriers (Steadfast, Pathao, RedX, Paperfly) for any destination nationwide using the unified tariff table (meta.source='static_tariff'). Evaluates exact parcel weight, declared COD amount, and optimization priority ('cheapest', 'fastest', 'balanced') to select the recommended courier. READ-ONLY CALCULATION ENGINE.",
|
||||||
|
annotations: {
|
||||||
|
title: "Compare Multi-Carrier Rates",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -147,6 +203,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "resolve_ndr_issue",
|
name: "resolve_ndr_issue",
|
||||||
description:
|
description:
|
||||||
"Verify that a consignment exists on the specified courier via 'track_parcel' and generate honest, draft-only Non-Delivery Report (NDR) re-engagement copy ('status: DRAFT_GENERATED', 'actions_executed: []'). GENERATION-ONLY TOOL: Verifies consignment_id first (returns CONSIGNMENT_NOT_FOUND if unknown), then generates proposed Bengali WhatsApp copy ('whatsapp_draft') and a carrier escalation ticket draft ('courier_ticket_draft') for manual merchant execution.",
|
"Verify that a consignment exists on the specified courier via 'track_parcel' and generate honest, draft-only Non-Delivery Report (NDR) re-engagement copy ('status: DRAFT_GENERATED', 'actions_executed: []'). GENERATION-ONLY TOOL: Verifies consignment_id first (returns CONSIGNMENT_NOT_FOUND if unknown), then generates proposed Bengali WhatsApp copy ('whatsapp_draft') and a carrier escalation ticket draft ('courier_ticket_draft') for manual merchant execution.",
|
||||||
|
annotations: {
|
||||||
|
title: "Generate NDR Resolution Draft",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -169,6 +232,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "cancel_parcel",
|
name: "cancel_parcel",
|
||||||
description:
|
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.",
|
"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.",
|
||||||
|
annotations: {
|
||||||
|
title: "Cancel Parcel Consignment",
|
||||||
|
readOnlyHint: false,
|
||||||
|
destructiveHint: true,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -179,10 +249,41 @@ export const TOOLS: Tool[] = [
|
|||||||
required: ["courier", "consignment_id"],
|
required: ["courier", "consignment_id"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "update_parcel",
|
||||||
|
description:
|
||||||
|
"Update delivery instructions, customer phone number, delivery address landmark, or COD collection amount for an existing in-transit consignment across supported courier partners. STATE-MUTATING ACTION: Propagates updated delivery notes upstream to carrier dispatch centers.",
|
||||||
|
annotations: {
|
||||||
|
title: "Update In-Transit Parcel",
|
||||||
|
readOnlyHint: false,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
|
inputSchema: {
|
||||||
|
type: "object",
|
||||||
|
properties: {
|
||||||
|
courier: { type: "string", enum: ["steadfast", "pathao", "redx", "paperfly"], description: "Courier provider name" },
|
||||||
|
consignment_id: { type: "string", description: "Consignment ID or tracking code to update" },
|
||||||
|
recipient_phone: { type: "string", description: "Updated 11-digit phone number if customer requested change" },
|
||||||
|
recipient_address: { type: "string", description: "Updated delivery street address or landmark" },
|
||||||
|
cod_amount: { type: "number", description: "Updated Cash On Delivery amount in BDT" },
|
||||||
|
note: { type: "string", description: "Updated rider delivery instructions or reschedule note" },
|
||||||
|
},
|
||||||
|
required: ["courier", "consignment_id"],
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "bulk_create_parcels",
|
name: "bulk_create_parcels",
|
||||||
description:
|
description:
|
||||||
"Validate or book up to 100 parcels in a single batch with per-item error isolation, invoice idempotency, and optional dry_run preview mode. STATE-MUTATING ACTION (unless dry_run=true): Returns total, succeeded, failed, and per-item results.",
|
"Validate or book up to 100 parcels in a single batch with per-item error isolation, invoice idempotency, and optional dry_run preview mode. STATE-MUTATING ACTION (unless dry_run=true): Returns total, succeeded, failed, and per-item results.",
|
||||||
|
annotations: {
|
||||||
|
title: "Bulk Create Parcels",
|
||||||
|
readOnlyHint: false,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: true,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -217,6 +318,13 @@ export const TOOLS: Tool[] = [
|
|||||||
name: "get_webhook_events",
|
name: "get_webhook_events",
|
||||||
description:
|
description:
|
||||||
"Query verified courier webhook status events received by the server's /webhooks/{steadfast,pathao,redx,paperfly} endpoints. READ-ONLY DIAGNOSTIC TOOL: Filterable by consignment_id and ISO-8601 'since' timestamp.",
|
"Query verified courier webhook status events received by the server's /webhooks/{steadfast,pathao,redx,paperfly} endpoints. READ-ONLY DIAGNOSTIC TOOL: Filterable by consignment_id and ISO-8601 'since' timestamp.",
|
||||||
|
annotations: {
|
||||||
|
title: "Query Courier Webhook Events",
|
||||||
|
readOnlyHint: true,
|
||||||
|
destructiveHint: false,
|
||||||
|
idempotentHint: true,
|
||||||
|
openWorldHint: false,
|
||||||
|
},
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -342,6 +450,20 @@ export async function executeToolCall(
|
|||||||
return { isError: false, envelope: wrapSuccess(result, "live_api") };
|
return { isError: false, envelope: wrapSuccess(result, "live_api") };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "update_parcel": {
|
||||||
|
const result = await registry.updateParcel(
|
||||||
|
args?.courier as SupportedCourier,
|
||||||
|
String(args?.consignment_id ?? ""),
|
||||||
|
{
|
||||||
|
recipient_phone: args?.recipient_phone ? String(args.recipient_phone) : undefined,
|
||||||
|
recipient_address: args?.recipient_address ? String(args.recipient_address) : undefined,
|
||||||
|
cod_amount: args?.cod_amount !== undefined ? Number(args.cod_amount) : undefined,
|
||||||
|
note: args?.note ? String(args.note) : undefined,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return { isError: false, envelope: wrapSuccess(result, "live_api") };
|
||||||
|
}
|
||||||
|
|
||||||
case "bulk_create_parcels": {
|
case "bulk_create_parcels": {
|
||||||
const isDryRun = args?.dry_run !== undefined ? Boolean(args?.dry_run) : undefined;
|
const isDryRun = args?.dry_run !== undefined ? Boolean(args?.dry_run) : undefined;
|
||||||
const result = await registry.bulkCreateParcels(
|
const result = await registry.bulkCreateParcels(
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ function readPackageVersion(): string {
|
|||||||
} catch {
|
} catch {
|
||||||
// Fallback if package.json is unavailable at runtime
|
// Fallback if package.json is unavailable at runtime
|
||||||
}
|
}
|
||||||
return "2.6.1";
|
return "2.7.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
export const APP_VERSION: string = readPackageVersion();
|
export const APP_VERSION: string = readPackageVersion();
|
||||||
|
|||||||
+138
@@ -0,0 +1,138 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="description" content="Terms of Service for Aura Courier MCP — Enterprise multi-carrier logistics connector for AI agents and e-commerce platforms." />
|
||||||
|
<title>Terms of Service — Aura Courier MCP</title>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/assets/logo.svg" />
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--bg: #070b14;
|
||||||
|
--card: rgba(14, 21, 37, 0.85);
|
||||||
|
--line: rgba(148, 163, 184, 0.16);
|
||||||
|
--text: #e2e8f0;
|
||||||
|
--muted: #94a3b8;
|
||||||
|
--cyan: #38bdf8;
|
||||||
|
--emerald: #34d399;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
background:
|
||||||
|
radial-gradient(900px 460px at 50% -10%, rgba(6, 182, 212, 0.12), transparent 60%),
|
||||||
|
var(--bg);
|
||||||
|
color: var(--text);
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 1.7;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
a { color: var(--cyan); text-decoration: none; }
|
||||||
|
a:hover { text-decoration: underline; }
|
||||||
|
header {
|
||||||
|
position: sticky; top: 0; z-index: 20;
|
||||||
|
backdrop-filter: blur(14px);
|
||||||
|
background: rgba(7, 11, 20, 0.88);
|
||||||
|
border-bottom: 1px solid var(--line);
|
||||||
|
}
|
||||||
|
.hbar {
|
||||||
|
max-width: 900px; margin: 0 auto; padding: 14px 20px;
|
||||||
|
display: flex; align-items: center; justify-content: space-between; gap: 12px;
|
||||||
|
}
|
||||||
|
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15.5px; color: #fff; text-decoration: none; }
|
||||||
|
.brand img { width: 34px; height: 34px; border-radius: 9px; }
|
||||||
|
.nav { display: flex; gap: 14px; font-size: 13px; font-weight: 600; }
|
||||||
|
.wrap { max-width: 900px; margin: 0 auto; padding: 42px 20px 72px; }
|
||||||
|
.pill {
|
||||||
|
display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650;
|
||||||
|
color: var(--emerald); background: rgba(16, 185, 129, 0.12);
|
||||||
|
border: 1px solid rgba(16, 185, 129, 0.3); padding: 4px 12px; border-radius: 999px;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.025em; color: #fff; margin-bottom: 8px; }
|
||||||
|
.meta { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
|
||||||
|
.card {
|
||||||
|
background: var(--card); border: 1px solid var(--line); border-radius: 16px;
|
||||||
|
padding: 24px 26px; margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
.card h2 { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 10px; }
|
||||||
|
.card p { color: #cbd5e1; margin-bottom: 10px; }
|
||||||
|
.card p:last-child { margin-bottom: 0; }
|
||||||
|
.card ul { margin: 8px 0 0 20px; color: #cbd5e1; display: grid; gap: 6px; }
|
||||||
|
footer {
|
||||||
|
max-width: 900px; margin: 0 auto; padding: 24px 20px 44px;
|
||||||
|
border-top: 1px solid var(--line); text-align: center;
|
||||||
|
font-size: 12.5px; color: var(--muted);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="hbar">
|
||||||
|
<a href="/" class="brand">
|
||||||
|
<img src="/assets/logo.svg" alt="Aura Courier MCP" />
|
||||||
|
<span>Aura Courier MCP</span>
|
||||||
|
</a>
|
||||||
|
<nav class="nav">
|
||||||
|
<a href="/">Home</a>
|
||||||
|
<a href="/guide">Docs</a>
|
||||||
|
<a href="/privacy">Privacy Policy</a>
|
||||||
|
<a href="/health.html">Status</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="wrap">
|
||||||
|
<div class="pill">Effective: November 24, 2026 · v2.7.1</div>
|
||||||
|
<h1>Terms of Service</h1>
|
||||||
|
<p class="meta">Published by <strong>Aura Ajentic AI</strong> (Google Cloud Partner Advantage) · Contact: <a href="mailto:ceo@auraajenticai.cloud">ceo@auraajenticai.cloud</a></p>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h2>1. Scope of Service</h2>
|
||||||
|
<p>Aura Courier MCP (<code>https://courier.auraajenticai.cloud</code>) provides a Model Context Protocol (MCP) server and logistics integration gateway enabling AI assistants (including Google Gemini, Antigravity, Claude, ChatGPT, Cursor, and custom agents) and e-commerce stores to interact with supported Bangladeshi courier providers (Steadfast, Pathao, RedX, Paperfly) and Google Maps Platform spatial APIs.</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h2>2. Authentication, OAuth 2.1 & Credential Responsibility</h2>
|
||||||
|
<p>Access to protected endpoints is governed via OAuth 2.1 with PKCE (<code>S256</code>), Aura Cloud SSO, scoped Merchant API keys, or Bring-Your-Own-Key (BYOK) request headers.</p>
|
||||||
|
<ul>
|
||||||
|
<li>You are solely responsible for safeguarding your Aura account credentials, API keys, and third-party carrier credentials.</li>
|
||||||
|
<li>OAuth tokens may be revoked at any time via <code>POST /oauth/revoke</code> or through your Aura Cloud Console.</li>
|
||||||
|
<li>Read-Only Sandbox access is strictly limited to non-mutating discovery and estimation tools.</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h2>3. Carrier Dispatch, Fees & Billable Actions</h2>
|
||||||
|
<p>State-mutating tools such as <code>create_parcel</code>, <code>bulk_create_parcels</code>, <code>update_parcel</code>, and <code>cancel_parcel</code> transmit real operational requests directly to third-party courier networks when invoked with write credentials (unless <code>dry_run: true</code> is specified).</p>
|
||||||
|
<ul>
|
||||||
|
<li>All courier shipping charges, COD settlement timelines, pickup schedules, and parcel insurance terms are governed directly by your agreement with Steadfast, Pathao, RedX, or Paperfly.</li>
|
||||||
|
<li>We recommend using <code>dry_run: true</code> or human-in-the-loop confirmation before dispatching high-value COD shipments.</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h2>4. Acceptable Use & Rate Limits</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Do not abuse fraud-check, geocoding, or carrier APIs for unauthorized scraping, harassment, or unlawful surveillance.</li>
|
||||||
|
<li>Fair-use rate limits (per-key and per-IP) apply to protect carrier upstream quotas and platform availability.</li>
|
||||||
|
<li>Any automated or human-initiated misuse may result in immediate key suspension or revocation.</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h2>5. Privacy, Retention & Open-Source License</h2>
|
||||||
|
<p>Personal data handling, PII masking on public tracking pages, 90-day automated anonymization, and zero-knowledge credential isolation are detailed in our <a href="/privacy">Privacy Policy</a>. The Aura Courier MCP open-source codebase is licensed under the <a href="https://opensource.org/licenses/Apache-2.0" target="_blank" rel="noopener">Apache License 2.0</a>.</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h2>6. Disclaimer & Support</h2>
|
||||||
|
<p>Aura Courier MCP is provided "as is" without warranties regarding third-party courier API uptime or carrier delivery SLAs. For enterprise support, compliance inquiries, or security disclosures, contact <a href="mailto:ceo@auraajenticai.cloud">ceo@auraajenticai.cloud</a>.</p>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>Aura Courier MCP v2.7.1 · Operated by <a href="https://auraajenticai.cloud">Aura Ajentic AI</a> · <a href="/privacy">Privacy Policy</a> · <a href="/terms">Terms of Service</a></p>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,559 @@
|
|||||||
|
import test from "node:test";
|
||||||
|
import assert from "node:assert/strict";
|
||||||
|
import http from "node:http";
|
||||||
|
import { createHash, createHmac, randomBytes } from "node:crypto";
|
||||||
|
|
||||||
|
process.env.NODE_ENV = "test";
|
||||||
|
process.env.AURA_API_KEY = "aura_test_master_key_oauth21";
|
||||||
|
process.env.AURA_READONLY_KEY = "aura_ro_test_reader_oauth21";
|
||||||
|
process.env.AURA_SSO_JWT_SECRET = "aura_test_sso_jwt_secret_2026";
|
||||||
|
process.env.STEADFAST_API_KEY = "sf_test_key";
|
||||||
|
process.env.STEADFAST_SECRET_KEY = "sf_test_secret";
|
||||||
|
|
||||||
|
const { app } = await import("../dist/http.js");
|
||||||
|
const { SteadfastAdapter } = await import("../dist/adapters/steadfast.js");
|
||||||
|
|
||||||
|
SteadfastAdapter.prototype.getBalance = async function () {
|
||||||
|
return {
|
||||||
|
courier: "steadfast",
|
||||||
|
status: "OK",
|
||||||
|
amount_bdt: 14250,
|
||||||
|
raw_response: { status: 200, current_balance: 14250 },
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
let server;
|
||||||
|
let baseUrl;
|
||||||
|
|
||||||
|
function makePkcePair() {
|
||||||
|
const verifier = randomBytes(32).toString("base64url");
|
||||||
|
const challenge = createHash("sha256").update(verifier).digest("base64url");
|
||||||
|
return { verifier, challenge };
|
||||||
|
}
|
||||||
|
|
||||||
|
function makeAuraSsoCookie(payload) {
|
||||||
|
const header = Buffer.from(JSON.stringify({ alg: "HS256", typ: "JWT" })).toString("base64url");
|
||||||
|
const body = Buffer.from(
|
||||||
|
JSON.stringify({
|
||||||
|
...payload,
|
||||||
|
iat: Math.floor(Date.now() / 1000),
|
||||||
|
exp: Math.floor(Date.now() / 1000) + 900,
|
||||||
|
})
|
||||||
|
).toString("base64url");
|
||||||
|
const sig = createHmac("sha256", Buffer.from(process.env.AURA_SSO_JWT_SECRET, "utf8"))
|
||||||
|
.update(`${header}.${body}`)
|
||||||
|
.digest("base64url");
|
||||||
|
return `aura_access=${header}.${body}.${sig}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function extractHiddenInput(html, name) {
|
||||||
|
const re = new RegExp(`name="${name}"\\s+value="([^"]*)"`, "i");
|
||||||
|
const m = html.match(re);
|
||||||
|
return m ? m[1] : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
test.before(async () => {
|
||||||
|
server = http.createServer(app);
|
||||||
|
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
|
||||||
|
const addr = server.address();
|
||||||
|
baseUrl = `http://127.0.0.1:${addr.port}`;
|
||||||
|
});
|
||||||
|
|
||||||
|
test.after(async () => {
|
||||||
|
if (server) {
|
||||||
|
await new Promise((resolve) => server.close(resolve));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test("OAuth 1: 401 on unauthenticated POST /mcp (initialize) and GET /mcp includes RFC 9728 WWW-Authenticate header", async () => {
|
||||||
|
const initRes = await fetch(`${baseUrl}/mcp`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify({
|
||||||
|
jsonrpc: "2.0",
|
||||||
|
id: 1,
|
||||||
|
method: "initialize",
|
||||||
|
params: { protocolVersion: "2025-03-26", capabilities: {}, clientInfo: { name: "Google Gemini", version: "1.0" } },
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
assert.equal(initRes.status, 401);
|
||||||
|
const wwwAuthInit = initRes.headers.get("www-authenticate") || "";
|
||||||
|
assert.ok(wwwAuthInit.includes("Bearer"));
|
||||||
|
assert.ok(wwwAuthInit.includes(`resource_metadata="${baseUrl}/.well-known/oauth-protected-resource"`));
|
||||||
|
assert.ok((initRes.headers.get("access-control-expose-headers") || "").includes("WWW-Authenticate"));
|
||||||
|
|
||||||
|
const getRes = await fetch(`${baseUrl}/mcp`, {
|
||||||
|
method: "GET",
|
||||||
|
headers: { Accept: "text/event-stream" },
|
||||||
|
});
|
||||||
|
assert.equal(getRes.status, 401);
|
||||||
|
assert.ok((getRes.headers.get("www-authenticate") || "").includes(`resource_metadata="${baseUrl}/.well-known/oauth-protected-resource"`));
|
||||||
|
});
|
||||||
|
|
||||||
|
test("OAuth 2: RFC 9728 Protected Resource Metadata & RFC 8414 Authorization Server Metadata endpoints return valid JSON", async () => {
|
||||||
|
for (const p of ["/.well-known/oauth-protected-resource", "/.well-known/oauth-protected-resource/mcp"]) {
|
||||||
|
const res = await fetch(`${baseUrl}${p}`);
|
||||||
|
assert.equal(res.status, 200);
|
||||||
|
const data = await res.json();
|
||||||
|
assert.equal(data.resource, `${baseUrl}/mcp`);
|
||||||
|
assert.deepEqual(data.authorization_servers, [baseUrl]);
|
||||||
|
assert.ok(data.bearer_methods_supported.includes("header"));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const p of ["/.well-known/oauth-authorization-server", "/.well-known/openid-configuration"]) {
|
||||||
|
const res = await fetch(`${baseUrl}${p}`);
|
||||||
|
assert.equal(res.status, 200);
|
||||||
|
const data = await res.json();
|
||||||
|
assert.equal(data.issuer, baseUrl);
|
||||||
|
assert.equal(data.authorization_endpoint, `${baseUrl}/oauth/authorize`);
|
||||||
|
assert.equal(data.token_endpoint, `${baseUrl}/oauth/token`);
|
||||||
|
assert.equal(data.registration_endpoint, `${baseUrl}/oauth/register`);
|
||||||
|
assert.ok(data.code_challenge_methods_supported.includes("S256"));
|
||||||
|
assert.ok(data.grant_types_supported.includes("authorization_code"));
|
||||||
|
assert.ok(data.grant_types_supported.includes("refresh_token"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test("OAuth 3: RFC 7591 Dynamic Client Registration allows Google googleusercontent.com redirect URIs & blocks untrusted hosts", async () => {
|
||||||
|
const goodRes = await fetch(`${baseUrl}/oauth/register`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify({
|
||||||
|
client_name: "Google Gemini",
|
||||||
|
redirect_uris: ["https://oauth-redirect.googleusercontent.com/r/gemini-aura-test"],
|
||||||
|
token_endpoint_auth_method: "none",
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
assert.equal(goodRes.status, 201);
|
||||||
|
const client = await goodRes.json();
|
||||||
|
assert.ok(client.client_id.startsWith("aura_dcr_"));
|
||||||
|
assert.deepEqual(client.redirect_uris, ["https://oauth-redirect.googleusercontent.com/r/gemini-aura-test"]);
|
||||||
|
|
||||||
|
const badRes = await fetch(`${baseUrl}/oauth/register`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify({
|
||||||
|
client_name: "Untrusted Phish",
|
||||||
|
redirect_uris: ["https://evil.example.com/steal-code"],
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
assert.equal(badRes.status, 400);
|
||||||
|
const badBody = await badRes.json();
|
||||||
|
assert.equal(badBody.error, "invalid_redirect_uri");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("OAuth 4: Consent UI is global Silicon Valley grade (inline SVG logo, Google SSO, zero internal Snehalata/test-key leaks)", async () => {
|
||||||
|
const redirectUri = "https://oauth-redirect.googleusercontent.com/r/gemini-ui-audit";
|
||||||
|
const { challenge } = makePkcePair();
|
||||||
|
const authUrl = new URL(`${baseUrl}/oauth/authorize`);
|
||||||
|
authUrl.searchParams.set("response_type", "code");
|
||||||
|
authUrl.searchParams.set("client_id", "google-gemini");
|
||||||
|
authUrl.searchParams.set("redirect_uri", redirectUri);
|
||||||
|
authUrl.searchParams.set("scope", "read write");
|
||||||
|
authUrl.searchParams.set("state", "st_ui");
|
||||||
|
authUrl.searchParams.set("code_challenge", challenge);
|
||||||
|
authUrl.searchParams.set("code_challenge_method", "S256");
|
||||||
|
|
||||||
|
const res = await fetch(authUrl.toString());
|
||||||
|
assert.equal(res.status, 200);
|
||||||
|
const html = await res.text();
|
||||||
|
// Inline SVG logo (no external img tag that can break)
|
||||||
|
assert.ok(html.includes("<svg") && html.includes('aria-label="Aura Courier MCP"'));
|
||||||
|
assert.ok(!html.includes("/assets/courier-logo.jpg"));
|
||||||
|
// Global SSO + Google Sign-In present
|
||||||
|
assert.ok(html.includes("Continue with Google"));
|
||||||
|
assert.ok(html.includes("https://auth.auraajenticai.cloud/login/google"));
|
||||||
|
assert.ok(html.includes("Continue in Read-Only Sandbox"));
|
||||||
|
// Zero internal brand or raw test-key leaks
|
||||||
|
assert.ok(!/snehalata/i.test(html));
|
||||||
|
assert.ok(!html.includes("snl_mcp_"));
|
||||||
|
assert.ok(!html.includes("aura_ro_public_inspector_2026"));
|
||||||
|
assert.ok(!html.includes("Master Key"));
|
||||||
|
});
|
||||||
|
|
||||||
|
test("OAuth 5: 1-Click Aura SSO cookie (aura_access) authorizes owner with full master access & zero key typing", async () => {
|
||||||
|
const redirectUri = "https://oauth-redirect.googleusercontent.com/r/gemini-sso-owner";
|
||||||
|
const { verifier, challenge } = makePkcePair();
|
||||||
|
const ssoCookie = makeAuraSsoCookie({
|
||||||
|
sub: "11111111-2222-3333-4444-555555555555",
|
||||||
|
email: "ceo@auraajenticai.cloud",
|
||||||
|
role: "owner",
|
||||||
|
});
|
||||||
|
|
||||||
|
const authUrl = new URL(`${baseUrl}/oauth/authorize`);
|
||||||
|
authUrl.searchParams.set("response_type", "code");
|
||||||
|
authUrl.searchParams.set("client_id", "google-gemini");
|
||||||
|
authUrl.searchParams.set("redirect_uri", redirectUri);
|
||||||
|
authUrl.searchParams.set("scope", "read write");
|
||||||
|
authUrl.searchParams.set("state", "st_sso");
|
||||||
|
authUrl.searchParams.set("code_challenge", challenge);
|
||||||
|
authUrl.searchParams.set("code_challenge_method", "S256");
|
||||||
|
|
||||||
|
const consentRes = await fetch(authUrl.toString(), { headers: { Cookie: ssoCookie } });
|
||||||
|
assert.equal(consentRes.status, 200);
|
||||||
|
const consentHtml = await consentRes.text();
|
||||||
|
assert.ok(consentHtml.includes("ceo@auraajenticai.cloud"));
|
||||||
|
assert.ok(consentHtml.includes("Allow Access"));
|
||||||
|
const csrfToken = extractHiddenInput(consentHtml, "csrf_token");
|
||||||
|
|
||||||
|
const approveRes = await fetch(`${baseUrl}/oauth/authorize`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
Cookie: ssoCookie,
|
||||||
|
},
|
||||||
|
body: new URLSearchParams({
|
||||||
|
client_id: "google-gemini",
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
state: "st_sso",
|
||||||
|
scope: "read write",
|
||||||
|
code_challenge: challenge,
|
||||||
|
code_challenge_method: "S256",
|
||||||
|
csrf_token: csrfToken,
|
||||||
|
auth_mode: "sso",
|
||||||
|
decision: "approve",
|
||||||
|
}).toString(),
|
||||||
|
redirect: "manual",
|
||||||
|
});
|
||||||
|
assert.equal(approveRes.status, 302);
|
||||||
|
const code = new URL(approveRes.headers.get("location")).searchParams.get("code");
|
||||||
|
|
||||||
|
const tokRes = await fetch(`${baseUrl}/oauth/token`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
grant_type: "authorization_code",
|
||||||
|
code,
|
||||||
|
client_id: "google-gemini",
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
code_verifier: verifier,
|
||||||
|
}).toString(),
|
||||||
|
});
|
||||||
|
assert.equal(tokRes.status, 200);
|
||||||
|
const tokens = await tokRes.json();
|
||||||
|
assert.equal(tokens.scope, "read write");
|
||||||
|
|
||||||
|
const mcpCall = await fetch(`${baseUrl}/mcp`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Authorization: `Bearer ${tokens.access_token}`,
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
jsonrpc: "2.0",
|
||||||
|
id: 50,
|
||||||
|
method: "tools/call",
|
||||||
|
params: { name: "get_balance", arguments: { courier: "steadfast" } },
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
assert.equal(mcpCall.status, 200);
|
||||||
|
const body = await mcpCall.json();
|
||||||
|
assert.equal(body.result.isError, false);
|
||||||
|
assert.equal(JSON.parse(body.result.content[0].text).data.amount_bdt, 14250);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("OAuth 6: End-to-End API Key PKCE S256 flow -> Non-Rotating Refresh -> Static Dual-Auth -> Revocation", async () => {
|
||||||
|
const redirectUri = "https://oauth-redirect.googleusercontent.com/r/gemini-live-flow";
|
||||||
|
const regRes = await fetch(`${baseUrl}/oauth/register`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify({
|
||||||
|
client_name: "Google Gemini",
|
||||||
|
redirect_uris: [redirectUri],
|
||||||
|
token_endpoint_auth_method: "none",
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
assert.equal(regRes.status, 201);
|
||||||
|
const { client_id: clientId } = await regRes.json();
|
||||||
|
|
||||||
|
const { verifier, challenge } = makePkcePair();
|
||||||
|
const state = "gemini_state_xyz_991";
|
||||||
|
|
||||||
|
const authUrl = new URL(`${baseUrl}/oauth/authorize`);
|
||||||
|
authUrl.searchParams.set("response_type", "code");
|
||||||
|
authUrl.searchParams.set("client_id", clientId);
|
||||||
|
authUrl.searchParams.set("redirect_uri", redirectUri);
|
||||||
|
authUrl.searchParams.set("scope", "read write");
|
||||||
|
authUrl.searchParams.set("state", state);
|
||||||
|
authUrl.searchParams.set("code_challenge", challenge);
|
||||||
|
authUrl.searchParams.set("code_challenge_method", "S256");
|
||||||
|
|
||||||
|
const consentHtml = await (await fetch(authUrl.toString())).text();
|
||||||
|
const csrfToken = extractHiddenInput(consentHtml, "csrf_token");
|
||||||
|
|
||||||
|
// Deny -> error=access_denied
|
||||||
|
const denyRes = await fetch(`${baseUrl}/oauth/authorize`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
client_id: clientId,
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
state,
|
||||||
|
scope: "read write",
|
||||||
|
code_challenge: challenge,
|
||||||
|
code_challenge_method: "S256",
|
||||||
|
csrf_token: csrfToken,
|
||||||
|
auth_mode: "apikey",
|
||||||
|
decision: "deny",
|
||||||
|
}).toString(),
|
||||||
|
redirect: "manual",
|
||||||
|
});
|
||||||
|
assert.equal(denyRes.status, 302);
|
||||||
|
assert.equal(new URL(denyRes.headers.get("location")).searchParams.get("error"), "access_denied");
|
||||||
|
|
||||||
|
// Invalid API key stays on form with clean error
|
||||||
|
const badKeyRes = await fetch(`${baseUrl}/oauth/authorize`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
client_id: clientId,
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
state,
|
||||||
|
scope: "read write",
|
||||||
|
code_challenge: challenge,
|
||||||
|
code_challenge_method: "S256",
|
||||||
|
csrf_token: csrfToken,
|
||||||
|
auth_mode: "apikey",
|
||||||
|
decision: "approve",
|
||||||
|
api_key: "totally_wrong_key_123",
|
||||||
|
}).toString(),
|
||||||
|
redirect: "manual",
|
||||||
|
});
|
||||||
|
assert.equal(badKeyRes.status, 200);
|
||||||
|
assert.ok((await badKeyRes.text()).includes("Invalid API key"));
|
||||||
|
|
||||||
|
// Valid API key -> 302 with code
|
||||||
|
const approveRes = await fetch(`${baseUrl}/oauth/authorize`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
client_id: clientId,
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
state,
|
||||||
|
scope: "read write",
|
||||||
|
code_challenge: challenge,
|
||||||
|
code_challenge_method: "S256",
|
||||||
|
csrf_token: csrfToken,
|
||||||
|
auth_mode: "apikey",
|
||||||
|
decision: "approve",
|
||||||
|
api_key: process.env.AURA_API_KEY,
|
||||||
|
}).toString(),
|
||||||
|
redirect: "manual",
|
||||||
|
});
|
||||||
|
assert.equal(approveRes.status, 302);
|
||||||
|
const authCode = new URL(approveRes.headers.get("location")).searchParams.get("code");
|
||||||
|
|
||||||
|
// Wrong PKCE rejected
|
||||||
|
const wrongPkce = await fetch(`${baseUrl}/oauth/token`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
grant_type: "authorization_code",
|
||||||
|
code: authCode,
|
||||||
|
client_id: clientId,
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
code_verifier: "wrong_verifier_abcdefghijklmnopqrstuvwxyz_0123456789",
|
||||||
|
}).toString(),
|
||||||
|
});
|
||||||
|
assert.equal(wrongPkce.status, 400);
|
||||||
|
|
||||||
|
// Correct PKCE -> tokens
|
||||||
|
const tokRes = await fetch(`${baseUrl}/oauth/token`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
grant_type: "authorization_code",
|
||||||
|
code: authCode,
|
||||||
|
client_id: clientId,
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
code_verifier: verifier,
|
||||||
|
}).toString(),
|
||||||
|
});
|
||||||
|
assert.equal(tokRes.status, 200);
|
||||||
|
const tokens = await tokRes.json();
|
||||||
|
assert.equal(tokens.token_type, "Bearer");
|
||||||
|
|
||||||
|
// Replay rejected
|
||||||
|
const replayRes = await fetch(`${baseUrl}/oauth/token`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
grant_type: "authorization_code",
|
||||||
|
code: authCode,
|
||||||
|
client_id: clientId,
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
code_verifier: verifier,
|
||||||
|
}).toString(),
|
||||||
|
});
|
||||||
|
assert.equal(replayRes.status, 400);
|
||||||
|
|
||||||
|
// Non-rotating refresh token
|
||||||
|
const refRes = await fetch(`${baseUrl}/oauth/token`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
grant_type: "refresh_token",
|
||||||
|
refresh_token: tokens.refresh_token,
|
||||||
|
client_id: clientId,
|
||||||
|
}).toString(),
|
||||||
|
});
|
||||||
|
assert.equal(refRes.status, 200);
|
||||||
|
const refreshed = await refRes.json();
|
||||||
|
assert.equal(refreshed.refresh_token, tokens.refresh_token);
|
||||||
|
assert.notEqual(refreshed.access_token, tokens.access_token);
|
||||||
|
|
||||||
|
// Static Dual-Auth still works
|
||||||
|
const staticRes = await fetch(`${baseUrl}/mcp`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Authorization: `Bearer ${process.env.AURA_API_KEY}`,
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
jsonrpc: "2.0",
|
||||||
|
id: 12,
|
||||||
|
method: "tools/call",
|
||||||
|
params: { name: "get_balance", arguments: { courier: "steadfast" } },
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
assert.equal(staticRes.status, 200);
|
||||||
|
|
||||||
|
// Revocation
|
||||||
|
const revRes = await fetch(`${baseUrl}/oauth/revoke`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({ token: tokens.access_token }).toString(),
|
||||||
|
});
|
||||||
|
assert.equal(revRes.status, 200);
|
||||||
|
|
||||||
|
const afterRev = await fetch(`${baseUrl}/mcp`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Authorization: `Bearer ${tokens.access_token}`,
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
jsonrpc: "2.0",
|
||||||
|
id: 13,
|
||||||
|
method: "tools/call",
|
||||||
|
params: { name: "get_balance", arguments: { courier: "steadfast" } },
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
assert.equal(afterRev.status, 401);
|
||||||
|
assert.ok((afterRev.headers.get("www-authenticate") || "").includes('error="invalid_token"'));
|
||||||
|
});
|
||||||
|
|
||||||
|
test("OAuth 7: 1-Click Read-Only Sandbox strictly limits scope to read without exposing any raw API key", async () => {
|
||||||
|
const redirectUri = "https://oauth-redirect.googleusercontent.com/r/gemini-sandbox";
|
||||||
|
const { verifier, challenge } = makePkcePair();
|
||||||
|
|
||||||
|
const authUrl = new URL(`${baseUrl}/oauth/authorize`);
|
||||||
|
authUrl.searchParams.set("response_type", "code");
|
||||||
|
authUrl.searchParams.set("client_id", "gemini-sandbox");
|
||||||
|
authUrl.searchParams.set("redirect_uri", redirectUri);
|
||||||
|
authUrl.searchParams.set("scope", "read write");
|
||||||
|
authUrl.searchParams.set("state", "st_sbx");
|
||||||
|
authUrl.searchParams.set("code_challenge", challenge);
|
||||||
|
authUrl.searchParams.set("code_challenge_method", "S256");
|
||||||
|
|
||||||
|
const consentHtml = await (await fetch(authUrl.toString())).text();
|
||||||
|
const csrfToken = extractHiddenInput(consentHtml, "csrf_token");
|
||||||
|
|
||||||
|
const approveRes = await fetch(`${baseUrl}/oauth/authorize`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
client_id: "gemini-sandbox",
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
state: "st_sbx",
|
||||||
|
scope: "read write",
|
||||||
|
code_challenge: challenge,
|
||||||
|
code_challenge_method: "S256",
|
||||||
|
csrf_token: csrfToken,
|
||||||
|
auth_mode: "sandbox",
|
||||||
|
decision: "sandbox",
|
||||||
|
}).toString(),
|
||||||
|
redirect: "manual",
|
||||||
|
});
|
||||||
|
assert.equal(approveRes.status, 302);
|
||||||
|
const code = new URL(approveRes.headers.get("location")).searchParams.get("code");
|
||||||
|
|
||||||
|
const tokRes = await fetch(`${baseUrl}/oauth/token`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
|
body: new URLSearchParams({
|
||||||
|
grant_type: "authorization_code",
|
||||||
|
code,
|
||||||
|
client_id: "gemini-sandbox",
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
code_verifier: verifier,
|
||||||
|
}).toString(),
|
||||||
|
});
|
||||||
|
assert.equal(tokRes.status, 200);
|
||||||
|
const tokens = await tokRes.json();
|
||||||
|
assert.equal(tokens.scope, "read");
|
||||||
|
|
||||||
|
const writeAttempt = await fetch(`${baseUrl}/mcp`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Authorization: `Bearer ${tokens.access_token}`,
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
jsonrpc: "2.0",
|
||||||
|
id: 14,
|
||||||
|
method: "tools/call",
|
||||||
|
params: { name: "create_parcel", arguments: { courier: "steadfast" } },
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
assert.equal(writeAttempt.status, 200);
|
||||||
|
const writeBody = await writeAttempt.json();
|
||||||
|
assert.equal(writeBody.result.isError, true);
|
||||||
|
assert.ok(writeBody.result.content[0].text.includes("Insufficient scope"));
|
||||||
|
});
|
||||||
|
|
||||||
|
test("OAuth 8: Global Partner Directory Compliance (13 MCP tool annotations, claude.com/chatgpt/cursor/zapier/n8n DCR, and GET /terms)", async () => {
|
||||||
|
// 1. All 13 tools expose MCP 2025-03-26 annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint)
|
||||||
|
const listRes = await fetch(`${baseUrl}/mcp`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify({ jsonrpc: "2.0", id: 80, method: "tools/list", params: {} }),
|
||||||
|
});
|
||||||
|
assert.equal(listRes.status, 200);
|
||||||
|
const tools = (await listRes.json()).result.tools;
|
||||||
|
assert.equal(tools.length, 13);
|
||||||
|
for (const t of tools) {
|
||||||
|
assert.ok(t.annotations && typeof t.annotations.title === "string", `missing title annotation on ${t.name}`);
|
||||||
|
assert.equal(typeof t.annotations.readOnlyHint, "boolean", `missing readOnlyHint on ${t.name}`);
|
||||||
|
assert.equal(typeof t.annotations.destructiveHint, "boolean", `missing destructiveHint on ${t.name}`);
|
||||||
|
assert.equal(typeof t.annotations.idempotentHint, "boolean", `missing idempotentHint on ${t.name}`);
|
||||||
|
assert.equal(typeof t.annotations.openWorldHint, "boolean", `missing openWorldHint on ${t.name}`);
|
||||||
|
}
|
||||||
|
const byName = Object.fromEntries(tools.map((t) => [t.name, t.annotations]));
|
||||||
|
assert.equal(byName.track_parcel.readOnlyHint, true);
|
||||||
|
assert.equal(byName.create_parcel.readOnlyHint, false);
|
||||||
|
assert.equal(byName.cancel_parcel.destructiveHint, true);
|
||||||
|
assert.equal(byName.resolve_ndr_issue.readOnlyHint, true);
|
||||||
|
|
||||||
|
// 2. Major AI partner callback URIs accepted via RFC 7591 DCR
|
||||||
|
const partnerCallbacks = [
|
||||||
|
"https://claude.com/api/mcp/auth_callback",
|
||||||
|
"https://claude.ai/api/mcp/auth_callback",
|
||||||
|
"https://chatgpt.com/connector_platform_oauth_redirect",
|
||||||
|
"https://cursor.com/oauth/callback",
|
||||||
|
"https://zapier.com/dashboard/auth/oauth/return/App123",
|
||||||
|
"https://my.n8n.cloud/rest/oauth2-credential/callback",
|
||||||
|
];
|
||||||
|
const regRes = await fetch(`${baseUrl}/oauth/register`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify({ client_name: "Global AI Directory Suite", redirect_uris: partnerCallbacks }),
|
||||||
|
});
|
||||||
|
assert.equal(regRes.status, 201);
|
||||||
|
|
||||||
|
// 3. Legal /terms & /privacy endpoints return 200 HTML
|
||||||
|
const termsRes = await fetch(`${baseUrl}/terms`);
|
||||||
|
assert.equal(termsRes.status, 200);
|
||||||
|
const termsHtml = await termsRes.text();
|
||||||
|
assert.ok(termsHtml.includes("Terms of Service"));
|
||||||
|
});
|
||||||
+3
-3
@@ -439,7 +439,7 @@ test("11. GET /health unauthenticated returns only { ok, version }; with admin t
|
|||||||
const adminBody = await adminRes.json();
|
const adminBody = await adminRes.json();
|
||||||
assert.equal(adminBody.ok, true);
|
assert.equal(adminBody.ok, true);
|
||||||
assert.equal(adminBody.version, expectedVersion);
|
assert.equal(adminBody.version, expectedVersion);
|
||||||
assert.equal(adminBody.tools_count, 12);
|
assert.equal(adminBody.tools_count, 13);
|
||||||
assert.ok(adminBody.performance);
|
assert.ok(adminBody.performance);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -811,7 +811,7 @@ test("24. Upstream Cancellation: Steadfast cancelParcel handles already-cancelle
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test("25. AI Connector: Unauthenticated tools/list discovery succeeds and lists 12 tools", async () => {
|
test("25. AI Connector: Unauthenticated tools/list discovery succeeds and lists 13 tools", 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" },
|
||||||
@@ -821,5 +821,5 @@ test("25. AI Connector: Unauthenticated tools/list discovery succeeds and lists
|
|||||||
const body = await res.json();
|
const body = await res.json();
|
||||||
assert.equal(body.jsonrpc, "2.0");
|
assert.equal(body.jsonrpc, "2.0");
|
||||||
assert.ok(Array.isArray(body.result.tools));
|
assert.ok(Array.isArray(body.result.tools));
|
||||||
assert.equal(body.result.tools.length, 12);
|
assert.equal(body.result.tools.length, 13);
|
||||||
});
|
});
|
||||||
|
|||||||
+60
-9
@@ -41,9 +41,12 @@ async function validateManifest() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(json.$schema === 'https://antigravity.google/schemas/v1/plugin.json', 'plugin.json declares official Antigravity $schema');
|
||||||
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 === PKG_VERSION, `version matches package.json ('${PKG_VERSION}', got '${json.version}')`);
|
assert(json.version === PKG_VERSION, `version matches package.json ('${PKG_VERSION}', got '${json.version}')`);
|
||||||
|
assert(json.privacyPolicyUrl === 'https://courier.auraajenticai.cloud/privacy', 'privacyPolicyUrl is configured');
|
||||||
|
assert(json.termsOfServiceUrl === 'https://courier.auraajenticai.cloud/terms', 'termsOfServiceUrl is configured');
|
||||||
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'`);
|
||||||
@@ -65,8 +68,7 @@ async function validateMcpConfig() {
|
|||||||
const content = fs.readFileSync(mcpConfigPath, 'utf8');
|
const content = fs.readFileSync(mcpConfigPath, 'utf8');
|
||||||
const json = JSON.parse(content);
|
const json = JSON.parse(content);
|
||||||
assert(json.mcpServers && json.mcpServers['aura-courier'], 'server aura-courier is declared');
|
assert(json.mcpServers && json.mcpServers['aura-courier'], 'server aura-courier is declared');
|
||||||
assert(json.mcpServers['aura-courier'].url === 'https://courier.auraajenticai.cloud/mcp', 'remote MCP endpoint is https://courier.auraajenticai.cloud/mcp');
|
assert(json.mcpServers['aura-courier'].serverUrl === 'https://courier.auraajenticai.cloud/mcp', 'remote MCP serverUrl is https://courier.auraajenticai.cloud/mcp');
|
||||||
assert(json.mcpServers['aura-courier'].transport === 'streamable-http', 'transport is streamable-http');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function validateAssets() {
|
async function validateAssets() {
|
||||||
@@ -94,7 +96,11 @@ async function validateSkillsAndRules() {
|
|||||||
'validate_and_geocode_address',
|
'validate_and_geocode_address',
|
||||||
'calculate_delivery_zone_and_fee',
|
'calculate_delivery_zone_and_fee',
|
||||||
'compare_courier_rates',
|
'compare_courier_rates',
|
||||||
'resolve_ndr_issue'
|
'resolve_ndr_issue',
|
||||||
|
'cancel_parcel',
|
||||||
|
'update_parcel',
|
||||||
|
'bulk_create_parcels',
|
||||||
|
'get_webhook_events'
|
||||||
];
|
];
|
||||||
for (const tool of expectedTools) {
|
for (const tool of expectedTools) {
|
||||||
assert(skillContent.includes(`\`${tool}\``), `skill documents tool '${tool}'`);
|
assert(skillContent.includes(`\`${tool}\``), `skill documents tool '${tool}'`);
|
||||||
@@ -112,28 +118,65 @@ async function validateSkillsAndRules() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function validateRemoteMcpServer() {
|
async function validateRemoteMcpServer() {
|
||||||
console.log('\n--- 5. Validating Live Remote MCP Handshake & Tools ---');
|
console.log('\n--- 5. Validating Live Remote MCP OAuth 2.1 Discovery, Handshake & 13 Tools ---');
|
||||||
const endpoint = 'https://courier.auraajenticai.cloud/mcp';
|
const baseOrigin = 'https://courier.auraajenticai.cloud';
|
||||||
|
const endpoint = `${baseOrigin}/mcp`;
|
||||||
|
const authToken = process.env.AURA_API_KEY || 'aura_ro_public_inspector_2026';
|
||||||
try {
|
try {
|
||||||
const initRes = await fetch(endpoint, {
|
// 5a. RFC 9728 Protected Resource Metadata & RFC 8414 Authorization Server Metadata
|
||||||
|
const prmRes = await fetch(`${baseOrigin}/.well-known/oauth-protected-resource`);
|
||||||
|
assert(prmRes.status === 200, `RFC 9728 /.well-known/oauth-protected-resource returned HTTP 200 (got ${prmRes.status})`);
|
||||||
|
const prmData = await prmRes.json();
|
||||||
|
assert(prmData.resource === endpoint, `protected resource matches ${endpoint}`);
|
||||||
|
|
||||||
|
const asmRes = await fetch(`${baseOrigin}/.well-known/oauth-authorization-server`);
|
||||||
|
assert(asmRes.status === 200, `RFC 8414 /.well-known/oauth-authorization-server returned HTTP 200 (got ${asmRes.status})`);
|
||||||
|
const asmData = await asmRes.json();
|
||||||
|
assert(Array.isArray(asmData.code_challenge_methods_supported) && asmData.code_challenge_methods_supported.includes('S256'), 'OAuth 2.1 PKCE S256 advertised');
|
||||||
|
|
||||||
|
// 5b. Unauthenticated initialize returns 401 + WWW-Authenticate challenge
|
||||||
|
const unauthRes = await fetch(endpoint, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Accept': 'application/json, text/event-stream'
|
'Accept': 'application/json, text/event-stream'
|
||||||
},
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
jsonrpc: '2.0',
|
||||||
|
id: 0,
|
||||||
|
method: 'initialize',
|
||||||
|
params: {
|
||||||
|
protocolVersion: '2025-03-26',
|
||||||
|
capabilities: {},
|
||||||
|
clientInfo: { name: 'antigravity-validator', version: PKG_VERSION }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
assert(unauthRes.status === 401, `unauthenticated initialize returns HTTP 401 OAuth challenge (got ${unauthRes.status})`);
|
||||||
|
const wwwAuth = unauthRes.headers.get('www-authenticate') || '';
|
||||||
|
assert(wwwAuth.includes('resource_metadata='), '401 includes RFC 9728 WWW-Authenticate resource_metadata header');
|
||||||
|
|
||||||
|
// 5c. Authenticated initialize handshake + 13 live tools
|
||||||
|
const initRes = await fetch(endpoint, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Accept': 'application/json, text/event-stream',
|
||||||
|
'Authorization': `Bearer ${authToken}`
|
||||||
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
jsonrpc: '2.0',
|
jsonrpc: '2.0',
|
||||||
id: 1,
|
id: 1,
|
||||||
method: 'initialize',
|
method: 'initialize',
|
||||||
params: {
|
params: {
|
||||||
protocolVersion: '2024-11-05',
|
protocolVersion: '2025-03-26',
|
||||||
capabilities: {},
|
capabilities: {},
|
||||||
clientInfo: { name: 'antigravity-validator', version: PKG_VERSION }
|
clientInfo: { name: 'antigravity-validator', version: PKG_VERSION }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
assert(initRes.status === 200, `initialize endpoint returned HTTP 200 (got ${initRes.status})`);
|
assert(initRes.status === 200, `authenticated initialize endpoint returned HTTP 200 (got ${initRes.status})`);
|
||||||
const sessionId = initRes.headers.get('mcp-session-id');
|
const sessionId = initRes.headers.get('mcp-session-id');
|
||||||
assert(!!sessionId, `mcp-session-id header received: ${sessionId}`);
|
assert(!!sessionId, `mcp-session-id header received: ${sessionId}`);
|
||||||
|
|
||||||
@@ -145,6 +188,7 @@ async function validateRemoteMcpServer() {
|
|||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Accept': 'application/json, text/event-stream',
|
'Accept': 'application/json, text/event-stream',
|
||||||
|
'Authorization': `Bearer ${authToken}`,
|
||||||
'mcp-session-id': sessionId
|
'mcp-session-id': sessionId
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
@@ -158,7 +202,14 @@ async function validateRemoteMcpServer() {
|
|||||||
assert(toolsRes.status === 200, `tools/list returned HTTP 200`);
|
assert(toolsRes.status === 200, `tools/list returned HTTP 200`);
|
||||||
const toolsData = await toolsRes.json();
|
const toolsData = await toolsRes.json();
|
||||||
const liveTools = toolsData.result?.tools || [];
|
const liveTools = toolsData.result?.tools || [];
|
||||||
assert(liveTools.length === 9, `exactly 9 tools returned by remote server (got ${liveTools.length})`);
|
assert(liveTools.length === 13, `exactly 13 tools returned by remote server (got ${liveTools.length})`);
|
||||||
|
const allAnnotated = liveTools.every(t => t.annotations && typeof t.annotations.readOnlyHint === 'boolean' && typeof t.annotations.destructiveHint === 'boolean');
|
||||||
|
assert(allAnnotated, 'all 13 live tools expose MCP readOnlyHint & destructiveHint annotations');
|
||||||
|
|
||||||
|
const termsRes = await fetch(`${baseOrigin}/terms`);
|
||||||
|
assert(termsRes.status === 200, `Terms of Service /terms returned HTTP 200 (got ${termsRes.status})`);
|
||||||
|
const privRes = await fetch(`${baseOrigin}/privacy`);
|
||||||
|
assert(privRes.status === 200, `Privacy Policy /privacy returned HTTP 200 (got ${privRes.status})`);
|
||||||
|
|
||||||
const liveToolNames = liveTools.map(t => t.name);
|
const liveToolNames = liveTools.map(t => t.name);
|
||||||
console.log(` Live tools on server: [ ${liveToolNames.join(', ')} ]`);
|
console.log(` Live tools on server: [ ${liveToolNames.join(', ')} ]`);
|
||||||
|
|||||||
Reference in New Issue
Block a user