From de8d00a475e30d4222c684c82c8b12b235c3c945 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sat, 11 Jul 2026 23:05:11 -0700 Subject: [PATCH] fix: address CI lint failures in chat routes and grok MCP schema server --- packages/dashboard/src/routes/register-chat-routes.ts | 11 ++++++++--- .../src/mcp-schema-server.cjs | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/dashboard/src/routes/register-chat-routes.ts b/packages/dashboard/src/routes/register-chat-routes.ts index 0f9903e8e8..f5fb29cde1 100644 --- a/packages/dashboard/src/routes/register-chat-routes.ts +++ b/packages/dashboard/src/routes/register-chat-routes.ts @@ -4,14 +4,19 @@ import { mkdir, rm, writeFile } from "node:fs/promises"; import { basename, join, resolve } from "node:path"; import { THINKING_LEVELS, type EnrichedChatSession, type ChatAttachment } from "@fusion/core"; import { ApiError, badRequest, notFound } from "../api-error.js"; -import { resolveProjectChatContext } from "../chat-project-services.js"; +/* +FNXC:GrokAcp 2026-07-11-18:30: +List/create and ChatManager share resolveProjectChatContext (not getOrCreateProjectStore / +getOrCreateScopedChatStore at this layer). Direct imports of those helpers were leftover after +the store-alignment fix and failed lint as unused; keep manager construction on the resolved +store/chatStore pair only. +*/ +import { getOrCreateScopedChatManager, resolveProjectChatContext } from "../chat-project-services.js"; import { CHAT_ALLOWED_MIME_TYPES, CHAT_MAX_ATTACHMENT_SIZE } from "./chat-attachment-config.js"; import { rateLimit, RATE_LIMITS } from "../rate-limit.js"; import { writeSSEEvent, type SessionBufferedEvent } from "../sse-buffer.js"; import { TASK_PLANNER_CHAT_AGENT_ID_PREFIX } from "../chat.js"; import type { ApiRoutesContext } from "./types.js"; -import { getOrCreateScopedChatManager, getOrCreateScopedChatStore } from "../chat-project-services.js"; -import { getOrCreateProjectStore } from "../project-store-resolver.js"; interface ChatRouteDeps { parseLastEventId: (req: import("express").Request) => number | undefined; diff --git a/plugins/fusion-plugin-grok-runtime/src/mcp-schema-server.cjs b/plugins/fusion-plugin-grok-runtime/src/mcp-schema-server.cjs index 8068f77482..2527bc74b8 100644 --- a/plugins/fusion-plugin-grok-runtime/src/mcp-schema-server.cjs +++ b/plugins/fusion-plugin-grok-runtime/src/mcp-schema-server.cjs @@ -12,6 +12,8 @@ Grok actually invokes MCP tools/call itself. const fs = require("fs"); const http = require("http"); const readline = require("readline"); +// FNXC:GrokAcp 2026-07-11-18:30: CJS has no global URL under eslint no-undef; use node:url. +const { URL } = require("node:url"); const schemaPath = process.argv[2]; const bridgeUrl = process.env.FUSION_GROK_TOOL_BRIDGE_URL;