Step 245: HeadlessEditorState — agent API surface without ImGui/SDL

Adds the headless agent architecture for Sprint 9 Phase 9a:
- ASTUtils.h: pure AST utilities extracted from EditorUtils.h
- HeadlessEditorState.h: GUI-free state with buffer management
- HeadlessAgentRPCHandler.h: full RPC dispatch (20+ methods)
- step245_test.cpp: 20 tests all passing

Also fixes test compilation errors (NotificationSystem API changes,
AgentRole permissions, DependencyPanel missing include) and adds
SDL2 system library detection fix in CMakeLists.txt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bill
2026-02-11 01:34:27 +00:00
parent f63e6a5fdd
commit 9fcb5a0c8c
13 changed files with 1522 additions and 28 deletions

View File

@@ -1,6 +1,7 @@
// Step 142 TDD Test: Emacs package browser
#include "EmacsPackageBrowser.h"
#include "EmacsIntegration.h"
#include "NotificationSystem.h"
#include <iostream>
static void expect(bool cond, const std::string& name, int& passed, int& failed) {
@@ -27,9 +28,9 @@ int main() {
MockEmacsConnection mock;
EmacsPackageBrowserState state;
std::string log;
NotificationSystem notifications;
refreshEmacsPackages(state, mock, log);
refreshEmacsPackages(state, mock, notifications);
expect(!state.packages.empty(), "packages loaded", passed, failed);
const EmacsPackageEntry* usePkg = findPkg(state.packages, "use-package");
@@ -44,7 +45,7 @@ int main() {
expect(magitPkg->status == "available", "available status set", passed, failed);
}
bool loadOk = loadEmacsPackage(mock, "magit", log);
bool loadOk = loadEmacsPackage(mock, "magit", notifications);
expect(loadOk, "load package command", passed, failed);
expect(mock.getLastSentCommand().find("(require 'magit)") != std::string::npos,
"require command sent", passed, failed);