MCPcopy Create free account
hub / github.com/HKUDS/OpenSpace / SkillEditResult

Class SkillEditResult

openspace/skill_engine/patch.py:89–107  ·  view source on GitHub ↗

Result of a skill edit operation. Attributes: skill_dir: Final skill directory location. content_diff: Combined unified diff (git diff format) covering all modified files, for lineage recording. content_snapshot: Full directory snapshot ``{relative_path: cont

Source from the content-addressed store, hash-verified

87
88@dataclass
89class SkillEditResult:
90 """Result of a skill edit operation.
91
92 Attributes:
93 skill_dir: Final skill directory location.
94 content_diff: Combined unified diff (git diff format) covering all
95 modified files, for lineage recording.
96 content_snapshot: Full directory snapshot ``{relative_path: content}``,
97 for lineage recording.
98 error: Non-None means the operation failed.
99 """
100 skill_dir: Path = field(default_factory=lambda: Path("."))
101 content_diff: str = ""
102 content_snapshot: Dict[str, str] = field(default_factory=dict)
103 error: Optional[str] = None
104
105 @property
106 def ok(self) -> bool:
107 return self.error is None
108
109
110class PatchError(RuntimeError):

Callers 3

fix_skillFunction · 0.85
derive_skillFunction · 0.85
create_skillFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected