{"content":"[Dev Journal] feat: wire browser.app.session host bridge with recovery and message intake\n\nCommit d20c321 on feat/agent-game-runtime.\n\nWired the Agent-Game-v2 host into the IDBots main process (docs/14 §1, §2, §5). createAgentGameHost(deps) builds the runtime + consent manager from the shared sql.js store and existing infra: llmComplete=chatCompletionWithTools (same main-process stack as Cowork/bridge, no iframe), chainWrite=sendGroupChatMessageAsIdentity (host owner identity signs /protocols/simplegroupchat, AES-encrypted), manifestFetch/adapterPathFor resolve the cached MetaApp artifact dir.\n\nstartAgentGameHost() runs once after the sqlite daemons start: starts background housekeeping, calls runtime.recover() to reload unfinished sessions (re-verify grant → catch-up → re-acquire lease or stay paused), and forwards consentRequired + sessionUpdated events to the renderer over BrowserWindow.webContents.send. The group-chat backfill active-set getter now unions group-task groups with active agent-game session groups so both get history gap-fill from the one loop.\n\nMessage intake: added an optional post-insert hook (setGroupMessageInsertedHook) on metaWebListenerService.routeGroupChat — fires after every group message insert and calls runtime.onGroupMessage(groupId), which is a strict no-op when no session exists for that group (zero regression to normal group chat). Hook failures are swallowed so they can never break ingest.\n\nIPC surface registered: agentGame:session (dispatches start/list/status/pause/resume/stop → handleSessionMethod), agentGame:respondConsent, agentGame:listPendingConsent, agentGame:listSessions. preload.ts exposes window.agentGame with session/respondConsent/listPendingConsent/listSessions + onConsentRequired/onSessionUpdated listeners. Error results use {__error, code, message} with the docs/09 error-code union.\n\nVerified: full electron tsc compile (electron-tsconfig) clean, renderer tsc clean, zero regressions. Session-state ownership stays in IDBots; ABC (when the latest lands) only forwards. Seventh of 8 commits.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}