- Create WorkspaceService for managing .gadget/ directory
- Implement workspace.json for persistent identity (workspaceId UUID)
- Add work order cache for crash recovery
- Update drone registration to include workspaceId
- Add crash recovery socket events (requestCrashRecovery, crashRecoveryResponse)
- Implement crash recovery handler in DroneSession
- Write work order cache before processing, remove after completion
- Add event handlers to DroneSession (thinking, response, toolCall, workOrderComplete)
- Implement routing logic to forward events to CodeSession
- Add chat session index to SocketService for reverse lookup
- Add workOrderComplete to ServerToClientEvents interface
- Update CodeSession to register chat session and set current turn on drone
- Add unit tests for DroneSession (12 tests, all passing)
- Resolve duplicate DroneStatus enum (import from @gadget/api)
- Fix IAiProvider interface conflict with DB→runtime mapper
- Add callId to ToolCallMessage and ChatToolCallSchema
- Fix ChatTurnStats schema field name (thinkingTokenCount)
- Add provider/selectedModel to ChatSession interface and model
- Implement CodeSession.onSubmitPrompt() to create ChatTurn and send work orders
- Add drone/chat session tracking to CodeSession
- Add unit tests for CodeSession (9 tests, all passing)
We want to speak only one language when dealing with AI content to
minimize the number of maps, transforms, and copies. This initiative
isn't done, this is a checkpoint along the way while conducting
experiments.
Moved all Mongoose model interfaces to @gadget/api to commonize the data
structures being passed around the system as JSON objects via HTTP and
Socket.IO.
We now have AiApi, OllamaAiApi, and OpenAiApi. Documentation updates to
provide a bit more high-level clarity that was originally generated by
the agent.