Skip to content

Add watched AI-agent control-lease for Workbench live sessions - #3

Merged
cursor[bot] merged 1 commit into
2.1.9from
cursor/workbench-control-lease-b486
Aug 24, 2026
Merged

Add watched AI-agent control-lease for Workbench live sessions#3
cursor[bot] merged 1 commit into
2.1.9from
cursor/workbench-control-lease-b486

Conversation

@ds-code-t

@ds-code-t ds-code-t commented Aug 24, 2026

Copy link
Copy Markdown
Owner

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

  • Lease holder is HUMAN (default when the UI is up) or AGENT, plus agent display name, currentAction banner text, and an optional pending Save permission.
  • Agent mutating calls fail until 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, returns HUMAN, and fails in-flight agent permission waits.
  • Testing the live scenario (executeStep, play, Mapping reads, evidence) is allowed on the agent lease. Copying into the original .feature is not.
  • Human Save asks before copying the live scenario into file X / scenario Y. Agent Save uses the same service and, with the UI attached, blocks on Allow/Deny. Deny writes nothing. The demo buffer stays unsavable. Picker load still never rewrites features.
  • UI mode cannot share stdout with stdio MCP, so ui starts a 127.0.0.1 JSON attach endpoint and writes .pickleball/workbench/attach.json (url + token). Headless mcp stdio 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

  • I reviewed AGENTS.md and the relevant feature-map entry.
  • Framework implementation is complete.
  • Focused framework tests were added or updated.
  • Maven consumer scenarios were not added. This is Workbench-controller behavior; coverage is headless Workbench unit tests rather than @all Cucumber.
  • Canonical documentation was updated (docs/pickleball-workbench.md, docs/pickleball-workbench-player.md, pickleball-workbench/AGENTS.md).
  • docs/agent/feature-map.md remains accurate.
  • docs/agent/repository-index.md is current.
  • Backward compatibility was preserved, with one documented stdio contract addition: mutating MCP tools now require workbench_request_control first. The stdout JSON-RPC-only contract is unchanged.

Validation

  • python3 scripts/verify_agent_contract.py
  • python3 scripts/refresh_agent_index.py --check
  • python3 scripts/sync_consumer_guidance.py --check
  • ./gradlew :pickleball-workbench:test (includes verifyWorkbenchMcpStdio and artifact checks)
  • ./gradlew verifyStrictControllerIsolation
  • Root ./gradlew test not run; this is a Workbench-only change.
  • ./gradlew publishToMavenLocal not required to land the 2.1.9 Workbench controller.
  • Maven consumer @all not run, per Workbench validation policy.

This PR targets 2.1.9, not master. After validation it is merged into 2.1.9.

Open in Web Open in Cursor 

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
ds-code-t marked this pull request as ready for review August 24, 2026 18:03
@cursor
cursor Bot merged commit 4a64567 into 2.1.9 Aug 24, 2026
1 check passed
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.

2 participants