diff --git a/apps/web/app/api/workspace/search-index/route.ts b/apps/web/app/api/workspace/search-index/route.ts index b571381517d..5acdbfdb9b8 100644 --- a/apps/web/app/api/workspace/search-index/route.ts +++ b/apps/web/app/api/workspace/search-index/route.ts @@ -11,6 +11,13 @@ import { export const dynamic = "force-dynamic"; export const runtime = "nodejs"; +/** Safely convert an unknown DB value to a display string. */ +function dbStr(val: unknown): string { + if (val == null) {return "";} + if (typeof val === "object") {return JSON.stringify(val);} + return String(val as string | number | boolean); +} + // --- Types --- export type SearchIndexItem = { @@ -209,15 +216,15 @@ async function buildEntryItems(): Promise { } for (const entry of entries) { - const entryId = String(entry.entry_id ?? ""); + const entryId = dbStr(entry.entry_id); if (!entryId) {continue;} - const displayValue = String(entry[displayField] ?? ""); + const displayValue = dbStr(entry[displayField]); const fieldPreview: Record = {}; for (const f of previewFields) { const val = entry[f.name]; if (val != null && val !== "") { - fieldPreview[f.name] = String(val); + fieldPreview[f.name] = dbStr(val); } } diff --git a/apps/web/lib/agent-runner.ts b/apps/web/lib/agent-runner.ts index 68f6f8a5e7e..d4bdf412ab9 100644 --- a/apps/web/lib/agent-runner.ts +++ b/apps/web/lib/agent-runner.ts @@ -492,10 +492,8 @@ export function parseErrorFromStderr(stderr: string): string | undefined { if (!stderr) {return undefined;} // Strip ANSI escape codes - const clean = stderr.replace( - /\x1B\[[0-9;]*[A-Za-z]/g, - "", - ); + // eslint-disable-next-line no-control-regex + const clean = stderr.replace(/\x1B\[[0-9;]*[A-Za-z]/g, ""); // Look for JSON error bodies (e.g. from API responses) const jsonMatch = clean.match(/\{"error":\{[^}]*"message":"([^"]+)"[^}]*\}/); diff --git a/package.json b/package.json index caf3ddad6ec..df39df061a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ironclaw", - "version": "2026.2.15-1.1", + "version": "2026.2.15-1.2", "description": "AI-powered CRM platform with multi-channel agent gateway, DuckDB workspace, and knowledge management", "keywords": [], "license": "MIT",