fix(auth,ui): support least-privilege DB role, fix 1280px navbar, sync 13 MCP tools & standalone Woo/Shopify guide
This commit is contained in:
Vendored
+8
-1
@@ -80,6 +80,13 @@ export async function initDynamicAuthStore(pool) {
|
|||||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
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");
|
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 || []) {
|
for (const row of res.rows || []) {
|
||||||
dynamicKeyHashes.set(row.token_hash, {
|
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.`);
|
console.log(`[Auth] Loaded ${dynamicKeyHashes.size} dynamic MCP key(s) from PostgreSQL.`);
|
||||||
}
|
}
|
||||||
catch (err) {
|
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) {
|
export async function upsertDynamicKeyHash(opts) {
|
||||||
|
|||||||
+32
-3
@@ -1503,9 +1503,9 @@
|
|||||||
<span class="res-icon"></></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">🏪</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">❓</span>
|
<span class="res-icon">❓</span>
|
||||||
@@ -1514,6 +1514,35 @@
|
|||||||
</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;">
|
||||||
|
|||||||
+74
-15
@@ -90,19 +90,20 @@
|
|||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
.hbar {
|
.hbar {
|
||||||
max-width: 1200px;
|
max-width: 1260px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 12px 20px;
|
padding: 10px 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 16px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
.logo-group {
|
.logo-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 10px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.logo-img {
|
.logo-img {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
@@ -145,18 +146,21 @@
|
|||||||
.nav-links {
|
.nav-links {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 14px;
|
gap: 10px;
|
||||||
|
min-width: 0;
|
||||||
|
flex-shrink: 1;
|
||||||
}
|
}
|
||||||
.nav-item {
|
.nav-item {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 13.5px;
|
font-size: 12.5px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
transition: color 0.18s;
|
transition: color 0.18s;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 5px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.nav-item:hover { color: #fff; }
|
.nav-item:hover { color: #fff; }
|
||||||
.nav-item.active {
|
.nav-item.active {
|
||||||
@@ -808,6 +812,14 @@
|
|||||||
.dock-item svg { width: 19px; height: 19px; }
|
.dock-item svg { width: 19px; height: 19px; }
|
||||||
|
|
||||||
/* ===== Responsive Breakpoints ===== */
|
/* ===== 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) {
|
@media (max-width: 960px) {
|
||||||
.hero { grid-template-columns: 1fr; gap: 32px; }
|
.hero { grid-template-columns: 1fr; gap: 32px; }
|
||||||
.hero-title { font-size: 34px; }
|
.hero-title { font-size: 34px; }
|
||||||
@@ -1327,7 +1339,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="stat-val">12</div>
|
<div class="stat-val">13</div>
|
||||||
<div class="stat-label" data-i18n="stat_tools">MCP Tools (JSON-RPC)</div>
|
<div class="stat-label" data-i18n="stat_tools">MCP Tools (JSON-RPC)</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1534,7 +1546,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- ===== All 12 MCP Tools Section ===== -->
|
<!-- ===== All 13 MCP Tools Section ===== -->
|
||||||
<section id="tools" style="margin-bottom: 48px;">
|
<section id="tools" style="margin-bottom: 48px;">
|
||||||
<div class="section-header">
|
<div class="section-header">
|
||||||
<div class="section-tag" style="display:inline-flex; align-items:center; gap:6px;">
|
<div class="section-tag" style="display:inline-flex; align-items:center; gap:6px;">
|
||||||
@@ -1545,8 +1557,8 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<span data-i18n="tools_tag">Core Protocol</span>
|
<span data-i18n="tools_tag">Core Protocol</span>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="section-title" data-i18n="tools_title">All 12 MCP Tools</h2>
|
<h2 class="section-title" data-i18n="tools_title">All 13 MCP Tools</h2>
|
||||||
<p class="section-subtitle" data-i18n="tools_subtitle">Aura Courier MCP-এ থাকা ১২টি শক্তিশালী টুল, যেগুলো সরাসরি আপনার AI এজেন্ট বা অটোমেশন ফ্লোতে কাজ করে।</p>
|
<p class="section-subtitle" data-i18n="tools_subtitle">Aura Courier MCP-এ থাকা ১৩টি শক্তিশালী টুল, যেগুলো সরাসরি আপনার AI এজেন্ট বা অটোমেশন ফ্লোতে কাজ করে।</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tools-grid">
|
<div class="tools-grid">
|
||||||
@@ -1760,6 +1772,24 @@
|
|||||||
<div class="tool-name">bulk_create_parcels</div>
|
<div class="tool-name">bulk_create_parcels</div>
|
||||||
<div class="tool-desc" data-i18n="t12_desc">এক ক্লিকে ১০০টি পর্যন্ত পার্সেল ব্যাচ বুকিং বা ভ্যালিডেশন করুন উইথ আইসোলেটেড এরর হ্যান্ডলিং।</div>
|
<div class="tool-desc" data-i18n="t12_desc">এক ক্লিকে ১০০টি পর্যন্ত পার্সেল ব্যাচ বুকিং বা ভ্যালিডেশন করুন উইথ আইসোলেটেড এরর হ্যান্ডলিং।</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Tool 13: get_webhook_events -->
|
||||||
|
<div class="tool-card">
|
||||||
|
<div>
|
||||||
|
<div class="tool-card-top">
|
||||||
|
<div class="tool-icon-wrap ic-purple" style="background:rgba(139,92,246,0.15); border-color:rgba(139,92,246,0.35);">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#a78bfa" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2"/>
|
||||||
|
<path d="m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06"/>
|
||||||
|
<path d="m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<button class="btn-schema" onclick="openSchemaModal('get_webhook_events')">Schema & JSON ↗</button>
|
||||||
|
</div>
|
||||||
|
<div class="tool-name">get_webhook_events</div>
|
||||||
|
<div class="tool-desc" data-i18n="t13_desc">Pathao, Steadfast, RedX ও Paperfly-এর রিয়েল-টাইম ডেলিভারি ওয়েবহুক ইভেন্ট লগ লাইভ দেখুন।</div>
|
||||||
|
</div>
|
||||||
</div></div>
|
</div></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -2188,8 +2218,8 @@
|
|||||||
btn_check_risk: "Check Risk →",
|
btn_check_risk: "Check Risk →",
|
||||||
fraud_desc_safe: "New customer - Safe to proceed · Zero Mock Data",
|
fraud_desc_safe: "New customer - Safe to proceed · Zero Mock Data",
|
||||||
tools_tag: "Core Protocol",
|
tools_tag: "Core Protocol",
|
||||||
tools_title: "All 12 MCP Tools",
|
tools_title: "All 13 MCP Tools",
|
||||||
tools_subtitle: "Aura Courier MCP-এ থাকা ১২টি শক্তিশালী টুল, যেগুলো সরাসরি আপনার AI এজেন্ট বা অটোমেশন ফ্লোতে কাজ করে।",
|
tools_subtitle: "Aura Courier MCP-এ থাকা ১৩টি শক্তিশালী টুল, যেগুলো সরাসরি আপনার AI এজেন্ট বা অটোমেশন ফ্লোতে কাজ করে।",
|
||||||
t1_desc: "নতুন পার্সেল বা ডেলিভারি অর্ডার তৈরি করুন (Steadfast, Pathao, RedX, Paperfly-তে ১-ক্লিকে)।",
|
t1_desc: "নতুন পার্সেল বা ডেলিভারি অর্ডার তৈরি করুন (Steadfast, Pathao, RedX, Paperfly-তে ১-ক্লিকে)।",
|
||||||
t2_desc: "পার্সেল ট্র্যাকিং স্ট্যাটাস ও লাইভ ডেলিভারি টাইমলাইন এক ক্লিকে ট্র্যাক করুন।",
|
t2_desc: "পার্সেল ট্র্যাকিং স্ট্যাটাস ও লাইভ ডেলিভারি টাইমলাইন এক ক্লিকে ট্র্যাক করুন।",
|
||||||
t3_desc: "সব কুরিয়ার মার্চেন্ট একাউন্টের লাইভ ব্যালেন্স, পেন্ডিং ডিসবার্সমেন্ট ও পেআউট জানুন।",
|
t3_desc: "সব কুরিয়ার মার্চেন্ট একাউন্টের লাইভ ব্যালেন্স, পেন্ডিং ডিসবার্সমেন্ট ও পেআউট জানুন।",
|
||||||
@@ -2210,6 +2240,7 @@
|
|||||||
t10_desc: "যেকোনো কুরিয়ারে বুক করা পার্সেল ক্যানসেলেশন রিকোয়েস্ট পাঠান বা স্বয়ংক্রিয় বাতিল করুন।",
|
t10_desc: "যেকোনো কুরিয়ারে বুক করা পার্সেল ক্যানসেলেশন রিকোয়েস্ট পাঠান বা স্বয়ংক্রিয় বাতিল করুন।",
|
||||||
t11_desc: "ইন-ট্রানজিট পার্সেলের ডেলিভারি নোট, গ্রাহকের ফোন নম্বর বা সিওডি টাকার পরিমাণ আপডেট করুন।",
|
t11_desc: "ইন-ট্রানজিট পার্সেলের ডেলিভারি নোট, গ্রাহকের ফোন নম্বর বা সিওডি টাকার পরিমাণ আপডেট করুন।",
|
||||||
t12_desc: "এক ক্লিকে ১০০টি পর্যন্ত পার্সেল ব্যাচ বুকিং বা ভ্যালিডেশন করুন উইথ আইসোলেটেড এরর হ্যান্ডলিং।",
|
t12_desc: "এক ক্লিকে ১০০টি পর্যন্ত পার্সেল ব্যাচ বুকিং বা ভ্যালিডেশন করুন উইথ আইসোলেটেড এরর হ্যান্ডলিং।",
|
||||||
|
t13_desc: "Pathao, Steadfast, RedX ও Paperfly-এর রিয়েল-টাইম ডেলিভারি ওয়েবহুক ইভেন্ট লগ লাইভ দেখুন।",
|
||||||
spatial_tag: "Spatial Engine",
|
spatial_tag: "Spatial Engine",
|
||||||
spatial_title: "Google Maps Spatial AI Routing",
|
spatial_title: "Google Maps Spatial AI Routing",
|
||||||
spatial_subtitle: "গুগল ম্যাপের উপর ভিত্তি করে রুট অপটিমাইজেশন, জোন ডিটেকশন ও রিয়েল-টাইম দূরত্ব পরিমাপ।",
|
spatial_subtitle: "গুগল ম্যাপের উপর ভিত্তি করে রুট অপটিমাইজেশন, জোন ডিটেকশন ও রিয়েল-টাইম দূরত্ব পরিমাপ।",
|
||||||
@@ -2256,8 +2287,8 @@
|
|||||||
btn_check_risk: "Check Risk →",
|
btn_check_risk: "Check Risk →",
|
||||||
fraud_desc_safe: "New customer - Safe to proceed · Zero Mock Data",
|
fraud_desc_safe: "New customer - Safe to proceed · Zero Mock Data",
|
||||||
tools_tag: "Core Protocol",
|
tools_tag: "Core Protocol",
|
||||||
tools_title: "All 12 MCP Tools",
|
tools_title: "All 13 MCP Tools",
|
||||||
tools_subtitle: "Production-grade tools available inside Aura Courier MCP for seamless agentic workflows.",
|
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.",
|
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.",
|
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.",
|
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.",
|
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.",
|
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.",
|
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_tag: "Spatial Engine",
|
||||||
spatial_title: "Google Maps Spatial AI Routing",
|
spatial_title: "Google Maps Spatial AI Routing",
|
||||||
spatial_subtitle: "Rooftop geocoding, route optimization, zone detection, and real-time distance matrix.",
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+22
-2
@@ -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 -->
|
||||||
@@ -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,6 +428,26 @@
|
|||||||
<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>
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,14 @@ export async function initDynamicAuthStore(pool: any): Promise<void> {
|
|||||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
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");
|
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 || []) {
|
for (const row of res.rows || []) {
|
||||||
dynamicKeyHashes.set(row.token_hash, {
|
dynamicKeyHashes.set(row.token_hash, {
|
||||||
@@ -149,7 +157,7 @@ export async function initDynamicAuthStore(pool: any): Promise<void> {
|
|||||||
}
|
}
|
||||||
console.log(`[Auth] Loaded ${dynamicKeyHashes.size} dynamic MCP key(s) from PostgreSQL.`);
|
console.log(`[Auth] Loaded ${dynamicKeyHashes.size} dynamic MCP key(s) from PostgreSQL.`);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.warn("[Auth] Dynamic key table init skipped:", err?.message);
|
console.warn("[Auth] Dynamic key table load skipped:", err?.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user