Phase 3e complete: Agent API Extend (Steps 59, 61-63)

Step 59: WebSocketAgentServer with session management, JSON-RPC routing, MockWebSocketTransport (10/10 tests)
Step 61: ASTMutationAPI with setProperty, updateNode, deleteNode, insertNode, journal, OptimizationLock warning (6/6 tests)
Step 62: ContextAPI with getInScopeSymbols, getCallHierarchy, getDependencyGraph (6/6 tests)
Step 63: BatchMutationAPI with atomic applySequence and reverse-order rollback (5/5 tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bill
2026-02-08 20:57:39 -07:00
parent e92e904a6d
commit 7fb9e89e25
10 changed files with 1400 additions and 109 deletions

View File

@@ -63,6 +63,19 @@ public:
return result;
}
// Remove a child from whatever role it belongs to
bool removeChild(ASTNode* child) {
for (auto& [role, kids] : children_) {
auto it = std::find(kids.begin(), kids.end(), child);
if (it != kids.end()) {
(*it)->parent = nullptr;
kids.erase(it);
return true;
}
}
return false;
}
private:
std::map<std::string, std::vector<ASTNode*>> children_;
};