From 10cca9d67e2d0cf3d7703a6c2b6d30e598475601 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Thu, 2 Apr 2026 02:47:38 +0000 Subject: [PATCH] feat(kugetsu): add KUGETSU_VERBOSITY for PM agent output control Add KUGETSU_VERBOSITY environment variable with three modes: - default (default): Normal balanced output - verbose: High verbosity with all context - quiet: Minimal output, essential info only Export KUGETSU_VERBOSITY in cmd_delegate when running opencode. Fixes #46 --- skills/kugetsu/scripts/kugetsu | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skills/kugetsu/scripts/kugetsu b/skills/kugetsu/scripts/kugetsu index a5c2578..a6df81f 100755 --- a/skills/kugetsu/scripts/kugetsu +++ b/skills/kugetsu/scripts/kugetsu @@ -12,6 +12,8 @@ ENV_DIR="${ENV_DIR:-$KUGETSU_DIR/env}" QUEUE_FILE="$KUGETSU_DIR/queue.json" MAX_CONCURRENT_AGENTS="${MAX_CONCURRENT_AGENTS:-3}" POLL_INTERVAL="${POLL_INTERVAL:-600}" +KUGETSU_VERBOSITY="${KUGETSU_VERBOSITY:-default}" +VERBOSITY_DIR="$KUGETSU_DIR/verbosity" # Load user config overrides (~/.kugetsu/config) if [ -f "$KUGETSU_DIR/config" ]; then @@ -549,6 +551,7 @@ cmd_status() { cmd_delegate() { local message="${1:-}" + local verbosity="${KUGETSU_VERBOSITY:-default}" if [ -z "$message" ]; then echo "Error: message is required" >&2 @@ -568,7 +571,7 @@ cmd_delegate() { local temp_dir="${KUGETSU_TEMP_DIR:-$HOME/.local/share/opencode/tool-output}" mkdir -p "$ENV_DIR" - local env_sh="set -a; export KUGETSU_TEMP_DIR='$temp_dir'; " + local env_sh="set -a; export KUGETSU_TEMP_DIR='$temp_dir'; export KUGETSU_VERBOSITY='$verbosity'; " if [ -f "$ENV_DIR/pm-agent.env" ]; then env_sh="${env_sh}source '$ENV_DIR/pm-agent.env'; " elif [ -f "$ENV_DIR/default.env" ]; then @@ -579,6 +582,7 @@ cmd_delegate() { nohup sh -c "${env_sh}opencode run '$message' --continue --session '$pm_session' >> '$log_file' 2>&1" > /dev/null 2>&1 & disown echo "Delegated to PM agent (logged to $(basename "$log_file"))" + echo "Verbosity: $verbosity" } cmd_logs() { -- 2.49.1