Skip to content

fix(desktop): scope local tool restrictions to the invoking turn - #3780

Merged
bobleer merged 2 commits into
GCWing:mainfrom
bobleer:bob/fix-desktop-card-peer-origin
Nov 6, 2026
Merged

bobleer merged 2 commits into
GCWing:mainfrom
bobleer:bob/fix-desktop-card-peer-origin

Conversation

@bobleer

@bobleer bobleer commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix local DesktopCard creation/display and Creative frontend customization being rejected as Peer Device Mode whenever another device remains attached to the host. Attachments are event subscriptions and can outlive a switch back to the local desktop; they do not identify the caller of a tool.

The Peer host now stamps the submitting turn's origin. Both tools use that context, preserved through queued/persisted metadata, interrupted-turn recovery, subagents, session messages, and automatic goal continuation. Peer MiniApp/BTW submissions and direct tool calls retain an explicit unsupported result. Tool listing preserves origin booleans so availability and execution agree.

Type and Areas

  • Type: bug fix
  • Areas: Desktop/Tauri, Agent Runtime context, Core tools

Motivation / Impact

A local user can create or show cards and customize the frontend while a Peer controller stays connected in the background. An actual remote controller cannot create a card or change the frontend on an unseen host desktop. Older controllers do not need a new payload field: the receiving host supplies the origin, and legacy local requests remain valid.

Verification

  • cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-creation --lib -- desktop_card frontend_workbench — 45 passed.
  • cargo test --locked -p openbitfun-desktop --no-default-features --lib -- desktop_cards frontend_workbench — 50 passed.
  • cargo check --locked -p openbitfun-desktop --no-default-features --lib — passed.
  • pnpm run fmt:rs and git diff --check — passed.

The fixtures cover simulated Peer/mobile control origins, remote-workspace command-source refusal, legacy payload/record compatibility, and context propagation. No live SSH, relay/mobile, Peer Device, or Detached Dispatch integration was exercised; native card windows were not launched.

Reviewer Notes

AI-assisted. Testing level: lightly tested (focused automated checks, no native/remote manual pass). No card-store schema, controller attachment lifecycle, or command-registry changes.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer bobleer changed the title fix(desktop-cards): scope peer restrictions to the invoking turn fix(desktop): scope local tool restrictions to the invoking turn Nov 6, 2026
@bobleer
bobleer merged commit 271ddb3 into GCWing:main Nov 6, 2026
12 checks 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.

1 participant