feat: auto-update pouch and catalog sources during normal use

Add taste-skill to catalog.yaml, and refresh pouch plus cloned catalog
or custom Git sources on a 24h interval so users do not need a
separate update command.
This commit is contained in:
2026-10-13 16:41:55 +08:00
parent d3b6732d40
commit 8390706df8
14 changed files with 836 additions and 40 deletions
+30
View File
@@ -204,6 +204,36 @@ class CatalogCollectionTests(unittest.TestCase):
self.assertFalse((skill_dir / "first-skill").exists())
self.assertFalse((skill_dir / "second-skill").exists())
def test_add_refreshes_collection_before_installing_new_children(self) -> None:
first = self.run_pouch("add", "test-pack/first-skill", "-g", "-a", "codex")
self.assertEqual(first.returncode, 0, first.stderr)
write_skill(self.upstream / "skills", "third-skill")
subprocess.run(["git", "-C", str(self.upstream), "add", "."], check=True)
subprocess.run(
[
"git",
"-C",
str(self.upstream),
"-c",
"user.name=Test",
"-c",
"user.email=test@example.com",
"commit",
"-m",
"add third",
],
check=True,
capture_output=True,
)
second = self.run_pouch("add", "test-pack", "-g", "-a", "codex")
skill_dir = self.home / ".codex" / "skills"
self.assertEqual(second.returncode, 0, second.stderr)
self.assertTrue((skill_dir / "third-skill").is_symlink())
self.assertTrue((skill_dir / "third-skill" / "SKILL.md").is_file())
def test_status_expands_collection_children(self) -> None:
installed = self.run_pouch("add", "test-pack", "-g", "-a", "codex")
status = self.run_pouch("status", "-a", "codex")