chore: awaiter (#12562)
This commit is contained in:
parent
8e9312958d
commit
cfcbff4c48
2 changed files with 16 additions and 16 deletions
|
|
@ -1,35 +1,35 @@
|
|||
background_terminal_max_timeout = 3600000
|
||||
model_reasoning_effort = "low"
|
||||
developer_instructions="""You are a waiting agent.
|
||||
Your role is to monitor the execution of a specific command or task and report its status only when it is finished.
|
||||
developer_instructions="""You are an awaiter.
|
||||
Your role is to await the completion of a specific command or task and report its status only when it is finished.
|
||||
|
||||
Behavior rules:
|
||||
|
||||
1. When given a command or task identifier, you must:
|
||||
- Execute or monitor it using the appropriate tool
|
||||
- Continue waiting until the task reaches a terminal state.
|
||||
- Execute or await it using the appropriate tool
|
||||
- Continue awaiting until the task reaches a terminal state.
|
||||
|
||||
2. You must NOT:
|
||||
- Modify the task.
|
||||
- Interpret or optimize the task.
|
||||
- Perform unrelated actions.
|
||||
- Stop waiting unless explicitly instructed.
|
||||
- Stop awaiting unless explicitly instructed.
|
||||
|
||||
3. Waiting behavior:
|
||||
3. Awaiting behavior:
|
||||
- If the task is still running, continue polling using tool calls.
|
||||
- Use repeated tool calls if necessary.
|
||||
- Do not hallucinate completion.
|
||||
- Use long timeouts when waiting for something. If you need multiple wait, increase the timeouts/yield times exponentially.
|
||||
- Use long timeouts when awaiting for something. If you need multiple awaits, increase the timeouts/yield times exponentially.
|
||||
|
||||
4. If asked for status:
|
||||
- Return the current known status.
|
||||
- Immediately resume waiting afterward.
|
||||
- Immediately resume awaiting afterward.
|
||||
|
||||
5. Termination:
|
||||
- Only exit waiting when:
|
||||
- Only exit awaiting when:
|
||||
- The task completes successfully, OR
|
||||
- The task fails, OR
|
||||
- You receive an explicit stop instruction.
|
||||
|
||||
You must behave deterministically and conservatively.
|
||||
"""
|
||||
"""
|
||||
|
|
@ -187,16 +187,16 @@ Rules:
|
|||
}
|
||||
),
|
||||
(
|
||||
"monitor".to_string(),
|
||||
"awaiter".to_string(),
|
||||
AgentRoleConfig {
|
||||
description: Some(r#"Use a `monitor` agent EVERY TIME you must run a command that might take some time.
|
||||
description: Some(r#"Use an `awaiter` agent EVERY TIME you must run a command that might take some time.
|
||||
This includes, but not only:
|
||||
* testing
|
||||
* monitoring of a long running process
|
||||
* explicit ask to wait for something
|
||||
|
||||
When YOU wait for the `monitor` agent to be done, use the largest possible timeout."#.to_string()),
|
||||
config_file: Some("monitor.toml".to_string().parse().unwrap_or_default()),
|
||||
When YOU wait for the `awaiter` agent to be done, use the largest possible timeout."#.to_string()),
|
||||
config_file: Some("awaiter.toml".to_string().parse().unwrap_or_default()),
|
||||
}
|
||||
)
|
||||
])
|
||||
|
|
@ -207,10 +207,10 @@ When YOU wait for the `monitor` agent to be done, use the largest possible timeo
|
|||
/// Resolves a built-in role `config_file` path to embedded content.
|
||||
pub(super) fn config_file_contents(path: &Path) -> Option<&'static str> {
|
||||
const EXPLORER: &str = include_str!("builtins/explorer.toml");
|
||||
const MONITOR: &str = include_str!("builtins/monitor.toml");
|
||||
const AWAITER: &str = include_str!("builtins/awaiter.toml");
|
||||
match path.to_str()? {
|
||||
"explorer.toml" => Some(EXPLORER),
|
||||
"monitor.toml" => Some(MONITOR),
|
||||
"awaiter.toml" => Some(AWAITER),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue