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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 24 additions & 12 deletions OpenBitFun-Installer/src/i18n/generatedLocaleContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,19 @@ export const SHARED_TERMS_BY_APP_LANGUAGE = {
"workspace": "Workspace"
},
"modes": {
"agentic": "Agentic Mode",
"assistant": "Assistant Mode",
"expert": "Expert Mode",
"review": "Review Mode"
},
"agents": {
"code": "Code Session",
"cowork": "Cowork Session",
"claw": "Claw",
"Minimal": "Minimal",
"Standard": "Standard",
"Ultimate": "Ultimate",
"Creative": "Creative",
"Claw": "Assistant",
"Cowork": "Cowork",
"DeepResearch": "Deep Research",
"ComputerUse": "Computer Use",
"default": "Default Assistant"
},
"tools": {
Expand Down Expand Up @@ -113,15 +117,19 @@ export const SHARED_TERMS_BY_APP_LANGUAGE = {
"workspace": "工作区"
},
"modes": {
"agentic": "代理模式",
"assistant": "助手模式",
"expert": "专家模式",
"review": "评审模式"
},
"agents": {
"code": "代码会话",
"cowork": "协作会话",
"claw": "Claw",
"Minimal": "极简",
"Standard": "标准",
"Ultimate": "极致",
"Creative": "创造",
"Claw": "助理",
"Cowork": "办公协作",
"DeepResearch": "深度研究",
"ComputerUse": "电脑操作",
"default": "默认助手"
},
"tools": {
Expand Down Expand Up @@ -162,15 +170,19 @@ export const SHARED_TERMS_BY_APP_LANGUAGE = {
"workspace": "工作區"
},
"modes": {
"agentic": "代理模式",
"assistant": "助手模式",
"expert": "專家模式",
"review": "審查模式"
},
"agents": {
"code": "程式碼會話",
"cowork": "協作會話",
"claw": "Claw",
"Minimal": "極簡",
"Standard": "標準",
"Ultimate": "極致",
"Creative": "創造",
"Claw": "助理",
"Cowork": "辦公協作",
"DeepResearch": "深度研究",
"ComputerUse": "電腦操作",
"default": "預設助手"
},
"tools": {
Expand Down
6 changes: 6 additions & 0 deletions design-system/packages/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ text buttons keep those hit targets while omitting the visible pill background
and radius. Use native hover, pressed, focus, disabled, and loading behavior in
addition to Design Lab's state specimens.

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

## Native scrollbars

`styles.css` owns scrollbar presentation inside `ThemeRoot` (or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
font: inherit;
font-size: var(--openbitfun-type-label-md-font-size);
font-weight: var(--openbitfun-type-label-md-font-weight);
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);
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);
}

.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); }
Expand All @@ -33,7 +33,7 @@
.root:hover:not(:disabled) { background: var(--openbitfun-color-action-neutral-surface-hover); box-shadow: var(--openbitfun-shadow-sm); }
.root[data-appearance="primary"]:hover:not(:disabled) { background: var(--openbitfun-color-action-primary-hover); }
}
.root:active:not(:disabled) { background: var(--openbitfun-color-action-neutral-surface-pressed); transform: scale(0.98); }
.root:active:not(:disabled) { background: var(--openbitfun-color-action-neutral-surface-pressed); }
.root[data-appearance="primary"]:active:not(:disabled) { background: var(--openbitfun-color-action-primary-pressed); }
.root:focus-visible { outline: var(--openbitfun-focus-width) solid var(--openbitfun-color-focus-ring); outline-offset: var(--openbitfun-focus-offset); }
.root:disabled { color: var(--openbitfun-color-action-neutral-content-disabled); cursor: not-allowed; box-shadow: none; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
transition:
min-block-size var(--openbitfun-motion-duration-base) var(--openbitfun-motion-easing-standard),
border-radius var(--openbitfun-motion-duration-base) 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);
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
}

.root[data-interactive="true"] {
Expand All @@ -29,7 +28,6 @@
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
color var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard),
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);
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
}

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

.root:is(:focus-visible, [data-openbitfun-preview-state="focus-visible"]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
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);
box-shadow var(--openbitfun-motion-duration-fast) var(--openbitfun-motion-easing-standard);
}

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

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

.root:is(:focus-visible, [data-openbitfun-preview-state="focus-visible"]) {
Expand Down
25 changes: 25 additions & 0 deletions docs/architecture/product-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -911,3 +911,28 @@ WorkspaceInfo/WorkspaceIdentity 的运行操作由 Core 的 runtime extension tr
原 Core 存储入口保留错误映射;可选 legacy-migration facade 保留旧导入路径,但不再由 product-full 启用。
远程四种场景不提供迁移工具的执行入口;仅转换本机保存的连接记录,不连接远端。
使用与发行契约以 [独立迁移器说明](../../src/apps/data-migrator/README.zh-CN.md) 为准。


## Agent 身份与产品概念

Agent Harness 的唯一规范标识为 `Minimal`、`Standard`、`Ultimate`、`Creative`,分别显示为极简、标准、极致、创造。配置键、运行注册、会话状态和新持久化记录共用这些大小写固定的标识。共享源为 [Harness 身份契约](../../src/shared/agent-harness/contract.json),由 `pnpm run agent-harness:generate` 生成 Rust 和 TypeScript 类型,核心边界检查校验生成结果。

| 概念 | 负责的事实 | 例子 |
| --- | --- | --- |
| Agent Harness | 会话的执行策略、工具策略和协作方式 | Minimal、Standard、Ultimate、Creative |
| 智能体(Agent) | 直接承接用户任务的角色 | 助理 Claw、办公协作 Cowork、深度研究 DeepResearch,以及自定义智能体 |
| 子智能体(SubAgent) | 受父级委派的独立任务执行者 | ComputerUse、Explore、ResearchSpecialist、SwarmWorker |
| 技能(Skill) | 执行者可发现和调用的能力资源 | 由技能注册表提供 |
| 技能套件 | 现有的技能分组与各执行者的技能选择配置 | 保留分组、开关、逐项调整、按组保存和重置 |

来源(内置、用户、项目、外部)与角色分别建模。电脑操作属于子智能体;助理可在智能体管理页配置,但会话选择器继续遵守助理工作区的固定入口。技能套件从当前设备、工作区的真实目录中筛选支持 Skill 工具且可由本产品配置的执行者,不维护三项固定名单,不为缺少 Skill 能力的 Minimal 提供无效配置,也不将外部来源的只读定义当成本地可写配置。

会话选择器保留四项 Harness 和既有智能体子菜单。打开、选择、关闭、高亮、首轮锁定、新会话确认、跟随上次选择、固定默认值,以及助理、ACP、子会话限制均由原有交互规则负责。`other` 只代表菜单导航,不能写入运行身份。一个主会话选择一个可执行入口;Harness 和普通智能体不组成无依据的二重配置。

旧名只在明确的升级与协议适配边界读取。历史 `coding_shared` 配置键迁往 Standard,迁移同时保留工具、技能及子智能体覆盖;无法无损合并的冲突返回明确错误并保留原始文件。旧会话中的 Minimal 执行标记保留原有优先级。外部或带来源限定的身份不改名,未知身份保留并交由原有可用性判断处理。

Peer HostInvoke、Peer 事件和移动遥控在各自适配边界继续支持现有 v0 线协议,双向翻译产品身份字段;应用内状态和磁盘记录保持规范标识。工具参数、提示词正文、用户元数据和外部定义不参与通用翻译。旧 CLI 参数 `--harness-profile balanced` 的历史语义仍是保留显式 `--agent`,先解码语义再规范化身份。各发行能力集继续决定真正可执行的目录,命名统一不增加 CLI 或远程宿主的能力。

历史 API 名称(例如 get_available_modes)、agentic 事件通道和编译期提示词资源键是兼容协议,不是另一套 Agent 标识。小写图标、颜色 token 和模型推理强度属于各自独立领域,不通过大小写替换改变其语义。技能“已启用”或“运行时已选择”表示可用性与解析状态,不能表述为已经被 Agent 调用。

Detached Dispatch 的 SSH、账号设备 RPC 和 CLI 协议入口同样在传输边界保留现有协议标识,接收后立即规范化。目标持久化任务、会话和控制端观察记录使用规范身份;改名不改变协议版本、工作区归属或断线后目标独立执行的行为。按路径读写配置时,适配器只转换对应身份字段,保留未知配置字段;歧义别名在调用写入逻辑之前返回错误。
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"node": ">=22.12.0"
},
"scripts": {
"agent-harness:generate": "node scripts/generate-agent-harness.mjs",
"agent-harness:check": "node scripts/generate-agent-harness.mjs --check",
"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",
"generate-brand-assets": "node scripts/generate-brand-assets.mjs",
"copy-assets": "pnpm run copy-monaco && pnpm run generate-brand-assets",
Expand Down Expand Up @@ -73,7 +75,7 @@
"mobile:ui:generate": "node scripts/mobile-ui-design-system.mjs",
"mobile:ui:check": "node scripts/mobile-ui-design-system.mjs --check && node scripts/mobile-ui-preview.mjs --check",
"mobile:ui:preview": "node scripts/mobile-ui-design-system.mjs && node scripts/mobile-ui-preview.mjs",
"check:core-boundaries": "node scripts/check-core-boundaries.mjs",
"check:core-boundaries": "pnpm run agent-harness:check && node scripts/check-core-boundaries.mjs",
"check:core-boundaries:test": "node --test scripts/check-core-boundaries.test.mjs",
"check:github-config": "pnpm --dir src/web-ui exec node ../../scripts/check-github-config.mjs && node --test scripts/check-github-config.test.mjs",
"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",
Expand Down
1 change: 1 addition & 0 deletions scripts/check-core-boundaries.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ test('contract and AI adapter tests keep reviewed feature and failure-domain top
name: 'core_type_contracts',
path: 'tests/core_type_contracts.rs',
leaves: [
'tests/core_type_contracts/agent_identity.rs',
'tests/core_type_contracts/session_contracts.rs',
'tests/core_type_contracts/session_usage_contracts.rs',
'tests/core_type_contracts/surface_contracts.rs',
Expand Down
1 change: 1 addition & 0 deletions scripts/core-boundaries/explicit-test-topology.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export const coreTypesIntegrationTestTargets = [
name: 'core_type_contracts',
path: 'tests/core_type_contracts.rs',
leaves: [
'tests/core_type_contracts/agent_identity.rs',
'tests/core_type_contracts/session_contracts.rs',
'tests/core_type_contracts/session_usage_contracts.rs',
'tests/core_type_contracts/surface_contracts.rs',
Expand Down
2 changes: 1 addition & 1 deletion scripts/core-boundaries/rules/feature-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export const optionalDependencyFeatureOwnerRules = [
{ depName: 'openbitfun-agent-workflows', ownerFeatures: ['deep-research'] },
{
depName: 'openbitfun-core-types',
ownerFeatures: ['deep-research', 'remote-connect', 'speech'],
ownerFeatures: ['deep-research', 'remote-connect', 'remote-ssh-concrete', 'speech'],
},
{ depName: 'openbitfun-product-domains', ownerFeatures: ['account-identity', 'canvas-runtime', 'function-agents', 'hook-import', 'miniapp-market', 'miniapp-runtime', 'miniapp-storage', 'plugin-source', 'remote-connect'] },
{ depName: 'openbitfun-runtime-ports', ownerFeatures: ['deep-research', 'git', 'remote-connect', 'remote-ssh', 'remote-ssh-concrete', 'script-tool-runtime', 'web-tools'] },
Expand Down
16 changes: 8 additions & 8 deletions scripts/core-boundaries/rules/source/forbidden-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1568,19 +1568,19 @@ export const forbiddenContentRules = [
path: 'src/crates/assembly/core/src/agentic/agents/mod.rs',
patterns: [
{
regex: /\bpub const SHARED_CODING_MODE_PROMPT_TEMPLATE\b/,
regex: /\bpub const STANDARD_HARNESS_PROMPT_TEMPLATE\b/,
message:
'core agent mode module must not own shared coding-mode prompt facts; use openbitfun-agent-runtime agents',
'core agent mode module must not own Standard Harness prompt facts; use openbitfun-agent-runtime agents',
},
{
regex: /\bpub const SHARED_CODING_MODE_CONFIG_PROFILE_ID\b/,
regex: /\bpub const STANDARD_HARNESS_CONFIG_ID\b/,
message:
'core agent mode module must not own shared coding-mode config profile facts; use openbitfun-agent-runtime agents',
'core agent mode module must not own Standard Harness config profile facts; use openbitfun-agent-runtime agents',
},
{
regex: /\bpub const SHARED_CODING_MODE_IDS\b/,
regex: /\bpub const STANDARD_HARNESS_CONFIG_MEMBERS\b/,
message:
'core agent mode module must not own shared coding-mode membership facts; use openbitfun-agent-runtime agents',
'core agent mode module must not own Standard Harness membership facts; use openbitfun-agent-runtime agents',
},
{
regex: /\bpub fn resolve_mode_config_profile_id\b/,
Expand All @@ -1598,9 +1598,9 @@ export const forbiddenContentRules = [
'core agent mode module must not own mode config profile labels; use openbitfun-agent-runtime agents',
},
{
regex: /\bpub fn shared_coding_mode_user_context_policy\b/,
regex: /\bpub fn standard_harness_user_context_policy\b/,
message:
'core agent mode module must not own shared coding-mode context policy; use openbitfun-agent-runtime agents',
'core agent mode module must not own Standard Harness context policy; use openbitfun-agent-runtime agents',
},
],
},
Expand Down
16 changes: 8 additions & 8 deletions scripts/core-boundaries/rules/source/required-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,12 +1506,12 @@ export const requiredContentRules = [
'agent-runtime must own shared mode config profile facts that are runtime-visible and product-neutral',
patterns: [
{
regex: /\bpub const SHARED_CODING_MODE_PROMPT_TEMPLATE\b/,
message: 'missing shared coding-mode prompt template fact',
regex: /\bpub const STANDARD_HARNESS_PROMPT_TEMPLATE\b/,
message: 'missing Standard Harness prompt template fact',
},
{
regex: /\bpub const SHARED_CODING_MODE_CONFIG_PROFILE_ID\b/,
message: 'missing shared coding-mode config profile id',
regex: /\bpub const STANDARD_HARNESS_CONFIG_ID\b/,
message: 'missing Standard Harness config profile id',
},
{
regex: /\bpub fn resolve_mode_config_profile_id\b/,
Expand All @@ -1526,8 +1526,8 @@ export const requiredContentRules = [
message: 'missing mode presentation rank',
},
{
regex: /\bpub fn shared_coding_mode_user_context_policy\b/,
message: 'missing shared coding-mode user-context policy',
regex: /\bpub fn standard_harness_user_context_policy\b/,
message: 'missing Standard Harness user-context policy',
},
{
regex: /\bpub enum SubagentListScope\b/,
Expand Down Expand Up @@ -1593,7 +1593,7 @@ export const requiredContentRules = [
},
{
regex: /\bshared_coding_modes_resolve_to_the_same_config_profile\b/,
message: 'missing shared coding-mode profile regression',
message: 'missing Standard Harness profile regression',
},
{
regex:
Expand Down Expand Up @@ -3111,7 +3111,7 @@ export const requiredContentRules = [
'core agent mode module must keep old import paths while agent-runtime owns shared mode profile facts',
patterns: [
{
regex: /pub use openbitfun_agent_runtime::agents::\{[\s\S]*mode_presentation_rank[\s\S]*resolve_mode_config_profile_id[\s\S]*shared_coding_mode_user_context_policy[\s\S]*SHARED_CODING_MODE_PROMPT_TEMPLATE[\s\S]*\};/,
regex: /pub use openbitfun_agent_runtime::agents::\{[\s\S]*mode_presentation_rank[\s\S]*resolve_mode_config_profile_id[\s\S]*standard_harness_user_context_policy[\s\S]*STANDARD_HARNESS_PROMPT_TEMPLATE[\s\S]*\};/,
message: 'missing agent-runtime shared mode profile compatibility re-export',
},
],
Expand Down
4 changes: 2 additions & 2 deletions scripts/core-boundaries/self-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2833,11 +2833,11 @@ export function runManifestParserSelfTest({
'resolve_subagent_availability',
'SubagentOverrideLayers',
'SubagentStateReason',
'SHARED_CODING_MODE_CONFIG_PROFILE_ID',
'STANDARD_HARNESS_CONFIG_ID',
'resolve_mode_config_profile_id',
'mode_config_profile_member_mode_ids',
'mode_presentation_rank',
'shared_coding_mode_user_context_policy',
'standard_harness_user_context_policy',
'SubAgentSource',
'subagent_source_kind',
'subagent_source_presentation_rank',
Expand Down
Loading
Loading