feat: add workflow dashboard for queue, leases, and next safe action (Closes #605)
Read-only MCP tool gitea_workflow_dashboard plus mcp-menu entry so operators and LLMs can see PR/issue queues, leases, terminal locks, blockers, and exact next-safe prompts without reconstructing state from comments. Never assigns work or presents blocked/terminal-locked items as safe.
This commit is contained in:
+43
-15
@@ -19,6 +19,32 @@ print_banner() {
|
||||
printf 'Safe by default — destructive actions require explicit confirmation.\n\n'
|
||||
}
|
||||
|
||||
show_workflow_dashboard_help() {
|
||||
printf '\n--- Workflow dashboard (queue, leases, next safe action) ---\n\n'
|
||||
printf 'Read-only operational view (#605). Does NOT assign work.\n'
|
||||
printf 'Exclusive assignment still requires gitea_allocate_next_work.\n\n'
|
||||
printf 'Canonical MCP tool (any healthy Gitea namespace with gitea.read):\n\n'
|
||||
printf ' gitea_workflow_dashboard(\n'
|
||||
printf ' remote=\"prgs\",\n'
|
||||
printf ' org=\"Scaled-Tech-Consulting\",\n'
|
||||
printf ' repo=\"Gitea-Tools\",\n'
|
||||
printf ' )\n\n'
|
||||
printf 'Returns machine-readable sections:\n'
|
||||
printf ' - open_pr_queue / open_issue_queue\n'
|
||||
printf ' - active_leases_by_role / stale_or_expired_leases\n'
|
||||
printf ' - terminal_review_lock\n'
|
||||
printf ' - blocked_items (never presented as safe)\n'
|
||||
printf ' - review_ready_prs / merge_ready_prs / author_remediation\n'
|
||||
printf ' - discussion_issues / controller_needed\n'
|
||||
printf ' - next_safe_by_role + primary_next_safe_action with exact prompts\n'
|
||||
printf ' - human_summary (copy-friendly multi-line text)\n\n'
|
||||
printf 'Safety:\n'
|
||||
printf ' - Never suggests blocked or terminal-locked items as safe.\n'
|
||||
printf ' - Incomplete inventory fails closed (no safe suggestions).\n'
|
||||
printf ' - This menu entry is documentation only; it does not call Gitea.\n'
|
||||
pause
|
||||
}
|
||||
|
||||
show_root_checkout_health() {
|
||||
printf '\n--- Project status / root checkout health ---\n\n'
|
||||
printf 'Current directory: %s\n' "$(pwd)"
|
||||
@@ -241,25 +267,27 @@ main_menu() {
|
||||
while true; do
|
||||
print_banner
|
||||
printf ' 1) Project status / root checkout health\n'
|
||||
printf ' 2) Author workflow prompts\n'
|
||||
printf ' 3) Reviewer workflow prompts\n'
|
||||
printf ' 4) Merger workflow prompts\n'
|
||||
printf ' 5) Reconciler workflow prompts\n'
|
||||
printf ' 6) Onboarding new project to this MCP workflow\n'
|
||||
printf ' 7) Proxmox deployment menu placeholder\n'
|
||||
printf ' 8) Create Proxmox LXC placeholder\n'
|
||||
printf ' 9) Run tests\n'
|
||||
printf ' 2) Workflow dashboard (queue, leases, next safe action)\n'
|
||||
printf ' 3) Author workflow prompts\n'
|
||||
printf ' 4) Reviewer workflow prompts\n'
|
||||
printf ' 5) Merger workflow prompts\n'
|
||||
printf ' 6) Reconciler workflow prompts\n'
|
||||
printf ' 7) Onboarding new project to this MCP workflow\n'
|
||||
printf ' 8) Proxmox deployment menu placeholder\n'
|
||||
printf ' 9) Create Proxmox LXC placeholder\n'
|
||||
printf ' t) Run tests\n'
|
||||
printf ' 0) Exit\n'
|
||||
read -r -p 'Choice: ' choice
|
||||
case "$choice" in
|
||||
1) show_root_checkout_health ;;
|
||||
2) show_author_prompts ;;
|
||||
3) show_reviewer_prompts ;;
|
||||
4) show_merger_prompts ;;
|
||||
5) show_reconciler_prompts ;;
|
||||
6) show_onboarding_prompt ;;
|
||||
7|8) show_proxmox_placeholder ;;
|
||||
9) run_tests ;;
|
||||
2) show_workflow_dashboard_help ;;
|
||||
3) show_author_prompts ;;
|
||||
4) show_reviewer_prompts ;;
|
||||
5) show_merger_prompts ;;
|
||||
6) show_reconciler_prompts ;;
|
||||
7) show_onboarding_prompt ;;
|
||||
8|9) show_proxmox_placeholder ;;
|
||||
t|T|tests) run_tests ;;
|
||||
0) printf 'Goodbye.\n'; exit 0 ;;
|
||||
*) printf 'Invalid choice.\n'; pause ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user