hive-subagent-mcp: fix build against AcpRuntime's new policy parameter
#4822 added a CompactionPolicy generic parameter and a policy argument to AcpRuntime::new. #4822 and #4824 (which added acp_runtime's call) were reviewed and CI'd independently and merged textually clean, so neither build caught that the two conflict: forge/main fails to compile with 'missing generics for struct AcpRuntime' and 'this function takes 4 arguments but 3 were supplied'. Parameterize AcpRuntime<hive_claude::NeverCompact>, matching this crate's documented no-mid-turn-compaction design (session.rs's module doc: subagents are bounded, single-batch work, not sessions long-lived enough to need in-place compaction).
This commit is contained in:
parent
b68fd7306e
commit
c01ddd8238
1 changed files with 12 additions and 3 deletions
|
|
@ -1696,7 +1696,7 @@ async fn after_turn(
|
||||||
fn spawn_and_track_acp(
|
fn spawn_and_track_acp(
|
||||||
state: &Arc<State>,
|
state: &Arc<State>,
|
||||||
name: &str,
|
name: &str,
|
||||||
runtime: AcpRuntime,
|
runtime: AcpRuntime<hive_claude::NeverCompact>,
|
||||||
config: Config,
|
config: Config,
|
||||||
prompt: String,
|
prompt: String,
|
||||||
verdict: Option<VerdictTx>,
|
verdict: Option<VerdictTx>,
|
||||||
|
|
@ -1743,11 +1743,20 @@ fn acp_session_file(sessions: &Path, name: &str) -> PathBuf {
|
||||||
/// The ACP runtime `name`'s run drives, keeping its session id in
|
/// The ACP runtime `name`'s run drives, keeping its session id in
|
||||||
/// [`acp_session_file`] and answering permission requests per
|
/// [`acp_session_file`] and answering permission requests per
|
||||||
/// [`acp_permits`].
|
/// [`acp_permits`].
|
||||||
fn acp_runtime(command: AcpCommand, sessions: &Path, name: &str) -> AcpRuntime {
|
fn acp_runtime(
|
||||||
|
command: AcpCommand,
|
||||||
|
sessions: &Path,
|
||||||
|
name: &str,
|
||||||
|
) -> AcpRuntime<hive_claude::NeverCompact> {
|
||||||
let groups = hive_sh4re::permissions::effective_tool_groups();
|
let groups = hive_sh4re::permissions::effective_tool_groups();
|
||||||
let permit: PermissionPolicy =
|
let permit: PermissionPolicy =
|
||||||
Arc::new(move |ask: &PermissionAsk<'_>| acp_permits(ask, &groups));
|
Arc::new(move |ask: &PermissionAsk<'_>| acp_permits(ask, &groups));
|
||||||
AcpRuntime::new(command, acp_session_file(sessions, name), permit)
|
AcpRuntime::new(
|
||||||
|
command,
|
||||||
|
acp_session_file(sessions, name),
|
||||||
|
permit,
|
||||||
|
hive_claude::NeverCompact,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an ACP subagent may run the tool call it asks about.
|
/// Whether an ACP subagent may run the tool call it asks about.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue