fix: Migrate planner, predictor, supervisor to SDK (#6)
Replace tmux-based run_formula_and_monitor() with synchronous agent_run() from lib/agent-sdk.sh, matching the pattern established in gardener-run.sh. Key changes per agent: - Drop agent-session.sh, use agent-sdk.sh (SID_FILE, LOGFILE) - Remove SESSION_NAME, PHASE_FILE, PHASE_POLL_INTERVAL (tmux/phase artifacts) - Strip phase protocol from prompt footer (SDK mode needs no phase signals) - Preserve all prompt composition: context blocks, memory, journal, preflight Shared helpers added to lib/formula-session.sh: - build_sdk_prompt_footer(): build_prompt_footer minus phase protocol - formula_worktree_setup(): fetch + cleanup + create worktree + EXIT trap Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8f389d9dab
commit
de2e7dc1fb
5 changed files with 113 additions and 80 deletions
|
|
@ -92,11 +92,8 @@ Supported actions:
|
|||
The commit-and-pr step converts JSONL to JSON array. The orchestrator executes
|
||||
actions after the PR merges. Do NOT call mutation APIs directly during the run."
|
||||
|
||||
# Reuse shared footer (API reference + environment), replace phase protocol
|
||||
# shellcheck disable=SC2034 # consumed by build_prompt_footer
|
||||
PHASE_FILE="" # not used in SDK mode
|
||||
build_prompt_footer "$GARDENER_API_EXTRA"
|
||||
PROMPT_FOOTER="${PROMPT_FOOTER%%## Phase protocol*}## Completion protocol (REQUIRED)
|
||||
build_sdk_prompt_footer "$GARDENER_API_EXTRA"
|
||||
PROMPT_FOOTER="${PROMPT_FOOTER}## Completion protocol (REQUIRED)
|
||||
When the commit-and-pr step creates a PR, write the PR number and stop:
|
||||
echo \"\$PR_NUMBER\" > '${GARDENER_PR_FILE}'
|
||||
Then STOP. Do NOT write PHASE: signals — the orchestrator handles CI, review, and merge.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue