diff --git a/lib/formula-session.sh b/lib/formula-session.sh index d1830be..925135a 100644 --- a/lib/formula-session.sh +++ b/lib/formula-session.sh @@ -150,7 +150,7 @@ ensure_profile_repo() { # Checks if the agent has a .profile repo by querying Forgejo API. # Returns 0 if repo exists, 1 otherwise. _profile_has_repo() { - local agent_identity="${AGENT_IDENTITY:-}" + local agent_identity="${1:-${AGENT_IDENTITY:-}}" if [ -z "$agent_identity" ]; then if ! resolve_agent_identity; then @@ -186,8 +186,8 @@ _count_undigested_journals() { # Runs a claude -p one-shot to digest undigested journals into lessons-learned.md # Returns 0 on success, 1 on failure. _profile_digest_journals() { - local agent_identity="${AGENT_IDENTITY:-}" - local model="${CLAUDE_MODEL:-opus}" + local agent_identity="${1:-${AGENT_IDENTITY:-}}" + local model="${2:-${CLAUDE_MODEL:-opus}}" if [ -z "$agent_identity" ]; then if ! resolve_agent_identity; then