Add watched AI-agent control-lease for Workbench live sessions - #3
Merged
Merged
Conversation
Swing and MCP/HTTP attach share one controller-owned lease and LiveScenarioPlayer. UI mode exposes a localhost JSON attach endpoint so an agent joins the visible session instead of starting a second worker. Save copies a picker-loaded scenario back to the originating feature only after explicit Allow. Co-authored-by: ds-code-t <ds-code-t@users.noreply.github.com>
ds-code-t
marked this pull request as ready for review
August 24, 2026 18:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Workbench is a collaborative live-testing space. This adds a controller-owned control lease so a human can watch an AI agent work in the same Swing window, then take the floor at any time. Swing and MCP/HTTP attach remain adapters over
WorkbenchServices/WorkbenchController/LiveScenarioPlayer. There is still one Workbench JVM and one consumer worker.Behavior
HUMAN(default when the UI is up) orAGENT, plus agent display name,currentActionbanner text, and an optional pending Save permission.workbench_request_control. While the agent holds the lease, Swing play/edit/mapping/save/worker controls lock. WebView editors stay mounted and become read-only. Take control stays enabled, returnsHUMAN, and fails in-flight agent permission waits.executeStep, play, Mapping reads, evidence) is allowed on the agent lease. Copying into the original.featureis not.uistarts a 127.0.0.1 JSON attach endpoint and writes.pickleball/workbench/attach.json(url + token). Headlessmcpstdio is unchanged: stdout remains JSON-RPC only. That client may hold the lease without a banner; Save is still an explicit tool.Functionality-change coverage
AGENTS.mdand the relevant feature-map entry.@allCucumber.docs/pickleball-workbench.md,docs/pickleball-workbench-player.md,pickleball-workbench/AGENTS.md).docs/agent/feature-map.mdremains accurate.docs/agent/repository-index.mdis current.workbench_request_controlfirst. The stdout JSON-RPC-only contract is unchanged.Validation
python3 scripts/verify_agent_contract.pypython3 scripts/refresh_agent_index.py --checkpython3 scripts/sync_consumer_guidance.py --check./gradlew :pickleball-workbench:test(includesverifyWorkbenchMcpStdioand artifact checks)./gradlew verifyStrictControllerIsolation./gradlew testnot run; this is a Workbench-only change../gradlew publishToMavenLocalnot required to land the 2.1.9 Workbench controller.@allnot run, per Workbench validation policy.This PR targets 2.1.9, not master. After validation it is merged into 2.1.9.