Documentation
¶
Index ¶
- Constants
- func ComputeHarnessContextHash(context *HarnessContextV1) (string, error)
- func WriteHarnessContextV1(path string, context *HarnessContextV1) error
- func WriteHarnessPlanV1(path string, plan *HarnessPlanV1) error
- type AmbiguousResolution
- type CandidateDecision
- type ContextAmbiguousCase
- type ContextConfigSnapshot
- type ContextDependencyEdge
- type ContextDependencyGraph
- type ContextDependencyNode
- type ContextMetrics
- type ContextMigrationNode
- type ContextSchemaObject
- type ContextSchemaState
- type ContextSquashCandidate
- type ContextWorkspace
- type HarnessContextV1
- type HarnessPlanModel
- type HarnessPlanV1
- type HumanReviewRequirement
- type PlanValidationIssue
- type PlanValidationOptions
- type PlanValidationResult
Constants ¶
View Source
const ( HarnessContextV1Version = "1.0.0" HarnessPlanV1Version = "1.0.0" )
Variables ¶
This section is empty.
Functions ¶
func ComputeHarnessContextHash ¶
func ComputeHarnessContextHash(context *HarnessContextV1) (string, error)
func WriteHarnessContextV1 ¶
func WriteHarnessContextV1(path string, context *HarnessContextV1) error
func WriteHarnessPlanV1 ¶
func WriteHarnessPlanV1(path string, plan *HarnessPlanV1) error
Types ¶
type AmbiguousResolution ¶
type CandidateDecision ¶
type ContextAmbiguousCase ¶
type ContextAmbiguousCase struct {
Type string `json:"type,omitempty"`
Summary string `json:"summary,omitempty"`
Reason string `json:"reason,omitempty"`
RawSQLExcerpt string `json:"raw_sql_excerpt,omitempty"`
Context string `json:"context,omitempty"`
CaseID string `json:"case_id"`
MigrationID string `json:"migration_id"`
RiskLevel string `json:"risk_level"`
AllowedDecisions []string `json:"allowed_decisions"`
}
type ContextConfigSnapshot ¶
type ContextDependencyEdge ¶
type ContextDependencyGraph ¶
type ContextDependencyGraph struct {
Nodes []ContextDependencyNode `json:"nodes"`
Edges []ContextDependencyEdge `json:"edges"`
Cycles [][]string `json:"cycles,omitempty"`
}
type ContextDependencyNode ¶
type ContextMetrics ¶
type ContextMetrics struct {
OriginalFileCount int `json:"original_file_count,omitempty"`
OriginalStatementCount int `json:"original_statement_count,omitempty"`
DataOperationCount int `json:"data_operation_count,omitempty"`
ObjectsConsolidated int `json:"objects_consolidated,omitempty"`
WarningsCount int `json:"warnings_count,omitempty"`
ProcessingTime string `json:"processing_time,omitempty"`
}
type ContextMigrationNode ¶
type ContextMigrationNode struct {
MigrationID string `json:"migration_id"`
Sequence int `json:"sequence"`
Checksum string `json:"checksum,omitempty"`
OperationTypes []string `json:"operation_types,omitempty"`
AffectedObjects []string `json:"affected_objects,omitempty"`
SemanticOperations []string `json:"semantic_operations,omitempty"`
DependsOn []string `json:"depends_on,omitempty"`
Reversible bool `json:"reversible"`
SquashSafe bool `json:"squash_safe"`
RiskFlags []string `json:"risk_flags,omitempty"`
}
type ContextSchemaObject ¶
type ContextSchemaState ¶
type ContextSchemaState struct {
SchemaSQLPath string `json:"schema_sql_path,omitempty"`
SchemaSQLHash string `json:"schema_sql_hash,omitempty"`
StatementCount int `json:"statement_count,omitempty"`
ObjectCount int `json:"object_count,omitempty"`
Objects []ContextSchemaObject `json:"objects,omitempty"`
Extensions []string `json:"extensions,omitempty"`
}
type ContextSquashCandidate ¶
type ContextSquashCandidate struct {
GroupID string `json:"group_id"`
MigrationIDs []string `json:"migration_ids,omitempty"`
Confidence string `json:"confidence,omitempty"`
Reason string `json:"reason,omitempty"`
BlockedBy []string `json:"blocked_by,omitempty"`
AllowedActions []string `json:"allowed_actions"`
}
type ContextWorkspace ¶
type ContextWorkspace struct {
ProjectRoot string `json:"project_root,omitempty"`
OutputDirectory string `json:"output_directory,omitempty"`
OriginalFileRoot string `json:"original_file_root,omitempty"`
FileCount int `json:"file_count,omitempty"`
WorkspaceHash string `json:"workspace_hash,omitempty"`
}
type HarnessContextV1 ¶
type HarnessContextV1 struct {
ContextVersion string `json:"context_version"`
GeneratedAt time.Time `json:"generated_at"`
EngineVersion string `json:"engine_version"`
ContextHash string `json:"context_hash"`
Workspace ContextWorkspace `json:"workspace"`
ConfigSnapshot ContextConfigSnapshot `json:"config_snapshot"`
SchemaState ContextSchemaState `json:"schema_state"`
MigrationChain []ContextMigrationNode `json:"migration_chain"`
DependencyGraph ContextDependencyGraph `json:"dependency_graph"`
SquashCandidates []ContextSquashCandidate `json:"squash_candidates"`
AmbiguousCases []ContextAmbiguousCase `json:"ambiguous_cases"`
DeterministicWarnings []string `json:"deterministic_warnings,omitempty"`
Metrics ContextMetrics `json:"metrics"`
}
func LoadHarnessContextV1 ¶
func LoadHarnessContextV1(path string) (*HarnessContextV1, error)
type HarnessPlanModel ¶
type HarnessPlanV1 ¶
type HarnessPlanV1 struct {
PlanVersion string `json:"plan_version"`
ContextVersion string `json:"context_version"`
ContextHash string `json:"context_hash"`
GeneratedAt time.Time `json:"generated_at"`
Model HarnessPlanModel `json:"model"`
CandidateDecisions []CandidateDecision `json:"candidate_decisions"`
AmbiguousResolutions []AmbiguousResolution `json:"ambiguous_resolutions"`
GlobalRecommendations []string `json:"global_recommendations"`
RequiresHumanReview []HumanReviewRequirement `json:"requires_human_review"`
}
func LoadHarnessPlanV1 ¶
func LoadHarnessPlanV1(path string) (*HarnessPlanV1, error)
type HumanReviewRequirement ¶
type PlanValidationIssue ¶
type PlanValidationOptions ¶
type PlanValidationResult ¶
type PlanValidationResult struct {
Valid bool `json:"valid"`
Errors []PlanValidationIssue `json:"errors"`
Warnings []PlanValidationIssue `json:"warnings"`
}
func ValidateHarnessPlanV1 ¶
func ValidateHarnessPlanV1(plan *HarnessPlanV1, context *HarnessContextV1, options *PlanValidationOptions) (*PlanValidationResult, error)
Click to show internal directories.
Click to hide internal directories.