Complete sprint 141-145 scaffolding, tooling, and tests
This commit is contained in:
31
editor/src/graduation/AstToTextRegenerationPolicySchema.h
Normal file
31
editor/src/graduation/AstToTextRegenerationPolicySchema.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1669: AST-to-text regeneration policy schema.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct AstToTextRegenerationPolicySchema {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class AstToTextRegenerationPolicySchemaFactory {
|
||||
public:
|
||||
static AstToTextRegenerationPolicySchema make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const AstToTextRegenerationPolicySchema& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
29
editor/src/graduation/AuthoringModeStateModel.h
Normal file
29
editor/src/graduation/AuthoringModeStateModel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
// Step 1649: Authoring mode schema and state model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct AuthoringModeStateModel {
|
||||
std::string workspaceId;
|
||||
std::string mode;
|
||||
bool astProjectionEnabled = true;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class AuthoringModeStateModelFactory {
|
||||
public:
|
||||
static AuthoringModeStateModel make(const std::string& workspaceId,
|
||||
const std::string& mode,
|
||||
bool astProjectionEnabled) {
|
||||
bool valid = !workspaceId.empty()
|
||||
&& (mode == "text_first" || mode == "ast_first" || mode == "hybrid");
|
||||
return {workspaceId, mode, astProjectionEnabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const AuthoringModeStateModel& v) {
|
||||
return {{"workspace_id", v.workspaceId},
|
||||
{"mode", v.mode},
|
||||
{"ast_projection_enabled", v.astProjectionEnabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/ConflictMergeReportArtifact.h
Normal file
31
editor/src/graduation/ConflictMergeReportArtifact.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1687: Conflict/merge report artifact.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct ConflictMergeReportArtifact {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class ConflictMergeReportArtifactFactory {
|
||||
public:
|
||||
static ConflictMergeReportArtifact make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const ConflictMergeReportArtifact& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/ConflictPreviewImpactEstimatorModel.h
Normal file
31
editor/src/graduation/ConflictPreviewImpactEstimatorModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1682: Conflict preview and impact estimator model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct ConflictPreviewImpactEstimatorModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class ConflictPreviewImpactEstimatorModelFactory {
|
||||
public:
|
||||
static ConflictPreviewImpactEstimatorModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const ConflictPreviewImpactEstimatorModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/ConflictRegionDetectorModel.h
Normal file
31
editor/src/graduation/ConflictRegionDetectorModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1680: Conflict region detector model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct ConflictRegionDetectorModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class ConflictRegionDetectorModelFactory {
|
||||
public:
|
||||
static ConflictRegionDetectorModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const ConflictRegionDetectorModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/CppConstructiveLoopReportArtifact.h
Normal file
31
editor/src/graduation/CppConstructiveLoopReportArtifact.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1697: C++ constructive loop report artifact.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct CppConstructiveLoopReportArtifact {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class CppConstructiveLoopReportArtifactFactory {
|
||||
public:
|
||||
static CppConstructiveLoopReportArtifact make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const CppConstructiveLoopReportArtifact& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/CppConstructiveLoopStateModel.h
Normal file
31
editor/src/graduation/CppConstructiveLoopStateModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1689: C++ constructive loop state model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct CppConstructiveLoopStateModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class CppConstructiveLoopStateModelFactory {
|
||||
public:
|
||||
static CppConstructiveLoopStateModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const CppConstructiveLoopStateModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/CppConstructiveReadinessScorerModel.h
Normal file
31
editor/src/graduation/CppConstructiveReadinessScorerModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1696: C++ constructive readiness scorer model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct CppConstructiveReadinessScorerModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class CppConstructiveReadinessScorerModelFactory {
|
||||
public:
|
||||
static CppConstructiveReadinessScorerModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const CppConstructiveReadinessScorerModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/CppFormattingStylingGuardModel.h
Normal file
31
editor/src/graduation/CppFormattingStylingGuardModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1670: C++ formatting/styling guard model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct CppFormattingStylingGuardModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class CppFormattingStylingGuardModelFactory {
|
||||
public:
|
||||
static CppFormattingStylingGuardModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const CppFormattingStylingGuardModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/CppLoopLatencyBudgetEnforcerModel.h
Normal file
31
editor/src/graduation/CppLoopLatencyBudgetEnforcerModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1692: C++ loop latency budget enforcer model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct CppLoopLatencyBudgetEnforcerModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class CppLoopLatencyBudgetEnforcerModelFactory {
|
||||
public:
|
||||
static CppLoopLatencyBudgetEnforcerModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const CppLoopLatencyBudgetEnforcerModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/CppTestFeedbackBridgeModel.h
Normal file
31
editor/src/graduation/CppTestFeedbackBridgeModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1691: C++ test-feedback bridge model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct CppTestFeedbackBridgeModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class CppTestFeedbackBridgeModelFactory {
|
||||
public:
|
||||
static CppTestFeedbackBridgeModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const CppTestFeedbackBridgeModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/CppTextDeltaParserBridgeModel.h
Normal file
31
editor/src/graduation/CppTextDeltaParserBridgeModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1660: C++ text-delta parser bridge model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct CppTextDeltaParserBridgeModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class CppTextDeltaParserBridgeModelFactory {
|
||||
public:
|
||||
static CppTextDeltaParserBridgeModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const CppTextDeltaParserBridgeModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
33
editor/src/graduation/CppTextFirstDefaultProfile.h
Normal file
33
editor/src/graduation/CppTextFirstDefaultProfile.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
// Step 1652: C++ text-first default profile model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct CppTextFirstDefaultProfile {
|
||||
std::string profileId;
|
||||
std::string language;
|
||||
std::string defaultMode;
|
||||
bool deterministicProjection = true;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class CppTextFirstDefaultProfileFactory {
|
||||
public:
|
||||
static CppTextFirstDefaultProfile make(const std::string& profileId,
|
||||
const std::string& language,
|
||||
const std::string& defaultMode,
|
||||
bool deterministicProjection) {
|
||||
bool valid = !profileId.empty()
|
||||
&& language == "cpp"
|
||||
&& defaultMode == "text_first";
|
||||
return {profileId, language, defaultMode, deterministicProjection, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const CppTextFirstDefaultProfile& v) {
|
||||
return {{"profile_id", v.profileId},
|
||||
{"language", v.language},
|
||||
{"default_mode", v.defaultMode},
|
||||
{"deterministic_projection", v.deterministicProjection},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/HybridModeReadinessReportArtifact.h
Normal file
31
editor/src/graduation/HybridModeReadinessReportArtifact.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1657: Hybrid mode readiness report artifact.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct HybridModeReadinessReportArtifact {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class HybridModeReadinessReportArtifactFactory {
|
||||
public:
|
||||
static HybridModeReadinessReportArtifact make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const HybridModeReadinessReportArtifact& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1690: Incremental compile feedback packet model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct IncrementalCompileFeedbackPacketModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class IncrementalCompileFeedbackPacketModelFactory {
|
||||
public:
|
||||
static IncrementalCompileFeedbackPacketModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const IncrementalCompileFeedbackPacketModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/IncrementalSyncDiagnosticsModel.h
Normal file
31
editor/src/graduation/IncrementalSyncDiagnosticsModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1662: Incremental sync diagnostics model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct IncrementalSyncDiagnosticsModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class IncrementalSyncDiagnosticsModelFactory {
|
||||
public:
|
||||
static IncrementalSyncDiagnosticsModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const IncrementalSyncDiagnosticsModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/IncrementalSyncReportArtifact.h
Normal file
31
editor/src/graduation/IncrementalSyncReportArtifact.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1667: Incremental sync report artifact.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct IncrementalSyncReportArtifact {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class IncrementalSyncReportArtifactFactory {
|
||||
public:
|
||||
static IncrementalSyncReportArtifact make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const IncrementalSyncReportArtifact& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/IncrementalTextEditPacketSchema.h
Normal file
31
editor/src/graduation/IncrementalTextEditPacketSchema.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1659: Incremental text edit packet schema.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct IncrementalTextEditPacketSchema {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class IncrementalTextEditPacketSchemaFactory {
|
||||
public:
|
||||
static IncrementalTextEditPacketSchema make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const IncrementalTextEditPacketSchema& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/MergePolicyEngineModel.h
Normal file
31
editor/src/graduation/MergePolicyEngineModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1681: Merge policy engine model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct MergePolicyEngineModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class MergePolicyEngineModelFactory {
|
||||
public:
|
||||
static MergePolicyEngineModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const MergePolicyEngineModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/ModeTransitionEventPacketModel.h
Normal file
31
editor/src/graduation/ModeTransitionEventPacketModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1656: Mode transition event packet model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct ModeTransitionEventPacketModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class ModeTransitionEventPacketModelFactory {
|
||||
public:
|
||||
static ModeTransitionEventPacketModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const ModeTransitionEventPacketModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/NodeIdentityPreservationPolicyModel.h
Normal file
31
editor/src/graduation/NodeIdentityPreservationPolicyModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1661: Node identity preservation policy model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct NodeIdentityPreservationPolicyModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class NodeIdentityPreservationPolicyModelFactory {
|
||||
public:
|
||||
static NodeIdentityPreservationPolicyModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const NodeIdentityPreservationPolicyModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/ReconciliationDecisionPacketModel.h
Normal file
31
editor/src/graduation/ReconciliationDecisionPacketModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1686: Reconciliation decision packet model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct ReconciliationDecisionPacketModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class ReconciliationDecisionPacketModelFactory {
|
||||
public:
|
||||
static ReconciliationDecisionPacketModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const ReconciliationDecisionPacketModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/RegenerationQualityScorerModel.h
Normal file
31
editor/src/graduation/RegenerationQualityScorerModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1676: Regeneration quality scorer model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct RegenerationQualityScorerModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class RegenerationQualityScorerModelFactory {
|
||||
public:
|
||||
static RegenerationQualityScorerModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const RegenerationQualityScorerModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/RegenerationStabilityReportArtifact.h
Normal file
31
editor/src/graduation/RegenerationStabilityReportArtifact.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1677: Regeneration stability report artifact.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct RegenerationStabilityReportArtifact {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class RegenerationStabilityReportArtifactFactory {
|
||||
public:
|
||||
static RegenerationStabilityReportArtifact make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const RegenerationStabilityReportArtifact& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/SemanticNoiseDiffSuppressorModel.h
Normal file
31
editor/src/graduation/SemanticNoiseDiffSuppressorModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1672: Semantic-noise diff suppressor model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct SemanticNoiseDiffSuppressorModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class SemanticNoiseDiffSuppressorModelFactory {
|
||||
public:
|
||||
static SemanticNoiseDiffSuppressorModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const SemanticNoiseDiffSuppressorModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
29
editor/src/graduation/SessionModeOverrideModel.h
Normal file
29
editor/src/graduation/SessionModeOverrideModel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
// Step 1651: Session-level mode override model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct SessionModeOverrideModel {
|
||||
std::string sessionId;
|
||||
std::string requestedMode;
|
||||
bool inheritedWorkspacePolicy = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class SessionModeOverrideModelFactory {
|
||||
public:
|
||||
static SessionModeOverrideModel make(const std::string& sessionId,
|
||||
const std::string& requestedMode,
|
||||
bool inheritedWorkspacePolicy) {
|
||||
bool valid = !sessionId.empty()
|
||||
&& (requestedMode == "text_first" || requestedMode == "ast_first" || requestedMode == "hybrid");
|
||||
return {sessionId, requestedMode, inheritedWorkspacePolicy, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const SessionModeOverrideModel& v) {
|
||||
return {{"session_id", v.sessionId},
|
||||
{"requested_mode", v.requestedMode},
|
||||
{"inherited_workspace_policy", v.inheritedWorkspacePolicy},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/StableIncludeOrderRegenerationModel.h
Normal file
31
editor/src/graduation/StableIncludeOrderRegenerationModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1671: Stable include/order regeneration model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct StableIncludeOrderRegenerationModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class StableIncludeOrderRegenerationModelFactory {
|
||||
public:
|
||||
static StableIncludeOrderRegenerationModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const StableIncludeOrderRegenerationModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/SyncConfidenceScoreModel.h
Normal file
31
editor/src/graduation/SyncConfidenceScoreModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1666: Sync confidence score model.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct SyncConfidenceScoreModel {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class SyncConfidenceScoreModelFactory {
|
||||
public:
|
||||
static SyncConfidenceScoreModel make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const SyncConfidenceScoreModel& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
31
editor/src/graduation/TextAstDivergencePacketSchema.h
Normal file
31
editor/src/graduation/TextAstDivergencePacketSchema.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
// Step 1679: Text-AST divergence packet schema.
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
struct TextAstDivergencePacketSchema {
|
||||
std::string id;
|
||||
std::string detail;
|
||||
int score = 0;
|
||||
bool enabled = false;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
class TextAstDivergencePacketSchemaFactory {
|
||||
public:
|
||||
static TextAstDivergencePacketSchema make(const std::string& id,
|
||||
const std::string& detail,
|
||||
int score,
|
||||
bool enabled) {
|
||||
bool valid = !id.empty() && !detail.empty() && score >= 0;
|
||||
return {id, detail, score, enabled, valid};
|
||||
}
|
||||
|
||||
static nlohmann::json toJson(const TextAstDivergencePacketSchema& v) {
|
||||
return {{"id", v.id},
|
||||
{"detail", v.detail},
|
||||
{"score", v.score},
|
||||
{"enabled", v.enabled},
|
||||
{"valid", v.valid}};
|
||||
}
|
||||
};
|
||||
29
editor/src/graduation/WorkspaceModePolicyBindings.h
Normal file
29
editor/src/graduation/WorkspaceModePolicyBindings.h
Normal 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}};
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user