ACP Wrap up
This commit is contained in:
@@ -21,6 +21,48 @@ pub struct RuntimeCapabilities {
|
||||
pub session_resume: bool,
|
||||
pub steering: bool,
|
||||
pub tool_permissions: bool,
|
||||
/// Galaxy owns and persists the message history supplied to each turn.
|
||||
pub host_managed_history: bool,
|
||||
/// Tool proposals cross the runtime boundary for Galaxy to approve and execute.
|
||||
pub host_tool_execution: bool,
|
||||
/// A failed turn can be safely replayed from the same request payload.
|
||||
pub request_retries: bool,
|
||||
/// Galaxy can append corrective instructions and start a follow-up turn.
|
||||
pub corrective_retries: bool,
|
||||
/// Transcript events can be forwarded through Galaxy shared sessions.
|
||||
pub shared_session_sync: bool,
|
||||
}
|
||||
|
||||
impl RuntimeCapabilities {
|
||||
#[must_use]
|
||||
pub const fn provider() -> Self {
|
||||
Self {
|
||||
model_selection: true,
|
||||
session_resume: false,
|
||||
steering: false,
|
||||
tool_permissions: false,
|
||||
host_managed_history: true,
|
||||
host_tool_execution: true,
|
||||
request_retries: true,
|
||||
corrective_retries: true,
|
||||
shared_session_sync: true,
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn session_runtime() -> Self {
|
||||
Self {
|
||||
model_selection: false,
|
||||
session_resume: true,
|
||||
steering: true,
|
||||
tool_permissions: true,
|
||||
host_managed_history: false,
|
||||
host_tool_execution: false,
|
||||
request_retries: false,
|
||||
corrective_retries: false,
|
||||
shared_session_sync: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
|
||||
@@ -120,3 +120,22 @@ fn turn_control_delivers_cancel_and_steering_in_order() {
|
||||
assert_eq!(control.receive().await.unwrap(), TurnCommand::Cancel);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn runtime_shapes_publish_controller_policy_as_capabilities() {
|
||||
let provider = RuntimeCapabilities::provider();
|
||||
assert!(provider.host_managed_history);
|
||||
assert!(provider.host_tool_execution);
|
||||
assert!(provider.request_retries);
|
||||
assert!(provider.corrective_retries);
|
||||
assert!(provider.shared_session_sync);
|
||||
assert!(!provider.steering);
|
||||
|
||||
let session = RuntimeCapabilities::session_runtime();
|
||||
assert!(!session.host_managed_history);
|
||||
assert!(!session.host_tool_execution);
|
||||
assert!(!session.request_retries);
|
||||
assert!(!session.corrective_retries);
|
||||
assert!(!session.shared_session_sync);
|
||||
assert!(session.steering);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user