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:
@@ -1,5 +1,6 @@
|
||||
// Step 143 TDD Test: Elisp function discovery and indexing
|
||||
#include "EmacsFunctionDiscovery.h"
|
||||
#include "NotificationSystem.h"
|
||||
#include <iostream>
|
||||
|
||||
static void expect(bool cond, const std::string& name, int& passed, int& failed) {
|
||||
@@ -17,21 +18,21 @@ int main() {
|
||||
int failed = 0;
|
||||
|
||||
MockEmacsConnection mock;
|
||||
std::string log;
|
||||
NotificationSystem notifications;
|
||||
std::string error;
|
||||
|
||||
auto packages = queryEmacsPackageList(mock, false, log, error);
|
||||
auto packages = queryEmacsPackageList(mock, false, notifications, error);
|
||||
expect(!packages.empty(), "loaded packages fetched", passed, failed);
|
||||
|
||||
auto funcs = queryEmacsFunctions(mock, "^use-package", log);
|
||||
auto funcs = queryEmacsFunctions(mock, "^use-package", notifications);
|
||||
expect(!funcs.empty(), "apropos returns functions", passed, failed);
|
||||
|
||||
auto doc = queryEmacsFunctionDoc(mock, "use-package", log);
|
||||
auto doc = queryEmacsFunctionDoc(mock, "use-package", notifications);
|
||||
expect(!doc.signature.empty(), "describe-function signature", passed, failed);
|
||||
expect(!doc.doc.empty(), "describe-function docstring", passed, failed);
|
||||
|
||||
EmacsFunctionIndex index;
|
||||
refreshEmacsFunctionIndex(index, mock, packages, log);
|
||||
refreshEmacsFunctionIndex(index, mock, packages, notifications);
|
||||
expect(index.functionsByPackage.count("use-package") > 0, "index contains use-package", passed, failed);
|
||||
|
||||
Module module("mod1", "test", "elisp");
|
||||
|
||||
Reference in New Issue
Block a user