feat: re-enable session lifecycle CRs with session_end outcome

Broker now supports session-scoped ACs that stay active across
multiple CRs. Session start posts 'completed' CR, session end
posts 'session_end' CR which consumes the AC.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tyler J King 2026-04-03 02:05:58 -04:00
parent 740fcdb3b5
commit ff16b5642e

View file

@ -30,8 +30,7 @@ pub fn run_human_mode(
// Post SESSION_STARTED CR if broker available: // Post SESSION_STARTED CR if broker available:
if let Some(ref base) = broker_url { if let Some(ref base) = broker_url {
if let Ok(client) = build_client(token) { if let Ok(client) = build_client(token) {
// Session start CR skipped — broker consumes AC on first CR, let _ = post_cr(&client, base, &session.ac_id, "completed");
// which would block per-command CRs. Needs session-scoped AC model.
} }
} }
@ -122,7 +121,7 @@ pub fn run_human_mode(
// Post SESSION_ENDED CR: // Post SESSION_ENDED CR:
if let Some(ref base) = broker_url { if let Some(ref base) = broker_url {
if let Ok(client) = build_client(token) { if let Ok(client) = build_client(token) {
// Session end CR skipped — same AC consumption issue as session start. let _ = post_cr(&client, base, &session.ac_id, "session_end");
} }
} }