Skip to content

feat(age): report auto-lock countdown in age agent status - #3656

Merged
dominikschulz merged 1 commit into
gopasspw:masterfrom
dominikschulz:feat/ageautolock
Oct 10, 2026
Merged

dominikschulz merged 1 commit into
gopasspw:masterfrom
dominikschulz:feat/ageautolock

Conversation

@dominikschulz

Copy link
Copy Markdown
Member

gopass age agent status only reported whether the agent was running and locked, leaving users unable to tell how long an unlocked session would last before the inactivity timer cleared the cached identities.

Add a read-only lock-in command to the agent protocol that answers OK <seconds> until the inactivity timer fires, or OK -1 when no auto-lock is scheduled (the timer is disabled or the agent is already locked). The agent tracks the timer deadline and reports it without ever arming, resetting or disarming the timer, so polling cannot keep a session alive. The command is advertised as a capability token, derived from the dispatch table like every other command.

The client fetches status, lock-in and hello over the existing single connection; a legacy agent's ERR on lock-in degrades to -1 and is treated as "countdown unavailable" rather than an error. age agent status prints the remaining time only when the agent is unlocked and advertises the capability, so a legacy agent is never misreported as "auto-lock disabled".

`gopass age agent status` only reported whether the agent was running and
locked, leaving users unable to tell how long an unlocked session would
last before the inactivity timer cleared the cached identities.

Add a read-only `lock-in` command to the agent protocol that answers
`OK <seconds>` until the inactivity timer fires, or `OK -1` when no
auto-lock is scheduled (the timer is disabled or the agent is already
locked). The agent tracks the timer deadline and reports it without ever
arming, resetting or disarming the timer, so polling cannot keep a session
alive. The command is advertised as a capability token, derived from the
dispatch table like every other command.

The client fetches status, lock-in and hello over the existing single
connection; a legacy agent's ERR on lock-in degrades to -1 and is treated
as "countdown unavailable" rather than an error. `age agent status` prints
the remaining time only when the agent is unlocked and advertises the
capability, so a legacy agent is never misreported as "auto-lock disabled".

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@dominikschulz
dominikschulz merged commit c588599 into gopasspw:master Oct 10, 2026
10 checks passed
@dominikschulz
dominikschulz deleted the feat/ageautolock branch October 10, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 换网址