Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/interactive-capabilities/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- generated by scripts/generate-interactive-capabilities.mjs; do not edit -->
# OpenBitFun 功能与设置目录 / OpenBitFun Features & Settings

OpenBitFun Playbook 当前包含 **24 个功能**和 **24 个设置页**,共 **48 个**用户可理解的条目、**369 项**有源码证据的子能力。每个条目有独立 Markdown,并直接服务于说明书网站、OpenBitFun 全局搜索和 `OpenBitFunControl` 智能体工具。
OpenBitFun Playbook 当前包含 **24 个功能**和 **24 个设置页**,共 **48 个**用户可理解的条目、**370 项**有源码证据的子能力。每个条目有独立 Markdown,并直接服务于说明书网站、OpenBitFun 全局搜索和 `OpenBitFunControl` 智能体工具。

OpenBitFun Playbook currently contains **24 features**, **24 settings pages**, and **369** source-backed sub-capabilities across **48** user-facing entries. Every entry has its own Markdown page and directly powers the website, in-app global search, and the `OpenBitFunControl` agent tool.
OpenBitFun Playbook currently contains **24 features**, **24 settings pages**, and **370** source-backed sub-capabilities across **48** user-facing entries. Every entry has its own Markdown page and directly powers the website, in-app global search, and the `OpenBitFunControl` agent tool.

## 唯一事实源 / Single source of truth

Expand All @@ -27,20 +27,20 @@ OpenBitFun Playbook currently contains **24 features**, **24 settings pages**, a
- Generated per-item interaction audit: `docs/interactive-capabilities/technical/product-control-open-audit.json`
- Generated low-level audit map: `docs/interactive-capabilities/technical/tauri-command-map.json`

说明书、网站、搜索和智能体只看“功能 + 设置 + 子能力”。每项子能力都必须引用已注册 Tauri Command 或可解析的源码标记;这些证据不会进入公开目录。当前 **703** 个 Tauri 命令只用于实现覆盖审计。产品 UI 交互源码会在生成和检查时扫描并校验,但不会保存成随普通 UI 改动频繁变化的版本化快照。
说明书、网站、搜索和智能体只看“功能 + 设置 + 子能力”。每项子能力都必须引用已注册 Tauri Command 或可解析的源码标记;这些证据不会进入公开目录。当前 **704** 个 Tauri 命令只用于实现覆盖审计。产品 UI 交互源码会在生成和检查时扫描并校验,但不会保存成随普通 UI 改动频繁变化的版本化快照。

Docs, website, search, and agents see only features, settings, and documented sub-capabilities. Every sub-capability must reference a registered Tauri command or a resolvable source marker; evidence is stripped from public projections. The **703** Tauri commands remain implementation-audit evidence only. Product UI interaction sources are scanned and validated during generation and checks, but are not stored as a versioned snapshot that churns with ordinary UI changes.
Docs, website, search, and agents see only features, settings, and documented sub-capabilities. Every sub-capability must reference a registered Tauri command or a resolvable source marker; evidence is stripped from public projections. The **704** Tauri commands remain implementation-audit evidence only. Product UI interaction sources are scanned and validated during generation and checks, but are not stored as a versioned snapshot that churns with ordinary UI changes.

## 控制边界 / Control boundary

- 每个子能力都明确标记为直接控制、委托给专用智能体工具、需交互打开或不支持;“打开页面”不会再被统计成“智能体已控制”。当前覆盖:直接 **63**、委托 **74**、需交互 **232**、不支持 **0**。
- 每个子能力都明确标记为直接控制、委托给专用智能体工具、需交互打开或不支持;“打开页面”不会再被统计成“智能体已控制”。当前覆盖:直接 **63**、委托 **74**、需交互 **233**、不支持 **0**。
- 稳定行为声明为带 JSON 输入契约的 `operations` 或 `options`,并绑定原生产品控制 Provider;智能体不接触原始 Tauri Command。
- `OpenBitFunControl list` 和 `search` 都返回带 `nextCursor` 的精简分页结果;目录可持续增长,不靠固定总量上限。完整目录和 369 项子能力都不会写入 system prompt。
- `OpenBitFunControl list` 和 `search` 都返回带 `nextCursor` 的精简分页结果;目录可持续增长,不靠固定总量上限。完整目录和 370 项子能力都不会写入 system prompt。
- 目录发现与契约读取不依赖 React 或可见窗口。普通配置型 option 统一由 Product Assembly 的共享 ConfigService 执行器读、写并回读,因此 Desktop、CLI 与 Headless 表面走同一份实现;只有宿主原生 operation/provider option 和界面导航按表面注册适配器,缺失时必须明确返回不可用,禁止静默回退本机。只读智能体只能发现和读取目录。

- Every documented item is classified as direct control, delegated Agent control, interactive opening, or unsupported; opening a page is never counted as direct control. Current coverage is **63 direct**, **74 delegated**, **232 interactive**, and **0 unsupported**.
- Every documented item is classified as direct control, delegated Agent control, interactive opening, or unsupported; opening a page is never counted as direct control. Current coverage is **63 direct**, **74 delegated**, **233 interactive**, and **0 unsupported**.
- Stable behavior becomes a typed `operation` or `option` with a JSON input contract and a native product-control provider. Agents never receive raw Tauri commands.
- `OpenBitFunControl list` and `search` return compact pages with a `nextCursor`; the catalog can grow without a fixed total-size ceiling. Neither the full catalog nor its 369 documented items enters the system prompt.
- `OpenBitFunControl list` and `search` return compact pages with a `nextCursor`; the catalog can grow without a fixed total-size ceiling. Neither the full catalog nor its 370 documented items enters the system prompt.
- Discovery and contract lookup do not depend on React or a visible window. Ordinary config-backed options are read, written, and read back by one Product Assembly ConfigService executor shared by Desktop, CLI, and headless surfaces. Only host-native operations/provider options and presentation routes install surface adapters; missing adapters return explicit unavailability without local fallback. Read-only agents may only discover and inspect entries.

## 防腐化门禁 / Anti-drift gates
Expand Down
68 changes: 65 additions & 3 deletions docs/interactive-capabilities/capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "OpenBitFun Playbook",
"origin": "https://playbook.openbitfun.com",
"source": "src/shared/interactive-capabilities/catalog.json",
"digest": "f592c3304b41651db62ca8afeff8bb8e3d56a3e49d6420eff960b3cfe9eb9294",
"digest": "6a6de5f67359bdd2aead1692c4afd1b748e601045004dc140dd73b92342dd2bc",
"ownerDigest": "6f0746578f3c56479f7c289bb05395dfe6917042f4d419de8c9a2f719d31f815",
"searchAcceptance": [
{
Expand Down Expand Up @@ -187,11 +187,11 @@
"features": 24,
"settings": 24,
"userFacing": 48,
"documentedItems": 369,
"documentedItems": 370,
"controlCoverage": {
"direct": 63,
"delegated": 74,
"interactive": 232,
"interactive": 233,
"unsupported": 0
}
},
Expand Down Expand Up @@ -18865,6 +18865,7 @@
"id": "setting.tools.desktop-control:query",
"capabilityId": "setting.tools.desktop-control",
"itemIds": [
"external-control",
"permissions",
"safety-posture"
],
Expand Down Expand Up @@ -18907,6 +18908,52 @@
"pageId": "tools.desktop-control"
}
},
{
"id": "setting.tools.desktop-control:open:external-control",
"capabilityId": "setting.tools.desktop-control",
"itemIds": [
"external-control"
],
"kind": "open",
"risk": "ui",
"executionHost": "presentationSurface",
"availability": {
"desktop": {
"available": true
},
"cli": {
"available": false,
"reason": "This delivery profile has no live presentation surface"
},
"peer": {
"available": true,
"requiredCapabilities": [
"product_control_v1",
"product_control_presentation_v1"
]
},
"remoteControl": {
"available": true
},
"detachedDispatch": {
"available": false,
"reason": "This delivery profile has no live presentation surface"
}
},
"inputSchema": {
"type": "object",
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"additionalProperties": true
},
"openReason": "visualSelection",
"presentationTarget": {
"kind": "settings",
"pageId": "tools.desktop-control"
}
},
{
"id": "setting.tools.desktop-control:open:permissions",
"capabilityId": "setting.tools.desktop-control",
Expand Down Expand Up @@ -35578,6 +35625,19 @@
"Locking down desktop input during regular coding: turn off Allow desktop control on this page—agents immediately lose desktop control even if OS permissions remain granted."
],
"items": [
{
"id": "external-control",
"titleZh": "为本机集成授权工作区",
"titleEn": "Authorize workspaces for local integrations",
"descriptionZh": "启用本机 HTTP 接口,为每个集成创建或撤销令牌。外部任务在桌面会话中运行。",
"descriptionEn": "Enable local HTTP access and issue or revoke workspace-scoped integration tokens. Submitted tasks run in desktop sessions.",
"control": {
"kind": "open",
"reasonCode": "visualSelection",
"reasonZh": "用户需要在桌面设置中选择此集成可以访问的工作区,并复制仅在创建时显示一次的令牌。",
"reasonEn": "In Desktop settings, the user chooses which workspaces the integration can access and copies the token while it is visible at creation."
}
},
{
"id": "permissions",
"titleZh": "查看“允许桌面控制”开关及“辅助功能”、“屏幕录制”系统授权状态并完成授权",
Expand Down Expand Up @@ -35675,6 +35735,8 @@
"Shows live grant status for both Accessibility (mouse/keyboard input) and Screen Recording (visual capture)",
"One-click permission request or direct jump into your operating system’s Privacy & Security settings",
"Works alongside single-window App Sharing, live control status cards, and immediate stop controls",
"为本机集成授权工作区",
"Authorize workspaces for local integrations",
"查看“允许桌面控制”开关及“辅助功能”、“屏幕录制”系统授权状态并完成授权",
"Inspect Allow desktop control plus Accessibility and Screen Recording grants and authorize in OS settings",
"结合应用级总开关、单窗口共享与主机边界安全管控桌面操作",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Manage the Allow desktop control master switch for native desktop GUI automation

## 完整功能清单 / Everything included

- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 为本机集成授权工作区
- Authorize workspaces for local integrations
- 说明:启用本机 HTTP 接口,为每个集成创建或撤销令牌。外部任务在桌面会话中运行。
- Why & how: Enable local HTTP access and issue or revoke workspace-scoped integration tokens. Submitted tasks run in desktop sessions.
- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 查看“允许桌面控制”开关及“辅助功能”、“屏幕录制”系统授权状态并完成授权
- Inspect Allow desktop control plus Accessibility and Screen Recording grants and authorize in OS settings
- 说明:在 macOS 上需同时授予“辅助功能”(用于模拟点击与键盘输入)和“屏幕录制”(用于截取目标画面)才能完整运行桌面自动化;未就绪时可直接点击“系统设置”跳转授权。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"schemaVersion": 1,
"generatedFrom": "src/shared/interactive-capabilities/catalog.json",
"catalogDigest": "f592c3304b41651db62ca8afeff8bb8e3d56a3e49d6420eff960b3cfe9eb9294",
"count": 232,
"catalogDigest": "6a6de5f67359bdd2aead1692c4afd1b748e601045004dc140dd73b92342dd2bc",
"count": 233,
"reasonCounts": {
"externalAuth": 4,
"secretEntry": 6,
"unstructuredInteraction": 195,
"visualSelection": 27
"visualSelection": 28
},
"entries": [
{
Expand Down Expand Up @@ -3425,6 +3425,22 @@
"command:browser_control_enable_default_cdp"
]
},
{
"capabilityId": "setting.tools.desktop-control",
"itemId": "external-control",
"titleZh": "为本机集成授权工作区",
"titleEn": "Authorize workspaces for local integrations",
"reasonCode": "visualSelection",
"reasonZh": "用户需要在桌面设置中选择此集成可以访问的工作区,并复制仅在创建时显示一次的令牌。",
"reasonEn": "In Desktop settings, the user chooses which workspaces the integration can access and copies the token while it is visible at creation.",
"presentationTarget": {
"kind": "settings",
"pageId": "tools.desktop-control"
},
"evidence": [
"command:desktop_external_control"
]
},
{
"capabilityId": "setting.tools.desktop-control",
"itemId": "permissions",
Expand Down
26 changes: 21 additions & 5 deletions docs/interactive-capabilities/technical/tauri-command-map.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"schemaVersion": 2,
"generatedFrom": "src/shared/interactive-capabilities/catalog.json",
"catalogDigest": "f592c3304b41651db62ca8afeff8bb8e3d56a3e49d6420eff960b3cfe9eb9294",
"commandCount": 703,
"catalogDigest": "6a6de5f67359bdd2aead1692c4afd1b748e601045004dc140dd73b92342dd2bc",
"commandCount": 704,
"coverage": {
"commandCount": 703,
"documentedCommandCount": 637,
"commandCount": 704,
"documentedCommandCount": 638,
"implementationCommandCount": 66,
"implementationDigest": "22a8353380694e1246a4b15ec83c4f5a10c781fd5dfb0a0fb9d2a135e53380b6"
},
Expand Down Expand Up @@ -1716,7 +1716,7 @@
"visibility": "documented",
"rustPath": "api::agentic_api::create_session",
"sourceFile": "src/apps/desktop/src/api/agentic_api.rs",
"signature": "fn create_session( coordinator: State<'_, Arc<ConversationCoordinator>>, app_state: State<'_, AppState>, runtime: State<'_, DesktopRuntimeContext>, mut request: CreateSessionRequest, ) -> Result<CreateSessionResponse, String>",
"signature": "fn create_session( coordinator: State<'_, Arc<ConversationCoordinator>>, app_state: State<'_, AppState>, runtime: State<'_, DesktopRuntimeContext>, request: CreateSessionRequest, ) -> Result<CreateSessionResponse, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
Expand Down Expand Up @@ -2155,6 +2155,22 @@
"signature": "fn desktop_card_set_visible( cards: State<'_, Arc<DesktopCards>>, request: DesktopCardSetVisibleRequest, ) -> Result<DesktopCardRecord, String>",
"remoteWorkspacePolicy": "LocalOnly"
},
{
"id": "desktop_external_control",
"moduleId": "external_control",
"capabilityId": "setting.tools.desktop-control",
"capabilityIds": [
"setting.tools.desktop-control"
],
"documentedItemIds": [
"setting.tools.desktop-control:external-control"
],
"visibility": "documented",
"rustPath": "external_control::desktop_external_control",
"sourceFile": "src/apps/desktop/src/external_control.rs",
"signature": "fn desktop_external_control( webview: tauri::Webview, app: AppHandle, request: ControllerSettingsRequest, ) -> Result<Value, String>",
"remoteWorkspacePolicy": "WorkspaceAgnostic"
},
{
"id": "dispatch_answer",
"moduleId": "dispatch",
Expand Down
27 changes: 27 additions & 0 deletions src/apps/desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1150,3 +1150,30 @@ directory together with `workspace_data.json` in a full backup. A workspace meta
export does not embed image bytes; missing assets display the default icon with a load warning
and preserve the saved reference. Unreferenced assets are retained; resetting an icon does
not delete another record's shared image. Unknown icon versions remain intact.

## Control Desktop from a local application

In **Settings → Browser & desktop control → External control**, enable local HTTP access. Choose a listening port (default 38371), name the integration, select its local project workspaces and create a token. Copy the token while it is displayed. Enter a browser origin only for a web page connecting directly. For a task board with its own backend, keep the token in that backend. Each integration can access only the sessions it creates. Revoke its token in the same settings section.

Send requests to the API address shown in Settings with an `Authorization: Bearer <token>` header. The listener binds to IPv4 loopback. The workspace ID comes from the catalog on this desktop. The following example uses a token supplied through the environment.

```sh
base=http://127.0.0.1:38371/v1
curl -sS -H "Authorization: Bearer $OBF_TOKEN" "$base/workspaces"

curl -sS -H "Authorization: Bearer $OBF_TOKEN" -H 'Content-Type: application/json' \
-d '{"workspaceId":"WORKSPACE_ID","title":"Review issue 17","prompt":"Summarize the affected code","idempotencyKey":"issue-17-attempt-1"}' \
"$base/turns"
```

| Request | Behavior |
| --- | --- |
| `GET /v1/capabilities` | Read the API version, execution host and supported operations. |
| `GET /v1/workspaces` | List eligible local projects granted to this token. |
| `POST /v1/turns` | Create a regular desktop session and start its first turn. Returns HTTP 202 with `sessionId`, `turnId`, `workspaceId` and admission state. To continue a session, send its `sessionId` and a fresh idempotency key, omitting the title. |
| `GET /v1/turns/{turnId}` | Read current status, waiting reason through `awaiting_approval` or `awaiting_input`, and the terminal reply or error when available. |
| `GET /v1/turns/{turnId}/events` | Subscribe to SSE `snapshot` events with the same bearer header. Use streaming fetch in a browser. Reconnect to receive the current snapshot. |
| `POST /v1/turns/{turnId}/cancel` | Request cancellation of this turn. Read status to observe settlement. |
| `POST /v1/turns/{turnId}/open` | Bring the desktop window forward and request navigation to the owning session. |

Repeat a submission with the same key and payload after a lost response. Reusing the key for different content returns HTTP 409. A busy session also returns 409. A browser disconnect leaves an accepted turn running in Desktop. If Desktop exits during handoff, `outcome_unknown` preserves the original IDs for inspection. Desktop does not replay the prompt automatically. Busy work retains Desktop's normal tool and question handling. Remote workspaces, peer hosts and detached workers are outside this listener's execution scope.
Loading
Loading