diff --git a/dist/middleware/auth.js b/dist/middleware/auth.js index 76b9394..3df8d52 100644 --- a/dist/middleware/auth.js +++ b/dist/middleware/auth.js @@ -80,6 +80,13 @@ export async function initDynamicAuthStore(pool) { updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() ) `); + } + catch (ddlErr) { + 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, { @@ -95,7 +102,7 @@ export async function initDynamicAuthStore(pool) { console.log(`[Auth] Loaded ${dynamicKeyHashes.size} dynamic MCP key(s) from PostgreSQL.`); } catch (err) { - console.warn("[Auth] Dynamic key table init skipped:", err?.message); + console.warn("[Auth] Dynamic key table load skipped:", err?.message); } } export async function upsertDynamicKeyHash(opts) { diff --git a/guide.html b/guide.html index 712ed54..1fd1ab1 100644 --- a/guide.html +++ b/guide.html @@ -1503,9 +1503,9 @@ </> API & MCP Docs - - đŸĒ - Store Integration Guide + + 🛒 + WooCommerce & Shopify Plugins ❓ @@ -1514,6 +1514,35 @@ + +
+
+ +

WooCommerce & Shopify Standalone Plugins

+

CRM āĻ›āĻžā§œāĻžāχ āϏāϰāĻžāϏāϰāĻŋ āφāĻĒāύāĻžāϰ WooCommerce āĻŦāĻž Shopify āĻ¸ā§āĻŸā§‹āϰ āĻĨ⧇āϕ⧇ ā§§-āĻ•ā§āϞāĻŋāϕ⧇ Steadfast, Pathao, RedX āĻ“ Paperfly āĻĒāĻžāĻ°ā§āϏ⧇āϞ āĻŦ⧁āĻ•āĻŋāĻ‚ āĻāĻŦāĻ‚ āĻĢā§āϰāĻĄ āĻšā§‡āĻ• āϚāĻžāϞ⧁ āĻ•āϰ⧁āύāĨ¤

+
+
+
+
đŸŸŖ WordPress / WooCommerce Plugin (.zip)
+

āφāĻĒāύāĻžāϰ āύāĻŋāĻœā§‡āϰ API Key āϏāĻš āĻĒā§āϰāĻŋ-āϞāĻŋāĻ‚āĻ•āĻĄ WordPress āĻĒā§āϞāĻžāĻ—āχāύ āĻĄāĻžāωāύāϞ⧋āĻĄ āĻ•āϰ⧇ Plugins → Add New → Upload Plugin-āĻ āχāĻ¨ā§āϏāϟāϞ āĻ•āϰ⧁āύāĨ¤ āĻ…āĻ°ā§āĻĄāĻžāϰ āϞāĻŋāĻ¸ā§āĻŸā§‡āχ ā§§-āĻ•ā§āϞāĻŋāĻ• āϕ⧁āϰāĻŋ⧟āĻžāϰ āĻŦ⧁āĻ•āĻŋāĻ‚ āĻ“ āĻĢā§āϰāĻĄ āϰāĻŋāĻ¸ā§āĻ• āĻŦā§āϝāĻžāϜ āĻĒāĻžāĻŦ⧇āύāĨ¤

+
+ âŦ‡ Download WooCommerce .zip ↗ + Open Store Setup ↗ +
+
+
+
đŸŸĸ Shopify Courier & Order Widget
+

Shopify Admin Webhook āĻŦāĻž Aura Client Portal-āĻāϰ Shopify āĻ•āĻžāύ⧇āĻ•ā§āϟāϰ āĻĻāĻŋā§Ÿā§‡ āĻ…āĻŸā§‹āĻŽā§‡āϟāĻŋāĻ• āĻ…āĻ°ā§āĻĄāĻžāϰ āϏāĻŋāĻ™ā§āĻ•, COD āĻĢā§āϰāĻĄ āĻ¸ā§āĻ•ā§āϝāĻžāύ āĻāĻŦāĻ‚ āĻ¸ā§āĻŸā§‡āĻĄāĻĢāĻžāĻ¸ā§āϟ/āĻĒāĻžāĻ āĻžāĻ“ āĻĄāĻŋāϏāĻĒā§āϝāĻžāϚ āϚāĻžāϞ⧁ āĻ•āϰ⧁āύāĨ¤

+
+ Connect Shopify Store ↗ + Test 13 MCP Tools → +
+
+
+
+
diff --git a/index.html b/index.html index 1456e63..a4d04c1 100644 --- a/index.html +++ b/index.html @@ -90,19 +90,20 @@ border-bottom: 1px solid var(--border); } .hbar { - max-width: 1200px; + max-width: 1260px; margin: 0 auto; - padding: 12px 20px; + padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; - gap: 16px; + gap: 12px; } .logo-group { display: flex; align-items: center; - gap: 12px; + gap: 10px; text-decoration: none; + flex-shrink: 0; } .logo-img { width: 40px; @@ -145,18 +146,21 @@ .nav-links { display: flex; align-items: center; - gap: 14px; + gap: 10px; + min-width: 0; + flex-shrink: 1; } .nav-item { color: var(--text-muted); white-space: nowrap; text-decoration: none; - font-size: 13.5px; + font-size: 12.5px; font-weight: 600; transition: color 0.18s; display: inline-flex; align-items: center; - gap: 6px; + gap: 5px; + flex-shrink: 0; } .nav-item:hover { color: #fff; } .nav-item.active { @@ -808,6 +812,14 @@ .dock-item svg { width: 19px; height: 19px; } /* ===== Responsive Breakpoints ===== */ + @media (max-width: 1220px) { + .logo-sub { display: none; } + .nav-links { gap: 8px; } + .nav-item { font-size: 12px; } + .health-pill { padding: 4px 8px; font-size: 11px; } + .login-btn { padding: 5px 10px; font-size: 12px; } + } + @media (max-width: 960px) { .hero { grid-template-columns: 1fr; gap: 32px; } .hero-title { font-size: 34px; } @@ -1327,7 +1339,7 @@
-
12
+
13
MCP Tools (JSON-RPC)
@@ -1534,7 +1546,7 @@
- +
-

All 12 MCP Tools

-

Aura Courier MCP-āĻ āĻĨāĻžāĻ•āĻž ⧧⧍āϟāĻŋ āĻļāĻ•ā§āϤāĻŋāĻļāĻžāϞ⧀ āϟ⧁āϞ, āϝ⧇āϗ⧁āϞ⧋ āϏāϰāĻžāϏāϰāĻŋ āφāĻĒāύāĻžāϰ AI āĻāĻœā§‡āĻ¨ā§āϟ āĻŦāĻž āĻ…āĻŸā§‹āĻŽā§‡āĻļāύ āĻĢā§āϞ⧋āϤ⧇ āĻ•āĻžāϜ āĻ•āϰ⧇āĨ¤

+

All 13 MCP Tools

+

Aura Courier MCP-āĻ āĻĨāĻžāĻ•āĻž ā§§ā§ŠāϟāĻŋ āĻļāĻ•ā§āϤāĻŋāĻļāĻžāϞ⧀ āϟ⧁āϞ, āϝ⧇āϗ⧁āϞ⧋ āϏāϰāĻžāϏāϰāĻŋ āφāĻĒāύāĻžāϰ AI āĻāĻœā§‡āĻ¨ā§āϟ āĻŦāĻž āĻ…āĻŸā§‹āĻŽā§‡āĻļāύ āĻĢā§āϞ⧋āϤ⧇ āĻ•āĻžāϜ āĻ•āϰ⧇āĨ¤

@@ -1760,6 +1772,24 @@
bulk_create_parcels
āĻāĻ• āĻ•ā§āϞāĻŋāϕ⧇ ā§§ā§Ļā§ĻāϟāĻŋ āĻĒāĻ°ā§āϝāĻ¨ā§āϤ āĻĒāĻžāĻ°ā§āϏ⧇āϞ āĻŦā§āϝāĻžāϚ āĻŦ⧁āĻ•āĻŋāĻ‚ āĻŦāĻž āĻ­ā§āϝāĻžāϞāĻŋāĻĄā§‡āĻļāύ āĻ•āϰ⧁āύ āωāχāĻĨ āφāχāϏ⧋āϞ⧇āĻŸā§‡āĻĄ āĻāϰāϰ āĻšā§āϝāĻžāĻ¨ā§āĻĄāϞāĻŋāĻ‚āĨ¤
+ + + +
+
+
+
+ + + + + +
+ +
+
get_webhook_events
+
Pathao, Steadfast, RedX āĻ“ Paperfly-āĻāϰ āϰāĻŋā§Ÿā§‡āϞ-āϟāĻžāχāĻŽ āĻĄā§‡āϞāĻŋāĻ­āĻžāϰāĻŋ āĻ“ā§Ÿā§‡āĻŦāĻšā§āĻ• āχāϭ⧇āĻ¨ā§āϟ āϞāĻ— āϞāĻžāχāĻ­ āĻĻ⧇āϖ⧁āύāĨ¤
+
@@ -2188,8 +2218,8 @@ btn_check_risk: "Check Risk →", fraud_desc_safe: "New customer - Safe to proceed ¡ Zero Mock Data", tools_tag: "Core Protocol", - tools_title: "All 12 MCP Tools", - tools_subtitle: "Aura Courier MCP-āĻ āĻĨāĻžāĻ•āĻž ⧧⧍āϟāĻŋ āĻļāĻ•ā§āϤāĻŋāĻļāĻžāϞ⧀ āϟ⧁āϞ, āϝ⧇āϗ⧁āϞ⧋ āϏāϰāĻžāϏāϰāĻŋ āφāĻĒāύāĻžāϰ AI āĻāĻœā§‡āĻ¨ā§āϟ āĻŦāĻž āĻ…āĻŸā§‹āĻŽā§‡āĻļāύ āĻĢā§āϞ⧋āϤ⧇ āĻ•āĻžāϜ āĻ•āϰ⧇āĨ¤", + tools_title: "All 13 MCP Tools", + tools_subtitle: "Aura Courier MCP-āĻ āĻĨāĻžāĻ•āĻž ā§§ā§ŠāϟāĻŋ āĻļāĻ•ā§āϤāĻŋāĻļāĻžāϞ⧀ āϟ⧁āϞ, āϝ⧇āϗ⧁āϞ⧋ āϏāϰāĻžāϏāϰāĻŋ āφāĻĒāύāĻžāϰ AI āĻāĻœā§‡āĻ¨ā§āϟ āĻŦāĻž āĻ…āĻŸā§‹āĻŽā§‡āĻļāύ āĻĢā§āϞ⧋āϤ⧇ āĻ•āĻžāϜ āĻ•āϰ⧇āĨ¤", t1_desc: "āύāϤ⧁āύ āĻĒāĻžāĻ°ā§āϏ⧇āϞ āĻŦāĻž āĻĄā§‡āϞāĻŋāĻ­āĻžāϰāĻŋ āĻ…āĻ°ā§āĻĄāĻžāϰ āϤ⧈āϰāĻŋ āĻ•āϰ⧁āύ (Steadfast, Pathao, RedX, Paperfly-āϤ⧇ ā§§-āĻ•ā§āϞāĻŋāϕ⧇)āĨ¤", t2_desc: "āĻĒāĻžāĻ°ā§āϏ⧇āϞ āĻŸā§āĻ°ā§āϝāĻžāĻ•āĻŋāĻ‚ āĻ¸ā§āĻŸā§āϝāĻžāϟāĻžāϏ āĻ“ āϞāĻžāχāĻ­ āĻĄā§‡āϞāĻŋāĻ­āĻžāϰāĻŋ āϟāĻžāχāĻŽāϞāĻžāχāύ āĻāĻ• āĻ•ā§āϞāĻŋāϕ⧇ āĻŸā§āĻ°ā§āϝāĻžāĻ• āĻ•āϰ⧁āύāĨ¤", t3_desc: "āϏāĻŦ āϕ⧁āϰāĻŋāϝāĻŧāĻžāϰ āĻŽāĻžāĻ°ā§āĻšā§‡āĻ¨ā§āϟ āĻāĻ•āĻžāωāĻ¨ā§āĻŸā§‡āϰ āϞāĻžāχāĻ­ āĻŦā§āϝāĻžāϞ⧇āĻ¨ā§āϏ, āĻĒ⧇āĻ¨ā§āĻĄāĻŋāĻ‚ āĻĄāĻŋāϏāĻŦāĻžāĻ°ā§āϏāĻŽā§‡āĻ¨ā§āϟ āĻ“ āĻĒ⧇āφāωāϟ āϜāĻžāύ⧁āύāĨ¤", @@ -2210,6 +2240,7 @@ t10_desc: "āϝ⧇āϕ⧋āύ⧋ āϕ⧁āϰāĻŋ⧟āĻžāϰ⧇ āĻŦ⧁āĻ• āĻ•āϰāĻž āĻĒāĻžāĻ°ā§āϏ⧇āϞ āĻ•ā§āϝāĻžāύāϏ⧇āϞ⧇āĻļāύ āϰāĻŋāϕ⧋āϝāĻŧ⧇āĻ¸ā§āϟ āĻĒāĻžāĻ āĻžāύ āĻŦāĻž āĻ¸ā§āĻŦāϝāĻŧāĻ‚āĻ•ā§āϰāĻŋāϝāĻŧ āĻŦāĻžāϤāĻŋāϞ āĻ•āϰ⧁āύāĨ¤", t11_desc: "āχāύ-āĻŸā§āϰāĻžāύāϜāĻŋāϟ āĻĒāĻžāĻ°ā§āϏ⧇āϞ⧇āϰ āĻĄā§‡āϞāĻŋāĻ­āĻžāϰāĻŋ āύ⧋āϟ, āĻ—ā§āϰāĻžāĻšāϕ⧇āϰ āĻĢā§‹āύ āύāĻŽā§āĻŦāϰ āĻŦāĻž āϏāĻŋāĻ“āĻĄāĻŋ āϟāĻžāĻ•āĻžāϰ āĻĒāϰāĻŋāĻŽāĻžāĻŖ āφāĻĒāĻĄā§‡āϟ āĻ•āϰ⧁āύāĨ¤", t12_desc: "āĻāĻ• āĻ•ā§āϞāĻŋāϕ⧇ ā§§ā§Ļā§ĻāϟāĻŋ āĻĒāĻ°ā§āϝāĻ¨ā§āϤ āĻĒāĻžāĻ°ā§āϏ⧇āϞ āĻŦā§āϝāĻžāϚ āĻŦ⧁āĻ•āĻŋāĻ‚ āĻŦāĻž āĻ­ā§āϝāĻžāϞāĻŋāĻĄā§‡āĻļāύ āĻ•āϰ⧁āύ āωāχāĻĨ āφāχāϏ⧋āϞ⧇āĻŸā§‡āĻĄ āĻāϰāϰ āĻšā§āϝāĻžāĻ¨ā§āĻĄāϞāĻŋāĻ‚āĨ¤", + t13_desc: "Pathao, Steadfast, RedX āĻ“ Paperfly-āĻāϰ āϰāĻŋā§Ÿā§‡āϞ-āϟāĻžāχāĻŽ āĻĄā§‡āϞāĻŋāĻ­āĻžāϰāĻŋ āĻ“ā§Ÿā§‡āĻŦāĻšā§āĻ• āχāϭ⧇āĻ¨ā§āϟ āϞāĻ— āϞāĻžāχāĻ­ āĻĻ⧇āϖ⧁āύāĨ¤", spatial_tag: "Spatial Engine", spatial_title: "Google Maps Spatial AI Routing", spatial_subtitle: "āϗ⧁āĻ—āϞ āĻŽā§āϝāĻžāĻĒ⧇āϰ āωāĻĒāϰ āĻ­āĻŋāĻ¤ā§āϤāĻŋ āĻ•āϰ⧇ āϰ⧁āϟ āĻ…āĻĒāϟāĻŋāĻŽāĻžāχāĻœā§‡āĻļāύ, āĻœā§‹āύ āĻĄāĻŋāĻŸā§‡āĻ•āĻļāύ āĻ“ āϰāĻŋāϝāĻŧ⧇āϞ-āϟāĻžāχāĻŽ āĻĻā§‚āϰāĻ¤ā§āĻŦ āĻĒāϰāĻŋāĻŽāĻžāĻĒāĨ¤", @@ -2256,8 +2287,8 @@ btn_check_risk: "Check Risk →", fraud_desc_safe: "New customer - Safe to proceed ¡ Zero Mock Data", tools_tag: "Core Protocol", - tools_title: "All 12 MCP Tools", - tools_subtitle: "Production-grade tools available inside Aura Courier MCP for seamless agentic workflows.", + tools_title: "All 13 MCP Tools", + tools_subtitle: "13 production-grade tools available inside Aura Courier MCP for seamless agentic workflows.", t1_desc: "Automated booking across Steadfast, Pathao, RedX, and Paperfly with 1-click fallback.", t2_desc: "Unified parcel tracking timeline and carrier status across all Bangladesh logistics.", t3_desc: "Live COD balance, pending disbursement and payout tracking across all accounts.", @@ -2278,6 +2309,7 @@ t10_desc: "Cancel live booked parcels across Steadfast, Pathao, RedX, or Paperfly via API or portal action.", t11_desc: "Update in-transit parcel delivery instructions, customer phone, address, or COD amount.", t12_desc: "Validate or dispatch batches of up to 100 parcels in a single call with isolated error handling.", + t13_desc: "Inspect recent real-time carrier webhook events (Pathao, Steadfast, RedX, Paperfly) for parcel status sync.", spatial_tag: "Spatial Engine", spatial_title: "Google Maps Spatial AI Routing", spatial_subtitle: "Rooftop geocoding, route optimization, zone detection, and real-time distance matrix.", @@ -2773,6 +2805,33 @@ } } } + }, + "get_webhook_events": { + "desc": "Retrieve recent real-time carrier webhook events received from Pathao, Steadfast, RedX, and Paperfly.", + "schema": { + "type": "object", + "properties": { + "courier": { + "type": "string", + "enum": ["steadfast", "pathao", "redx", "paperfly"], + "description": "Optional carrier filter" + }, + "limit": { + "type": "number", + "description": "Maximum number of recent webhook events to return (default 20)" + } + } + }, + "sample": { + "method": "tools/call", + "params": { + "name": "get_webhook_events", + "arguments": { + "courier": "pathao", + "limit": 10 + } + } + } } }; diff --git a/mcp_explorer.html b/mcp_explorer.html index e65da31..5229e6c 100644 --- a/mcp_explorer.html +++ b/mcp_explorer.html @@ -326,7 +326,7 @@

Streamable-HTTP MCP Protocol Explorer

-

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.

+

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.

@@ -381,7 +381,7 @@ -

Registered MCP Tools (9 Tools)

+

Registered MCP Tools (13 Tools)

1. list_couriers
@@ -428,6 +428,26 @@
Non-Delivery Report triage with automated WhatsApp templates and re-dispatch commands.
Input: tracking_code, reason ¡ Returns: triage plan & whatsapp text
+
+
10. cancel_parcel
+
Cancel booked parcels or dispatch carrier cancellation requests across Steadfast, Pathao, RedX & Paperfly.
+
Input: courier, consignment_id, reason? ¡ Returns: cancellation status
+
+
+
11. update_parcel
+
Update in-transit parcel delivery instructions, recipient phone, landmark address, or COD amount.
+
Input: courier, consignment_id, note?, phone?, cod_amount? ¡ Returns: update result
+
+
+
12. bulk_create_parcels
+
Validate or book up to 100 parcels in a single batch call with isolated error handling and dry-run support.
+
Input: items[], dry_run? ¡ Returns: per-item booking summary
+
+
+
13. get_webhook_events
+
Retrieve recent real-time carrier webhook events (Pathao, Steadfast, RedX, Paperfly) for parcel status sync.
+
Input: courier?, limit? ¡ Returns: recent normalized webhook events
+
diff --git a/src/middleware/auth.ts b/src/middleware/auth.ts index ac7b285..e423966 100644 --- a/src/middleware/auth.ts +++ b/src/middleware/auth.ts @@ -135,6 +135,14 @@ export async function initDynamicAuthStore(pool: any): Promise { 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, { @@ -149,7 +157,7 @@ export async function initDynamicAuthStore(pool: any): Promise { } console.log(`[Auth] Loaded ${dynamicKeyHashes.size} dynamic MCP key(s) from PostgreSQL.`); } catch (err: any) { - console.warn("[Auth] Dynamic key table init skipped:", err?.message); + console.warn("[Auth] Dynamic key table load skipped:", err?.message); } }