1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! Durable routine-fire tool grants.
//!
//! A grant is a signed `approval_response` an owner minted during a
//! routine's attended setup rehearsal, honored on later UNATTENDED firings
//! of the same routine — the mechanism that lets a scheduled fire use a
//! tool the capability gate would otherwise escalate to a person who is not
//! present. [`RoutineGrantSet`] is what the harness verifies off the wire
//! (`polyc_turn_runner::verify_routine_tool_grants`) and hands to
//! [`crate::RunTurnOptions::routine_tool_grants`]; the gate that consults it
//! (`crate::routine_grant_approves`) is armed only on a routine's fire
//! dispatch (`crate::RunTurnOptions::fire_dispatch`), scheduled or the
//! attended setup rehearsal alike.
use HashMap;
/// Verified routine-fire tool grants for one turn.
///
/// Empty on every ordinary conversation — a grant is inert unless
/// [`crate::RunTurnOptions::fire_dispatch`] is `true`.
/// One tool-scoped grant: the capability shortfall it covers and
/// the exact tool shape it was minted against.
/// A routine's blanket grant: admits every tool below a risk
/// ceiling, without per-tool scoping.