Repository navigation
fix(remote): route bot device controls remotely and let the Agent list devices and dispatch - #3652
Merged
Merged
Conversation
…the selected device
With a remote device selected, the IM bot still read and changed models
through this host's session store ("Session storage is unavailable"), told
assistant-mode users that no assistants existed, created assistant sessions
in the device's open project workspace (or failed when none was open), and
resumed sessions without the transcript preview.
Route /model through get_model_catalog and set_session_model on the device,
list and select the device's assistants, choose session workspaces per mode
(selected assistant, selected project, then the device's open project), let
the device place an unselected assistant session in its default assistant,
remember where new sessions land, and preview resumed sessions from the
device transcript. Remote error replies now surface as errors.
…sktop and CLI Detached Dispatch was reachable only through Desktop UI flows: the product control catalog had no executable dispatch operations, CLI marked the whole capability as lacking a presentation surface, and no operation returned the account's device list, so the Agent could neither count the user's devices nor dispatch work. Add the detached-dispatch product-control provider on feature.detached-dispatch (list-targets, submit, status, list-jobs, cancel) with a closed request contract. Both hosts bind it to a new Core executor, execute_dispatch_control, which the CLI dispatch outbound command now also uses. list-targets returns every same-account device with isCurrentDevice plus saved SSH targets; submit resolves a device name, alias, device:<id>, or ssh:<id>, never targets this host, and never falls back to a local run. Detached dispatch workers may observe but not submit further jobs. Desktop runs dispatch operations outside the settings transaction because a submit can spend minutes uploading its baseline.
Tell the Claw and OpenBitFun agents, and the OpenBitFunControl description, that same-account devices and Detached Dispatch live under feature.detached-dispatch, to read list-targets before stating a device count, and to submit only on the user's request without falling back to this host.
…gent-gaps # Conflicts: # docs/interactive-capabilities/README.md # docs/interactive-capabilities/capabilities.json # docs/interactive-capabilities/technical/product-control-open-audit.json # docs/interactive-capabilities/technical/tauri-command-map.json # src/crates/contracts/product-domains/src/generated/product-control-catalog.json # src/web-ui/src/app/global-search/generated/interactive-capabilities.json # src/web-ui/src/infrastructure/api/generated/productControl.ts
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
Two remote-device gap families found from a WeChat-driven CLI daemon:
/modelfailed withSession storage is unavailable: <id>because the bot read and changed models through this host's session store. The same local-only pattern also broke assistant mode: "switch assistant" claimed no assistants existed, new assistant sessions landed in the device's open project workspace (or failed when none was open), and resume showed no transcript preview.feature.detached-dispatchhad only "open UI" items, so on CLI the whole capability reported "no live presentation surface", and no product-control operation returned the account's device list. The Agent answered "only one device" from Remote Connect status, which describes just the executing host.Type and Areas
Type: bug fix / feature
Areas: Rust core (remote-connect bot, dispatch, product-control tool), product-domains contracts, CLI, desktop/Tauri, generated capability catalog and docs, agent prompts
Motivation / Impact
Bot (
remote_connect/bot/command_router.rs)/modelreadsget_model_catalogand appliesset_session_modelon the selected device.reasoning_presetis omitted because an explicit null would clear it.list_assistants) without switching the device's own active workspace.errorreplies are decoded as typedRemoteResponseerrors.Agent device list and dispatch
detached_dispatch_control.rsand owner facts onfeature.detached-dispatch:list-targets(Read): every same-account device withisCurrentDevice, online state, kind, model and OS, plus saved SSH targets.submit(Execute):workspacePathis scopedProductHostLocal,approvalPolicymust be explicit.status,list-jobs(Read) andcancel(Destructive).execute_dispatch_controlis shared by the Desktop binding, the CLI binding and the existingopenbitfun dispatch outboundcommand. Hosts supply only their account session and SSH manager.device:<id>orssh:<id>. This host is never a target, and offline devices fail without a local fallback.submit, so a job cannot fan out further dispatches.claw_mode.md,openbitfun_agent.mdand theOpenBitFunControldescription tell the Agent to readlist-targetsbefore stating a device count, and to dispatch only on request.Remote scenarios: remote control (IM bot driving another device) and Detached Dispatch (controller side, via the Agent) are the targets of this change. Peer Device Mode keeps requiring
product_control_native_v1for the new provider, which CLI peers do not advertise, so it stays explicitly unavailable there. The dispatch wire protocol (v6) and all target verbs are unchanged. Bot changes use only existingRemoteCommands, so older target hosts keep working.Upgrade compatibility: no persisted shapes change. The
dispatch outbound targetsoutput now uses the sharedlist-targetsshape introduced earlier this week.Verification
remote_device_flow_tests):/modellist and apply; assistant switching; resume with preview; assistant session creation without a workspace. All bot tests: core 76, services-integrations 71.cargo test -p openbitfun-product-domains --no-default-features(contract risk, scope and per-profile availability, including the refused nested submit)cargo test -p openbitfun-core --lib --features agent-runtime,ssh-remote,remote-connect,dispatch-store service::dispatch::agent_controlcargo test -p openbitfun-core --lib --no-default-features --features mcp-runtime,git agentic::tools::implementations::openbitfun_control_tool::testscargo test -p openbitfun-desktop --lib -- openbitfun_control_host::tests dispatch_api(catalog-to-Desktop binding guard)cargo test -p openbitfun-cli --bin openbitfun -- dispatch remote_control, including a new guard that every CLI-available provider operation has a CLI bindingcargo test -p openbitfun-agent-content --test prompt_catalog_contractspnpm run capabilities:check,pnpm run check:core-boundaries(+:test),pnpm run check:repo-hygiene, web-uiopenBitFunControlDiscoveryandProductControlAPItestsopenbitfun dispatch outbound targetssigned out (empty devices with a reason) and on a signed-in account (4 devices, the executing Mac marked current, offline devices flagged, SSH targets listed). No live WeChat run or real cross-device submit was performed.Checked refreshed upstream
mainand open PRs before implementation; none covered these gaps.Checklist