clear the remaining type errors

- DiscordAccount seeded DiscordStatus without its two nullable fields.
- bug-report typed reporter.name as string, but users.name is nullable; and the
  Discord upload wrapped a Buffer directly in a Blob.
- Lucide icons take no `title` prop, so the sync spinner's tooltip moved to a
  wrapping span.
- DesktopView cast its dynamic import to a type that included `| null`.
- dock PUT cast the request body straight to string[]; it now rejects anything
  that is not an array of strings instead of writing it to the database.
- buildZodSchema assembles a mutable record, since z.ZodRawShape is readonly in
  zod v4.
- The dev-server proxy forwards Bun's `string | Buffer` frames through a helper
  that satisfies WebSocket.send without copying.

bunx tsgo is now clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
brunorezio
2026-07-25 23:30:20 +01:00
co-authored by Claude Opus 5
parent 0041fcbd47
commit 0d67e2af26
7 changed files with 197 additions and 79 deletions
+3 -2
View File
@@ -139,7 +139,7 @@ function discoverTools(dirs: string[]): DiscoveredTool[] {
const { meta } = parseFrontmatter(content);
if (!meta.name || !meta.description) continue;
if ((meta.targets as string ?? 'all') === 'pi') continue;
if (((meta.targets as string) ?? 'all') === 'pi') continue;
if (seen.has(meta.name)) continue;
seen.add(meta.name);
@@ -153,7 +153,8 @@ function discoverTools(dirs: string[]): DiscoveredTool[] {
// ── Schema building (frontmatter inputs → zod) ──
function buildZodSchema(inputs: Record<string, ToolParam>): z.ZodRawShape {
const shape: z.ZodRawShape = {};
// z.ZodRawShape is readonly in zod v4, so build it mutably and widen on return.
const shape: Record<string, z.ZodTypeAny> = {};
for (const [name, param] of Object.entries(inputs)) {
let field: z.ZodTypeAny;