feat: audit console TUI, system prompt management, and CLI improvements
Audit Console Phase 1: tool_call_trace emission from mcplocal router,
session_bind/rbac_decision event kinds, GET /audit/sessions endpoint,
full Ink TUI with session sidebar, event timeline, and detail view
(mcpctl console --audit).
System prompts: move 6 hardcoded LLM prompts to mcpctl-system project
with extensible ResourceRuleRegistry validation framework, template
variable enforcement ({{maxTokens}}, {{pageCount}}), and delete-resets-
to-default behavior. All consumers fetch via SystemPromptFetcher with
hardcoded fallbacks.
CLI: -p shorthand for --project across get/create/delete/config commands,
console auto-scroll improvements, shell completions regenerated.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -119,10 +119,10 @@ _mcpctl() {
|
||||
COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
|
||||
;;
|
||||
claude)
|
||||
COMPREPLY=($(compgen -W "--project -o --output --inspect --stdout -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "-p --project -o --output --inspect --stdout -h --help" -- "$cur"))
|
||||
;;
|
||||
claude-generate)
|
||||
COMPREPLY=($(compgen -W "--project -o --output --inspect --stdout -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "-p --project -o --output --inspect --stdout -h --help" -- "$cur"))
|
||||
;;
|
||||
setup)
|
||||
COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
|
||||
@@ -138,11 +138,11 @@ _mcpctl() {
|
||||
return ;;
|
||||
get)
|
||||
if [[ -z "$resource_type" ]]; then
|
||||
COMPREPLY=($(compgen -W "$resources -o --output --project -A --all -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "$resources -o --output -p --project -A --all -h --help" -- "$cur"))
|
||||
else
|
||||
local names
|
||||
names=$(_mcpctl_resource_names "$resource_type")
|
||||
COMPREPLY=($(compgen -W "$names -o --output --project -A --all -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "$names -o --output -p --project -A --all -h --help" -- "$cur"))
|
||||
fi
|
||||
return ;;
|
||||
describe)
|
||||
@@ -156,11 +156,11 @@ _mcpctl() {
|
||||
return ;;
|
||||
delete)
|
||||
if [[ -z "$resource_type" ]]; then
|
||||
COMPREPLY=($(compgen -W "$resources --project -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "$resources -p --project -h --help" -- "$cur"))
|
||||
else
|
||||
local names
|
||||
names=$(_mcpctl_resource_names "$resource_type")
|
||||
COMPREPLY=($(compgen -W "$names --project -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "$names -p --project -h --help" -- "$cur"))
|
||||
fi
|
||||
return ;;
|
||||
logs)
|
||||
@@ -197,13 +197,13 @@ _mcpctl() {
|
||||
COMPREPLY=($(compgen -W "--subject --binding --operation --force -h --help" -- "$cur"))
|
||||
;;
|
||||
prompt)
|
||||
COMPREPLY=($(compgen -W "--project --content --content-file --priority --link -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "-p --project --content --content-file --priority --link -h --help" -- "$cur"))
|
||||
;;
|
||||
serverattachment)
|
||||
COMPREPLY=($(compgen -W "--project -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "-p --project -h --help" -- "$cur"))
|
||||
;;
|
||||
promptrequest)
|
||||
COMPREPLY=($(compgen -W "--project --content --content-file --priority -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "-p --project --content --content-file --priority -h --help" -- "$cur"))
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
|
||||
@@ -276,9 +276,9 @@ _mcpctl() {
|
||||
if [[ $((cword - subcmd_pos)) -eq 1 ]]; then
|
||||
local names
|
||||
names=$(mcpctl get projects -o json 2>/dev/null | jq -r '.[].name' 2>/dev/null)
|
||||
COMPREPLY=($(compgen -W "$names --stdin-mcp -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "$names --stdin-mcp --audit -h --help" -- "$cur"))
|
||||
else
|
||||
COMPREPLY=($(compgen -W "--stdin-mcp -h --help" -- "$cur"))
|
||||
COMPREPLY=($(compgen -W "--stdin-mcp --audit -h --help" -- "$cur"))
|
||||
fi
|
||||
return ;;
|
||||
help)
|
||||
|
||||
Reference in New Issue
Block a user