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

Class SkillOrigin

openspace/skill_engine/types.py:36–55  ·  view source on GitHub ↗

How this skill was created / entered the system. Version DAG model — every change creates a new SkillRecord node:: Lineage rules: IMPORTED / CAPTURED → root node, no parent (parent_skill_ids = []) DERIVED → 1+ parents, new skill name, new directory FIXED

Source from the content-addressed store, hash-verified

34
35
36class SkillOrigin(str, Enum):
37 """How this skill was created / entered the system.
38
39 Version DAG model — every change creates a new SkillRecord node::
40
41 Lineage rules:
42 IMPORTED / CAPTURED → root node, no parent (parent_skill_ids = [])
43 DERIVED → 1+ parents, new skill name, new directory
44 FIXED → exactly 1 parent (previous version of same skill),
45 same ``name`` & ``path``, new ``skill_id``.
46 Files on disk are updated in-place; old directory
47 content (all files) is preserved via
48 ``content_snapshot`` dict in the DB.
49 Only the latest version is ``is_active=True``.
50 """
51
52 IMPORTED = "imported" # Initial import, no parent
53 CAPTURED = "captured" # Captured from a successful execution with no parent skill involved
54 DERIVED = "derived" # Derived from existing skill(s) (upgrade, wrap, compose, etc.)
55 FIXED = "fixed" # Fix of existing skill — new record, parent = previous version
56
57
58_EVOLUTION_TO_ORIGIN: Dict["EvolutionType", "SkillOrigin"] = {

Callers 2

from_dictMethod · 0.85
_to_recordMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected