Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content-scraper/server/lib/db-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ export function escapeSqlValue(value: SqlValue): string {
// String escaping
const escaped = value
// Remove null bytes (can cause truncation attacks)
// oxlint-disable-next-line no-control-regex
.replace(/\0/g, "")
// Remove other control characters (except newlines and tabs)
// oxlint-disable-next-line no-control-regex
.replace(/[\x01-\x08\x0B\x0C\x0E-\x1F\x7F]/g, "")
// Escape backslashes first
.replace(/\\/g, "\\\\")
Expand Down
1 change: 1 addition & 0 deletions content-scraper/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"ignoreDeprecations": "5.0",
"target": "ES2022",
"useDefineForClassFields": true,
"lib": ["ES2023"],
Expand Down
1 change: 0 additions & 1 deletion discord-read/server/lib/config-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
loadConnectionConfig,
saveConnectionConfig,
deleteConnectionConfig,
type DiscordConnectionRow,
} from "./supabase-client.ts";

/**
Expand Down
95 changes: 45 additions & 50 deletions discord-read/server/lib/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,62 +184,57 @@ export class HyperDXLogger {
*/
private async sendToHyperDX(logEntry: Record<string, unknown>) {
console.log(`[HyperDX] 📤 Sending log to ${this.hyperDxEndpoint}...`);
try {
const response = await fetch(this.hyperDxEndpoint, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: this.apiKey!,
},
body: JSON.stringify({
resourceLogs: [
{
resource: {
attributes: [
{
key: "service.name",
value: { stringValue: this.service },
},
],
},
scopeLogs: [
const response = await fetch(this.hyperDxEndpoint, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: this.apiKey!,
},
body: JSON.stringify({
resourceLogs: [
{
resource: {
attributes: [
{
scope: { name: this.service },
logRecords: [
{
timeUnixNano: `${Date.now() * 1000000}`,
severityText: String(
logEntry.level || "info",
).toUpperCase(),
body: { stringValue: String(logEntry.body) },
attributes: Object.entries(logEntry)
.filter(([key]) => key !== "body" && key !== "level")
.map(([key, value]) => ({
key,
value: { stringValue: String(value) },
})),
},
],
key: "service.name",
value: { stringValue: this.service },
},
],
},
],
}),
});

const body = await response.text();
if (!response.ok) {
throw new Error(
`HyperDX API returned ${response.status}: ${response.statusText} - ${body}`,
);
}
console.log(
`[HyperDX] ✅ Log sent successfully (${response.status}) - Response: ${body || "(empty)"}`,
scopeLogs: [
{
scope: { name: this.service },
logRecords: [
{
timeUnixNano: `${Date.now() * 1000000}`,
severityText: String(
logEntry.level || "info",
).toUpperCase(),
body: { stringValue: String(logEntry.body) },
attributes: Object.entries(logEntry)
.filter(([key]) => key !== "body" && key !== "level")
.map(([key, value]) => ({
key,
value: { stringValue: String(value) },
})),
},
],
},
],
},
],
}),
});

const body = await response.text();
if (!response.ok) {
throw new Error(
`HyperDX API returned ${response.status}: ${response.statusText} - ${body}`,
);
} catch (error) {
// Re-throw to be caught by caller
throw error;
}
console.log(
`[HyperDX] ✅ Log sent successfully (${response.status}) - Response: ${body || "(empty)"}`,
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion discord-read/server/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const runtime = withRuntime<Env, typeof StateSchema, Registry>({
}

const configToSave: DiscordConfig = {
...(existingConfig || {}),
...existingConfig,
connectionId: mergedConnectionId,
organizationId: mergedOrgId,
meshUrl: mergedMeshUrl,
Expand Down
12 changes: 6 additions & 6 deletions discord-read/server/tools/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { isSupabaseConfigured } from "../lib/supabase-client.ts";
/**
* Save Discord bot configuration
*/
export const createSaveConfigTool = (env: Env) =>
export const createSaveConfigTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_SAVE_CONFIG",
description:
Expand Down Expand Up @@ -159,7 +159,7 @@ export const createSaveConfigTool = (env: Env) =>
/**
* Update Discord bot configuration (partial update)
*/
export const createUpdateConfigTool = (env: Env) =>
export const createUpdateConfigTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_UPDATE_CONFIG",
description:
Expand Down Expand Up @@ -281,7 +281,7 @@ export const createUpdateConfigTool = (env: Env) =>
/**
* Load Discord bot configuration
*/
export const createLoadConfigTool = (env: Env) =>
export const createLoadConfigTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_LOAD_CONFIG",
description:
Expand Down Expand Up @@ -364,7 +364,7 @@ export const createLoadConfigTool = (env: Env) =>
/**
* Delete Discord bot configuration
*/
export const createDeleteConfigTool = (env: Env) =>
export const createDeleteConfigTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_DELETE_CONFIG",
description:
Expand Down Expand Up @@ -408,7 +408,7 @@ export const createDeleteConfigTool = (env: Env) =>
/**
* Get cache statistics
*/
export const createCacheStatsTool = (env: Env) =>
export const createCacheStatsTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_CONFIG_CACHE_STATS",
description: "Get Discord configuration cache statistics",
Expand All @@ -430,7 +430,7 @@ export const createCacheStatsTool = (env: Env) =>
/**
* Clear configuration cache
*/
export const createClearCacheTool = (env: Env) =>
export const createClearCacheTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_CONFIG_CLEAR_CACHE",
description:
Expand Down
8 changes: 4 additions & 4 deletions discord-read/server/tools/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { invalidateAutoRespondCache } from "../discord/client.ts";
/**
* Query Discord messages (read-only, scoped to connection)
*/
export const createQueryMessagesTool = (env: Env) =>
export const createQueryMessagesTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_QUERY_MESSAGES",
description:
Expand Down Expand Up @@ -159,7 +159,7 @@ export const createQueryMessagesTool = (env: Env) =>
/**
* Query Discord guilds (read-only)
*/
export const createQueryGuildsTool = (env: Env) =>
export const createQueryGuildsTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_QUERY_GUILDS",
description: "Query Discord guilds (servers) from the database.",
Expand Down Expand Up @@ -228,7 +228,7 @@ export const createQueryGuildsTool = (env: Env) =>
/**
* Query message statistics
*/
export const createMessageStatsTool = (env: Env) =>
export const createMessageStatsTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_MESSAGE_STATS",
description:
Expand Down Expand Up @@ -333,7 +333,7 @@ export const createMessageStatsTool = (env: Env) =>
/**
* Query channel contexts (custom prompts per channel)
*/
export const createQueryChannelContextsTool = (env: Env) =>
export const createQueryChannelContextsTool = (_env: Env) =>
createPrivateTool({
id: "DISCORD_QUERY_CHANNEL_CONTEXTS",
description:
Expand Down
2 changes: 1 addition & 1 deletion discord-read/server/tools/discord/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ export const createPurgeChannelMessagesTool = (env: Env) =>
console.log(
`🧹 [Purge] Bulk deleted ${chunk.length} recent messages`,
);
} catch (error) {
} catch {
console.log(
`⚠️ [Purge] Bulk delete failed, falling back to individual delete`,
);
Expand Down
4 changes: 2 additions & 2 deletions discord-read/shared/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export function getDatabaseEnv(): Env | null {
* For now, we'll use direct table operations instead
*/
export async function runSQL<T = unknown>(
sql: string,
params: unknown[] = [],
_sql: string,
_params: unknown[] = [],
): Promise<T[]> {
const client = getSupabaseClient();
if (!client) {
Expand Down
2 changes: 1 addition & 1 deletion hyperdx/server/tools/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const AlertChannelSchema = z.discriminatedUnion("type", [
}),
]);

const AlertResponseSchema = z.object({
const _AlertResponseSchema = z.object({
id: z.string(),
interval: AlertIntervalSchema,
threshold: z.number(),
Expand Down
1 change: 1 addition & 0 deletions hyperdx/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"ignoreDeprecations": "5.0",
"target": "ES2022",
"useDefineForClassFields": true,
"lib": ["ES2023", "ES2024", "DOM", "DOM.Iterable"],
Expand Down
2 changes: 1 addition & 1 deletion multi-channel-inbox/api/tools/conversations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export const statsTool = (env: Env) =>
total_conversations: z.number(),
}),
annotations: { readOnlyHint: true },
execute: async ({}) => {
execute: async () => {
const byStatus = await runSQL<{
status: string;
count: number;
Expand Down
2 changes: 1 addition & 1 deletion multi-channel-inbox/api/tools/sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const listSourcesTool = (env: Env) =>
),
}),
annotations: { readOnlyHint: true },
execute: async ({}) => {
execute: async () => {
const sources = await runSQL<{
id: string;
source_type: string;
Expand Down
1 change: 1 addition & 0 deletions multi-channel-inbox/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"ignoreDeprecations": "5.0",
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
Expand Down
2 changes: 1 addition & 1 deletion multi-channel-inbox/web/components/ui/combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function ComboboxChip({

function ComboboxChipsInput({
className,
children,
children: _children,
...props
}: ComboboxPrimitive.Input.Props) {
return (
Expand Down
3 changes: 0 additions & 3 deletions registry/scripts/enrich-with-ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ async function enrichMcpWithAI(
const name = server.name;
const description = server.description || server.short_description || "";
const repoUrl = server.repository?.url || "";
const hasRemote = (server.remotes?.length ?? 0) > 0;
const isNpm = server.remotes?.some((r) => r.type === "npm") ?? false;
const isVerified = server.verified;

// Serialize remotes for the prompt
const remotesInfo =
Expand Down
2 changes: 1 addition & 1 deletion registry/scripts/publish-verified.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async function main() {
// ── Apply icon overrides ──────────────────────────────────
console.log("\n── ICON OVERRIDES ──");
let iconCount = 0;
for (const server of [...(current || [])]) {
for (const server of current || []) {
const override = VERIFIED_SERVER_OVERRIDES[server.name];
if (!override?.icons) continue;

Expand Down
1 change: 1 addition & 0 deletions registry/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"ignoreDeprecations": "5.0",
"target": "ES2022",
"useDefineForClassFields": true,
"lib": ["ES2023", "DOM", "DOM.Iterable"],
Expand Down
2 changes: 1 addition & 1 deletion scripts/filter-deployable-mcps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (!mcpsJson) {
let mcps: string[];
try {
mcps = JSON.parse(mcpsJson);
} catch (error) {
} catch {
console.error("❌ Error: Invalid JSON array provided");
process.exit(1);
}
Expand Down
15 changes: 9 additions & 6 deletions slack-mcp/server/health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ export async function getHealthStatus(): Promise<HealthStatus> {

return {
status: cachedDeepResult.status,
summary: buildSummary(cachedDeepResult.status, cachedDeepResult.connections),
summary: buildSummary(
cachedDeepResult.status,
cachedDeepResult.connections,
),
timestamp: now.toISOString(),
deepCheckAt: cachedDeepResult.timestamp,
uptime: process.uptime(),
Expand Down Expand Up @@ -233,7 +236,7 @@ async function runDeepCheck(): Promise<ConnectionHealth[]> {
} else {
const { WebClient } = await import("@slack/web-api");
const tempClient = new WebClient(config.botToken);
const authResult = await tempClient.auth.test();
await tempClient.auth.test();
layers.push({
layer: "slack_api",
status: "ok",
Expand Down Expand Up @@ -309,7 +312,6 @@ async function runDeepCheck(): Promise<ConnectionHealth[]> {
const reader = resp.body!.getReader();
const decoder = new TextDecoder();
let gotText = false;
let responsePreview = "";

try {
let buffer = "";
Expand All @@ -332,7 +334,6 @@ async function runDeepCheck(): Promise<ConnectionHealth[]> {
(event.type === "text" && event.text)
) {
gotText = true;
responsePreview += event.delta || event.text || "";
}
} catch {
// ignore parse errors
Expand Down Expand Up @@ -382,7 +383,7 @@ async function runDeepCheck(): Promise<ConnectionHealth[]> {
});
callbackReachable = resp.status < 500;
callbackDetail = `callback=${resp.status}, triggers=${triggerState.activeTriggerTypes.length}`;
} catch (fetchErr) {
} catch {
callbackDetail = `callback unreachable, triggers=${triggerState.activeTriggerTypes.length}`;
}

Expand Down Expand Up @@ -464,7 +465,9 @@ async function runDeepCheck(): Promise<ConnectionHealth[]> {

results.push({
connectionId: config.connectionId.slice(0, 8) + "…",
teamName: config.teamName ? config.teamName.slice(0, 1) + "***" : undefined,
teamName: config.teamName
? config.teamName.slice(0, 1) + "***"
: undefined,
connectionName: config.connectionName,
mode,
overall,
Expand Down
Loading
Loading