Carry dynamic Verse context in worker launches
This commit is contained in:
parent
0fca183873
commit
edd93a11b9
13 changed files with 140 additions and 16 deletions
|
|
@ -452,6 +452,24 @@ pub fn build_epiphany_role_launch_request(
|
|||
expected_revision: Option<u64>,
|
||||
max_runtime_seconds: Option<u64>,
|
||||
state: &EpiphanyThreadState,
|
||||
) -> Result<EpiphanyJobLaunchRequest, String> {
|
||||
build_epiphany_role_launch_request_with_dynamic_context(
|
||||
thread_id,
|
||||
role_id,
|
||||
expected_revision,
|
||||
max_runtime_seconds,
|
||||
state,
|
||||
None,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn build_epiphany_role_launch_request_with_dynamic_context(
|
||||
thread_id: &str,
|
||||
role_id: EpiphanyRoleResultRoleId,
|
||||
expected_revision: Option<u64>,
|
||||
max_runtime_seconds: Option<u64>,
|
||||
state: &EpiphanyThreadState,
|
||||
dynamic_prompt_context: Option<String>,
|
||||
) -> Result<EpiphanyJobLaunchRequest, String> {
|
||||
let binding_id = epiphany_role_binding_id(role_id)?;
|
||||
let owner_role = epiphany_role_owner(role_id)?;
|
||||
|
|
@ -487,6 +505,7 @@ pub fn build_epiphany_role_launch_request(
|
|||
role_id: epiphany_role_label(role_id).to_string(),
|
||||
state_revision: state.revision,
|
||||
objective: state.objective.clone(),
|
||||
dynamic_prompt_context,
|
||||
active_subgoal_id: state.active_subgoal_id.clone(),
|
||||
active_subgoals: state
|
||||
.subgoals
|
||||
|
|
@ -551,6 +570,26 @@ pub fn build_epiphany_reorient_launch_request(
|
|||
state: &EpiphanyThreadState,
|
||||
checkpoint: &EpiphanyInvestigationCheckpoint,
|
||||
decision: &CoreEpiphanyReorientDecision,
|
||||
) -> EpiphanyJobLaunchRequest {
|
||||
build_epiphany_reorient_launch_request_with_dynamic_context(
|
||||
thread_id,
|
||||
expected_revision,
|
||||
max_runtime_seconds,
|
||||
state,
|
||||
checkpoint,
|
||||
decision,
|
||||
None,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn build_epiphany_reorient_launch_request_with_dynamic_context(
|
||||
thread_id: &str,
|
||||
expected_revision: Option<u64>,
|
||||
max_runtime_seconds: Option<u64>,
|
||||
state: &EpiphanyThreadState,
|
||||
checkpoint: &EpiphanyInvestigationCheckpoint,
|
||||
decision: &CoreEpiphanyReorientDecision,
|
||||
dynamic_prompt_context: Option<String>,
|
||||
) -> EpiphanyJobLaunchRequest {
|
||||
let instruction = build_epiphany_reorient_launch_instruction(decision.action);
|
||||
build_reorient_job_launch_request(EpiphanyReorientLaunchRequestInput {
|
||||
|
|
@ -563,6 +602,7 @@ pub fn build_epiphany_reorient_launch_request(
|
|||
state,
|
||||
checkpoint,
|
||||
decision,
|
||||
dynamic_prompt_context,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue