@blade-hq/agent-react 2610.0.0-beta.79 → 2610.0.0-beta.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -605,3 +605,8 @@ blade-chat::part(input-toolbar) { gap: 12px; }
605
605
  ### MCP Apps
606
606
 
607
607
  `McpAppCard` 使用官方 AppBridge 渲染归档卡片,内置 Web 消费同一组件。在 `BladeProvider` 下传入会话 ID 与来源 ID,也可直接提供 `BladeClient`。`McpAppMessage` 表示 App 提供的文本;`McpAppMessageContext` 将其交给当前对话的待发送区。用户可在 `ChatView` 查看、移除并确认发送。`update-model-context` 会把 App 提交的当前状态经 `sessions.updateMcpAppContext` 存为会话上下文:只落库、不追加聊天、不启动 agent turn,正在运行的一轮保持启动时版本,下一个新的运行才读取;冲突(409)时重读最新 revision 后重提同一份状态一次。
608
+
609
+
610
+ ### 子智能体卡片
611
+
612
+ `AgentTaskCard` 提供共享的可折叠子智能体卡片,`AgentTaskCardProps` 接受任务 `title`、`status`、最新动作 `activity` 和详情 `children`。`AgentTaskStatus` 包含 `running`、`waiting_input`、`completed`、`failed`、`cancelled`;进入 `waiting_input` 时自动展开,提示图标持续轻缓闪动,并遵守系统减少动态效果设置。回答表单由宿主通过 `children` 提供,回答后应更新状态以停止提示。
@@ -3,6 +3,6 @@ interface Props {
3
3
  toolCall: ToolCallInfo;
4
4
  className?: string;
5
5
  }
6
- /** SDK 没有第一方子循环消息流,只保留轻量意图行和可展开的最终结果。 */
6
+ /** SDK receives the parent tool status and result; child-stream hosts supply card content separately. */
7
7
  export declare function AgentLoopBlock({ toolCall, className }: Props): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -0,0 +1,12 @@
1
+ import { type ReactNode } from "react";
2
+ export type AgentTaskStatus = "running" | "waiting_input" | "completed" | "failed" | "cancelled";
3
+ export interface AgentTaskCardProps {
4
+ title: string;
5
+ status: AgentTaskStatus;
6
+ activity?: string;
7
+ children?: ReactNode;
8
+ className?: string;
9
+ recordId?: string;
10
+ }
11
+ /** Shared child-agent boundary; activity remains visible while details are collapsed. */
12
+ export declare function AgentTaskCard({ title, status, activity, children, className, recordId }: AgentTaskCardProps): import("react/jsx-runtime").JSX.Element;
@@ -92,6 +92,7 @@ declare const BladeAgent: {
92
92
  shared?: boolean | undefined;
93
93
  memory_enabled?: boolean | undefined;
94
94
  is_persistent?: boolean | undefined;
95
+ initiator?: "sdk" | "ui" | "unknown" | null | undefined;
95
96
  is_headless?: boolean | undefined;
96
97
  viewer_role?: "owner" | "viewer" | undefined;
97
98
  template_id?: string | null | undefined;
package/dist/index.d.ts CHANGED
@@ -71,3 +71,5 @@ export type { SessionQueuePanelProps } from "./components/SessionQueuePanel";
71
71
  export { isAgentComputerCommand, isAgentComputerToolCall, classifyAgentComputerLaunchOutcome, } from "./lib/agent-computer-command";
72
72
  export type { AgentComputerLaunchOutcome } from "./lib/agent-computer-command";
73
73
  export * from "@blade-hq/agent-client";
74
+ export { AgentTaskCard } from "./components/AgentTaskCard";
75
+ export type { AgentTaskCardProps, AgentTaskStatus } from "./components/AgentTaskCard";