Skip to content

feat(request-help): add BSK_REQUEST_HELP=off to disable blocking help requests - #53

Merged
BB-fat merged 3 commits into
mainfrom
feat/disable-request-help
Jul 31, 2026
Merged

feat(request-help): add BSK_REQUEST_HELP=off to disable blocking help requests#53
BB-fat merged 3 commits into
mainfrom
feat/disable-request-help

Conversation

@BB-fat

@BB-fat BB-fat commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Motivation

bsk request-help is a blocking human-in-the-loop command: it brings the tab to the foreground, shows the help overlay, and waits until the user acts or the call times out (default 5m). On unattended / background-server deployments there is no human around, and a blocking help prompt must never appear — but today there is no way to turn the command off.

What changes

New environment variable BSK_REQUEST_HELP:

  • BSK_REQUEST_HELP=off (case-insensitive, surrounding whitespace ignored) disables request-help.
  • Unset or any other value keeps the current default behaviour (enabled).

When disabled, bsk request-help returns immediately — no daemon startup, no overlay, no waiting — with a synthetic structured result and exit code 0:

{ "outcome": "disabled", "note": "request-help disabled by BSK_REQUEST_HELP=off (unattended mode)", "tab_id": 0 }

The agent therefore gets a normal, machine-readable result instead of an error and can react deliberately (the skill docs now tell agents not to retry request-help after a disabled outcome, and to continue autonomously or stop gracefully).

Implementation

  • bsk-protocol: new HelpOutcome::Disabled variant ("disabled") + regenerated tool_request_help_result.json schema.
  • CLI (human_loop.rs): dispatch() short-circuits before ensure_daemon() when disabled; the off value parsing lives in a pure, unit-tested helper.
  • Daemon (ipc.rs): handle_tool_dispatch refuses to forward tool.request_help to the extension when disabled and answers with the same synthetic result, so non-CLI IPC callers are covered too.
  • Extension transport/types.ts: HelpOutcome union gains "disabled" (no behaviour change — the daemon never forwards the call when disabled).
  • Docs: both skill/SKILL.md copies document the variable's purpose (unattended mode), its exact behaviour, and the agent guidance above.

Tests

  • cargo fmt --all, cargo clippy -p bsk-protocol -p bsk --all-targets -- -D warnings: clean.
  • cargo test -p bsk-protocol: 104 passed.
  • cargo test -p bsk: all green except one pre-existing, environment-dependent failure in skill_install::sync::tests::sync_continues_on_partial_error (also fails on a clean tree in this environment; unrelated to this change).
  • New unit tests cover the off value detection and disabled outcome serialization.

@BB-fat
BB-fat merged commit 71255ae into main Jul 31, 2026
4 checks passed
@BB-fat
BB-fat deleted the feat/disable-request-help branch July 31, 2026 15:54
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