gaia-cli 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gaia_cli/__init__.py ADDED
File without changes
gaia_cli/__main__.py ADDED
@@ -0,0 +1,5 @@
1
+ from gaia_cli.main import main
2
+
3
+
4
+ if __name__ == "__main__":
5
+ main()
gaia_cli/combinator.py ADDED
@@ -0,0 +1,33 @@
1
+ def detect_combinations(graph_data, owned_skills, detected_skills):
2
+ combinations = []
3
+
4
+ owned_skill_ids = set()
5
+ for skill in owned_skills:
6
+ if isinstance(skill, dict) and 'skillId' in skill:
7
+ owned_skill_ids.add(skill['skillId'])
8
+ elif isinstance(skill, str):
9
+ owned_skill_ids.add(skill)
10
+
11
+ combined_available = owned_skill_ids.union(set(detected_skills))
12
+
13
+ for skill in graph_data.get('skills', []):
14
+ if skill.get('type') not in ['composite', 'legendary']:
15
+ continue
16
+
17
+ prereqs = skill.get('prerequisites', [])
18
+ if not prereqs:
19
+ continue
20
+
21
+ if all(prereq in combined_available for prereq in prereqs):
22
+ if skill['id'] not in owned_skill_ids:
23
+ combinations.append({
24
+ 'candidateResult': skill['id'],
25
+ 'levelFloor': skill.get('level'),
26
+ 'detectedSkills': [p for p in prereqs if p in detected_skills] or prereqs,
27
+ 'status': 'new_fusion'
28
+ })
29
+
30
+ return combinations
31
+
32
+ def get_combinations(graph_data, owned_skills, detected_skills):
33
+ return detect_combinations(graph_data, owned_skills, detected_skills)