Complete sprint 141-145 scaffolding, tooling, and tests

This commit is contained in:
Bill
2026-02-24 15:34:10 -07:00
parent 1c0645b2f9
commit 61e3f6ca32
94 changed files with 2878 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#pragma once
// Step 1650: Workspace mode policy bindings.
#include <string>
#include <nlohmann/json.hpp>
struct WorkspaceModePolicyBindings {
std::string workspaceId;
std::string defaultMode;
bool locked = false;
bool valid = false;
};
class WorkspaceModePolicyBindingsFactory {
public:
static WorkspaceModePolicyBindings make(const std::string& workspaceId,
const std::string& defaultMode,
bool locked) {
bool valid = !workspaceId.empty()
&& (defaultMode == "text_first" || defaultMode == "ast_first" || defaultMode == "hybrid");
return {workspaceId, defaultMode, locked, valid};
}
static nlohmann::json toJson(const WorkspaceModePolicyBindings& v) {
return {{"workspace_id", v.workspaceId},
{"default_mode", v.defaultMode},
{"locked", v.locked},
{"valid", v.valid}};
}
};