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
+12 -5
View File
@@ -10,6 +10,7 @@ from pathlib import Path
from unittest.mock import patch
from pouch import cli
from pouch.auto_update import UpdateResult
REPO_ROOT = Path(__file__).resolve().parents[1]
@@ -95,14 +96,20 @@ class CreateWorkflowTests(unittest.TestCase):
with (
patch.object(cli, "POUCH_HOME", self.skills_home),
patch.object(cli, "ensure_pouch_home"),
patch.object(cli.subprocess, "run") as run,
patch.object(
cli,
"run_updates",
return_value=[
UpdateResult("pouch", "updated", "abc1234"),
UpdateResult("catalog:waza", "current"),
],
) as run_updates,
patch.object(cli, "record_auto_update") as record,
):
cli.cmd_update(argparse.Namespace())
run.assert_called_once_with(
["git", "-C", str(self.skills_home), "pull"],
check=True,
)
run_updates.assert_called_once_with()
record.assert_called_once()
def test_create_writes_draft_and_brief_without_registering_owned_skill(self) -> None:
project = self.home / "project"