generated from coulomb/repo-seed
feat(CUST-WP-0014): repo sync automation & Gitea inventory
- Migration e2f3a4b5c6d7: add last_state_synced_at to managed_repos
- consistency_check.py: PATCH last_state_synced_at after fix run;
fix ~ treated as non-empty state_hub_task_id (C-03 vs C-11);
fix _inject_task_id_into_block skipping injection when field exists
with null value
- install_hooks.sh: idempotent post-commit hook installer for all
registered repos (make install-hooks REPO= / install-hooks-all)
- gitea_inventory.py: compare coulomb Gitea org against state-hub
registered repos — registered / unregistered / hub-only sections
- infra/README.md: document systemd user timer + crontab fallback
- systemd user timer: custodian-sync.{service,timer} runs
fix-consistency-all every 15 min (enabled)
- dashboard/src/repo-sync.md: Repo Sync Health page — sync age table,
unregistered Gitea repos, hub-only repos
- api/routers/repos.py: GET /repos/{slug}/dispatch endpoint returning
active goal, pending tasks per workstream, human interventions
- mcp_server/server.py: get_repo_dispatch() MCP tool
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1416,6 +1416,24 @@ def update_repo_goal(
|
||||
return json.dumps(goal, indent=2)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def get_repo_dispatch(repo_slug: str) -> str:
|
||||
"""Return active workstreams, pending tasks, and goal for a repo.
|
||||
|
||||
Use this at the start of a repo agent session to discover what work is
|
||||
pending without needing to read the full state summary or scan workplan
|
||||
files. The response includes:
|
||||
- active_goal: the highest-priority active repo goal
|
||||
- active_workstreams: list of active workstreams with pending tasks
|
||||
- human_interventions: tasks that need human input (needs_human=true)
|
||||
- last_state_synced_at: when the repo was last synced to the hub
|
||||
|
||||
Args:
|
||||
repo_slug: Slug of the repository (e.g. 'marki-docx')
|
||||
"""
|
||||
return json.dumps(_get(f"/repos/{repo_slug}/dispatch"), indent=2)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Entry point
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user