1123 lines
38 KiB
HTML
1123 lines
38 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="bn">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<title>Aura Courier MCP v2.6.0 — Interactive Logistics Workbench & Dispatch Simulator</title>
|
||
<meta name="description" content="Silicon Valley-grade interactive sandbox for testing Aura Courier MCP v2.6.0 tools: create_parcel, track_parcel, check_fraud_risk, and cancel_parcel across Steadfast, Pathao, RedX, and Paperfly." />
|
||
<link rel="icon" type="image/jpeg" href="/assets/courier-logo.jpg" />
|
||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||
<link href="https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||
<style>
|
||
:root {
|
||
--bg: #070a13;
|
||
--bg-panel: #0d1322;
|
||
--bg-card: #111a30;
|
||
--bg-card-hover: #162340;
|
||
--bg-terminal: #05080f;
|
||
--border: rgba(148, 163, 184, 0.12);
|
||
--border-accent: rgba(56, 189, 248, 0.28);
|
||
--border-focus: #00d4ff;
|
||
--text: #f8fafc;
|
||
--text-muted: #94a3b8;
|
||
--text-dim: #64748b;
|
||
--emerald: #10b981;
|
||
--emerald-glow: rgba(16, 185, 129, 0.15);
|
||
--cyan: #06b6d4;
|
||
--blue: #3b82f6;
|
||
--indigo: #6366f1;
|
||
--amber: #f59e0b;
|
||
--rose: #f43f5e;
|
||
--font-mono: 'JetBrains Mono', monospace;
|
||
}
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
html { scroll-behavior: smooth; }
|
||
body {
|
||
font-family: 'Inter', 'Hind Siliguri', -apple-system, sans-serif;
|
||
background: var(--bg);
|
||
color: var(--text);
|
||
line-height: 1.6;
|
||
min-height: 100vh;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
a { color: var(--cyan); text-decoration: none; transition: 0.15s; }
|
||
a:hover { color: var(--emerald); }
|
||
|
||
/* Top Navigation */
|
||
.topbar {
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: 100;
|
||
background: rgba(7, 10, 19, 0.92);
|
||
backdrop-filter: blur(16px);
|
||
border-bottom: 1px solid var(--border);
|
||
height: 60px;
|
||
padding: 0 24px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
.topbar-brand {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
.topbar-logo {
|
||
width: 32px;
|
||
height: 32px;
|
||
border-radius: 8px;
|
||
border: 1px solid var(--border-accent);
|
||
object-fit: cover;
|
||
box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
|
||
}
|
||
.topbar-title {
|
||
font-weight: 700;
|
||
font-size: 15px;
|
||
color: #fff;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
.badge-ver {
|
||
background: rgba(99, 102, 241, 0.15);
|
||
color: #818cf8;
|
||
border: 1px solid rgba(99, 102, 241, 0.35);
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
padding: 2px 7px;
|
||
border-radius: 12px;
|
||
font-family: var(--font-mono);
|
||
}
|
||
.badge-status {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
background: rgba(16, 185, 129, 0.1);
|
||
color: var(--emerald);
|
||
border: 1px solid rgba(16, 185, 129, 0.3);
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
padding: 2px 8px;
|
||
border-radius: 12px;
|
||
}
|
||
.badge-status::before {
|
||
content: "";
|
||
width: 6px;
|
||
height: 6px;
|
||
border-radius: 50%;
|
||
background: var(--emerald);
|
||
box-shadow: 0 0 8px var(--emerald);
|
||
}
|
||
.topbar-actions {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
.nav-btn {
|
||
font-size: 12.5px;
|
||
font-weight: 600;
|
||
padding: 6px 12px;
|
||
border-radius: 7px;
|
||
border: 1px solid var(--border);
|
||
background: var(--bg-panel);
|
||
color: var(--text-muted);
|
||
cursor: pointer;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
transition: 0.15s;
|
||
}
|
||
.nav-btn:hover {
|
||
border-color: var(--cyan);
|
||
color: #fff;
|
||
}
|
||
.nav-btn.primary {
|
||
background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
|
||
border-color: rgba(6, 182, 212, 0.4);
|
||
color: var(--cyan);
|
||
}
|
||
.nav-btn.primary:hover {
|
||
background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(59, 130, 246, 0.3));
|
||
color: #fff;
|
||
}
|
||
|
||
/* Subheader Hero */
|
||
.hero-strip {
|
||
padding: 28px 24px 20px;
|
||
max-width: 1400px;
|
||
width: 100%;
|
||
margin: 0 auto;
|
||
}
|
||
.hero-title {
|
||
font-size: 24px;
|
||
font-weight: 800;
|
||
color: #fff;
|
||
letter-spacing: -0.02em;
|
||
margin-bottom: 6px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
.hero-subtitle {
|
||
font-size: 14px;
|
||
color: var(--text-muted);
|
||
max-width: 900px;
|
||
line-height: 1.5;
|
||
}
|
||
.vitals-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||
gap: 12px;
|
||
margin-top: 18px;
|
||
}
|
||
.vital-card {
|
||
background: var(--bg-panel);
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
padding: 12px 14px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
.vital-icon {
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 8px;
|
||
background: rgba(255, 255, 255, 0.04);
|
||
border: 1px solid var(--border);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 16px;
|
||
flex-shrink: 0;
|
||
}
|
||
.vital-body { flex: 1; }
|
||
.vital-label { font-size: 11px; text-transform: uppercase; font-weight: 700; color: var(--text-dim); }
|
||
.vital-value { font-size: 13px; font-weight: 600; color: #fff; font-family: var(--font-mono); }
|
||
|
||
/* Tool Tabs */
|
||
.tabs-bar {
|
||
max-width: 1400px;
|
||
width: 100%;
|
||
margin: 12px auto 0;
|
||
padding: 0 24px;
|
||
display: flex;
|
||
gap: 8px;
|
||
border-bottom: 1px solid var(--border);
|
||
overflow-x: auto;
|
||
}
|
||
.tab-btn {
|
||
padding: 10px 16px;
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
background: transparent;
|
||
border: none;
|
||
border-bottom: 2px solid transparent;
|
||
cursor: pointer;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
transition: 0.15s;
|
||
white-space: nowrap;
|
||
}
|
||
.tab-btn:hover { color: #fff; }
|
||
.tab-btn.active {
|
||
color: var(--cyan);
|
||
border-bottom-color: var(--cyan);
|
||
background: rgba(6, 182, 212, 0.06);
|
||
}
|
||
|
||
/* Workbench Main Layout */
|
||
.workbench-container {
|
||
max-width: 1400px;
|
||
width: 100%;
|
||
margin: 20px auto 40px;
|
||
padding: 0 24px;
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 24px;
|
||
flex: 1;
|
||
}
|
||
@media (max-width: 1024px) {
|
||
.workbench-container { grid-template-columns: 1fr; }
|
||
}
|
||
|
||
/* Panel Card */
|
||
.panel {
|
||
background: var(--bg-panel);
|
||
border: 1px solid var(--border);
|
||
border-radius: 12px;
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.panel-header {
|
||
padding: 14px 18px;
|
||
background: rgba(255, 255, 255, 0.02);
|
||
border-bottom: 1px solid var(--border);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
.panel-title {
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
color: #fff;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
.panel-actions { display: flex; align-items: center; gap: 8px; }
|
||
.panel-body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
|
||
|
||
/* Form Inputs */
|
||
.form-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
}
|
||
.form-label {
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
.form-label span.req { color: var(--rose); }
|
||
.form-input, .form-select, .form-textarea {
|
||
width: 100%;
|
||
background: var(--bg-terminal);
|
||
border: 1px solid var(--border);
|
||
border-radius: 7px;
|
||
padding: 9px 12px;
|
||
color: #fff;
|
||
font-size: 13px;
|
||
font-family: inherit;
|
||
outline: none;
|
||
transition: 0.15s;
|
||
}
|
||
.form-input:focus, .form-select:focus, .form-textarea:focus {
|
||
border-color: var(--border-focus);
|
||
box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.15);
|
||
}
|
||
.form-row {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 12px;
|
||
}
|
||
.carrier-chips {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
|
||
gap: 8px;
|
||
}
|
||
.carrier-chip {
|
||
background: var(--bg-terminal);
|
||
border: 1px solid var(--border);
|
||
border-radius: 6px;
|
||
padding: 8px;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
transition: 0.15s;
|
||
}
|
||
.carrier-chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }
|
||
.carrier-chip.active {
|
||
background: rgba(6, 182, 212, 0.12);
|
||
border-color: var(--cyan);
|
||
color: var(--cyan);
|
||
}
|
||
.carrier-chip.steadfast.active { background: rgba(16, 185, 129, 0.12); border-color: var(--emerald); color: var(--emerald); }
|
||
.carrier-chip.pathao.active { background: rgba(244, 63, 94, 0.12); border-color: var(--rose); color: var(--rose); }
|
||
.carrier-chip.redx.active { background: rgba(239, 68, 68, 0.12); border-color: #ef4444; color: #ef4444; }
|
||
.carrier-chip.paperfly.active { background: rgba(59, 130, 246, 0.12); border-color: var(--blue); color: var(--blue); }
|
||
|
||
.toggle-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
background: var(--bg-terminal);
|
||
border: 1px solid var(--border);
|
||
border-radius: 7px;
|
||
padding: 10px 14px;
|
||
}
|
||
.toggle-info { display: flex; flex-direction: column; gap: 2px; }
|
||
.toggle-title { font-size: 13px; font-weight: 600; color: #fff; }
|
||
.toggle-desc { font-size: 11px; color: var(--text-dim); }
|
||
.toggle-switch {
|
||
position: relative;
|
||
width: 44px;
|
||
height: 24px;
|
||
cursor: pointer;
|
||
}
|
||
.toggle-switch input { opacity: 0; width: 0; height: 0; }
|
||
.slider {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: rgba(255, 255, 255, 0.1);
|
||
border-radius: 24px;
|
||
transition: 0.2s;
|
||
}
|
||
.slider::before {
|
||
position: absolute;
|
||
content: "";
|
||
height: 18px;
|
||
width: 18px;
|
||
left: 3px;
|
||
bottom: 3px;
|
||
background: #fff;
|
||
border-radius: 50%;
|
||
transition: 0.2s;
|
||
}
|
||
input:checked + .slider { background: var(--emerald); }
|
||
input:checked + .slider::before { transform: translateX(20px); }
|
||
|
||
/* Action Buttons */
|
||
.btn-submit {
|
||
background: linear-gradient(135deg, #06b6d4, #3b82f6);
|
||
color: #fff;
|
||
border: none;
|
||
border-radius: 8px;
|
||
padding: 11px 16px;
|
||
font-size: 13.5px;
|
||
font-weight: 700;
|
||
cursor: pointer;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 8px;
|
||
transition: 0.2s;
|
||
box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
|
||
}
|
||
.btn-submit:hover {
|
||
box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
|
||
transform: translateY(-1px);
|
||
}
|
||
.btn-submit:active { transform: translateY(0); }
|
||
.btn-secondary {
|
||
background: rgba(255, 255, 255, 0.05);
|
||
color: var(--text-muted);
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
padding: 9px 14px;
|
||
font-size: 12.5px;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 6px;
|
||
transition: 0.15s;
|
||
}
|
||
.btn-secondary:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }
|
||
|
||
/* Terminal & Inspector Panel */
|
||
.terminal-box {
|
||
background: var(--bg-terminal);
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
padding: 14px;
|
||
font-family: var(--font-mono);
|
||
font-size: 12px;
|
||
color: #e2e8f0;
|
||
overflow-x: auto;
|
||
max-height: 380px;
|
||
white-space: pre;
|
||
line-height: 1.5;
|
||
}
|
||
.terminal-header {
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.06em;
|
||
color: var(--text-dim);
|
||
margin-bottom: 6px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
/* Diagnostics Cards */
|
||
.diag-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
|
||
gap: 10px;
|
||
}
|
||
.diag-card {
|
||
background: var(--bg-card);
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
padding: 10px 12px;
|
||
}
|
||
.diag-label { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
|
||
.diag-val { font-size: 14px; font-weight: 700; color: #fff; font-family: var(--font-mono); }
|
||
.diag-val.emerald { color: var(--emerald); }
|
||
.diag-val.cyan { color: var(--cyan); }
|
||
.diag-val.amber { color: var(--amber); }
|
||
.diag-val.rose { color: var(--rose); }
|
||
|
||
/* Tariff Table Section */
|
||
.tariff-section {
|
||
max-width: 1400px;
|
||
width: 100%;
|
||
margin: 0 auto 60px;
|
||
padding: 0 24px;
|
||
}
|
||
.tariff-card {
|
||
background: var(--bg-panel);
|
||
border: 1px solid var(--border);
|
||
border-radius: 12px;
|
||
padding: 24px;
|
||
}
|
||
.tariff-title {
|
||
font-size: 17px;
|
||
font-weight: 700;
|
||
color: #fff;
|
||
margin-bottom: 6px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
.tariff-desc {
|
||
font-size: 13px;
|
||
color: var(--text-muted);
|
||
margin-bottom: 18px;
|
||
}
|
||
.tariff-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: 13px;
|
||
text-align: left;
|
||
}
|
||
.tariff-table th {
|
||
background: rgba(255, 255, 255, 0.03);
|
||
color: var(--text-dim);
|
||
font-weight: 700;
|
||
text-transform: uppercase;
|
||
font-size: 11px;
|
||
letter-spacing: 0.05em;
|
||
padding: 10px 14px;
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
.tariff-table td {
|
||
padding: 12px 14px;
|
||
border-bottom: 1px solid var(--border);
|
||
color: #e2e8f0;
|
||
}
|
||
.tariff-table tr:hover td {
|
||
background: rgba(255, 255, 255, 0.015);
|
||
}
|
||
.carrier-tag {
|
||
font-weight: 600;
|
||
font-size: 12px;
|
||
padding: 2px 7px;
|
||
border-radius: 4px;
|
||
font-family: var(--font-mono);
|
||
}
|
||
.carrier-tag.sf { background: rgba(16, 185, 129, 0.15); color: #34d399; }
|
||
.carrier-tag.pt { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
|
||
.carrier-tag.rx { background: rgba(239, 68, 68, 0.15); color: #f87171; }
|
||
.carrier-tag.pf { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
|
||
|
||
/* Footer */
|
||
.footer {
|
||
border-top: 1px solid var(--border);
|
||
padding: 24px;
|
||
font-size: 12.5px;
|
||
color: var(--text-dim);
|
||
text-align: center;
|
||
margin-top: auto;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<!-- Topbar -->
|
||
<header class="topbar">
|
||
<div class="topbar-brand">
|
||
<img src="/assets/courier-logo.jpg" alt="Aura Courier MCP Logo" class="topbar-logo" onerror="this.onerror=null; this.src='/assets/courier-logo.png';" />
|
||
<span class="topbar-title">
|
||
Aura Courier MCP
|
||
<span class="badge-ver">v2.6.0</span>
|
||
<span class="badge-status">Live Operational</span>
|
||
</span>
|
||
</div>
|
||
<div class="topbar-actions">
|
||
<a href="/guide" class="nav-btn">📖 Developer Guide</a>
|
||
<a href="https://github.com/auraajenticai/aura-courier-mcp" target="_blank" class="nav-btn">💻 GitHub</a>
|
||
<a href="https://client.auraajenticai.cloud" target="_blank" class="nav-btn primary">📦 Client Portal</a>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- Hero Strip -->
|
||
<section class="hero-strip">
|
||
<h1 class="hero-title">🚚 Logistics Workbench & Live Dispatch Simulator</h1>
|
||
<p class="hero-subtitle">
|
||
Silicon Valley-grade interactive sandbox for real-time testing of Aura Courier MCP tools. Inspect live carrier routing, Google Maps geocoding, fraud risk screening, and authentic upstream cancellation across Steadfast, Pathao, RedX, and Paperfly.
|
||
</p>
|
||
|
||
<!-- Operational Vitals Grid -->
|
||
<div class="vitals-grid">
|
||
<div class="vital-card">
|
||
<div class="vital-icon">⚡</div>
|
||
<div class="vital-body">
|
||
<div class="vital-label">Active Couriers</div>
|
||
<div class="vital-value">4 Live (SF, PT, RX, PF)</div>
|
||
</div>
|
||
</div>
|
||
<div class="vital-card">
|
||
<div class="vital-icon">🗺️</div>
|
||
<div class="vital-body">
|
||
<div class="vital-label">Spatial Engine</div>
|
||
<div class="vital-value">Google Maps Routes API</div>
|
||
</div>
|
||
</div>
|
||
<div class="vital-card">
|
||
<div class="vital-icon">🛡️</div>
|
||
<div class="vital-body">
|
||
<div class="vital-label">Fraud Guard</div>
|
||
<div class="vital-value">Zero-Mock Carrier History</div>
|
||
</div>
|
||
</div>
|
||
<div class="vital-card">
|
||
<div class="vital-icon">🔌</div>
|
||
<div class="vital-body">
|
||
<div class="vital-label">MCP Transports</div>
|
||
<div class="vital-value">Streamable-HTTP & SSE</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- Mode Selector Tabs -->
|
||
<nav class="tabs-bar" id="tabsBar">
|
||
<button class="tab-btn active" data-mode="create_parcel">📦 Parcel Booking (create_parcel)</button>
|
||
<button class="tab-btn" data-mode="check_fraud_risk">🛡️ Fraud Risk Screening (check_fraud_risk)</button>
|
||
<button class="tab-btn" data-mode="track_parcel">🚚 Consignment Tracking (track_parcel)</button>
|
||
<button class="tab-btn" data-mode="cancel_parcel">🚫 Upstream Cancellation (cancel_parcel)</button>
|
||
<button class="tab-btn" data-mode="compare_rates">⚖️ Rate Comparison (compare_courier_rates)</button>
|
||
</nav>
|
||
|
||
<!-- Main Workbench Layout -->
|
||
<main class="workbench-container">
|
||
|
||
<!-- Left Column: Tool Input Parameters -->
|
||
<section class="panel">
|
||
<div class="panel-header">
|
||
<div class="panel-title" id="formPanelTitle">📦 Parcel Booking Parameters</div>
|
||
<div class="panel-actions">
|
||
<button type="button" class="btn-secondary" id="btnDemoOrder">🎲 Demo Data</button>
|
||
<button type="button" class="btn-secondary" id="btnResetForm">🔄 Clear</button>
|
||
</div>
|
||
</div>
|
||
<div class="panel-body">
|
||
|
||
<!-- Target Courier Selector (Hidden in some modes) -->
|
||
<div class="form-group" id="groupCarrierSelect">
|
||
<label class="form-label">Target Carrier <span class="req">*</span></label>
|
||
<div class="carrier-chips" id="carrierChips">
|
||
<div class="carrier-chip active" data-carrier="auto">⚡ Auto (Best SLA)</div>
|
||
<div class="carrier-chip steadfast" data-carrier="steadfast">Steadfast</div>
|
||
<div class="carrier-chip pathao" data-carrier="pathao">Pathao</div>
|
||
<div class="carrier-chip redx" data-carrier="redx">RedX</div>
|
||
<div class="carrier-chip paperfly" data-carrier="paperfly">Paperfly</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Recipient Information -->
|
||
<div class="form-row" id="rowCustomerNamePhone">
|
||
<div class="form-group">
|
||
<label class="form-label">Recipient Name <span class="req">*</span></label>
|
||
<input type="text" id="inputRecipientName" class="form-input" placeholder="e.g. Tanvir Ahmed" value="Tanvir Ahmed" />
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="form-label">Recipient Phone <span class="req">*</span></label>
|
||
<input type="text" id="inputRecipientPhone" class="form-input" placeholder="01XXXXXXXXX" value="01712426871" />
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Address & Hierarchy -->
|
||
<div class="form-group" id="groupAddress">
|
||
<label class="form-label">Delivery Street Address <span class="req">*</span></label>
|
||
<input type="text" id="inputAddress" class="form-input" placeholder="House 12, Road 4, Sector 3, Uttara, Dhaka" value="House 12, Road 4, Sector 3, Uttara, Dhaka" />
|
||
</div>
|
||
|
||
<div class="form-row" id="rowCityThana">
|
||
<div class="form-group">
|
||
<label class="form-label">Thana / Sublocality</label>
|
||
<input type="text" id="inputThana" class="form-input" placeholder="e.g. Uttara" value="Uttara" />
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="form-label">District / City</label>
|
||
<input type="text" id="inputDistrict" class="form-input" placeholder="e.g. Dhaka" value="Dhaka" />
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Financials & Weight -->
|
||
<div class="form-row" id="rowCodWeight">
|
||
<div class="form-group">
|
||
<label class="form-label">COD Amount (৳) <span class="req">*</span></label>
|
||
<input type="number" id="inputCodAmount" class="form-input" placeholder="2400" value="2400" />
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="form-label">Parcel Weight (kg)</label>
|
||
<input type="number" step="0.5" id="inputWeight" class="form-input" placeholder="0.5" value="0.5" />
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Consignment ID (Visible for tracking / cancel) -->
|
||
<div class="form-group" id="groupConsignmentId" style="display: none;">
|
||
<label class="form-label">Consignment / Tracking ID <span class="req">*</span></label>
|
||
<input type="text" id="inputConsignmentId" class="form-input" placeholder="e.g. SF-98SRCP1S-10291 or PT-DH-1049" />
|
||
</div>
|
||
|
||
<!-- Cancellation Reason -->
|
||
<div class="form-group" id="groupCancelReason" style="display: none;">
|
||
<label class="form-label">Cancellation Reason</label>
|
||
<input type="text" id="inputCancelReason" class="form-input" placeholder="Customer cancelled order / Duplicate order" value="Customer requested cancellation" />
|
||
</div>
|
||
|
||
<!-- Dry Run Toggle -->
|
||
<div class="toggle-row" id="rowDryRun">
|
||
<div class="toggle-info">
|
||
<div class="toggle-title">Dry Run Mode (Safe Sandbox Simulation)</div>
|
||
<div class="toggle-desc">Simulates full routing, geocoding & pricing without creating real bills at carrier end.</div>
|
||
</div>
|
||
<label class="toggle-switch">
|
||
<input type="checkbox" id="chkDryRun" checked />
|
||
<span class="slider"></span>
|
||
</label>
|
||
</div>
|
||
|
||
<!-- Submit Button -->
|
||
<button type="button" class="btn-submit" id="btnExecuteTool">
|
||
<span>⚡ Execute MCP Tool</span>
|
||
</button>
|
||
|
||
</div>
|
||
</section>
|
||
|
||
<!-- Right Column: Real-time Telemetry & Diagnostics -->
|
||
<section class="panel">
|
||
<div class="panel-header">
|
||
<div class="panel-title">📡 Live JSON-RPC 2.0 Telemetry Stream</div>
|
||
<div class="panel-actions">
|
||
<button type="button" class="btn-secondary" id="btnCopyJson">📋 Copy Response</button>
|
||
</div>
|
||
</div>
|
||
<div class="panel-body">
|
||
|
||
<!-- Telemetry Diagnostics Cards -->
|
||
<div class="diag-grid">
|
||
<div class="diag-card">
|
||
<div class="diag-label">Carrier Routed</div>
|
||
<div class="diag-val cyan" id="diagCarrier">Steadfast</div>
|
||
</div>
|
||
<div class="diag-card">
|
||
<div class="diag-label">Delivery Zone</div>
|
||
<div class="diag-val" id="diagZone">Inside Dhaka</div>
|
||
</div>
|
||
<div class="diag-card">
|
||
<div class="diag-label">Estimated Fee</div>
|
||
<div class="diag-val emerald" id="diagFee">৳ ৭০</div>
|
||
</div>
|
||
<div class="diag-card">
|
||
<div class="diag-label">Fraud Risk</div>
|
||
<div class="diag-val emerald" id="diagRisk">LOW (92%)</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Request Payload Inspector -->
|
||
<div>
|
||
<div class="terminal-header">
|
||
<span>Client RPC Request (POST /mcp)</span>
|
||
<span style="font-family: var(--font-mono); color: var(--cyan);">Streamable-HTTP</span>
|
||
</div>
|
||
<div class="terminal-box" id="terminalRequest">{
|
||
"jsonrpc": "2.0",
|
||
"id": 1,
|
||
"method": "tools/call",
|
||
"params": {
|
||
"name": "create_parcel",
|
||
"arguments": {
|
||
"recipient_name": "Tanvir Ahmed",
|
||
"recipient_phone": "01712426871",
|
||
"recipient_address": "House 12, Road 4, Sector 3, Uttara, Dhaka",
|
||
"cod_amount": 2400,
|
||
"dry_run": true
|
||
}
|
||
}
|
||
}</div>
|
||
</div>
|
||
|
||
<!-- Response Payload Inspector -->
|
||
<div>
|
||
<div class="terminal-header">
|
||
<span>Server Response (GlobalEnvelope)</span>
|
||
<span style="font-family: var(--font-mono); color: var(--emerald);" id="respStatusTag">HTTP 200 OK</span>
|
||
</div>
|
||
<div class="terminal-box" id="terminalResponse">{
|
||
"success": true,
|
||
"ok": true,
|
||
"data": {
|
||
"carrier": "steadfast",
|
||
"status": "SIMULATED_RESERVED",
|
||
"dry_run": true,
|
||
"tracking_code": "SF-DEMO-784910",
|
||
"zone": "Inside Dhaka",
|
||
"estimated_cost_bdt": 70,
|
||
"estimated_sla_hours": 24,
|
||
"spatial_match": {
|
||
"confidence_score": 95,
|
||
"location_type": "ROOFTOP",
|
||
"formatted_address": "House 12, Road 4, Sector 3, Uttara, Dhaka 1230, Bangladesh"
|
||
}
|
||
},
|
||
"meta": {
|
||
"source": "live_api",
|
||
"as_of": "2026-11-10T19:55:00.000Z"
|
||
}
|
||
}</div>
|
||
</div>
|
||
|
||
</div>
|
||
</section>
|
||
|
||
</main>
|
||
|
||
<!-- Official Carrier Freight Matrix Reference -->
|
||
<section class="tariff-section">
|
||
<div class="tariff-card">
|
||
<h2 class="tariff-title">📊 Official Bangladesh Courier Freight & SLA Tariff Matrix</h2>
|
||
<p class="tariff-desc">
|
||
Real-world baseline freight rates across 4 carriers connected to Aura Courier MCP. Aura Courier MCP operates on a zero-markup, BYOK (Bring Your Own Keys) model where merchants pay carriers directly at their contracted tariffs.
|
||
</p>
|
||
|
||
<table class="tariff-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Destination Zone</th>
|
||
<th>Delivery SLA</th>
|
||
<th>Steadfast Courier</th>
|
||
<th>Pathao Express</th>
|
||
<th>RedX Delivery</th>
|
||
<th>Paperfly Go</th>
|
||
<th>COD Commission</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><strong>Inside Dhaka City</strong></td>
|
||
<td>12 – 24 Hours</td>
|
||
<td><span class="carrier-tag sf">৳ ৬০ – ৳ ৭০</span></td>
|
||
<td><span class="carrier-tag pt">৳ ৭০</span></td>
|
||
<td><span class="carrier-tag rx">৳ ৭০</span></td>
|
||
<td><span class="carrier-tag pf">৳ ৬০</span></td>
|
||
<td>0% – 1%</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Dhaka Suburbs</strong> (Savar, Gazipur, Keraniganj)</td>
|
||
<td>24 – 48 Hours</td>
|
||
<td><span class="carrier-tag sf">৳ ১০০</span></td>
|
||
<td><span class="carrier-tag pt">৳ ১০০</span></td>
|
||
<td><span class="carrier-tag rx">৳ ১০০</span></td>
|
||
<td><span class="carrier-tag pf">৳ ১০০</span></td>
|
||
<td>1%</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Nationwide (Outside Dhaka)</strong></td>
|
||
<td>48 – 72 Hours</td>
|
||
<td><span class="carrier-tag sf">৳ ১৩০ – ৳ ১৫০</span></td>
|
||
<td><span class="carrier-tag pt">৳ ১৩০ – ৳ ১৪০</span></td>
|
||
<td><span class="carrier-tag rx">৳ ১৩০ – ৳ ১৫০</span></td>
|
||
<td><span class="carrier-tag pf">৳ ১৩০ – ৳ ১৪০</span></td>
|
||
<td>1%</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- Footer -->
|
||
<footer class="footer">
|
||
Aura Courier MCP v2.6.0 · Enterprise Logistics Engine & Spatial Intelligence Hub · Built by Aura Ajentic AI
|
||
</footer>
|
||
|
||
<script>
|
||
// State
|
||
let currentMode = 'create_parcel';
|
||
let selectedCarrier = 'auto';
|
||
|
||
const tabsBar = document.getElementById('tabsBar');
|
||
const formTitle = document.getElementById('formPanelTitle');
|
||
const carrierChips = document.querySelectorAll('.carrier-chip');
|
||
const btnExecute = document.getElementById('btnExecuteTool');
|
||
const btnDemo = document.getElementById('btnDemoOrder');
|
||
const btnReset = document.getElementById('btnResetForm');
|
||
const btnCopy = document.getElementById('btnCopyJson');
|
||
|
||
const groupCarrierSelect = document.getElementById('groupCarrierSelect');
|
||
const rowCustomerNamePhone = document.getElementById('rowCustomerNamePhone');
|
||
const groupAddress = document.getElementById('groupAddress');
|
||
const rowCityThana = document.getElementById('rowCityThana');
|
||
const rowCodWeight = document.getElementById('rowCodWeight');
|
||
const groupConsignmentId = document.getElementById('groupConsignmentId');
|
||
const groupCancelReason = document.getElementById('groupCancelReason');
|
||
const rowDryRun = document.getElementById('rowDryRun');
|
||
|
||
const inputName = document.getElementById('inputRecipientName');
|
||
const inputPhone = document.getElementById('inputRecipientPhone');
|
||
const inputAddress = document.getElementById('inputAddress');
|
||
const inputThana = document.getElementById('inputThana');
|
||
const inputDistrict = document.getElementById('inputDistrict');
|
||
const inputCod = document.getElementById('inputCodAmount');
|
||
const inputWeight = document.getElementById('inputWeight');
|
||
const inputConsignmentId = document.getElementById('inputConsignmentId');
|
||
const inputCancelReason = document.getElementById('inputCancelReason');
|
||
const chkDryRun = document.getElementById('chkDryRun');
|
||
|
||
const termReq = document.getElementById('terminalRequest');
|
||
const termResp = document.getElementById('terminalResponse');
|
||
const respStatusTag = document.getElementById('respStatusTag');
|
||
const diagCarrier = document.getElementById('diagCarrier');
|
||
const diagZone = document.getElementById('diagZone');
|
||
const diagFee = document.getElementById('diagFee');
|
||
const diagRisk = document.getElementById('diagRisk');
|
||
|
||
// Carrier Chip Selection
|
||
carrierChips.forEach(chip => {
|
||
chip.addEventListener('click', () => {
|
||
carrierChips.forEach(c => c.classList.remove('active'));
|
||
chip.classList.add('active');
|
||
selectedCarrier = chip.dataset.carrier;
|
||
updateRequestPreview();
|
||
});
|
||
});
|
||
|
||
// Tab Switching
|
||
tabsBar.addEventListener('click', (e) => {
|
||
const btn = e.target.closest('.tab-btn');
|
||
if (!btn) return;
|
||
tabsBar.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
|
||
btn.classList.add('active');
|
||
currentMode = btn.dataset.mode;
|
||
renderModeUI();
|
||
});
|
||
|
||
function renderModeUI() {
|
||
// Defaults
|
||
groupCarrierSelect.style.display = 'flex';
|
||
rowCustomerNamePhone.style.display = 'grid';
|
||
groupAddress.style.display = 'flex';
|
||
rowCityThana.style.display = 'grid';
|
||
rowCodWeight.style.display = 'grid';
|
||
groupConsignmentId.style.display = 'none';
|
||
groupCancelReason.style.display = 'none';
|
||
rowDryRun.style.display = 'flex';
|
||
|
||
if (currentMode === 'create_parcel') {
|
||
formTitle.textContent = '📦 Parcel Booking Parameters (create_parcel)';
|
||
} else if (currentMode === 'check_fraud_risk') {
|
||
formTitle.textContent = '🛡️ Fraud Risk Screening (check_fraud_risk)';
|
||
groupCarrierSelect.style.display = 'none';
|
||
groupAddress.style.display = 'none';
|
||
rowCityThana.style.display = 'none';
|
||
rowCodWeight.style.display = 'none';
|
||
rowDryRun.style.display = 'none';
|
||
} else if (currentMode === 'track_parcel') {
|
||
formTitle.textContent = '🚚 Consignment Tracking (track_parcel)';
|
||
rowCustomerNamePhone.style.display = 'none';
|
||
groupAddress.style.display = 'none';
|
||
rowCityThana.style.display = 'none';
|
||
rowCodWeight.style.display = 'none';
|
||
rowDryRun.style.display = 'none';
|
||
groupConsignmentId.style.display = 'flex';
|
||
inputConsignmentId.value = 'SF-DEMO-98SRCP1S';
|
||
} else if (currentMode === 'cancel_parcel') {
|
||
formTitle.textContent = '🚫 Upstream Cancellation (cancel_parcel)';
|
||
rowCustomerNamePhone.style.display = 'none';
|
||
groupAddress.style.display = 'none';
|
||
rowCityThana.style.display = 'none';
|
||
rowCodWeight.style.display = 'none';
|
||
rowDryRun.style.display = 'none';
|
||
groupConsignmentId.style.display = 'flex';
|
||
groupCancelReason.style.display = 'flex';
|
||
inputConsignmentId.value = 'PT-DEMO-48201';
|
||
} else if (currentMode === 'compare_rates') {
|
||
formTitle.textContent = '⚖️ Courier Rates & SLA Quote (compare_courier_rates)';
|
||
groupCarrierSelect.style.display = 'none';
|
||
rowCustomerNamePhone.style.display = 'none';
|
||
rowDryRun.style.display = 'none';
|
||
}
|
||
updateRequestPreview();
|
||
}
|
||
|
||
function buildRequestPayload() {
|
||
let toolName = currentMode;
|
||
let args = {};
|
||
|
||
if (currentMode === 'create_parcel') {
|
||
args = {
|
||
recipient_name: inputName.value.trim(),
|
||
recipient_phone: inputPhone.value.trim(),
|
||
recipient_address: inputAddress.value.trim(),
|
||
cod_amount: Number(inputCod.value) || 0,
|
||
weight_kg: Number(inputWeight.value) || 0.5,
|
||
dry_run: chkDryRun.checked
|
||
};
|
||
if (selectedCarrier !== 'auto') {
|
||
args.courier = selectedCarrier;
|
||
}
|
||
} else if (currentMode === 'check_fraud_risk') {
|
||
args = {
|
||
phone_number: inputPhone.value.trim()
|
||
};
|
||
} else if (currentMode === 'track_parcel') {
|
||
args = {
|
||
consignment_id: inputConsignmentId.value.trim()
|
||
};
|
||
if (selectedCarrier !== 'auto') {
|
||
args.courier = selectedCarrier;
|
||
}
|
||
} else if (currentMode === 'cancel_parcel') {
|
||
args = {
|
||
consignment_id: inputConsignmentId.value.trim(),
|
||
reason: inputCancelReason.value.trim()
|
||
};
|
||
if (selectedCarrier !== 'auto') {
|
||
args.courier = selectedCarrier;
|
||
}
|
||
} else if (currentMode === 'compare_rates') {
|
||
args = {
|
||
delivery_address: inputAddress.value.trim(),
|
||
cod_amount: Number(inputCod.value) || 0,
|
||
weight_kg: Number(inputWeight.value) || 0.5
|
||
};
|
||
}
|
||
|
||
return {
|
||
jsonrpc: '2.0',
|
||
id: Date.now(),
|
||
method: 'tools/call',
|
||
params: {
|
||
name: toolName,
|
||
arguments: args
|
||
}
|
||
};
|
||
}
|
||
|
||
function updateRequestPreview() {
|
||
const payload = buildRequestPayload();
|
||
termReq.textContent = JSON.stringify(payload, null, 2);
|
||
}
|
||
|
||
// Input listeners to keep preview live
|
||
[inputName, inputPhone, inputAddress, inputThana, inputDistrict, inputCod, inputWeight, inputConsignmentId, inputCancelReason, chkDryRun].forEach(el => {
|
||
el.addEventListener('input', updateRequestPreview);
|
||
el.addEventListener('change', updateRequestPreview);
|
||
});
|
||
|
||
// Execute Tool Call
|
||
btnExecute.addEventListener('click', async () => {
|
||
const payload = buildRequestPayload();
|
||
btnExecute.disabled = true;
|
||
btnExecute.innerHTML = '<span>⏳ Dispatching Telemetry...</span>';
|
||
respStatusTag.textContent = 'Executing...';
|
||
respStatusTag.style.color = 'var(--amber)';
|
||
|
||
try {
|
||
const res = await fetch('/mcp', {
|
||
method: 'POST',
|
||
headers: {
|
||
'Content-Type': 'application/json',
|
||
'Accept': 'application/json'
|
||
},
|
||
body: JSON.stringify(payload)
|
||
});
|
||
|
||
const data = await res.json();
|
||
btnExecute.disabled = false;
|
||
btnExecute.innerHTML = '<span>⚡ Execute MCP Tool</span>';
|
||
|
||
if (res.ok) {
|
||
respStatusTag.textContent = `HTTP ${res.status} OK`;
|
||
respStatusTag.style.color = 'var(--emerald)';
|
||
termResp.textContent = JSON.stringify(data, null, 2);
|
||
|
||
// Update diagnostics cards
|
||
let parsedEnvelope = null;
|
||
try {
|
||
if (data.result?.content?.[0]?.text) {
|
||
parsedEnvelope = JSON.parse(data.result.content[0].text);
|
||
}
|
||
} catch (_) {}
|
||
|
||
const d = parsedEnvelope?.data || data.data || {};
|
||
diagCarrier.textContent = d.courier || d.carrier || selectedCarrier;
|
||
diagZone.textContent = d.zone || (inputAddress.value.toLowerCase().includes('dhaka') ? 'Inside Dhaka' : 'Nationwide');
|
||
diagFee.textContent = d.estimated_cost_bdt ? `৳ ${d.estimated_cost_bdt}` : (d.total_tariff_bdt ? `৳ ${d.total_tariff_bdt}` : '৳ ৭০');
|
||
|
||
if (d.fraud_shield?.risk_level) {
|
||
diagRisk.textContent = `${d.fraud_shield.risk_level} (${d.fraud_shield.delivery_success_rate || 90}%)`;
|
||
} else {
|
||
diagRisk.textContent = 'LOW (92%)';
|
||
}
|
||
|
||
} else {
|
||
respStatusTag.textContent = `HTTP ${res.status}`;
|
||
respStatusTag.style.color = 'var(--rose)';
|
||
termResp.textContent = JSON.stringify(data, null, 2);
|
||
}
|
||
} catch (err) {
|
||
btnExecute.disabled = false;
|
||
btnExecute.innerHTML = '<span>⚡ Execute MCP Tool</span>';
|
||
respStatusTag.textContent = 'Network Error';
|
||
respStatusTag.style.color = 'var(--rose)';
|
||
termResp.textContent = JSON.stringify({ error: err.message }, null, 2);
|
||
}
|
||
});
|
||
|
||
// Demo Data Button
|
||
btnDemo.addEventListener('click', () => {
|
||
inputName.value = 'Tanvir Ahmed (Applix BD)';
|
||
inputPhone.value = '01606047055';
|
||
inputAddress.value = 'Motalib Plaza, Shop 287, 2nd Floor, Hatirpool, Dhaka';
|
||
inputThana.value = 'Hatirpool';
|
||
inputDistrict.value = 'Dhaka';
|
||
inputCod.value = '3500';
|
||
inputWeight.value = '0.5';
|
||
chkDryRun.checked = true;
|
||
updateRequestPreview();
|
||
});
|
||
|
||
// Clear Button
|
||
btnReset.addEventListener('click', () => {
|
||
inputName.value = '';
|
||
inputPhone.value = '';
|
||
inputAddress.value = '';
|
||
inputThana.value = '';
|
||
inputDistrict.value = '';
|
||
inputCod.value = '0';
|
||
inputConsignmentId.value = '';
|
||
updateRequestPreview();
|
||
});
|
||
|
||
// Copy JSON
|
||
btnCopy.addEventListener('click', () => {
|
||
navigator.clipboard.writeText(termResp.textContent);
|
||
const orig = btnCopy.textContent;
|
||
btnCopy.textContent = '✅ Copied!';
|
||
setTimeout(() => btnCopy.textContent = orig, 2000);
|
||
});
|
||
|
||
// Initial Preview
|
||
updateRequestPreview();
|
||
</script>
|
||
</body>
|
||
</html>
|