From cfd00a4eda9498703eac1862c69334c6daa556d2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 08:20:51 +0000 Subject: [PATCH] fix: resolve TypeScript build errors (types/node, label vs name, safe cast) Agent-Logs-Url: https://github.com/Jacobcdsmith/jclaw-framework/sessions/f6df2783-4e30-4cd6-a337-286812d8ecaa Co-authored-by: Jacobcdsmith <88069592+Jacobcdsmith@users.noreply.github.com> --- src/gate/protocol.ts | 2 +- src/gate/server.ts | 4 ++-- tsconfig.json | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) 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,