diff --git a/src/gate/protocol.ts b/src/gate/protocol.ts index b7c42c2..e878cf3 100644 --- a/src/gate/protocol.ts +++ b/src/gate/protocol.ts @@ -647,7 +647,7 @@ async function handleRequest(ctx: ProtocolContext, req: RequestFrameT): Promise< const probeStart = Date.now(); let probeTtft: number | null = null; const probeSession = startSession({ - name: `probe-${Date.now()}`, + label: `probe-${Date.now()}`, provider: providerName as ProviderName, model: modelSpec ?? undefined }); diff --git a/src/gate/server.ts b/src/gate/server.ts index 8aaf53f..5eb621f 100644 --- a/src/gate/server.ts +++ b/src/gate/server.ts @@ -96,14 +96,14 @@ export async function startJclawGate(options: JclawGateOptions) { app.post("/webhook/whatsapp", express.json({ verify: (req, _res, buf) => { // Stash the raw body buffer for signature verification below. - (req as Record).rawBody = buf; + (req as unknown as Record).rawBody = buf; } }), (req, res) => { // ── Signature verification ───────────────────────────────────────────── const cfg = { ...DEFAULT_WHATSAPP, ...(readConfig().whatsapp ?? {}) }; if (cfg.appSecret) { const sigHeader = req.headers["x-hub-signature-256"]; - const rawBody = (req as Record).rawBody as Buffer | undefined; + const rawBody = (req as unknown as Record).rawBody as Buffer | undefined; if (!sigHeader || !rawBody) { res.status(403).send("Forbidden"); return; diff --git a/tsconfig.json b/tsconfig.json index a110bb1..efb73d9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "target": "ES2023", "lib": ["ES2023"], + "types": ["node"], "module": "ESNext", "moduleResolution": "bundler", "esModuleInterop": true,