Skip to content

Commit 69ce226

Browse files
authored
Merge pull request #2932 from GCWing/gcwing/agent-harness-workspace-polish
feat: unify agent identities and refine agent and skill management
2 parents 7c6d90b + e2720e6 commit 69ce226

426 files changed

Lines changed: 9601 additions & 10444 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎OpenBitFun-Installer/src/i18n/generatedLocaleContract.ts‎

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,19 @@ export const SHARED_TERMS_BY_APP_LANGUAGE = {
6464
"workspace": "Workspace"
6565
},
6666
"modes": {
67-
"agentic": "Agentic Mode",
6867
"assistant": "Assistant Mode",
6968
"expert": "Expert Mode",
7069
"review": "Review Mode"
7170
},
7271
"agents": {
73-
"code": "Code Session",
74-
"cowork": "Cowork Session",
75-
"claw": "Claw",
72+
"Minimal": "Minimal",
73+
"Standard": "Standard",
74+
"Ultimate": "Ultimate",
75+
"Creative": "Creative",
76+
"Claw": "Assistant",
77+
"Cowork": "Cowork",
78+
"DeepResearch": "Deep Research",
79+
"ComputerUse": "Computer Use",
7680
"default": "Default Assistant"
7781
},
7882
"tools": {
@@ -113,15 +117,19 @@ export const SHARED_TERMS_BY_APP_LANGUAGE = {
113117
"workspace": "工作区"
114118
},
115119
"modes": {
116-
"agentic": "代理模式",
117120
"assistant": "助手模式",
118121
"expert": "专家模式",
119122
"review": "评审模式"
120123
},
121124
"agents": {
122-
"code": "代码会话",
123-
"cowork": "协作会话",
124-
"claw": "Claw",
125+
"Minimal": "极简",
126+
"Standard": "标准",
127+
"Ultimate": "极致",
128+
"Creative": "创造",
129+
"Claw": "助理",
130+
"Cowork": "办公协作",
131+
"DeepResearch": "深度研究",
132+
"ComputerUse": "电脑操作",
125133
"default": "默认助手"
126134
},
127135
"tools": {
@@ -162,15 +170,19 @@ export const SHARED_TERMS_BY_APP_LANGUAGE = {
162170
"workspace": "工作區"
163171
},
164172
"modes": {
165-
"agentic": "代理模式",
166173
"assistant": "助手模式",
167174
"expert": "專家模式",
168175
"review": "審查模式"
169176
},
170177
"agents": {
171-
"code": "程式碼會話",
172-
"cowork": "協作會話",
173-
"claw": "Claw",
178+
"Minimal": "極簡",
179+
"Standard": "標準",
180+
"Ultimate": "極致",
181+
"Creative": "創造",
182+
"Claw": "助理",
183+
"Cowork": "辦公協作",
184+
"DeepResearch": "深度研究",
185+
"ComputerUse": "電腦操作",
174186
"default": "預設助手"
175187
},
176188
"tools": {

‎design-system/packages/ui/README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ text buttons keep those hit targets while omitting the visible pill background
3535
and radius. Use native hover, pressed, focus, disabled, and loading behavior in
3636
addition to Design Lab's state specimens.
3737

38+
Hover and press feedback keeps controls at their resting size on desktop and
39+
mobile. Use semantic surface, border, content, shadow, and opacity states;
40+
do not add press scaling in components or host-wide semantic selectors.
41+
Explicit content zoom, loading indicators, and enter/exit motion remain owned
42+
by the component that needs them.
43+
3844
## Native scrollbars
3945

4046
`styles.css` owns scrollbar presentation inside `ThemeRoot` (or

‎design-system/packages/ui/src/mobile/MobileButton/MobileButton.module.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
font: inherit;
2020
font-size: var(--openbitfun-type-label-md-font-size);
2121
font-weight: var(--openbitfun-type-label-md-font-weight);
22-
transition: background-color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard), border-color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard), box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard), transform var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
22+
transition: background-color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard), border-color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard), box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
2323
}
2424

2525
.root[data-size="sm"] { min-block-size: var(--openbitfun-space-12); padding-inline: var(--openbitfun-space-3); font-size: var(--openbitfun-type-label-sm-font-size); }
@@ -33,7 +33,7 @@
3333
.root:hover:not(:disabled) { background: var(--openbitfun-color-action-neutral-surface-hover); box-shadow: var(--openbitfun-shadow-sm); }
3434
.root[data-appearance="primary"]:hover:not(:disabled) { background: var(--openbitfun-color-action-primary-hover); }
3535
}
36-
.root:active:not(:disabled) { background: var(--openbitfun-color-action-neutral-surface-pressed); transform: scale(0.98); }
36+
.root:active:not(:disabled) { background: var(--openbitfun-color-action-neutral-surface-pressed); }
3737
.root[data-appearance="primary"]:active:not(:disabled) { background: var(--openbitfun-color-action-primary-pressed); }
3838
.root:focus-visible { outline: var(--openbitfun-focus-width) solid var(--openbitfun-color-focus-ring); outline-offset: var(--openbitfun-focus-offset); }
3939
.root:disabled { color: var(--openbitfun-color-action-neutral-content-disabled); cursor: not-allowed; box-shadow: none; }

‎design-system/packages/ui/src/mobile/MobileComposer/MobileComposer.module.css‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
transition:
1919
min-block-size var(--openbitfun-motion-duration-base) var(--openbitfun-motion-easing-standard),
2020
border-radius var(--openbitfun-motion-duration-base) var(--openbitfun-motion-easing-standard),
21-
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
22-
transform var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
21+
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
2322
}
2423

2524
.root[data-interactive="true"] {
@@ -29,7 +28,6 @@
2928
}
3029

3130
.root[data-interactive="true"]:active {
32-
transform: scale(0.99);
3331
box-shadow: var(--openbitfun-shadow-sm);
3432
}
3533

‎design-system/packages/ui/src/mobile/MobileIconButton/MobileIconButton.module.css‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
2525
background-color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
2626
border-color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
27-
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
28-
transform var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
27+
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
2928
}
3029

3130
.root[data-size="sm"] {
@@ -58,7 +57,6 @@
5857
.root:is(:active, [data-openbitfun-preview-state="active"]):not(:disabled) {
5958
color: var(--openbitfun-color-content-primary);
6059
background: var(--openbitfun-color-action-neutral-surface-pressed);
61-
transform: scale(0.94);
6260
}
6361

6462
.root:is(:focus-visible, [data-openbitfun-preview-state="focus-visible"]) {

‎design-system/packages/ui/src/mobile/MobileListRow/MobileListRow.module.css‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
transition:
2121
background-color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
2222
border-color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
23-
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
24-
transform var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
23+
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
2524
}
2625

2726
.root[data-appearance="surface"] {
@@ -44,7 +43,6 @@
4443

4544
.root:is(:active, [data-openbitfun-preview-state="active"]):not(:disabled) {
4645
background: var(--openbitfun-color-action-neutral-surface-pressed);
47-
transform: scale(0.99);
4846
}
4947

5048
.root:is(:focus-visible, [data-openbitfun-preview-state="focus-visible"]) {

‎docs/architecture/product-architecture.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,3 +911,28 @@ WorkspaceInfo/WorkspaceIdentity 的运行操作由 Core 的 runtime extension tr
911911
原 Core 存储入口保留错误映射;可选 legacy-migration facade 保留旧导入路径,但不再由 product-full 启用。
912912
远程四种场景不提供迁移工具的执行入口;仅转换本机保存的连接记录,不连接远端。
913913
使用与发行契约以 [独立迁移器说明](../../src/apps/data-migrator/README.zh-CN.md) 为准。
914+
915+
916+
## Agent 身份与产品概念
917+
918+
Agent Harness 的唯一规范标识为 `Minimal`、`Standard`、`Ultimate`、`Creative`,分别显示为极简、标准、极致、创造。配置键、运行注册、会话状态和新持久化记录共用这些大小写固定的标识。共享源为 [Harness 身份契约](../../src/shared/agent-harness/contract.json),由 `pnpm run agent-harness:generate` 生成 Rust 和 TypeScript 类型,核心边界检查校验生成结果。
919+
920+
| 概念 | 负责的事实 | 例子 |
921+
| --- | --- | --- |
922+
| Agent Harness | 会话的执行策略、工具策略和协作方式 | Minimal、Standard、Ultimate、Creative |
923+
| 智能体(Agent) | 直接承接用户任务的角色 | 助理 Claw、办公协作 Cowork、深度研究 DeepResearch,以及自定义智能体 |
924+
| 子智能体(SubAgent) | 受父级委派的独立任务执行者 | ComputerUse、Explore、ResearchSpecialist、SwarmWorker |
925+
| 技能(Skill) | 执行者可发现和调用的能力资源 | 由技能注册表提供 |
926+
| 技能套件 | 现有的技能分组与各执行者的技能选择配置 | 保留分组、开关、逐项调整、按组保存和重置 |
927+
928+
来源(内置、用户、项目、外部)与角色分别建模。电脑操作属于子智能体;助理可在智能体管理页配置,但会话选择器继续遵守助理工作区的固定入口。技能套件从当前设备、工作区的真实目录中筛选支持 Skill 工具且可由本产品配置的执行者,不维护三项固定名单,不为缺少 Skill 能力的 Minimal 提供无效配置,也不将外部来源的只读定义当成本地可写配置。
929+
930+
会话选择器保留四项 Harness 和既有智能体子菜单。打开、选择、关闭、高亮、首轮锁定、新会话确认、跟随上次选择、固定默认值,以及助理、ACP、子会话限制均由原有交互规则负责。`other` 只代表菜单导航,不能写入运行身份。一个主会话选择一个可执行入口;Harness 和普通智能体不组成无依据的二重配置。
931+
932+
旧名只在明确的升级与协议适配边界读取。历史 `coding_shared` 配置键迁往 Standard,迁移同时保留工具、技能及子智能体覆盖;无法无损合并的冲突返回明确错误并保留原始文件。旧会话中的 Minimal 执行标记保留原有优先级。外部或带来源限定的身份不改名,未知身份保留并交由原有可用性判断处理。
933+
934+
Peer HostInvoke、Peer 事件和移动遥控在各自适配边界继续支持现有 v0 线协议,双向翻译产品身份字段;应用内状态和磁盘记录保持规范标识。工具参数、提示词正文、用户元数据和外部定义不参与通用翻译。旧 CLI 参数 `--harness-profile balanced` 的历史语义仍是保留显式 `--agent`,先解码语义再规范化身份。各发行能力集继续决定真正可执行的目录,命名统一不增加 CLI 或远程宿主的能力。
935+
936+
历史 API 名称(例如 get_available_modes)、agentic 事件通道和编译期提示词资源键是兼容协议,不是另一套 Agent 标识。小写图标、颜色 token 和模型推理强度属于各自独立领域,不通过大小写替换改变其语义。技能“已启用”或“运行时已选择”表示可用性与解析状态,不能表述为已经被 Agent 调用。
937+
938+
Detached Dispatch 的 SSH、账号设备 RPC 和 CLI 协议入口同样在传输边界保留现有协议标识,接收后立即规范化。目标持久化任务、会话和控制端观察记录使用规范身份;改名不改变协议版本、工作区归属或断线后目标独立执行的行为。按路径读写配置时,适配器只转换对应身份字段,保留未知配置字段;歧义别名在调用写入逻辑之前返回错误。

‎package.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"node": ">=22.12.0"
88
},
99
"scripts": {
10+
"agent-harness:generate": "node scripts/generate-agent-harness.mjs",
11+
"agent-harness:check": "node scripts/generate-agent-harness.mjs --check",
1012
"copy-monaco": "copyfiles -u 5 \"src/web-ui/node_modules/monaco-editor/min/vs/**/*\" src/web-ui/public/monaco-editor && node scripts/prune-monaco-nls.cjs",
1113
"generate-brand-assets": "node scripts/generate-brand-assets.mjs",
1214
"copy-assets": "pnpm run copy-monaco && pnpm run generate-brand-assets",
@@ -73,7 +75,7 @@
7375
"mobile:ui:generate": "node scripts/mobile-ui-design-system.mjs",
7476
"mobile:ui:check": "node scripts/mobile-ui-design-system.mjs --check && node scripts/mobile-ui-preview.mjs --check",
7577
"mobile:ui:preview": "node scripts/mobile-ui-design-system.mjs && node scripts/mobile-ui-preview.mjs",
76-
"check:core-boundaries": "node scripts/check-core-boundaries.mjs",
78+
"check:core-boundaries": "pnpm run agent-harness:check && node scripts/check-core-boundaries.mjs",
7779
"check:core-boundaries:test": "node --test scripts/check-core-boundaries.test.mjs",
7880
"check:github-config": "pnpm --dir src/web-ui exec node ../../scripts/check-github-config.mjs && node --test scripts/check-github-config.test.mjs",
7981
"test:release-packaging": "node --test scripts/release-channel.test.mjs scripts/desktop-tauri-build.test.mjs scripts/server-build.test.mjs scripts/version-generation.test.mjs scripts/generate-frontend-revision.test.mjs scripts/generate-brand-assets.test.mjs scripts/tauri-release-manifest.test.mjs OpenBitFun-Installer/scripts/build-installer.test.cjs",

‎scripts/check-core-boundaries.test.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ test('contract and AI adapter tests keep reviewed feature and failure-domain top
862862
name: 'core_type_contracts',
863863
path: 'tests/core_type_contracts.rs',
864864
leaves: [
865+
'tests/core_type_contracts/agent_identity.rs',
865866
'tests/core_type_contracts/session_contracts.rs',
866867
'tests/core_type_contracts/session_usage_contracts.rs',
867868
'tests/core_type_contracts/surface_contracts.rs',

‎scripts/core-boundaries/explicit-test-topology.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export const coreTypesIntegrationTestTargets = [
129129
name: 'core_type_contracts',
130130
path: 'tests/core_type_contracts.rs',
131131
leaves: [
132+
'tests/core_type_contracts/agent_identity.rs',
132133
'tests/core_type_contracts/session_contracts.rs',
133134
'tests/core_type_contracts/session_usage_contracts.rs',
134135
'tests/core_type_contracts/surface_contracts.rs',

0 commit comments

Comments
 (0)