Move loop-claude's cycle, judge, interrupt, tmux and routing into agent_cycle
CI / tests (pull_request) Failing after 3m50s
CI / tests (pull_request) Failing after 3m50s
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
from claude_code.entries import Entry
|
||||
from loop_claude import escalation_mark
|
||||
from agent_cycle import escalation_mark
|
||||
from failure import Failure
|
||||
from loop_claude.cycle.judge import Grounds, JUDGE_RULES, TASK_HEADING, TRANSCRIPT_HEADING
|
||||
from agent_cycle.judge import Grounds, judge_rules, TASK_HEADING, TRANSCRIPT_HEADING
|
||||
from claude_code.transcript import human_answers
|
||||
from loop_claude.cycle.prompts import typed_answer
|
||||
from agent_cycle.worker_prompts import typed_answer
|
||||
from loop_claude.cycle.prompts import ANSWER_DESTINATIONS
|
||||
|
||||
|
||||
def grounds_of(prompt: str, entries: list[Entry]) -> Grounds | Failure:
|
||||
@@ -12,4 +13,4 @@ def grounds_of(prompt: str, entries: list[Entry]) -> Grounds | Failure:
|
||||
_, transcript_heading, shown = after_task.partition(TRANSCRIPT_HEADING)
|
||||
if not (task_heading and transcript_heading):
|
||||
return Failure(f"the archived prompt lacks the heading {TASK_HEADING.strip()!r} or {TRANSCRIPT_HEADING.strip()!r}, which judge_prompt writes")
|
||||
return Grounds(shown.removesuffix(f"\n\n{JUDGE_RULES}"), escalation_mark.after_mark(entries, 0), before_task, tuple(human_answers(entries, typed_answer)))
|
||||
return Grounds(shown.removesuffix(f"\n\n{judge_rules(ANSWER_DESTINATIONS)}"), escalation_mark.after_mark(entries, 0), before_task, tuple(human_answers(entries, typed_answer)))
|
||||
|
||||
Reference in New Issue
Block a user