Merge pull request 'fix: fix: action-agent.sh ignores project TOML — falls back to .env defaults (#317)' (#318) from fix/issue-317 into main
This commit is contained in:
commit
954f9fb96b
2 changed files with 5 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# action-agent.sh — Autonomous action agent: tmux + Claude + action formula
|
# action-agent.sh — Autonomous action agent: tmux + Claude + action formula
|
||||||
#
|
#
|
||||||
# Usage: ./action-agent.sh <issue-number>
|
# Usage: ./action-agent.sh <issue-number> [project.toml]
|
||||||
#
|
#
|
||||||
# Lifecycle:
|
# Lifecycle:
|
||||||
# 1. Fetch issue body (action formula) + existing comments
|
# 1. Fetch issue body (action formula) + existing comments
|
||||||
|
|
@ -16,10 +16,11 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
ISSUE="${1:?Usage: action-agent.sh <issue-number> [project.toml]}"
|
||||||
|
export PROJECT_TOML="${2:-${PROJECT_TOML:-}}"
|
||||||
|
|
||||||
source "$(dirname "$0")/../lib/env.sh"
|
source "$(dirname "$0")/../lib/env.sh"
|
||||||
source "$(dirname "$0")/../lib/agent-session.sh"
|
source "$(dirname "$0")/../lib/agent-session.sh"
|
||||||
|
|
||||||
ISSUE="${1:?Usage: action-agent.sh <issue-number>}"
|
|
||||||
SESSION_NAME="action-${ISSUE}"
|
SESSION_NAME="action-${ISSUE}"
|
||||||
LOCKFILE="/tmp/action-agent-${ISSUE}.lock"
|
LOCKFILE="/tmp/action-agent-${ISSUE}.lock"
|
||||||
LOGFILE="${FACTORY_ROOT}/action/action-poll-${PROJECT_NAME:-harb}.log"
|
LOGFILE="${FACTORY_ROOT}/action/action-poll-${PROJECT_NAME:-harb}.log"
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ for i in $(seq 0 $((COUNT - 1))); do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "spawning action-agent for issue #${ISSUE_NUM}"
|
log "spawning action-agent for issue #${ISSUE_NUM}"
|
||||||
nohup "${SCRIPT_DIR}/action-agent.sh" "$ISSUE_NUM" >> "$LOGFILE" 2>&1 &
|
nohup "${SCRIPT_DIR}/action-agent.sh" "$ISSUE_NUM" "$PROJECT_TOML" >> "$LOGFILE" 2>&1 &
|
||||||
log "started action-agent PID $! for issue #${ISSUE_NUM}"
|
log "started action-agent PID $! for issue #${ISSUE_NUM}"
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue