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
62
use ;
use crateSessionStatus;
// ─── Progress ───────────────────────────────────────────────
/// Structured progress information reported by strategies via `alc.progress()`.
///
/// Stored in `SessionStatus` and readable via `alc_status` MCP tool.
/// Not all strategies report progress — this is opt-in for strategies
/// that benefit from structured step tracking (e.g. multi-round pipelines).
/// Cheap, cloneable handle for writing progress from the Lua bridge.
///
/// Wraps the shared `SessionStatus` to expose only progress-related writes.
/// Passed to `bridge::register_progress()`.
///
/// # Call site and threading
///
/// Called exclusively from the Lua OS thread via `alc.progress()`.
/// Acquires `std::sync::Mutex<SessionStatus>` for a few microseconds
/// (single field assignment). See `SessionStatus` doc for full locking design.
///
/// # Poison policy
///
/// Silently skips on poison. Progress is observational (consumed by
/// `alc_status`) — a missed update degrades monitoring but does not
/// affect execution correctness. If you observe stale progress in
/// `alc_status` while the session is active, mutex poison from an
/// earlier OOM panic is a possible cause.