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 当前包含 **22 个功能**和 **21 个设置页**,共 **43 个**用户可理解的条目、**324 项**有源码证据的子能力。每个条目有独立 Markdown,并直接服务于说明书网站、OpenBitFun 全局搜索和 `OpenBitFunControl` 智能体工具。
OpenBitFun Playbook 当前包含 **22 个功能**和 **21 个设置页**,共 **43 个**用户可理解的条目、**325 项**有源码证据的子能力。每个条目有独立 Markdown,并直接服务于说明书网站、OpenBitFun 全局搜索和 `OpenBitFunControl` 智能体工具。

OpenBitFun Playbook currently contains **22 features**, **21 settings pages**, and **324** source-backed sub-capabilities across **43** 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 **22 features**, **21 settings pages**, and **325** source-backed sub-capabilities across **43** 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 **22 features**, **21 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 或可解析的源码标记;这些证据不会进入公开目录。当前 **669** 个 Tauri 命令只用于实现覆盖审计。产品 UI 交互源码会在生成和检查时扫描并校验,但不会保存成随普通 UI 改动频繁变化的版本化快照。
说明书、网站、搜索和智能体只看“功能 + 设置 + 子能力”。每项子能力都必须引用已注册 Tauri Command 或可解析的源码标记;这些证据不会进入公开目录。当前 **670** 个 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 **669** 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 **670** 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

- 每个子能力都明确标记为直接控制、委托给专用智能体工具、需交互打开或不支持;“打开页面”不会再被统计成“智能体已控制”。当前覆盖:直接 **49**、委托 **62**、需交互 **213**、不支持 **0**。
- 每个子能力都明确标记为直接控制、委托给专用智能体工具、需交互打开或不支持;“打开页面”不会再被统计成“智能体已控制”。当前覆盖:直接 **49**、委托 **62**、需交互 **214**、不支持 **0**。
- 稳定行为声明为带 JSON 输入契约的 `operations` 或 `options`,并绑定原生产品控制 Provider;智能体不接触原始 Tauri Command。
- `OpenBitFunControl list` 和 `search` 都返回带 `nextCursor` 的精简分页结果;目录可持续增长,不靠固定总量上限。完整目录和 324 项子能力都不会写入 system prompt。
- `OpenBitFunControl list` 和 `search` 都返回带 `nextCursor` 的精简分页结果;目录可持续增长,不靠固定总量上限。完整目录和 325 项子能力都不会写入 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 **49 direct**, **62 delegated**, **213 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 **49 direct**, **62 delegated**, **214 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 324 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 325 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
66 changes: 63 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": "f965bcc92d234b79484b5ec6a2fbd817c40e4c78119dd41b804fbbce3876fa5a",
"digest": "e05dbc222e1267523832f82d6392701ab011c9d8d5ad1582dbe407904dc80d3d",
"ownerDigest": "2269c2432e5db44706b2bce44df3c60672141a47c36141aeb1257ea7fd2507f8",
"searchAcceptance": [
{
Expand Down Expand Up @@ -138,11 +138,11 @@
"features": 22,
"settings": 21,
"userFacing": 43,
"documentedItems": 324,
"documentedItems": 325,
"controlCoverage": {
"direct": 49,
"delegated": 62,
"interactive": 213,
"interactive": 214,
"unsupported": 0
}
},
Expand Down Expand Up @@ -1418,6 +1418,7 @@
"capabilityId": "feature.personal-assistants",
"itemIds": [
"assistant-gallery",
"assistant-open-close",
"primary-delete-reset",
"identity-avatar",
"persona-documents",
Expand Down Expand Up @@ -1513,6 +1514,52 @@
"sceneId": "profile"
}
},
{
"id": "feature.personal-assistants:open:assistant-open-close",
"capabilityId": "feature.personal-assistants",
"itemIds": [
"assistant-open-close"
],
"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": "scene",
"sceneId": "profile"
}
},
{
"id": "feature.personal-assistants:open:primary-delete-reset",
"capabilityId": "feature.personal-assistants",
Expand Down Expand Up @@ -19965,6 +20012,17 @@
"reasonEn": "“Browse existing assistants, create a new one, and review each assistant's identity and capability summary” spans multiple live-state-dependent steps and currently has no single structured Command that can deterministically complete the whole workflow; the Agent opens the exact entry and keeps the remaining interaction visible to the user."
}
},
{
"id": "assistant-open-close",
"titleZh": "关闭侧栏中的助理并取消正在运行的会话,保留配置和历史,之后从助理空间重新打开",
"titleEn": "Close sidebar assistants and cancel running sessions, preserve configuration and history, and reopen them from the assistant gallery",
"control": {
"kind": "open",
"reasonCode": "visualSelection",
"reasonZh": "关闭操作依赖用户选择的助理;助理空间保留完整目录,并提供重新打开入口。",
"reasonEn": "Closing depends on the assistant selected by the user; the gallery retains the complete catalog and provides a reopen action."
}
},
{
"id": "primary-delete-reset",
"titleZh": "设为主助理、删除非主助理,或将助理工作区重置为默认状态",
Expand Down Expand Up @@ -20123,6 +20181,8 @@
"Configure default Skills, built-in tools, and MCP tools",
"浏览已有助理、创建新助理并查看每个助理的身份与能力概览",
"Browse existing assistants, create a new one, and review each assistant's identity and capability summary",
"关闭侧栏中的助理并取消正在运行的会话,保留配置和历史,之后从助理空间重新打开",
"Close sidebar assistants and cancel running sessions, preserve configuration and history, and reopen them from the assistant gallery",
"设为主助理、删除非主助理,或将助理工作区重置为默认状态",
"Set the primary assistant, delete non-primary assistants, or reset an assistant workspace to defaults",
"编辑助理名称、角色类型和气质,并选择官方头像、Emoji 或自定义头像字符",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Create and manage persistent AI assistants, define their identity and persona, c

- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 浏览已有助理、创建新助理并查看每个助理的身份与能力概览
- Browse existing assistants, create a new one, and review each assistant's identity and capability summary
- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 关闭侧栏中的助理并取消正在运行的会话,保留配置和历史,之后从助理空间重新打开
- Close sidebar assistants and cancel running sessions, preserve configuration and history, and reopen them from the assistant gallery
- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 设为主助理、删除非主助理,或将助理工作区重置为默认状态
- Set the primary assistant, delete non-primary assistants, or reset an assistant workspace to defaults
- **智能体可定位入口,需交互完成 / Agent opens; interaction required** · 编辑助理名称、角色类型和气质,并选择官方头像、Emoji 或自定义头像字符
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": "f965bcc92d234b79484b5ec6a2fbd817c40e4c78119dd41b804fbbce3876fa5a",
"count": 213,
"catalogDigest": "e05dbc222e1267523832f82d6392701ab011c9d8d5ad1582dbe407904dc80d3d",
"count": 214,
"reasonCounts": {
"externalAuth": 4,
"secretEntry": 5,
"unstructuredInteraction": 185,
"visualSelection": 19
"visualSelection": 20
},
"entries": [
{
Expand Down Expand Up @@ -353,9 +353,29 @@
},
"evidence": [
"command:create_assistant_workspace",
"command:get_assistant_workspaces",
"source:src/web-ui/src/app/scenes/profile/views/NurseryGallery.tsx#NurseryGallery"
]
},
{
"capabilityId": "feature.personal-assistants",
"itemId": "assistant-open-close",
"titleZh": "关闭侧栏中的助理并取消正在运行的会话,保留配置和历史,之后从助理空间重新打开",
"titleEn": "Close sidebar assistants and cancel running sessions, preserve configuration and history, and reopen them from the assistant gallery",
"reasonCode": "visualSelection",
"reasonZh": "关闭操作依赖用户选择的助理;助理空间保留完整目录,并提供重新打开入口。",
"reasonEn": "Closing depends on the assistant selected by the user; the gallery retains the complete catalog and provides a reopen action.",
"presentationTarget": {
"kind": "scene",
"sceneId": "profile"
},
"evidence": [
"command:close_workspace",
"command:open_workspace",
"source:src/web-ui/src/app/components/NavPanel/sections/workspaces/WorkspaceItem.tsx#handleCloseWorkspace",
"source:src/web-ui/src/app/scenes/profile/views/NurseryGallery.tsx#handleOpenAssistant"
]
},
{
"capabilityId": "feature.personal-assistants",
"itemId": "primary-delete-reset",
Expand Down
32 changes: 26 additions & 6 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": "f965bcc92d234b79484b5ec6a2fbd817c40e4c78119dd41b804fbbce3876fa5a",
"commandCount": 669,
"catalogDigest": "e05dbc222e1267523832f82d6392701ab011c9d8d5ad1582dbe407904dc80d3d",
"commandCount": 670,
"coverage": {
"commandCount": 669,
"documentedCommandCount": 621,
"commandCount": 670,
"documentedCommandCount": 622,
"implementationCommandCount": 48,
"implementationDigest": "f6d38a24a70708988cb47ada81d07eccf0668684e8734c9ee5155b9ffa7e3db8"
},
Expand Down Expand Up @@ -1285,11 +1285,13 @@
{
"id": "close_workspace",
"moduleId": "commands",
"capabilityId": "feature.projects",
"capabilityId": null,
"capabilityIds": [
"feature.personal-assistants",
"feature.projects"
],
"documentedItemIds": [
"feature.personal-assistants:assistant-open-close",
"feature.projects:close-switch-reorder"
],
"visibility": "documented",
Expand Down Expand Up @@ -2792,6 +2794,22 @@
"signature": "fn get_app_version( app: AppHandle, request: GetAppVersionRequest, ) -> Result<String, String>",
"remoteWorkspacePolicy": "WorkspaceAgnostic"
},
{
"id": "get_assistant_workspaces",
"moduleId": "commands",
"capabilityId": "feature.personal-assistants",
"capabilityIds": [
"feature.personal-assistants"
],
"documentedItemIds": [
"feature.personal-assistants:assistant-gallery"
],
"visibility": "documented",
"rustPath": "get_assistant_workspaces",
"sourceFile": "src/apps/desktop/src/api/commands.rs",
"signature": "fn get_assistant_workspaces( state: State<'_, AppState>, ) -> Result<Vec<WorkspaceInfoDto>, String>",
"remoteWorkspacePolicy": "WorkspaceAgnostic"
},
{
"id": "get_available_modes",
"moduleId": "agentic",
Expand Down Expand Up @@ -6361,11 +6379,13 @@
{
"id": "open_workspace",
"moduleId": "commands",
"capabilityId": "feature.projects",
"capabilityId": null,
"capabilityIds": [
"feature.personal-assistants",
"feature.projects"
],
"documentedItemIds": [
"feature.personal-assistants:assistant-open-close",
"feature.projects:open-create"
],
"visibility": "documented",
Expand Down
22 changes: 22 additions & 0 deletions src/apps/desktop/src/api/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct WorkspaceStateSnapshot {
current_workspace: Option<WorkspaceInfoDto>,
recent_workspaces: Vec<WorkspaceInfoDto>,
opened_workspaces: Vec<WorkspaceInfoDto>,
assistant_workspaces: Vec<WorkspaceInfoDto>,
primary_assistant_workspace_id: Option<String>,
legacy_remote_workspace: Option<crate::api::RemoteWorkspace>,
}
Expand All @@ -51,6 +52,7 @@ pub struct WorkspaceStartupStateSnapshotDto {
pub current_workspace: Option<WorkspaceInfoDto>,
pub recent_workspaces: Vec<WorkspaceInfoDto>,
pub opened_workspaces: Vec<WorkspaceInfoDto>,
pub assistant_workspaces: Vec<WorkspaceInfoDto>,
pub primary_assistant_workspace_id: Option<String>,
pub legacy_remote_workspace: Option<crate::api::RemoteWorkspace>,
}
Expand Down Expand Up @@ -1979,6 +1981,12 @@ async fn collect_workspace_state_snapshot(state: &State<'_, AppState>) -> Worksp
current_workspace,
recent_workspaces,
opened_workspaces,
assistant_workspaces: workspace_service
.get_assistant_workspaces()
.await
.iter()
.map(WorkspaceInfoDto::from_workspace_info)
.collect(),
primary_assistant_workspace_id,
legacy_remote_workspace,
}
Expand Down Expand Up @@ -2096,6 +2104,7 @@ async fn initialize_workspace_startup_state_impl(
current_workspace: snapshot.current_workspace,
recent_workspaces: snapshot.recent_workspaces,
opened_workspaces: snapshot.opened_workspaces,
assistant_workspaces: snapshot.assistant_workspaces,
primary_assistant_workspace_id: snapshot.primary_assistant_workspace_id,
legacy_remote_workspace: snapshot.legacy_remote_workspace,
})
Expand Down Expand Up @@ -2169,6 +2178,19 @@ async fn cleanup_invalid_workspaces_impl(
}
}

#[tauri::command]
pub async fn get_assistant_workspaces(
state: State<'_, AppState>,
) -> Result<Vec<WorkspaceInfoDto>, String> {
Ok(state
.workspace_service
.get_assistant_workspaces()
.await
.iter()
.map(WorkspaceInfoDto::from_workspace_info)
.collect())
}

#[tauri::command]
pub async fn get_opened_workspaces(
state: State<'_, AppState>,
Expand Down
1 change: 1 addition & 0 deletions src/apps/desktop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,7 @@ pub async fn run() {
remove_recent_workspace,
cleanup_invalid_workspaces,
get_opened_workspaces,
get_assistant_workspaces,
open_workspace,
open_remote_workspace,
create_assistant_workspace,
Expand Down
3 changes: 3 additions & 0 deletions src/crates/assembly/core/AGENTS-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,6 @@ cargo test -p openbitfun-core --no-default-features --features <minimal-features
feature-free facade 改动使用第一种,单一 feature 边界改动使用第二种,行为改动使用第三种。
只有 Cargo feature、依赖方向或 test-target 布局变化时才运行 `pnpm run check:core-boundaries`。
workspace check 与产品全量测试由 CI 兜底,不是 Core 默认预检。仅改文档时运行 `git diff --check`。

助理发现、打开状态持久化和按工作区 ID 重新打开的聚焦验证:
`cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib service::workspace::service::tests::assistant_`。
Loading
Loading