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
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
line-height: var(--openbitfun-type-label-sm-line-height);
}
.agentType { flex: 0 1 auto; min-inline-size: 0; max-inline-size: 45%; }
.agentType:only-child { flex: 1 1 0; max-inline-size: 100%; }
.model { flex: 1 1 0; min-inline-size: 0; }
.model:not([data-overflow='true']) { text-align: end; }
.status,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface AgentControlToolCardProps
};
requiresConfirmation?: boolean;
status: FlowChatToolStatus;
/** Pass null to hide both the label and the fallback status glyph. */
statusLabel?: ReactNode;
statusTone?: 'danger' | 'neutral' | 'success' | 'warning';
summary?: ReactNode;
Expand Down Expand Up @@ -82,8 +83,10 @@ export function AgentControlToolCard({
<dl className={styles.previewMetadata}>
<dt>{preview.labels.agentType}</dt>
<dd data-openbitfun-part="previewAgentType">{preview.agentType}</dd>
<dt>{preview.labels.model}</dt>
<dd data-openbitfun-part="previewModel">{preview.model}</dd>
{preview.model && <>
<dt>{preview.labels.model}</dt>
<dd data-openbitfun-part="previewModel">{preview.model}</dd>
</>}
</dl>
<div className={styles.previewTask}>
<span className={styles.previewCaption}>{preview.labels.description}</span>
Expand Down Expand Up @@ -145,7 +148,7 @@ export function AgentControlToolCard({
<OverflowText className={styles.status} data-openbitfun-part="agentStatus" data-tone={tone}>
{statusLabel}
</OverflowText>
) : !['completed', 'confirmed', 'cancelled', 'rejected'].includes(status) ? (
) : statusLabel !== null && !['completed', 'confirmed', 'cancelled', 'rejected'].includes(status) ? (
<ToolCardStatusSlot size={12} status={status} />
) : null}
<Icon name="arrow-up-right" size="xs" className={styles.openIcon} data-openbitfun-icon="open-panel-right" />
Expand All @@ -154,8 +157,10 @@ export function AgentControlToolCard({
<span className={styles.metadata}>
<OverflowText className={styles.agentType} data-openbitfun-part="agentType"
aria-label={preview.labels.agentType}>{preview.agentType}</OverflowText>
<OverflowText className={styles.model} data-openbitfun-part="agentModel"
aria-label={preview.labels.model}>{preview.model}</OverflowText>
{preview.model && (
<OverflowText className={styles.model} data-openbitfun-part="agentModel"
aria-label={preview.labels.model}>{preview.model}</OverflowText>
)}
</span>
)}
</span>
Expand Down
10 changes: 8 additions & 2 deletions docs/architecture/agent-runtime-services-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Agent Runtime API 的逻辑归属与物理部署分离:相同归属模块可
私有 SDK Host 或目标机器 Runtime 中。任何 Rust 部署都只管理自己进程树内的服务与 Node/Bun Plugin Host;不能因为多个
GUI/TUI/Remote Client 连接就复制 Runtime 状态模块,或按 Client/Workspace 创建 Plugin Host。

Rust Runtime SDK 以 `AGENT_RUNTIME_SDK_API_VERSION` 标记兼容边界。当前接口版本为 v10 preview:
Rust Runtime SDK 以 `AGENT_RUNTIME_SDK_API_VERSION` 标记兼容边界。当前接口版本为 v11 preview:
小版本更新允许增加可选 builder hook、有默认实现的端口方法或注册表查询能力,但不得向外部可用
Rust 结构体字面量(struct literal)构造的 DTO 直接增加字段,也不得改变既有端口语义、错误分类、session / turn 标识含义或
默认 feature 依赖。任何需要调用方改写现有嵌入代码的变更,必须提升接口版本并提供兼容迁移路径。
Expand Down Expand Up @@ -101,6 +101,12 @@ Product Assembly 选择并在 `agent-workflows` / 现有产品 owner 中执行
v10 让 Turn settlement 返回 Runtime 确认的终态、最终回答和结束原因。现有 Rust embedder 需要接收
`AgentTurnSettlementResult`;CLI 和 App Server adapter 可在不扩展各自 wire contract 的情况下丢弃返回值。

v11 移除按模型名称和 Agent 类型选择的上下文策略,以及父子任务关系对策略的覆盖。
Rust 调用方删除 `ModelCapabilityProfile`、`ContextProfile`、`ContextProfilePolicy` 和
`context_profile` 模块的引用。普通子代理并发直接使用 `ai.subagent_max_concurrency`;
重复失败检测直接使用现有执行配置;压缩和报告统一使用每类 8 条的结构化证据容量上限。
持久化数据和 wire payload 无需迁移。

只要外部调用方仍必须导入 `openbitfun-core`、启用 `product-full`、持有具体服务管理器、读取产品命令
注册表、理解 ACP/内部端口或依赖全局可变状态,公开 SDK 发布边界就不成立。公开 SDK 的完整
术语、能力等价和版本要求以 [`agent-sdk-product-architecture.md`](agent-sdk-product-architecture.md) 为准。
Expand Down Expand Up @@ -444,7 +450,7 @@ impl AgentRuntime {
该 Rust 接口是内部产品入口复用的当前形态,不是公开 Python/TypeScript SDK 的目标 API。它必须只接收
已组装的类型化部件,不负责创建
文件系统、终端、MCP、AI 客户端、Remote 提供方或产品命令。
当前 v10 preview 接口以 message / attachment / metadata、默认标准执行目标和活动 Turn 文本 steer 作为最小输入形态;若把
当前 v11 preview 接口以 message / attachment / metadata、默认标准执行目标和活动 Turn 文本 steer 作为最小输入形态;若把
model-round cancellation token、结构化 AgentInput 或更复杂的事件游标纳入公开 SDK,
必须分别评审 Rust Runtime SDK、SDK Host protocol 和公开 SDK API 的版本,并保留旧路径兼容。

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/deep-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The default strict-review contract is mirrored in Rust and TypeScript. New stric
- automatic file splitting, same-role fan-out, and reviewer retry are disabled;
- workers and the Judge share one three-call allowance and at most two run concurrently.

The runtime enforces the shared allowance even if a weak model ignores the prompt. This is a resource ceiling, not a keyword or risk-score workflow rule. The model decides whether another check is useful from the actual evidence and task; the manifest and backend limit which read-only capability, target scope, and question it may use. The Review capacity setting may lower focused checks and managed large-target batches to one-at-a-time execution, but it cannot raise the two-way ceiling or create additional work.
The runtime enforces the shared allowance even if a model ignores the prompt. This is a resource ceiling, not a keyword or risk-score workflow rule. The model decides whether another check is useful from the actual evidence and task; the manifest and backend limit which read-only capability, target scope, and question it may use. The Review capacity setting may lower focused checks and managed large-target batches to one-at-a-time execution, but it cannot raise the two-way ceiling or create additional work.

Historical configuration fields for reviewer timeouts, file-split thresholds, same-role instances, retries, concurrency, and queue behavior remain readable so stored sessions can recover honestly. New adaptive manifests override split, same-role, retry, concurrency, and call values to the bounded policy above. Configured review agents must be file-backed and read-only. `DeepReview` and `ReviewFixer` remain disallowed.

Expand Down
5 changes: 0 additions & 5 deletions scripts/core-boundaries/rules/source/facade-rules.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// Boundary rules for source ownership, facades, and required owner content.

export const facadeOnlyFiles = [
{
path: 'src/crates/assembly/core/src/agentic/context_profile.rs',
importPrefix: 'openbitfun_agent_runtime::context_profile',
reason: 'core context profile path must only re-export the agent-runtime owner crate',
},
{
path: 'src/crates/assembly/core/src/agentic/core/dialog_turn.rs',
importPrefix: 'openbitfun_agent_runtime::dialog_turn',
Expand Down
1 change: 0 additions & 1 deletion scripts/core-boundaries/rules/source/public-api-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const agentRuntimeRootPublicModules = [
'agents',
'checkpoint',
'compression_prefetch',
'context_profile',
'custom_agent',
'custom_subagent',
'deep_review',
Expand Down
27 changes: 0 additions & 27 deletions scripts/core-boundaries/rules/source/required-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -731,33 +731,6 @@ export const requiredContentRules = [
},
],
},
{
path: 'src/crates/execution/agent-runtime/src/context_profile.rs',
reason:
'agent-runtime must own provider-neutral context profile and model capability policy facts',
patterns: [
{
regex: /\bpub enum ContextProfile\b/,
message: 'missing context profile fact',
},
{
regex: /\bpub enum ModelCapabilityProfile\b/,
message: 'missing model capability profile fact',
},
{
regex: /\bpub struct ContextProfilePolicy\b/,
message: 'missing context profile policy fact',
},
{
regex: /\bfor_subagent_context_and_models\b/,
message: 'missing subagent context/model policy helper',
},
{
regex: /\bmodel_capability_weak_for_mini\b/,
message: 'missing weak-model regression',
},
],
},
{
path: 'src/crates/execution/agent-runtime/src/session_state.rs',
reason:
Expand Down
10 changes: 0 additions & 10 deletions scripts/core-boundaries/self-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2762,16 +2762,6 @@ export function runManifestParserSelfTest({
path: 'src/crates/execution/agent-runtime/Cargo.toml',
contracts: ['[features]', 'default = []'],
},
{
path: 'src/crates/execution/agent-runtime/src/context_profile.rs',
contracts: [
'ContextProfile',
'ModelCapabilityProfile',
'ContextProfilePolicy',
'for_subagent_context_and_models',
'model_capability_weak_for_mini',
],
},
{
path: 'src/crates/execution/agent-runtime/src/session_state.rs',
contracts: [
Expand Down
6 changes: 6 additions & 0 deletions src/crates/assembly/core/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ cargo test --locked -p openbitfun-core --no-default-features --features agent-ru
These fixtures cover prompt name mappings and simulated workspace policies;
they do not establish live SSH, relay, Peer, or Detached Dispatch behavior.

For ordinary subagent shared concurrency, permit release, and cancelled/timed-out waits:

```bash
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib subagent_concurrency_
```

For smart routing, unchanged subagent model policy and resumed subagent choices:

```bash
Expand Down
5 changes: 0 additions & 5 deletions src/crates/assembly/core/src/agentic/context_profile.rs

This file was deleted.

Loading
Loading