diff --git a/apps/cli/src/commands/broker-actions.ts b/apps/cli/src/commands/broker-actions.ts index a82bb8d..f0c89d3 100644 --- a/apps/cli/src/commands/broker-actions.ts +++ b/apps/cli/src/commands/broker-actions.ts @@ -194,7 +194,7 @@ export async function runMsgStatus(id: string | undefined, opts: StateFlags): Pr console.log(JSON.stringify(result, null, 2)); return EXIT.SUCCESS; } - render.section(`message ${id.slice(0, 12)}…`); + render.section(`message ${lookupId.slice(0, 12)}…`); render.kv([ ["target", result.targetSpec], ["delivered", result.delivered ? "yes" : "no"], diff --git a/apps/cli/src/constants/exit-codes.ts b/apps/cli/src/constants/exit-codes.ts index 1d85975..6fd2f98 100644 --- a/apps/cli/src/constants/exit-codes.ts +++ b/apps/cli/src/constants/exit-codes.ts @@ -9,6 +9,7 @@ export const EXIT = { PERMISSION_DENIED: 7, INTERNAL_ERROR: 8, CLAUDE_MISSING: 9, + IO_ERROR: 10, } as const; export type ExitCode = (typeof EXIT)[keyof typeof EXIT]; diff --git a/apps/cli/src/daemon/ipc/server.ts b/apps/cli/src/daemon/ipc/server.ts index c757692..401018c 100644 --- a/apps/cli/src/daemon/ipc/server.ts +++ b/apps/cli/src/daemon/ipc/server.ts @@ -328,7 +328,7 @@ function makeHandler(opts: { if (filterMesh && filterMesh !== slug) continue; try { const peers = await b.listPeers(); - for (const p of peers) all.push({ ...(p as Record), mesh: slug }); + for (const p of peers) all.push({ ...(p as unknown as Record), mesh: slug }); } catch (e) { opts.log("warn", "ipc_peers_broker_failed", { mesh: slug, err: String(e) }); } @@ -486,7 +486,7 @@ function makeHandler(opts: { if (filterMesh && filterMesh !== slug) continue; try { const skills = await b.listSkills(query); - for (const s of skills) all.push({ ...(s as Record), mesh: slug }); + for (const s of skills) all.push({ ...(s as unknown as Record), mesh: slug }); } catch (e) { opts.log("warn", "ipc_skills_broker_failed", { mesh: slug, err: String(e) }); } diff --git a/apps/cli/src/mcp/server.ts b/apps/cli/src/mcp/server.ts index b66460c..4e511f5 100644 --- a/apps/cli/src/mcp/server.ts +++ b/apps/cli/src/mcp/server.ts @@ -125,7 +125,7 @@ function subscribeEvents(onEvent: (e: DaemonEvent) => void): { close: () => void } if (!dataLine) continue; try { - const parsed = JSON.parse(dataLine); + const parsed = JSON.parse(dataLine) as Record; onEvent({ kind, ts: String(parsed.ts ?? ""), data: parsed }); } catch { /* malformed event; skip */ } } diff --git a/apps/cli/src/services/bridge/daemon-route.ts b/apps/cli/src/services/bridge/daemon-route.ts index 20195bd..fbfa75a 100644 --- a/apps/cli/src/services/bridge/daemon-route.ts +++ b/apps/cli/src/services/bridge/daemon-route.ts @@ -15,7 +15,7 @@ import { ipc } from "~/daemon/ipc/client.js"; import { ensureDaemonReady } from "~/services/daemon/lifecycle.js"; import { getDaemonPolicy } from "~/services/daemon/policy.js"; -import { warnDaemonState } from "~/ui/warnings.ts"; +import { warnDaemonState } from "~/ui/warnings.js"; function meshQuery(mesh?: string): string { return mesh ? `?mesh=${encodeURIComponent(mesh)}` : ""; diff --git a/apps/cli/src/types/text-import.d.ts b/apps/cli/src/types/text-import.d.ts new file mode 100644 index 0000000..3d8a646 --- /dev/null +++ b/apps/cli/src/types/text-import.d.ts @@ -0,0 +1,9 @@ +/** + * Bun's text-import attribute lets us bake `.md` content into the bundle + * at build time. TypeScript doesn't know about the import attribute + * syntax for non-JS modules, so we declare the wildcard here. + */ +declare module "*.md" { + const content: string; + export default content; +}