deepctl-core 0.2.6__tar.gz → 0.2.7__tar.gz
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.
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/PKG-INFO +1 -1
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/pyproject.toml +1 -1
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/skill_generator.py +69 -17
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core.egg-info/PKG-INFO +1 -1
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/README.md +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/setup.cfg +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/__init__.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/auth.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/base_command.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/base_group_command.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/client.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/config.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/models.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/output.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/plugin_env.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/plugin_manager.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/py.typed +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core/timing.py +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core.egg-info/SOURCES.txt +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core.egg-info/dependency_links.txt +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core.egg-info/requires.txt +0 -0
- {deepctl_core-0.2.6 → deepctl_core-0.2.7}/src/deepctl_core.egg-info/top_level.txt +0 -0
|
@@ -84,7 +84,7 @@ def fetch_repo_skills(force: bool = False) -> dict[str, str]:
|
|
|
84
84
|
pass
|
|
85
85
|
|
|
86
86
|
base = f"https://raw.githubusercontent.com/{_SKILLS_REPO}/{_SKILLS_BRANCH}"
|
|
87
|
-
skill_names = ["api", "docs", "
|
|
87
|
+
skill_names = ["api", "docs", "setup-mcp", "starters"]
|
|
88
88
|
skills: dict[str, str] = {}
|
|
89
89
|
|
|
90
90
|
_REPO_CACHE_DIR.mkdir(parents=True, exist_ok=True)
|
|
@@ -659,24 +659,24 @@ class SkillGenerator(ABC):
|
|
|
659
659
|
Mapping of file path -> content string
|
|
660
660
|
"""
|
|
661
661
|
|
|
662
|
-
def install(
|
|
663
|
-
|
|
664
|
-
#
|
|
662
|
+
def install(
|
|
663
|
+
self,
|
|
664
|
+
commands: list[CommandMetadata], # noqa: ARG002
|
|
665
|
+
version: str, # noqa: ARG002
|
|
666
|
+
) -> list[Path]:
|
|
667
|
+
"""Fetch skills from deepgram/skills repo and install them."""
|
|
665
668
|
repo_skills = fetch_repo_skills(force=True)
|
|
669
|
+
if not repo_skills:
|
|
670
|
+
return []
|
|
671
|
+
return self._write_repo_skills(repo_skills)
|
|
666
672
|
|
|
667
|
-
|
|
673
|
+
def _write_repo_skills(self, repo_skills: dict[str, str]) -> list[Path]:
|
|
674
|
+
"""Write combined repo skill content to this tool's skill paths."""
|
|
675
|
+
combined = "\n\n---\n\n".join(repo_skills.values())
|
|
668
676
|
written: list[Path] = []
|
|
669
|
-
for path
|
|
670
|
-
# Append repo skill content to the generated file
|
|
671
|
-
if repo_skills:
|
|
672
|
-
sections = [
|
|
673
|
-
f"\n\n## {name.title()}\n\n{body}"
|
|
674
|
-
for name, body in repo_skills.items()
|
|
675
|
-
]
|
|
676
|
-
content += "\n".join(sections)
|
|
677
|
-
|
|
677
|
+
for path in self.get_skill_paths():
|
|
678
678
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
679
|
-
path.write_text(
|
|
679
|
+
path.write_text(combined)
|
|
680
680
|
written.append(path)
|
|
681
681
|
return written
|
|
682
682
|
|
|
@@ -705,6 +705,10 @@ class ClaudeCodeGenerator(SkillGenerator):
|
|
|
705
705
|
cli_name = "claude"
|
|
706
706
|
display_name = "Claude Code"
|
|
707
707
|
|
|
708
|
+
@property
|
|
709
|
+
def _skill_dir(self) -> Path:
|
|
710
|
+
return Path.home() / ".claude" / "commands" / "deepgram"
|
|
711
|
+
|
|
708
712
|
def detect(self) -> bool:
|
|
709
713
|
return (
|
|
710
714
|
Path.home().joinpath(".claude").is_dir()
|
|
@@ -712,13 +716,37 @@ class ClaudeCodeGenerator(SkillGenerator):
|
|
|
712
716
|
)
|
|
713
717
|
|
|
714
718
|
def get_skill_paths(self) -> list[Path]:
|
|
715
|
-
return [
|
|
719
|
+
return [
|
|
720
|
+
self._skill_dir / f"{name}.md"
|
|
721
|
+
for name in ["api", "docs", "setup-mcp", "starters"]
|
|
722
|
+
]
|
|
716
723
|
|
|
717
724
|
def generate(
|
|
718
725
|
self, commands: list[CommandMetadata], version: str
|
|
719
726
|
) -> dict[Path, str]:
|
|
720
727
|
content = render_skill_content(commands, version, include_frontmatter=True)
|
|
721
|
-
return {self.
|
|
728
|
+
return {self._skill_dir / "deepgram.md": content}
|
|
729
|
+
|
|
730
|
+
def _write_repo_skills(self, repo_skills: dict[str, str]) -> list[Path]:
|
|
731
|
+
self._skill_dir.mkdir(parents=True, exist_ok=True)
|
|
732
|
+
written: list[Path] = []
|
|
733
|
+
for name, content in repo_skills.items():
|
|
734
|
+
path = self._skill_dir / f"{name}.md"
|
|
735
|
+
path.write_text(content)
|
|
736
|
+
written.append(path)
|
|
737
|
+
return written
|
|
738
|
+
|
|
739
|
+
def remove(self) -> list[Path]:
|
|
740
|
+
removed: list[Path] = []
|
|
741
|
+
if self._skill_dir.exists():
|
|
742
|
+
for f in self._skill_dir.glob("*.md"):
|
|
743
|
+
f.unlink()
|
|
744
|
+
removed.append(f)
|
|
745
|
+
try:
|
|
746
|
+
self._skill_dir.rmdir()
|
|
747
|
+
except OSError:
|
|
748
|
+
pass
|
|
749
|
+
return removed
|
|
722
750
|
|
|
723
751
|
|
|
724
752
|
class CodexGenerator(SkillGenerator):
|
|
@@ -758,6 +786,14 @@ class CodexGenerator(SkillGenerator):
|
|
|
758
786
|
return before + section + after.lstrip("\n")
|
|
759
787
|
return existing.rstrip("\n") + "\n\n" + section
|
|
760
788
|
|
|
789
|
+
def _write_repo_skills(self, repo_skills: dict[str, str]) -> list[Path]:
|
|
790
|
+
combined = "\n\n---\n\n".join(repo_skills.values())
|
|
791
|
+
wrapped = f"{self._BEGIN}\n{combined}\n{self._END}\n"
|
|
792
|
+
path = self.get_skill_paths()[0]
|
|
793
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
794
|
+
path.write_text(self._merge(path, wrapped))
|
|
795
|
+
return [path]
|
|
796
|
+
|
|
761
797
|
def remove(self) -> list[Path]:
|
|
762
798
|
path = self.get_skill_paths()[0]
|
|
763
799
|
if not path.exists():
|
|
@@ -813,6 +849,14 @@ class GeminiGenerator(SkillGenerator):
|
|
|
813
849
|
return before + section + after.lstrip("\n")
|
|
814
850
|
return existing.rstrip("\n") + "\n\n" + section
|
|
815
851
|
|
|
852
|
+
def _write_repo_skills(self, repo_skills: dict[str, str]) -> list[Path]:
|
|
853
|
+
combined = "\n\n---\n\n".join(repo_skills.values())
|
|
854
|
+
wrapped = f"{self._BEGIN}\n{combined}\n{self._END}\n"
|
|
855
|
+
path = self.get_skill_paths()[0]
|
|
856
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
857
|
+
path.write_text(self._merge(path, wrapped))
|
|
858
|
+
return [path]
|
|
859
|
+
|
|
816
860
|
def remove(self) -> list[Path]:
|
|
817
861
|
path = self.get_skill_paths()[0]
|
|
818
862
|
if not path.exists():
|
|
@@ -954,6 +998,14 @@ class OpenCodeGenerator(SkillGenerator):
|
|
|
954
998
|
return before + section + after.lstrip("\n")
|
|
955
999
|
return existing.rstrip("\n") + "\n\n" + section
|
|
956
1000
|
|
|
1001
|
+
def _write_repo_skills(self, repo_skills: dict[str, str]) -> list[Path]:
|
|
1002
|
+
combined = "\n\n---\n\n".join(repo_skills.values())
|
|
1003
|
+
wrapped = f"{self._BEGIN}\n{combined}\n{self._END}\n"
|
|
1004
|
+
path = self.get_skill_paths()[0]
|
|
1005
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
1006
|
+
path.write_text(self._merge(path, wrapped))
|
|
1007
|
+
return [path]
|
|
1008
|
+
|
|
957
1009
|
def remove(self) -> list[Path]:
|
|
958
1010
|
path = self.get_skill_paths()[0]
|
|
959
1011
|
if not path.exists():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|