PendingCommandView
The pending set as a consumer may READ and safely DRIVE — the TS PendingCommandView allowlist.
Class in muse_code
Session.pending returns the concrete PendingCommandSet, but
this narrow type hides the three mutators Session drives itself
(discard_ephemeral, observed_reclaim, observed_user_message)
and the two re-exposed as Session methods (stop_retrying,
replay_answered): a consumer calling discard_ephemeral directly
drains and latches the set so the later real host_exited reports empty
retirements, and a bare stop_retrying/replay_answered skips
TurnSubmitter.forget_retired and leaks the command’s turn/start
params in replay memory. The rest (a fold-only consumer performing its own
I/O) stays available.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
discarded |
bool |
Whether the ephemeral discard has closed this set. |
size |
int |
The number of pending entries. |
Methods
Section titled “Methods”| Method | Signature | Description |
|---|---|---|
submitted |
submitted(command_id: str, input: _I, *, display_text: str | None = ..., anchor_after_item_id: str | None = ...) -> None |
Records a submission. |
acked |
acked(command_id: str, ack: PendingCommandAck) -> None |
Records that the submit (or a replay) was acked. |
ack_errored |
ack_errored(command_id: str, error: CommandErrorResponse) -> PendingRetirement[_I] | Held |
The submit (or a replay) answered with an error. |
observed_queue_movement |
observed_queue_movement(turn_id: str) -> tuple[str, ...] |
Queue movement: a turn event for a turn that is NOT the entry’s own. |
reconnected_without_snapshot |
reconnected_without_snapshot() -> PendingJoinPlan[_I] |
Reconnect with NO snapshot (the default cursor-resume path). |
join_snapshot |
join_snapshot(facts: SnapshotJoinFacts) -> PendingJoinPlan[_I] |
Joins local entries against an authoritative snapshot. |
resolve_replay_at_join |
resolve_replay_at_join(command_id: str, answer: ReplayAnswer[_I], snapshot_queued_command_ids: Iterable[str]) -> PendingRetirement[_I] | Held |
Resolves a must_replay answer with the snapshot in hand. |
list |
list() -> tuple[PendingCommandEntry[_I], ...] |
Entries in render order. |
get |
get(command_id: str) -> PendingCommandEntry[_I] | None |
The entry snapshot for command_id, or None. |
has |
has(command_id: str) -> bool |
Whether an entry with command_id is pending. |
Source
clients/sdk-py/src/muse_code/facade/session.py:165