fix(ci,canvas): restore v2.6.0 hardened backend + cache-bust courier-canvas.js?v=2.6.1 and keep configs static route
CI / Build & Quality Check (push) Waiting to run

This commit is contained in:
Amirul Islam Redwan71
2026-11-12 22:08:27 +06:00
parent c37ae2f441
commit 6c1db1a068
29 changed files with 1473 additions and 251 deletions
+6 -3
View File
@@ -167,12 +167,13 @@ export const TOOLS: Tool[] = [
{
name: "cancel_parcel",
description:
"Request cancellation for an existing parcel consignment on Steadfast, Pathao, RedX, or Paperfly. Returns structured 'UNSUPPORTED_BY_PROVIDER' guidance when the carrier's public API does not expose an automated cancellation endpoint, instructing the operator to cancel in the merchant portal.",
"Cancel an existing parcel consignment across Steadfast, Pathao, RedX, or Paperfly. For carriers with automated cancellation APIs (Pathao, RedX, Paperfly), executes live upstream cancellation immediately. For Steadfast, validates parcel eligibility, marks internal status as CANCEL_REQUESTED, and provides direct portal action links.",
inputSchema: {
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 cancel" },
reason: { type: "string", description: "Optional cancellation reason (e.g. 'Customer cancelled', 'Address incorrect')" },
},
required: ["courier", "consignment_id"],
},
@@ -334,7 +335,8 @@ export async function executeToolCall(
case "cancel_parcel": {
const result = await registry.cancelParcel(
args?.courier as SupportedCourier,
String(args?.consignment_id ?? "")
String(args?.consignment_id ?? ""),
args?.reason ? String(args.reason) : undefined
);
return { isError: false, envelope: wrapSuccess(result, "live_api") };
}
@@ -352,7 +354,8 @@ export async function executeToolCall(
case "get_webhook_events": {
const result = registry.getWebhookEvents(
args?.consignment_id ? String(args?.consignment_id) : undefined,
args?.since ? String(args?.since) : undefined
args?.since ? String(args?.since) : undefined,
tenantId
);
return { isError: false, envelope: wrapSuccess(result, "cache") };
}