Skip to content

feat(daemon): support BSK_SESSION_IDLE and BSK_DAEMON_IDLE environment variables - #463

Open
legend91019 wants to merge 1 commit into
Tencent:mainfrom
legend91019:feat/456-configurable-idle-timeout
Open

legend91019 wants to merge 1 commit into
Tencent:mainfrom
legend91019:feat/456-configurable-idle-timeout

Conversation

@legend91019

@legend91019 legend91019 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #456.

Make session and daemon idle timeouts configurable through BSK_SESSION_IDLE and BSK_DAEMON_IDLE, including automatic daemon startup.

Previously, --session-idle and --daemon-idle were available only on explicit bsk daemon start / restart commands. Automatically spawned daemons used the defaults of five minutes for sessions and ten minutes for the daemon.

Changes

  • Resolve unset idle timeouts from the environment before falling back to defaults.
  • Propagate the environment settings through ensure_daemon() when starting a background daemon.
  • Apply the same settings to explicit startup while preserving CLI flag precedence.
  • Document both variables in crates/bsk-cli/skill/references/environment.md.
  • Add CLI parsing and resolution coverage for environment values, explicit flags, defaults, and isolated environment restoration.

The implementation touches crates/bsk-cli/src/cli/daemon.rs, crates/bsk-cli/src/cli/ensure_daemon.rs, crates/bsk-cli/src/daemon/start.rs, and crates/bsk-cli/tests/cli_parse.rs, in addition to the documentation.

Validation

Implementation verification previously recorded for this branch:

  • cargo fmt --check: passed.
  • cargo test -p bsk --test cli_parse --locked: 46 tests passed.
  • cargo test -p bsk daemon::sessions --locked: passed.

This description-only update repairs Markdown escaping and corrupted identifiers. It does not change the branch or claim a new test run. The currently visible external scan is separate from the locally recorded Rust checks.

…t variables

Make browser session idle timeout and daemon idle timeout configurable via
environment variables BSK_SESSION_IDLE and BSK_DAEMON_IDLE.

- Update StartArgs::resolved_session_idle() and resolved_daemon_idle() to fall back to environment variables.
- Update ensure_daemon() to pass BSK_SESSION_IDLE and BSK_DAEMON_IDLE to auto-spawned background instances.
- Update run_start() to resolve environment variables into StartArgs.
- Add test coverage in crates/bsk-cli/tests/cli_parse.rs.
- Document environment variables in crates/bsk-cli/skill/references/environment.md.

Fixes Tencent#456

This branch has not been deployed

No deployments
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.

browser session idle time too short. 5 minutes ? Make it longer or user configurable

1 participant