Step 248: compact AST response format (subtree, diff, version tracking)

Adds token-efficient AST queries: compact mode (<30% of full size),
subtree extraction by nodeId, version-tracked AST diff after mutations,
and tokenEstimate on all responses. 12/12 tests pass, 17 tools total.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bill
2026-02-11 06:29:17 +00:00
parent 1131fdf73d
commit fbff0cedd0
8 changed files with 599 additions and 13 deletions

View File

@@ -23,6 +23,7 @@
#include "AgentLibraryPolicy.h"
#include "WorkflowRecorder.h"
#include "FileOperations.h"
#include "CompactAST.h"
#include "Orchestrator.h"
#include "IncrementalOptimizer.h"
#include "TextASTSync.h"
@@ -64,6 +65,7 @@ struct HeadlessBufferState {
TextASTSync sync;
Orchestrator orchestrator;
IncrementalOptimizer incrementalOptimizer;
ASTVersionTracker versionTracker;
std::string language = "python";
std::string path = "(untitled)";
std::string editBuf;