v0.8.11 — Messaging, Prompts, Chat & LLM Bug Fixes
Bug Fixes
- WhatsApp
selfChatModenow gates inbound symmetrically —classifyInboundpreviously filtered only outbound (fromMe=true) traffic, so a contact DM or group message still routed to the bound session even with self-chat mode on — the agent could reply on the user's behalf in non-self-chats. Inbound from non-self-chats is now dropped whenselfChatModeis on, with a newnon_self_chat_inboundskip reason for log clarity. Back-compat preserved: withselfChatMode=false, inbound from contacts still emits as before. call_llmrecovers partial output instead of failing on SDK max turns —queryLlm's SDKmaxTurnswas 1, so reasoning-model outputs that naturally span multiple SDK turns (even without tools) failed outright with "Reached maximum number of turns (1)". Bumped to 10, and the consumer is now defensive: captures partial assistant text + warning when the SDK yields an error-result or throws mid-stream instead of returning a bare failure.call_llmrenders[Partial result — …]so callers see the signal. Added[queryLlm]debug logs (subtype, num_turns, stop_reason, errors) to close the observability gap. (Fixes lukilabs/craft-agents-oss#544)- Pi backend respects
includeCoAuthoredBy: false— Pi sessions calledgetSystemPrompt()without theincludeCoAuthoredByargument, so it silently defaulted totrueand rendered the Git Conventions block even when the user had disabled co-author attribution. Mirrors the earlier fix that only landed on the Claude path.getSystemPromptalso gained a defensive fallback: if a caller omits the arg, it resolves to the persistedgetCoAuthorPreference()value instead of hard-codedtrue. (Fixes lukilabs/craft-agents-oss#576) - Follow-up quote sent to the agent in full — Large follow-up annotation quotes were silently truncated at ~280 characters before reaching the agent, because the shared
normalizeExcerptForMessagehelper's tooltip-tuned default cap applied on the agent-facing path. Agent path now usesnormalizeFollowUpText(whitespace-collapse only, no length cap); the chip helper was renamed totruncateForChipTooltipand requires an explicitmaxLength. A dead 140-charnoteLabelpre-truncation was also removed. (Fixes lukilabs/craft-agents-oss#580)
Improvements
- Chat follow-up helpers extracted and unit-tested —
formatFollowUpSection,truncateForChipTooltip, andnormalizeFollowUpsMarkdownmoved out ofChatDisplay.tsxinto a siblingChatDisplay.follow-ups.tsmodule with 13 targeted tests covering the >1000-char quote regression, canonical message shape, multi-follow-up numbering, the round-trip parser, and chip-tooltip behavior. Added a narrow@craft-agent/ui/annotations/follow-up-statesubpath export so tests can import pure helpers without dragging in pdfjs + Vite-specific imports via the UI barrel. queryLlmSDK-stream consumer extracted for testability — Moved intoclaude-llm-query.tswith 12 new tests covering thrown/yielded error paths, structured output, and thecall_llmrender block.- Pre-commit typecheck now auto-discovers TS workspaces —
scripts/typecheck-staged.shpreviously hardcoded an 8-workspace allowlist, so staged TS changes in newer or renamed workspaces (messaging-*,apps/cli,apps/webui, etc.) silently skipped the hook. It now walksapps/<X>/andpackages/<X>/and typechecks any workspace with atsconfig.json, preferringbun run typecheckwhen defined. Surfaced and fixed four pre-existing TS errors that the old allowlist was hiding (apps/cliwebhook typing,apps/marketinglib bump to ES2023 +card.codeHtmlrename + indexed-access guards,apps/webuitsconfig alignment with Electron). electron:devnow builds the WhatsApp worker on startup —scripts/electron-dev.tsbuilt the MCP servers and Pi agent server but not the WhatsApp worker, so fresh checkouts hitMODULE_NOT_FOUNDondist/worker.cjsthe first time the user tried to connect WhatsApp — confusing because the Electron adapter reports it as a worker exit, not a missing-build error. Dev setup now shells out to the canonicalscripts/build-wa-worker.ts(~70 ms) so the worker bundle stays in sync on every start.
Breaking Changes
- None. No schema, IPC, or wire changes.