Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
feat(webui): refactor chat pages with shadcn and prepare for npm release (#2171)
DavdGao8b0b6e6db699
diff --git a/examples/web_ui/frontend/package.json b/examples/web_ui/frontend/package.jsonindex 4eeff8a91..057ca66a7 100644--- a/examples/web_ui/frontend/package.json+++ b/examples/web_ui/frontend/package.json@@ -11,8 +11,13 @@"preview": "vite preview"},"dependencies": {- "@agentscope-ai/agentscope": "^0.0.14",+ "@agentscope-ai/agentscope": "^0.0.15","@fontsource-variable/geist": "^5.2.8",+ "@shadcn/react": "^0.2.1",+ "@streamdown/cjk": "^1.0.3",+ "@streamdown/code": "^1.1.1",+ "@streamdown/math": "^1.0.2",+ "@streamdown/mermaid": "^1.0.2","@tailwindcss/vite": "^4.3.0","class-variance-authority": "^0.7.1","clsx": "^2.1.1",@@ -23,6 +28,7 @@"i18next-browser-languagedetector": "^8.2.1","lucide": "^1.3.0","lucide-react": "^1.16.0",+ "mime": "^4.1.0","mime-types": "^3.0.2","next-themes": "^0.4.6","onborda": "^1.2.5",@@ -32,13 +38,12 @@"react-diff-view": "^3.3.3","react-dom": "^19.2.6","react-i18next": "^17.0.8",- "react-markdown": "^10.1.0","react-resizable-panels": "^4.11.2","react-router-dom": "^7.15.1",- "remark-gfm": "^4.0.1","shadcn": "^4.13.0","shadcn-prose": "^1.2.1","sonner": "^2.0.7",+ "streamdown": "^2.5.0","tailwind-merge": "^3.6.0","tailwindcss": "^4.3.0","tw-animate-css": "^1.4.0",diff --git a/examples/web_ui/frontend/src/components/chat/MessageBubble.tsx b/examples/web_ui/frontend/src/components/chat/ASMessageBubble.tsxsimilarity index 62%rename from examples/web_ui/frontend/src/components/chat/MessageBubble.tsxrename to examples/web_ui/frontend/src/components/chat/ASMessageBubble.tsxindex 0b1a3f680..b281c77e6 100644--- a/examples/web_ui/frontend/src/components/chat/MessageBubble.tsx+++ b/examples/web_ui/frontend/src/components/chat/ASMessageBubble.tsx@@ -4,45 +4,50 @@ import type {DataBlock,Msg,TextBlock,+ ThinkingBlock,ToolCallBlock,ToolResultBlock,} from '@agentscope-ai/agentscope/message';import {ArrowDown,ArrowUp,- Bot,- CalendarClock,CheckCircle,ChevronRight,CirclePlay,- Copy,+ FileText,+ FileVideo2,Loader2,- MessageSquareQuote,TriangleAlert,- Wrench,} from 'lucide-react';+import * as mime from 'mime-types';import { useEffect, useRef, useState } from 'react';-import ReactMarkdown from 'react-markdown';-import remarkGfm from 'remark-gfm';-import { ConfirmCard } from './ConfirmCard';-import { FileAttachment } from './FileAttachment';import { renderToolCall } from './tool-renderers';import { countDiffStats, DiffStats, getResultDiff } from './tool-renderers/_shared';import type { TFunction, ToolCallWithResult } from './tool-renderers/types';+import { Markdown } from '@/components/markdown';import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';+import {+ Attachment,+ AttachmentContent,+ AttachmentDescription,+ AttachmentGroup,+ AttachmentMedia,+ AttachmentTitle,+} from '@/components/ui/attachment.tsx';import { Badge } from '@/components/ui/badge';-import { Button } from '@/components/ui/button';+import { Bubble, BubbleContent } from '@/components/ui/bubble.tsx';import {Collapsible,CollapsibleContent,CollapsibleTrigger,} from '@/components/ui/collapsible.tsx';-import { Item, ItemContent } from '@/components/ui/item.tsx';+import { Message, MessageFooter, MessageContent } from '@/components/ui/message';import { useAudioBlock, useReplayController } from '@/context/AudioContext';import { useTranslation } from '@/i18n/useI18n';import { cn } from '@/lib/utils';import { formatNumber, formatTime } from '@/utils/common';+import 'streamdown/styles.css';/*** A run of *consecutive* tool calls (of any name) collapsed into a single@@ -53,6 +58,8 @@ import { formatNumber, formatTime } from '@/utils/common';interface ToolCallGroupBlock {type: 'tool_call_group';calls: ToolCallWithResult[];+ created_at?: string;+ finished_at?: string;}type ExtendedContentBlock = ContentBlock | ToolCallGroupBlock;@@ -120,6 +127,8 @@ function groupToolCalls(content: ContentBlock[]): ExtendedContentBlock[] {name: block.name,input: '',state: 'finished' as const,+ created_at: block.created_at,+ finished_at: block.finished_at,},result: block,},@@ -281,28 +290,11 @@ function AudioInlineControl({ block }: { block: DataBlock }) {);}-type OnUserConfirm = (- toolCallBlock: ToolCallBlock,- confirm: boolean,- rules?: ToolCallBlock['suggested_rules'],-) => void;-const MCP_TOOL_PREFIX = 'mcp__';// Task-management tools are all surfaced under one "updated todos" summary.const TODO_TOOLS = new Set(['TaskGet', 'TaskUpdate', 'TaskList', 'TaskCreate']);-function renderConfirmCard(askingCall: ToolCallBlock, onUserConfirm?: OnUserConfirm) {- return (- <ConfirmCard- toolCall={askingCall}- onUserConfirm={(confirm, rules) => {- if (onUserConfirm) onUserConfirm(askingCall, confirm, rules);- }}- />- );-}-/*** Bucket a group's calls into per-category counts and total inserted/deleted* lines (from Edit/Write result diffs), then build the localized collapsible@@ -364,218 +356,6 @@ function summarizeToolGroup(calls: ToolCallWithResult[], t: TFunction) {return { title, insertions, deletions };}-/**- * Render a single content block. A `tool_call_group` renders one summary fold- * whose expanded body dispatches each call to `renderToolCall`. Truncation at- * the first `asking` call (and the trailing ConfirmCard, kept outside the fold)- * lives here so renderers only ever see a clean list of calls.- */-function renderBlock(- block: ExtendedContentBlock,- index: number,- t: TFunction,- onUserConfirm?: (- toolCallBlock: ToolCallBlock,- confirm: boolean,- rules?: ToolCallBlock['suggested_rules'],- ) => void,-) {- switch (block.type) {- case 'tool_call_group': {- const { title, insertions, deletions } = summarizeToolGroup(block.calls, t);- // Truncate at (and including) the first `asking` call — nothing runs- // after it. Its ConfirmCard renders OUTSIDE the Collapsible so- // collapsing never hides an action the user still needs to take.- const askIdx = block.calls.findIndex((c) => c.call.state === 'asking');- const visible = askIdx === -1 ? block.calls : block.calls.slice(0, askIdx + 1);- const askingCall = askIdx === -1 ? null : block.calls[askIdx].call;-- const allFinished = block.calls.some((c) => !c.result || c.result.state === 'running');- return (- <div key={index} className="flex flex-col gap-y-4 text-muted-foreground">- <Collapsible defaultOpen={false}>- <CollapsibleTrigger asChild>- <Button- variant="ghost"- className="group flex w-full items-center justify-between gap-2 px-0 hover:bg-transparent data-[state=open]:bg-transparent active:!translate-y-0 cursor-pointer"- >- <span- className={cn(- 'flex min-w-0 items-center gap-2',- allFinished && 'shimmer',- )}- >- <span className="truncate text-sm">{title}</span>- <ChevronRight className="size-3 shrink-0 transition-transform group-data-[state=open]:rotate-90" />- </span>- {(insertions > 0 || deletions > 0) && (- <DiffStats insertions={insertions} deletions={deletions} />- )}- </Button>- </CollapsibleTrigger>- <CollapsibleContent className="flex flex-col gap-y-1 bg-muted p-2 rounded text-sm">- {visible.map((pair) => renderToolCall(pair, t))}- </CollapsibleContent>- </Collapsible>- {askingCall && renderConfirmCard(askingCall, onUserConfirm)}- </div>- );- }- case 'text':- return (- <div key={index} className="prose w-full min-w-full">- <ReactMarkdown- remarkPlugins={[remarkGfm]}- components={{- code: ({ className, children, ...props }) => {- const isInline = !String(className ?? '').startsWith('language-');- if (isInline) {- return (- <code className={`${className ?? ''} break-all`} {...props}>- {children}- </code>- );- }- return (- <div className="relative w-full">- <Button- size="icon-xs"- variant="ghost"- className="absolute top-0 right-0 z-10"- onClick={async (e) => {- e.preventDefault();- e.stopPropagation();- await navigator.clipboard.writeText(- String(children),- );- }}- >- <Copy />- </Button>- <div className="overflow-x-auto max-w-full w-full">- <code className={className} {...props}>- {children}- </code>- </div>- </div>- );- },- }}- >- {block.text}- </ReactMarkdown>- </div>- );-- case 'thinking':- return (- <details key={index} className="text-muted-foreground">- <summary className="cursor-pointer select-none">- {t('messageBubble.thinking')}- </summary>- <p className="mt-1 whitespace-pre-wrap">{block.thinking}</p>- </details>- );-- case 'data': {- const dataType = block.source.media_type.split('/')[0];- // Audio data blocks render in the footer (see AudioFooterControl),- // not inline alongside text.- if (dataType === 'audio') return null;- const data =- block.source.type === 'url'- ? block.source.url- : `data:${block.source.media_type};base64,${block.source.data}`;- switch (dataType) {- case 'image':- return (- <img- key={index}- src={data}- alt={block.name || 'Uploaded image'}- className="max-h-80 max-w-full rounded-lg object-contain"- />- );- case 'video':- return (- <video- key={index}- controls- src={data}- className="max-h-80 max-w-full rounded-lg"- />- );- default:- return (- <FileAttachment- key={index}- name={block.name}- href={data}- mediaType={block.source.media_type}- />- );- }- }-- case 'hint': {- // Parse source: try JSON, fall back to plain string, default to t('common.message').- let hintLabel: string;- let hintSublabel: string | null = null;- let HintIcon = MessageSquareQuote;-- if (block.source) {- try {- const parsed = JSON.parse(block.source) as {- label?: string;- sublabel?: string;- };- hintLabel = parsed.label- ? t(`messageBubble.hintSource.${parsed.label}`)- : block.source;- hintSublabel = parsed.sublabel ?? null;- if (parsed.label === 'team_message') HintIcon = Bot;- else if (parsed.label === 'schedule') HintIcon = CalendarClock;- else if (parsed.label === 'tool_output') HintIcon = Wrench;- } catch {- hintLabel = block.source;- }- } else {- hintLabel = t('common.message');- }- const items: (TextBlock | DataBlock)[] =- typeof block.hint === 'string'- ? [{ type: 'text', id: `${block.id}-text`, text: block.hint }]- : block.hint;- return (- <Item variant={'outline'} className="max-w-full">- <ItemContent className="max-w-full">- <Collapsible>- <CollapsibleTrigger asChild>- <Button className="group w-full max-w-full" variant="ghost">- <HintIcon className="size-3.5" />- <span className="tracking-tight">{hintLabel}</span>- {hintSublabel && (- <span className="text-muted-foreground font-normal truncate max-w-[200px]">- {hintSublabel}- </span>- )}- <ChevronRight className="ml-auto group-data-[state=open]:rotate-90" />- </Button>- </CollapsibleTrigger>- <CollapsibleContent className="p-2.5 pt-0 max-w-full overflow-hidden break-all text-muted-foreground">- {items.map((inner, i) => renderBlock(inner, i, t))}- </CollapsibleContent>- </Collapsible>- </ItemContent>- </Item>- );- }-- default:- return null;- }-}-interface MessageBubbleProps {message: Msg;onUserConfirm: (@@ -603,7 +383,7 @@ interface MessageBubbleProps {* When `content` is empty and the message is still running, the bubble* body is omitted entirely so only the bottom status row renders.*/-export function MessageBubble({ message, onUserConfirm }: MessageBubbleProps) {+export function ASMessageBubble({ message }: MessageBubbleProps) {const isUser = message.role === 'user';const { t } = useTranslation();@@ -620,17 +400,15 @@ export function MessageBubble({ message, onUserConfirm }: MessageBubbleProps) {return () => clearInterval(id);}, [isRunning]);- const blocks = groupToolCalls(message.content);+ // Audio data blocks are rendered in the footer;+ // For role="user" messages, the data blocks are rendered as attachments in the+ // footer, while for role="assistant" messages, the data is rendered in its+ // original positionconst audioBlocks = message.content.filter((b): b is DataBlock => b.type === 'data' && b.source.media_type.split('/')[0] === 'audio',);- // Audio data blocks are rendered in the footer, so they shouldn't keep an- // otherwise-empty body bubble alive.- const hasBodyContent = blocks.some(- (b) => !(b.type === 'data' && b.source.media_type.split('/')[0] === 'audio'),- );- const showBody = hasBodyContent;- const showFooter = !isUser;++ const blocks = groupToolCalls(message.content);// A fatal error terminated this reply. ``finished_reason`` / ``error`` are// reply-level fields set by ``appendEvent`` on a ``REPLY_END`` with@@ -646,76 +424,280 @@ export function MessageBubble({ message, onUserConfirm }: MessageBubbleProps) {const elapsedText = formatTime(elapsedSeconds);return (- <div- className={`flex flex-col w-full max-w-full ${isUser ? 'items-end' : 'items-start'} mb-4`}- >- {showBody && (+ <Message align={isUser ? 'end' : 'start'} data-role={message.role}>+ <MessageContent>+ {blocks+ .filter((block) => block.type !== 'data')+ .map((block, index) => (+ <Bubble key={index} variant={isUser ? 'muted' : 'ghost'}>+ <BubbleContent>+ <ASBlock block={block} />+ </BubbleContent>+ </Bubble>+ ))}+ {isError && (+ <Alert+ variant="destructive"+ className="m-2 w-[calc(100%-1rem)] border-red-200 bg-red-50 text-destructive dark:border-red-900 dark:bg-red-950 dark:text-red-50"+ >+ <TriangleAlert />+ <AlertTitle>{t('messageBubble.error.title')}</AlertTitle>+ <AlertDescription>+ {t(`messageBubble.error.${errorInfo?.type ?? 'unknown'}`, {+ defaultValue:+ errorInfo?.message ?? t('messageBubble.error.unknown'),+ })}+ </AlertDescription>+ </Alert>+ )}+ <AttachmentGroup className="max-w-full">+ {blocks+ .filter((block) => block.type === 'data')+ .map((block, index) => (+ <ASBlock block={block} key={index} />+ ))}+ </AttachmentGroup>+ {message.role !== 'user' && (+ <MessageFooter>+ <Badge+ variant="secondary"+ aria-label={isRunning ? t('messageBubble.running') : undefined}+ >+ {isRunning ? (+ <Loader2 data-icon="inline-start" className="animate-spin" />+ ) : (+ <CheckCircle data-icon="inline-start" />+ )}+ <span className="tabular-nums tracking-tighter">{elapsedText}</span>+ {hasUsage && (+ <>+ <ArrowUp data-icon="inline-start" className="ml-1" />+ <span className="tabular-nums">+ {formatNumber(message.usage?.input_tokens ?? 0)}+ </span>+ <ArrowDown data-icon="inline-start" className="ml-1" />+ <span className="tabular-nums">+ {formatNumber(message.usage?.output_tokens ?? 0)}+ </span>+ </>+ )}+ {audioBlocks.map((block) => (+ <AudioInlineControl key={block.id} block={block} />+ ))}+ </Badge>+ </MessageFooter>+ )}+ </MessageContent>+ </Message>+ );+}++/**+ * A thinking block with a live-ticking "thinking for Xs" header. Kept as its+ * own component so only thinking blocks pay for the per-second timer.+ */+function ThinkingBlockView({ block }: { block: ThinkingBlock }) {+ const { t } = useTranslation();+ const isRunning = !block.finished_at;++ // Tick once per second while running so the elapsed time updates live.+ const [now, setNow] = useState(() => Date.now());+ useEffect(() => {+ if (!isRunning) return;+ const id = setInterval(() => setNow(Date.now()), 1000);+ return () => clearInterval(id);+ }, [isRunning]);++ const startMs = new Date(block.created_at).getTime();+ const endMs = isRunning ? now : new Date(block.finished_at!).getTime();+ const elapsedSeconds = Math.max(0, (endMs - startMs) / 1000);+ const elapsedText = formatTime(elapsedSeconds);+ return (+ <Collapsible>+ <CollapsibleTrigger asChild><div- className={`p-4 rounded-xl space-y-2 max-w-full ${- isUser ? 'w-fit bg-secondary' : 'w-full min-w-full'- }`}- >- {blocks.map((block, i) =>- renderBlock(- block,- i,- t,- (- toolCall: ToolCallBlock,- confirm: boolean,- rules?: ToolCallBlock['suggested_rules'],- ) => {- onUserConfirm(toolCall, confirm, message.id, rules);- toolCall.state = confirm ? 'allowed' : 'finished';- },- ),+ className={cn(+ 'group w-full flex items-center gap-2 text-left text-sm text-muted-foreground cursor-pointer',+ isRunning && 'shimmer',)}- </div>- )}- {isError && (- <Alert- variant="destructive"- className="m-2 w-[calc(100%-1rem)] border-red-200 bg-red-50 text-destructive dark:border-red-900 dark:bg-red-950 dark:text-red-50">- <TriangleAlert />- <AlertTitle>{t('messageBubble.error.title')}</AlertTitle>- <AlertDescription>- {t(`messageBubble.error.${errorInfo?.type ?? 'unknown'}`, {- defaultValue: errorInfo?.message ?? t('messageBubble.error.unknown'),- })}- </AlertDescription>- </Alert>- )}- {showFooter && (- <div className="flex flex-row items-center text-muted-foreground gap-x-4 px-2 w-full">- <Badge- variant="secondary"- aria-label={isRunning ? t('messageBubble.running') : undefined}- >- {isRunning ? (- <Loader2 data-icon="inline-start" className="animate-spin" />- ) : (- <CheckCircle data-icon="inline-start" />- )}- <span className="tabular-nums tracking-tighter">{elapsedText}</span>- {hasUsage && (- <>- <ArrowUp data-icon="inline-start" className="ml-1" />- <span className="tabular-nums">- {formatNumber(message.usage?.input_tokens ?? 0)}- </span>- <ArrowDown data-icon="inline-start" className="ml-1" />- <span className="tabular-nums">- {formatNumber(message.usage?.output_tokens ?? 0)}- </span>- </>+ <span>+ {t(+ elapsedText === '0s'+ ? 'messageBubble.thinking'+ : 'messageBubble.thinkingFor',+ { duration: elapsedText },)}- {audioBlocks.map((block) => (- <AudioInlineControl key={block.id} block={block} />- ))}- </Badge>+ </span>+ <ChevronRight className="hidden group-hover:flex group-data-[state=open]:flex size-3 shrink-0 transition-transform group-data-[state=open]:rotate-90" /></div>- )}- </div>+ </CollapsibleTrigger>+ <CollapsibleContent asChild>+ <Markdown+ animated+ isAnimating={isRunning}+ className="text-muted-foreground bg-muted p-2 rounded text-sm"+ >+ {block.thinking}+ </Markdown>+ </CollapsibleContent>+ </Collapsible>);}++interface ASBlockProps {+ block: ExtendedContentBlock;+}++export function ASBlock({ block, ...props }: ASBlockProps) {+ const { t } = useTranslation();++ switch (block.type) {+ case 'text':+ return (+ <Markdown animated isAnimating={!block.finished_at} {...props}>+ {block.text}+ </Markdown>+ );+ case 'data': {+ const dataType = block.source.media_type.split('/')[0];+ if (dataType === 'audio') return null;+ const data =+ block.source.type === 'url'+ ? block.source.url+ : `data:${block.source.media_type};base64,${block.source.data}`;+ switch (dataType) {+ case 'image':+ return (+ <Attachment>+ <AttachmentMedia variant={'image'}>+ <img src={data} alt={block.name || 'Uploaded image'} />+ </AttachmentMedia>+ <AttachmentContent>+ <AttachmentTitle>{block.name}</AttachmentTitle>+ <AttachmentDescription>+ {(+ mime.extension(block.source.media_type) || 'bin'+ ).toUpperCase()}+ </AttachmentDescription>+ </AttachmentContent>+ </Attachment>+ );+ case 'video':+ return (+ <Attachment>+ <AttachmentMedia variant={'icon'}>+ <FileVideo2 />+ </AttachmentMedia>+ <AttachmentContent>+ <AttachmentTitle>{block.name}</AttachmentTitle>+ <AttachmentDescription>+ {(+ mime.extension(block.source.media_type) || 'bin'+ ).toUpperCase()}+ </AttachmentDescription>+ </AttachmentContent>+ </Attachment>+ );+ default:+ // Unknown files+ return (+ <Attachment>+ <AttachmentMedia variant={'icon'}>+ <FileText />+ </AttachmentMedia>+ <AttachmentContent>+ <AttachmentTitle>{block.name}</AttachmentTitle>+ <AttachmentDescription>+ {(+ mime.extension(block.source.media_type) || 'bin'+ ).toUpperCase()}+ </AttachmentDescription>+ </AttachmentContent>+ </Attachment>+ );+ }+ }+ case 'thinking':+ return <ThinkingBlockView block={block} />;+ case 'hint': {+ // Parse source: try JSON, fall back to plain string, default to t('common.message').+ let hintLabel: string;+ let hintSublabel: string | null = null;++ if (block.source) {+ try {+ const parsed = JSON.parse(block.source) as {+ label?: string;+ sublabel?: string;+ };+ hintLabel = parsed.label+ ? t(`messageBubble.hintSource.${parsed.label.toLowerCase()}`)+ : block.source;+ hintSublabel = parsed.sublabel ?? null;+ } catch {+ hintLabel = block.source;+ }+ } else {+ hintLabel = t('common.message');+ }+ const items: (TextBlock | DataBlock)[] =+ typeof block.hint === 'string'+ ? [+ {+ type: 'text',+ id: `${block.id}-text`,+ text: block.hint,+ created_at: block.created_at,+ },+ ]+ : block.hint;+ return (+ <Collapsible>+ <CollapsibleTrigger asChild>+ <div+ className={cn(+ 'group w-full flex gap-2 items-center text-sm text-muted-foreground cursor-pointer hover:text-primary',+ !block.finished_at && 'shimmer',+ )}+ >+ <span>{hintLabel + (hintSublabel ? ` - ${hintSublabel}` : '')}</span>+ <ChevronRight className="size-3 shrink-0 transition-transform group-data-[state=open]:rotate-90" />+ </div>+ </CollapsibleTrigger>+ <CollapsibleContent className="bg-muted p-2 rounded text-sm">+ {items.map((item, index) => (+ <ASBlock block={item} key={index} />+ ))}+ </CollapsibleContent>+ </Collapsible>+ );+ }+ case 'tool_call_group': {+ const { title, insertions, deletions } = summarizeToolGroup(block.calls, t);+ const allFinished = block.calls.some((c) => !c.result || c.result.state === 'running');+ return (+ <Collapsible defaultOpen={false}>+ <CollapsibleTrigger asChild>+ <div+ className={cn(+ 'group w-full flex gap-2 items-center text-sm text-muted-foreground cursor-pointer hover:text-primary',+ allFinished && 'shimmer',+ )}+ >+ <span>{title}</span>+ <ChevronRight className="size-3 shrink-0 transition-transform group-data-[state=open]:rotate-90" />+ <DiffStats insertions={insertions} deletions={deletions} />+ </div>+ </CollapsibleTrigger>+ <CollapsibleContent className="flex flex-col w-full gap-y-1 bg-muted p-2 rounded text-sm text-muted-foreground">+ {block.calls.map((pair) => renderToolCall(pair, t))}+ </CollapsibleContent>+ </Collapsible>+ );+ }++ default:+ return null;+ }+}diff --git a/examples/web_ui/frontend/src/components/chat/ChatContent.tsx b/examples/web_ui/frontend/src/components/chat/ChatContent.tsxindex e76d87261..240faee0d 100644--- a/examples/web_ui/frontend/src/components/chat/ChatContent.tsx+++ b/examples/web_ui/frontend/src/components/chat/ChatContent.tsx@@ -1,11 +1,23 @@-import type { ContentBlock, Msg, ToolCallBlock } from '@agentscope-ai/agentscope/message';-import { ArrowDown } from 'lucide-react';-import React from 'react';-import { useCallback, useEffect, useRef, useState } from 'react';+import {+ type ContentBlock,+ getContentBlocks,+ type Msg,+ type ToolCallBlock,+} from '@agentscope-ai/agentscope/message';+import React, { useMemo } from 'react';-import { MessageBubble } from '@/components/chat/MessageBubble';+import { ASMessageBubble } from '@/components/chat/ASMessageBubble.tsx';+import { ConfirmCard } from '@/components/chat/ConfirmCard.tsx';+import { FlipCard } from '@/components/chat/FlipCard.tsx';import { TextInput } from '@/components/chat/TextInput.tsx';-import { Button } from '@/components/ui/button.tsx';+import {+ MessageScroller,+ MessageScrollerButton,+ MessageScrollerContent,+ MessageScrollerItem,+ MessageScrollerProvider,+ MessageScrollerViewport,+} from '@/components/ui/message-scroller.tsx';import type { ReplyPhase } from '@/hooks/useMessages';import { useTranslation } from '@/i18n/useI18n';import { cn } from '@/lib/utils';@@ -58,133 +70,82 @@ const ChatContentComponent: React.FC<ChatContentProps> = ({fileProcessor,}) => {const { t } = useTranslation();- const scrollAreaRef = useRef<HTMLDivElement>(null);- const prevMsgCountRef = useRef<number>(0);- const wasNearBottomRef = useRef<boolean>(true);const isEmpty = msgs.length === 0;- const [showScrollToBottom, setShowScrollToBottom] = useState(false);- const updateScrollState = useCallback(() => {- const scrollArea = scrollAreaRef.current;- if (!scrollArea) return;+ const toConfirmedToolCalls = useMemo(() => {+ if (msgs.length === 0) return [];- const { scrollTop, scrollHeight, clientHeight } = scrollArea;- const distanceFromBottom = scrollHeight - scrollTop - clientHeight;-- wasNearBottomRef.current = distanceFromBottom <= 50;- setShowScrollToBottom(distanceFromBottom > 100);- }, []);-- // Auto-scroll to bottom only if user is already near the bottom- useEffect(() => {- const currentCount = msgs.length;- const prevCount = prevMsgCountRef.current;-- const isActive = phase !== 'idle';- const isInitialLoad = prevCount === 0 && currentCount > 0;- const hasRelevantUpdate =- (currentCount > prevCount && prevCount > 0) || (isActive && prevCount > 0);- const shouldScroll = isInitialLoad || (hasRelevantUpdate && wasNearBottomRef.current);-- if (shouldScroll && scrollAreaRef.current) {- const { scrollHeight } = scrollAreaRef.current;-- scrollAreaRef.current.scrollTo({- top: scrollHeight,- behavior: 'smooth',- });- } else {- updateScrollState();- }-- prevMsgCountRef.current = currentCount;- }, [msgs, phase, updateScrollState]);-- // Track if user is near bottom whenever they scroll- useEffect(() => {- const scrollArea = scrollAreaRef.current;- if (!scrollArea) return;-- scrollArea.addEventListener('scroll', updateScrollState);- return () => scrollArea.removeEventListener('scroll', updateScrollState);- }, [updateScrollState]);+ const lastMsg = msgs[msgs.length - 1];+ return getContentBlocks(lastMsg, 'tool_call')+ .filter((tc) => tc.state === 'asking')+ .map((tc) => ({ replyId: lastMsg.id, toolCall: tc }));+ }, [msgs]);// On an empty session the prompt and the input centre together, so every box// down to the message list shrinks to its content instead of filling.return (<divclassName={cn(- 'flex flex-col h-full w-full items-center p-2 gap-4',+ 'flex flex-col h-full w-full items-center gap-4',isEmpty && 'justify-center',className,)}>- <div- className={cn(- 'relative min-h-0 w-full max-w-full',- isEmpty ? 'flex-none' : 'flex-1',- )}- >- <div- ref={scrollAreaRef}- className={cn(- 'overflow-auto no-scrollbar overflow-x-hidden',- isEmpty ? 'w-full' : 'size-full',- )}+ {isEmpty ? (+ <p className="text-center text-lg mb-2">{t('chat.greeting')}</p>+ ) : (+ <MessageScrollerProvider autoScroll={true} defaultScrollPosition={'end'}>+ <MessageScroller>+ <MessageScrollerViewport>+ <MessageScrollerContent>+ {msgs.map((message) => (+ <MessageScrollerItem key={message.id} messageId={message.id}>+ <ASMessageBubble+ key={message.id}+ message={message}+ onUserConfirm={onUserConfirm}+ />+ </MessageScrollerItem>+ ))}+ </MessageScrollerContent>+ </MessageScrollerViewport>+ <MessageScrollerButton className="rounded-full" />+ </MessageScroller>+ </MessageScrollerProvider>+ )}++ <div className="relative min-w-full max-w-full w-full">+ <FlipCard+ visible={toConfirmedToolCalls.length > 0 || footerSlot !== null}+ className="absolute bottom-full left-0 right-0 mb-2 z-50">- <div- className={cn(- 'flex flex-col gap-4 max-w-full',- isEmpty ? 'w-full' : 'size-full',- )}- >- {isEmpty ? (- <p className="text-center text-lg mb-2">{t('chat.greeting')}</p>- ) : (- msgs.map((message) => (- <MessageBubble- key={message.id}- message={message}- onUserConfirm={onUserConfirm}- />- ))- )}- </div>- </div>- <Button- type="button"- variant="outline"- size="icon"- aria-label="Scroll to bottom"- aria-hidden={!showScrollToBottom}- tabIndex={showScrollToBottom ? 0 : -1}- className={cn(- 'absolute bottom-4 left-1/2 z-10 -translate-x-1/2 rounded-full shadow-md transition-all duration-200',- showScrollToBottom- ? 'translate-y-0 opacity-100'- : 'pointer-events-none translate-y-2 opacity-0',+ {toConfirmedToolCalls.length > 0 ? (+ <ConfirmCard+ toolCall={toConfirmedToolCalls[0].toolCall}+ onUserConfirm={async (confirm, rules) => {+ onUserConfirm(+ toConfirmedToolCalls[0].toolCall,+ confirm,+ toConfirmedToolCalls[0].replyId,+ rules,+ );+ }}+ />+ ) : (+ footerSlot)}- onClick={() =>- scrollAreaRef.current?.scrollTo({- top: scrollAreaRef.current.scrollHeight,- behavior: 'smooth',- })- }- >- <ArrowDown />- </Button>+ </FlipCard>+ <TextInput+ className="min-w-full max-w-full w-full"+ onSend={onSend}+ disabled={disabled}+ autoComplete={autoComplete}+ allowedInputTypes={allowedInputTypes}+ fileProcessor={fileProcessor}+ phase={phase}+ onInterrupt={onInterrupt}+ />{' '}</div>- {footerSlot ? <div className="w-full max-w-full shrink-0">{footerSlot}</div> : null}- <TextInput- className="min-w-full max-w-full w-full"- onSend={onSend}- disabled={disabled}- autoComplete={autoComplete}- allowedInputTypes={allowedInputTypes}- fileProcessor={fileProcessor}- phase={phase}- onInterrupt={onInterrupt}- /></div>);};diff --git a/examples/web_ui/frontend/src/components/chat/ConfirmCard.tsx b/examples/web_ui/frontend/src/components/chat/ConfirmCard.tsxindex dd1bfcfe4..0b73804f1 100644--- a/examples/web_ui/frontend/src/components/chat/ConfirmCard.tsx+++ b/examples/web_ui/frontend/src/components/chat/ConfirmCard.tsx@@ -5,6 +5,7 @@ import { useEffect, useState } from 'react';import { getDisplayName, renderConfirmBody } from './tool-renderers';import { Button } from '@/components/ui/button';import { Kbd } from '@/components/ui/kbd';+import { Spinner } from '@/components/ui/spinner.tsx';import { useTranslation } from '@/i18n/useI18n';import { cn } from '@/lib/utils';@@ -15,7 +16,7 @@ export function ConfirmCard({onUserConfirm,}: {toolCall: ToolCallBlock;- onUserConfirm: (confirm: boolean, rules?: ToolCallBlock['suggested_rules']) => void;+ onUserConfirm: (confirm: boolean, rules?: ToolCallBlock['suggested_rules']) => Promise<void>;}) {const { t } = useTranslation();const hasSuggestedRules = !!toolCall.suggested_rules?.length;@@ -23,9 +24,18 @@ export function ConfirmCard({? ['yes', 'yes_with_rule', 'no']: ['yes', 'no'];const [selected, setSelected] = useState<SelectOption>('yes');+ const [hasConfirmed, sethasConfirmed] = useState<boolean>(false);++ const handleConfirm = async (confirm: boolean, rules?: ToolCallBlock['suggested_rules']) => {+ if (hasConfirmed) return;+ sethasConfirmed(true);+ onUserConfirm(confirm, rules).catch(() => {+ sethasConfirmed(false);+ });+ };useEffect(() => {- const handleKeyDown = (e: KeyboardEvent) => {+ const handleKeyDown = async (e: KeyboardEvent) => {const currentIndex = options.indexOf(selected);switch (e.key) {case 'ArrowUp':@@ -39,9 +49,9 @@ export function ConfirmCard({case 'Enter':e.preventDefault();if (selected === 'yes_with_rule') {- onUserConfirm(true, [toolCall.suggested_rules![0]]);+ await handleConfirm(true, [toolCall.suggested_rules![0]]);} else {- onUserConfirm(selected === 'yes');+ await handleConfirm(selected === 'yes');}break;}@@ -52,10 +62,10 @@ export function ConfirmCard({}, [onUserConfirm, selected, options]);return (- <div className="ring ring-border rounded-xl w-full p-4 space-y-4 text-sm overflow-hidden">- <div className="flex flex-col gap-y-2">+ <div className="bg-muted ring ring-border rounded-[28px] w-full px-6 py-5 space-y-4 text-sm overflow-hidden">+ <div className="flex flex-col gap-y-2 max-w-full"><strong className="text-secondary-foreground">{getDisplayName(toolCall, t)}</strong>- <div className="px-4 py-2 bg-white rounded-sm">+ <div className="px-4 py-2 bg-white rounded-sm max-w-full">{renderConfirmBody(toolCall, t)}</div></div>@@ -71,15 +81,22 @@ export function ConfirmCard({size="sm"variant="ghost"onMouseEnter={() => setSelected('yes')}- onClick={(e) => {+ onClick={async (e) => {e.stopPropagation();e.preventDefault();- onUserConfirm(true);+ await handleConfirm(true);}}+ disabled={hasConfirmed}>- <ChevronRight- className={cn('size-4', selected === 'yes' ? 'visible' : 'invisible')}- />+ {hasConfirmed ? (+ <Spinner+ className={cn('size-4', selected === 'yes' ? 'visible' : 'invisible')}+ />+ ) : (+ <ChevronRight+ className={cn('size-4', selected === 'yes' ? 'visible' : 'invisible')}+ />+ )}1. {t('common.yes')}<div className={cn(selected === 'yes' ? 'text-muted-foreground' : 'invisible')}>(<Kbd>Enter</Kbd> {t('confirmCard.toConfirm')})@@ -94,30 +111,43 @@ export function ConfirmCard({size="sm"variant="ghost"onMouseEnter={() => setSelected('yes_with_rule')}- onClick={(e) => {+ onClick={async (e) => {e.stopPropagation();e.preventDefault();- onUserConfirm(true, [toolCall.suggested_rules![0]]);+ await handleConfirm(true, [toolCall.suggested_rules![0]]);}}+ disabled={hasConfirmed}><span className="flex items-start gap-1 w-full break-words whitespace-normal min-w-0">- <ChevronRight- className={cn(- 'size-4 shrink-0 mt-0.5',- selected === 'yes_with_rule' ? 'visible' : 'invisible',- )}- />- <span className="break-words min-w-0">+ {hasConfirmed ? (+ <Spinner+ className={cn(+ 'size-4 shrink-0 mt-0.5',+ selected === 'yes_with_rule' ? 'visible' : 'invisible',+ )}+ />+ ) : (+ <ChevronRight+ className={cn(+ 'size-4 shrink-0 mt-0.5',+ selected === 'yes_with_rule' ? 'visible' : 'invisible',+ )}+ />+ )}+ <span className="break-all min-w-0">2.{' '}{t('confirmCard.yesWithRule', {toolName: toolCall.suggested_rules![0].tool_name,ruleContent: toolCall.suggested_rules![0].rule_content,})}- {selected === 'yes_with_rule' && (- <span className="text-muted-foreground ml-1 whitespace-nowrap">- (<Kbd>Enter</Kbd> {t('confirmCard.toConfirm')})- </span>- )}+ <span+ className={cn(+ 'text-muted-foreground ml-1 whitespace-nowrap',+ selected === 'yes_with_rule' ? 'visible' : 'invisible',+ )}+ >+ (<Kbd>Enter</Kbd> {t('confirmCard.toConfirm')})+ </span></span></span></Button>@@ -130,15 +160,22 @@ export function ConfirmCard({size="sm"variant="ghost"onMouseEnter={() => setSelected('no')}- onClick={(e) => {+ onClick={async (e) => {e.stopPropagation();e.preventDefault();- onUserConfirm(false);+ await handleConfirm(false);}}+ disabled={hasConfirmed}>- <ChevronRight- className={cn('size-4', selected === 'no' ? 'visible' : 'invisible')}- />+ {hasConfirmed ? (+ <Spinner+ className={cn('size-4', selected === 'no' ? 'visible' : 'invisible')}+ />+ ) : (+ <ChevronRight+ className={cn('size-4', selected === 'no' ? 'visible' : 'invisible')}+ />+ )}{hasSuggestedRules ? '3' : '2'}. {t('common.no')}<div className={cn(selected === 'no' ? 'text-muted-foreground' : 'invisible')}>(<Kbd>Enter</Kbd> {t('confirmCard.toConfirm')})diff --git a/examples/web_ui/frontend/src/components/chat/FileAttachment.tsx b/examples/web_ui/frontend/src/components/chat/FileAttachment.tsxdeleted file mode 100644index 703a74133..000000000--- a/examples/web_ui/frontend/src/components/chat/FileAttachment.tsx+++ /dev/null@@ -1,119 +0,0 @@-import { Download, File, FileAudio, FileImage, FileText, FileVideo } from 'lucide-react';-import * as mime from 'mime-types';--interface FileIconProps {- /** The MIME type, e.g. `application/pdf`. */- mediaType: string;- /** Optional CSS classes forwarded to the icon. */- className?: string;-}--/**- * Render a representative icon for a file based on its MIME type.- *- * @param root0 - The component props.- * @param root0.mediaType - The MIME type of the file.- * @param root0.className - CSS classes forwarded to the icon.- * @returns A lucide icon element appropriate for the file kind.- */-function FileIcon({ mediaType, className }: FileIconProps) {- switch (mediaType.split('/')[0]) {- case 'image':- return <FileImage className={className} />;- case 'audio':- return <FileAudio className={className} />;- case 'video':- return <FileVideo className={className} />;- case 'text':- return <FileText className={className} />;- default:- return mediaType === 'application/pdf' ? (- <FileText className={className} />- ) : (- <File className={className} />- );- }-}--/**- * Classify a file href for safe, correct linking.- *- * - `safe`: only `http`/`https`/`data`/`blob` schemes become a clickable- * link, so a malicious model-supplied URL (e.g. `javascript:`) can't turn- * the card into a click-to-execute vector.- * - `downloadable`: the HTML `download` attribute is only honoured for- * same-origin, `blob:`, and `data:` URLs; cross-origin remote URLs ignore- * it and just open. We only set `download` when it will actually work, and- * open remote URLs in a new tab instead.- *- * @param href - The candidate href (remote URL or `data:` URL).- * @returns Whether the href is safe to link and whether `download` applies.- */-function classifyHref(href: string): { safe: boolean; downloadable: boolean } {- let url: URL;- try {- url = new URL(href, window.location.origin);- } catch {- return { safe: false, downloadable: false };- }- const safe = ['http:', 'https:', 'data:', 'blob:'].includes(url.protocol);- const downloadable =- url.protocol === 'data:' ||- url.protocol === 'blob:' ||- url.origin === window.location.origin;- return { safe, downloadable };-}--interface FileAttachmentProps {- /** Display name of the file (falls back to a name generated from the extension). */- name?: string;- /** Resolved href — a remote URL or a `data:` URL — used for download. */- href: string;- /** MIME type of the file, e.g. `application/pdf`. */- mediaType: string;-}--/**- * A compact, downloadable card for a non-previewable file attachment- * (PDF, Word, Excel, plain-text blobs, …).- *- * Image / audio / video data blocks are rendered inline by the caller;- * every other MIME type falls back to this card instead of rendering- * nothing at all.- *- * @param root0 - The component props.- * @param root0.name - Display name of the file.- * @param root0.href - Download href (remote URL or `data:` URL).- * @param root0.mediaType - MIME type of the file.- * @returns A downloadable file-attachment card.- */-export function FileAttachment({ name, href, mediaType }: FileAttachmentProps) {- const ext = (mime.extension(mediaType) || '').toUpperCase();- const displayName = name || (ext ? `file.${ext.toLowerCase()}` : 'file');- const { safe, downloadable } = classifyHref(href);-- // Only safe schemes become a real link. Downloadable hrefs (data:/blob:/- // same-origin) get `download`; remote URLs open in a new tab, where the- // `download` attribute would be ignored anyway.- const linkProps = !safe- ? {}- : downloadable- ? { href, download: displayName }- : { href, target: '_blank' as const, rel: 'noopener noreferrer' };-- return (- <a- {...linkProps}- className="group flex w-fit max-w-xs items-center gap-3 rounded-lg border bg-muted/40 px-3 py-2 no-underline transition-colors hover:bg-muted"- >- <span className="flex size-9 shrink-0 items-center justify-center rounded-md bg-background text-muted-foreground">- <FileIcon mediaType={mediaType} className="size-4" />- </span>- <span className="flex min-w-0 flex-col">- <span className="truncate text-sm font-medium text-foreground">{displayName}</span>- {ext && <span className="text-xs text-muted-foreground">{ext}</span>}- </span>- <Download className="size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" />- </a>- );-}diff --git a/examples/web_ui/frontend/src/components/chat/FlipCard.tsx b/examples/web_ui/frontend/src/components/chat/FlipCard.tsxnew file mode 100644index 000000000..19f4b6d9d--- /dev/null+++ b/examples/web_ui/frontend/src/components/chat/FlipCard.tsx@@ -0,0 +1,39 @@+import { motion, AnimatePresence } from 'framer-motion';+import React from 'react';++interface FlipCardProps {+ visible: boolean;+ children: React.ReactNode;+ className?: string;+}++/**+ * The flip card component.+ */+export const FlipCard: React.FC<FlipCardProps> = ({ visible, children, className }) => {+ return (+ <div style={{ perspective: '800px', perspectiveOrigin: '50% 100%' }} className={className}>+ <AnimatePresence mode="wait">+ {visible && (+ <motion.div+ key="flip-card"+ initial={{ rotateX: -90, opacity: 0 }}+ animate={{ rotateX: 0, opacity: 1 }}+ exit={{ rotateX: 90, opacity: 0 }}+ transition={{+ duration: 0.45,+ ease: [0.34, 1.2, 0.64, 1],+ }}+ style={{+ transformOrigin: 'bottom center',+ transformStyle: 'preserve-3d',+ willChange: 'transform, opacity',+ }}+ >+ {children}+ </motion.div>+ )}+ </AnimatePresence>+ </div>+ );+};diff --git a/examples/web_ui/frontend/src/components/chat/SubagentHitlCard.tsx b/examples/web_ui/frontend/src/components/chat/SubagentHitlCard.tsxindex 63224f7d2..0b0e09aa4 100644--- a/examples/web_ui/frontend/src/components/chat/SubagentHitlCard.tsx+++ b/examples/web_ui/frontend/src/components/chat/SubagentHitlCard.tsx@@ -37,8 +37,8 @@ export function SubagentHitlCard({if (toolCalls.length === 0) return null;return (- <div className="ring ring-border rounded-xl w-full p-3 space-y-3 bg-secondary/30">- <div className="flex items-center gap-2 text-sm font-medium text-secondary-foreground">+ <div className="ring ring-border rounded-[28px] w-full p-3 space-y-3 bg-white">+ <div className="flex items-center gap-2 text-sm font-medium text-secondary-foreground px-2"><Users className="size-4 shrink-0" /><span>{t('chat.subagentConfirmTitle', { name: entry.worker_agent_name })}</span></div>@@ -47,7 +47,9 @@ export function SubagentHitlCard({<ConfirmCardkey={toolCall.id}toolCall={toolCall}- onUserConfirm={(confirm, rules) => onConfirm(toolCall, confirm, rules)}+ onUserConfirm={async (confirm, rules) =>+ onConfirm(toolCall, confirm, rules)+ }/>))}</div>diff --git a/examples/web_ui/frontend/src/components/chat/TextInput.tsx b/examples/web_ui/frontend/src/components/chat/TextInput.tsxindex fb151761b..95e0bd1c9 100644--- a/examples/web_ui/frontend/src/components/chat/TextInput.tsx+++ b/examples/web_ui/frontend/src/components/chat/TextInput.tsx@@ -1,5 +1,6 @@import type { ContentBlock, TextBlock } from '@agentscope-ai/agentscope/message';-import { Paperclip, Send, Loader2, Square, X, type LucideIcon } from 'lucide-react';+import { Paperclip, Send, Loader2, Square, type LucideIcon, XIcon, FileText } from 'lucide-react';+import mime from 'mime';import React, {useState,useRef,@@ -12,6 +13,16 @@ import React, {import { Button } from '../ui/button';import { Kbd } from '../ui/kbd';+import {+ Attachment,+ AttachmentAction,+ AttachmentActions,+ AttachmentContent,+ AttachmentDescription,+ AttachmentGroup,+ AttachmentMedia,+ AttachmentTitle,+} from '@/components/ui/attachment.tsx';import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';import type { ReplyPhase } from '@/hooks/useMessages';import { useTranslation } from '@/i18n/useI18n.ts';@@ -196,6 +207,8 @@ export const TextInput = forwardRef<TextInputRef, TextInputProps>(id: crypto.randomUUID(),type: 'text',text: value.trim(),+ created_at: new Date().toISOString(),+ finished_at: new Date().toISOString(),};blocks.push(textBlock);}@@ -290,35 +303,64 @@ export const TextInput = forwardRef<TextInputRef, TextInputProps>(};return (- <div className={cn('flex flex-col gap-1', className)}>+ <div className={cn('flex flex-col', className)}><divid="tour-chat-input"- className="flex w-full flex-col gap-2 rounded-[28px] border bg-background px-2"+ className="flex w-full flex-col rounded-[28px] border bg-background px-2"data-tour="chat-input">- {/* File list */}{files.length > 0 && (- <div className="flex flex-wrap gap-2">- {files.map((file, index) => (- <div- key={index}- className="flex items-center gap-1 rounded bg-muted px-2 py-1 text-sm"- >- {file.status === 'processing' && (- <Loader2 className="h-3 w-3 shrink-0 animate-spin text-muted-foreground" />- )}- <span className="max-w-[200px] truncate">{file.name}</span>- <button- onClick={() =>- setFiles(files.filter((_, i) => i !== index))- }- className="text-muted-foreground hover:text-foreground"- >- <X className="h-3 w-3" />- </button>- </div>- ))}- </div>+ <AttachmentGroup className={'w-full max-w-full px-1 mt-1'}>+ {files.map((file, index) => {+ const isImage =+ file.block &&+ file.block.type === 'data' &&+ file.block.source.media_type.startsWith('image/');+ let data: undefined | string;+ if (file.block && file.block.type === 'data') {+ const block = file.block;+ data =+ block.source.type === 'url'+ ? block.source.url+ : `data:${block.source.media_type};base64,${block.source.data}`;+ }++ return (+ <Attachment>+ <AttachmentMedia variant={isImage ? 'image' : 'icon'}>+ {file.status === 'processing' ? (+ <Loader2 className="size-3 shrink-0 animate-spin" />+ ) : isImage ? (+ <img src={data} alt={file.name} />+ ) : (+ <FileText className="size-3" />+ )}+ </AttachmentMedia>+ <AttachmentContent>+ <AttachmentTitle>{file.name}</AttachmentTitle>+ <AttachmentDescription>+ {file.status === 'processing'+ ? t('common.uploading')+ : (+ mime.getExtension(+ mime.getType(file.name) || 'bin',+ ) || 'bin'+ ).toUpperCase()}+ </AttachmentDescription>+ </AttachmentContent>+ <AttachmentActions>+ <AttachmentAction+ onClick={() =>+ setFiles(files.filter((_, i) => i !== index))+ }+ >+ <XIcon />+ </AttachmentAction>+ </AttachmentActions>+ </Attachment>+ );+ })}+ </AttachmentGroup>)}{/* ``items-end`` in both layouts: the buttons are then already at thediff --git a/examples/web_ui/frontend/src/components/chat/tool-renderers/BashRenderer.tsx b/examples/web_ui/frontend/src/components/chat/tool-renderers/BashRenderer.tsxindex b3bc9fee7..2660b35b4 100644--- a/examples/web_ui/frontend/src/components/chat/tool-renderers/BashRenderer.tsx+++ b/examples/web_ui/frontend/src/components/chat/tool-renderers/BashRenderer.tsx@@ -15,7 +15,7 @@ export const BashRenderer: ToolRenderer = {description?: string;};return (- <div className="w-full max-w-full overflow-hidden text-ellipsis truncate">+ <div className="w-full max-w-full"><div className="text-secondary-foreground font-mono">{command}</div>{description && <div className="text-muted-foreground">{description}</div>}</div>diff --git a/examples/web_ui/frontend/src/components/chat/tool-renderers/DefaultRenderer.tsx b/examples/web_ui/frontend/src/components/chat/tool-renderers/DefaultRenderer.tsxindex 19e079294..9c1a6ed27 100644--- a/examples/web_ui/frontend/src/components/chat/tool-renderers/DefaultRenderer.tsx+++ b/examples/web_ui/frontend/src/components/chat/tool-renderers/DefaultRenderer.tsx@@ -11,7 +11,7 @@ export function defaultGetDisplayName(call: ToolCallBlock): string {export function defaultRenderConfirmBody(call: ToolCallBlock): ReactNode {return (- <div className="w-full max-w-full overflow-hidden text-ellipsis truncate">+ <div className="w-full max-w-full overflow-hidden break-words"><div className="text-secondary-foreground">{call.input}</div></div>);diff --git a/examples/web_ui/frontend/src/components/chat/tool-renderers/EditRenderer.tsx b/examples/web_ui/frontend/src/components/chat/tool-renderers/EditRenderer.tsxindex 36e724b86..5cb7d276a 100644--- a/examples/web_ui/frontend/src/components/chat/tool-renderers/EditRenderer.tsx+++ b/examples/web_ui/frontend/src/components/chat/tool-renderers/EditRenderer.tsx@@ -48,7 +48,7 @@ export const EditRenderer: ToolRenderer = {getDisplayName: (call) => call.name,renderConfirmBody: (call) => (- <div className="w-full max-w-full overflow-hidden text-ellipsis truncate">+ <div className="w-full max-w-full overflow-hidden break-words"><div className="text-secondary-foreground">{tryGetFilePath(call.input)}</div></div>),diff --git a/examples/web_ui/frontend/src/components/chat/tool-renderers/ReadRenderer.tsx b/examples/web_ui/frontend/src/components/chat/tool-renderers/ReadRenderer.tsxindex dc7980ff9..ba35c1441 100644--- a/examples/web_ui/frontend/src/components/chat/tool-renderers/ReadRenderer.tsx+++ b/examples/web_ui/frontend/src/components/chat/tool-renderers/ReadRenderer.tsx@@ -43,7 +43,7 @@ export const ReadRenderer: ToolRenderer = {getDisplayName: (_call, t) => t('tool.read.name'),renderConfirmBody: (call) => (- <div className="w-full max-w-full overflow-hidden text-ellipsis truncate">+ <div className="w-full max-w-full overflow-hidden break-words"><div className="text-secondary-foreground">{tryGetFilePath(call.input)}</div></div>),diff --git a/examples/web_ui/frontend/src/components/chat/tool-renderers/WriteRenderer.tsx b/examples/web_ui/frontend/src/components/chat/tool-renderers/WriteRenderer.tsxindex 3d321bbc2..43ecf7d5b 100644--- a/examples/web_ui/frontend/src/components/chat/tool-renderers/WriteRenderer.tsx+++ b/examples/web_ui/frontend/src/components/chat/tool-renderers/WriteRenderer.tsx@@ -16,7 +16,7 @@ export const WriteRenderer: ToolRenderer = {getDisplayName: (call) => call.name,renderConfirmBody: (call) => (- <div className="w-full max-w-full overflow-hidden text-ellipsis truncate">+ <div className="w-full max-w-full overflow-hidden break-words"><div className="text-secondary-foreground">{tryGetFilePath(call.input)}</div></div>),diff --git a/examples/web_ui/frontend/src/components/chat/tool-renderers/_shared.tsx b/examples/web_ui/frontend/src/components/chat/tool-renderers/_shared.tsxindex 2695d20e6..8918df3eb 100644--- a/examples/web_ui/frontend/src/components/chat/tool-renderers/_shared.tsx+++ b/examples/web_ui/frontend/src/components/chat/tool-renderers/_shared.tsx@@ -92,7 +92,7 @@ export function ToolCallRow({{expandable && (<ChevronRightclassName={- 'size-3 shrink-0 transition-transform hidden group-hover:flex group-data-[state=open]:flex group-data-[state=open]:rotate-90'+ 'size-3 shrink-0 transition-transform text-transparent group-hover:text-current group-data-[state=open]:flex group-data-[state=open]:rotate-90'}/>)}@@ -200,6 +200,7 @@ export function FramedFileBody({ filePath, children }: { filePath?: string; chil* how many lines were inserted and deleted.*/export function DiffStats({ insertions, deletions }: { insertions: number; deletions: number }) {+ if (insertions === 0 && deletions === 0) return null;return (<div className="flex items-center gap-0.5"><div className="flex items-center text-emerald-600 dark:text-emerald-400">diff --git a/examples/web_ui/frontend/src/components/markdown/index.tsx b/examples/web_ui/frontend/src/components/markdown/index.tsxnew file mode 100644index 000000000..d9c53d20a--- /dev/null+++ b/examples/web_ui/frontend/src/components/markdown/index.tsx@@ -0,0 +1,29 @@+import { cjk } from '@streamdown/cjk';+import { code } from '@streamdown/code';+import { math } from '@streamdown/math';+import { mermaid } from '@streamdown/mermaid';+import * as React from 'react';+import { Streamdown } from 'streamdown';++import { cn } from '@/lib/utils';++const DEFAULT_PLUGINS = { code, math, cjk, mermaid };++function Markdown({+ className,+ plugins = DEFAULT_PLUGINS,+ controls = false,+ ...props+}: React.ComponentProps<typeof Streamdown>) {+ return (+ <Streamdown+ data-slot="markdown"+ plugins={plugins}+ controls={controls}+ className={cn('cn-markdown w-full min-w-0 overflow-hidden', className)}+ {...props}+ />+ );+}++export { Markdown };diff --git a/examples/web_ui/frontend/src/components/ui/attachment.tsx b/examples/web_ui/frontend/src/components/ui/attachment.tsxnew file mode 100644index 000000000..8174d97c9--- /dev/null+++ b/examples/web_ui/frontend/src/components/ui/attachment.tsx@@ -0,0 +1,191 @@+import * as React from 'react';+import { cva, type VariantProps } from 'class-variance-authority';+import { Slot } from 'radix-ui';++import { cn } from '@/lib/utils';+import { Button } from '@/components/ui/button';++const attachmentVariants = cva(+ 'group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed',+ {+ variants: {+ size: {+ default:+ 'gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2',+ sm: 'gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5',+ xs: 'gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1',+ },+ orientation: {+ horizontal: 'min-w-40 items-center',+ vertical: 'w-24 flex-col has-data-[slot=attachment-content]:w-30',+ },+ },+ },+);++function Attachment({+ className,+ state = 'done',+ size = 'default',+ orientation = 'horizontal',+ ...props+}: React.ComponentProps<'div'> &+ VariantProps<typeof attachmentVariants> & {+ state?: 'idle' | 'uploading' | 'processing' | 'error' | 'done';+ }) {+ return (+ <div+ data-slot="attachment"+ data-state={state}+ data-size={size}+ data-orientation={orientation}+ className={cn(attachmentVariants({ size, orientation }), className)}+ {...props}+ />+ );+}++const attachmentMediaVariants = cva(+ "relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5",+ {+ variants: {+ variant: {+ icon: '',+ image: 'opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover',+ },+ },+ defaultVariants: {+ variant: 'icon',+ },+ },+);++function AttachmentMedia({+ className,+ variant = 'icon',+ ...props+}: React.ComponentProps<'div'> & VariantProps<typeof attachmentMediaVariants>) {+ return (+ <div+ data-slot="attachment-media"+ data-variant={variant}+ className={cn(attachmentMediaVariants({ variant }), className)}+ {...props}+ />+ );+}++function AttachmentContent({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="attachment-content"+ className={cn(+ 'max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1',+ className,+ )}+ {...props}+ />+ );+}++function AttachmentTitle({ className, ...props }: React.ComponentProps<'span'>) {+ return (+ <span+ data-slot="attachment-title"+ className={cn(+ 'block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer',+ className,+ )}+ {...props}+ />+ );+}++function AttachmentDescription({ className, ...props }: React.ComponentProps<'span'>) {+ return (+ <span+ data-slot="attachment-description"+ className={cn(+ 'mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80',+ 'max-w-full',+ className,+ )}+ {...props}+ />+ );+}++function AttachmentActions({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="attachment-actions"+ className={cn(+ 'relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1',+ className,+ )}+ {...props}+ />+ );+}++function AttachmentAction({+ className,+ variant,+ size = 'icon-xs',+ ...props+}: React.ComponentProps<typeof Button>) {+ return (+ <Button+ data-slot="attachment-action"+ variant={variant ?? 'ghost'}+ size={size}+ className={cn(className)}+ {...props}+ />+ );+}++function AttachmentTrigger({+ className,+ asChild = false,+ type,+ ...props+}: React.ComponentProps<'button'> & {+ asChild?: boolean;+}) {+ const Comp = asChild ? Slot.Root : 'button';++ return (+ <Comp+ data-slot="attachment-trigger"+ type={asChild ? undefined : (type ?? 'button')}+ className={cn('absolute inset-0 z-10 outline-none', className)}+ {...props}+ />+ );+}++function AttachmentGroup({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="attachment-group"+ className={cn(+ 'flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start',+ className,+ )}+ {...props}+ />+ );+}++export {+ Attachment,+ AttachmentGroup,+ AttachmentMedia,+ AttachmentContent,+ AttachmentTitle,+ AttachmentDescription,+ AttachmentActions,+ AttachmentAction,+ AttachmentTrigger,+};diff --git a/examples/web_ui/frontend/src/components/ui/bubble.tsx b/examples/web_ui/frontend/src/components/ui/bubble.tsxnew file mode 100644index 000000000..f05f0a7b0--- /dev/null+++ b/examples/web_ui/frontend/src/components/ui/bubble.tsx@@ -0,0 +1,122 @@+import * as React from 'react';+import { cva, type VariantProps } from 'class-variance-authority';+import { Slot } from 'radix-ui';++import { cn } from '@/lib/utils';++function BubbleGroup({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="bubble-group"+ className={cn('flex min-w-0 flex-col gap-2', className)}+ {...props}+ />+ );+}++const bubbleVariants = cva(+ 'group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full',+ {+ variants: {+ variant: {+ default:+ '*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80',+ secondary:+ '*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]',+ muted: '*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]',+ tinted: '*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]',+ outline:+ '*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30',+ ghost: 'border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50',+ destructive:+ '*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30',+ },+ },+ defaultVariants: {+ variant: 'default',+ },+ },+);++function Bubble({+ variant = 'default',+ align = 'start',+ className,+ ...props+}: React.ComponentProps<'div'> &+ VariantProps<typeof bubbleVariants> & {+ align?: 'start' | 'end';+ }) {+ return (+ <div+ data-slot="bubble"+ data-variant={variant}+ data-align={align}+ className={cn(bubbleVariants({ variant }), className)}+ {...props}+ />+ );+}++function BubbleContent({+ asChild = false,+ className,+ ...props+}: React.ComponentProps<'div'> & {+ asChild?: boolean;+}) {+ const Comp = asChild ? Slot.Root : 'div';++ return (+ <Comp+ data-slot="bubble-content"+ className={cn(+ 'w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50',+ className,+ )}+ {...props}+ />+ );+}++const bubbleReactionsVariants = cva(+ 'absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0',+ {+ variants: {+ side: {+ top: 'top-0 -translate-y-3/4',+ bottom: 'bottom-0 translate-y-3/4',+ },+ align: {+ start: 'left-3',+ end: 'right-3',+ },+ },+ defaultVariants: {+ side: 'bottom',+ align: 'end',+ },+ },+);++function BubbleReactions({+ side = 'bottom',+ align = 'end',+ className,+ ...props+}: React.ComponentProps<'div'> & {+ align?: 'start' | 'end';+ side?: 'top' | 'bottom';+}) {+ return (+ <div+ data-slot="bubble-reactions"+ data-align={align}+ data-side={side}+ className={cn(bubbleReactionsVariants({ side, align }), className)}+ {...props}+ />+ );+}++export { BubbleGroup, Bubble, BubbleContent, BubbleReactions };diff --git a/examples/web_ui/frontend/src/components/ui/button.tsx b/examples/web_ui/frontend/src/components/ui/button.tsxindex 8a215c480..e23771a63 100644--- a/examples/web_ui/frontend/src/components/ui/button.tsx+++ b/examples/web_ui/frontend/src/components/ui/button.tsx@@ -3,7 +3,7 @@ import { cva, type VariantProps } from 'class-variance-authority';import { Slot } from 'radix-ui';import { cn } from '@/lib/utils';-import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip.tsx';+import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",diff --git a/examples/web_ui/frontend/src/components/ui/marker.tsx b/examples/web_ui/frontend/src/components/ui/marker.tsxnew file mode 100644index 000000000..facd0b9ec--- /dev/null+++ b/examples/web_ui/frontend/src/components/ui/marker.tsx@@ -0,0 +1,66 @@+import * as React from 'react';+import { cva, type VariantProps } from 'class-variance-authority';+import { Slot } from 'radix-ui';++import { cn } from '@/lib/utils';++const markerVariants = cva(+ "group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground",+ {+ variants: {+ variant: {+ default: '',+ separator:+ 'before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border',+ border: 'border-b border-border pb-2',+ },+ },+ },+);++function Marker({+ className,+ variant = 'default',+ asChild = false,+ ...props+}: React.ComponentProps<'div'> &+ VariantProps<typeof markerVariants> & {+ asChild?: boolean;+ }) {+ const Comp = asChild ? Slot.Root : 'div';++ return (+ <Comp+ data-slot="marker"+ data-variant={variant}+ className={cn(markerVariants({ variant, className }))}+ {...props}+ />+ );+}++function MarkerIcon({ className, ...props }: React.ComponentProps<'span'>) {+ return (+ <span+ data-slot="marker-icon"+ aria-hidden="true"+ className={cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className)}+ {...props}+ />+ );+}++function MarkerContent({ className, ...props }: React.ComponentProps<'span'>) {+ return (+ <span+ data-slot="marker-content"+ className={cn(+ 'min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',+ className,+ )}+ {...props}+ />+ );+}++export { Marker, MarkerIcon, MarkerContent, markerVariants };diff --git a/examples/web_ui/frontend/src/components/ui/message-scroller.tsx b/examples/web_ui/frontend/src/components/ui/message-scroller.tsxnew file mode 100644index 000000000..ff924e330--- /dev/null+++ b/examples/web_ui/frontend/src/components/ui/message-scroller.tsx@@ -0,0 +1,128 @@+import * as React from 'react';+import {+ MessageScroller as MessageScrollerPrimitive,+ useMessageScroller,+ useMessageScrollerScrollable,+ useMessageScrollerVisibility,+} from '@shadcn/react/message-scroller';++import { cn } from '@/lib/utils';+import { Button } from '@/components/ui/button';+import { ArrowDownIcon } from 'lucide-react';++function MessageScrollerProvider(+ props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>,+) {+ return <MessageScrollerPrimitive.Provider {...props} />;+}++function MessageScroller({+ className,+ ...props+}: React.ComponentProps<typeof MessageScrollerPrimitive.Root>) {+ return (+ <MessageScrollerPrimitive.Root+ data-slot="message-scroller"+ className={cn(+ 'group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden',+ className,+ )}+ {...props}+ />+ );+}++function MessageScrollerViewport({+ className,+ ...props+}: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>) {+ return (+ <MessageScrollerPrimitive.Viewport+ data-slot="message-scroller-viewport"+ className={cn(+ 'size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent',+ className,+ )}+ {...props}+ />+ );+}++function MessageScrollerContent({+ className,+ ...props+}: React.ComponentProps<typeof MessageScrollerPrimitive.Content>) {+ return (+ <MessageScrollerPrimitive.Content+ data-slot="message-scroller-content"+ className={cn('flex h-max min-h-full flex-col gap-6', className)}+ {...props}+ />+ );+}++function MessageScrollerItem({+ className,+ scrollAnchor = false,+ ...props+}: React.ComponentProps<typeof MessageScrollerPrimitive.Item>) {+ return (+ <MessageScrollerPrimitive.Item+ data-slot="message-scroller-item"+ scrollAnchor={scrollAnchor}+ className={cn(+ 'min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]',+ className,+ )}+ {...props}+ />+ );+}++function MessageScrollerButton({+ direction = 'end',+ className,+ children,+ render,+ variant = 'secondary',+ size = 'icon-sm',+ ...props+}: React.ComponentProps<typeof MessageScrollerPrimitive.Button> &+ Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {+ return (+ <MessageScrollerPrimitive.Button+ data-slot="message-scroller-button"+ data-direction={direction}+ data-variant={variant}+ data-size={size}+ direction={direction}+ className={cn(+ 'absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180',+ className,+ )}+ render={render ?? <Button variant={variant} size={size} />}+ {...props}+ >+ {children ?? (+ <>+ <ArrowDownIcon />+ <span className="sr-only">+ {direction === 'end' ? 'Scroll to end' : 'Scroll to start'}+ </span>+ </>+ )}+ </MessageScrollerPrimitive.Button>+ );+}++export {+ MessageScrollerProvider,+ MessageScroller,+ MessageScrollerViewport,+ MessageScrollerContent,+ MessageScrollerItem,+ MessageScrollerButton,+ useMessageScroller,+ useMessageScrollerScrollable,+ useMessageScrollerVisibility,+};diff --git a/examples/web_ui/frontend/src/components/ui/message.tsx b/examples/web_ui/frontend/src/components/ui/message.tsxnew file mode 100644index 000000000..f37847267--- /dev/null+++ b/examples/web_ui/frontend/src/components/ui/message.tsx@@ -0,0 +1,85 @@+import * as React from 'react';++import { cn } from '@/lib/utils';++function MessageGroup({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="message-group"+ className={cn('flex min-w-0 flex-col gap-2', className)}+ {...props}+ />+ );+}++function Message({+ className,+ align = 'start',+ ...props+}: React.ComponentProps<'div'> & { align?: 'start' | 'end' }) {+ return (+ <div+ data-slot="message"+ data-align={align}+ className={cn(+ 'group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse',+ className,+ )}+ {...props}+ />+ );+}++function MessageAvatar({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="message-avatar"+ className={cn(+ 'flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8',+ className,+ )}+ {...props}+ />+ );+}++function MessageContent({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="message-content"+ className={cn(+ 'flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end',+ className,+ )}+ {...props}+ />+ );+}++function MessageHeader({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="message-header"+ className={cn(+ 'flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0',+ className,+ )}+ {...props}+ />+ );+}++function MessageFooter({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="message-footer"+ className={cn(+ 'flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end',+ className,+ )}+ {...props}+ />+ );+}++export { MessageGroup, Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader };diff --git a/examples/web_ui/frontend/src/i18n/locales/en.json b/examples/web_ui/frontend/src/i18n/locales/en.jsonindex 4c87e248b..d93e27452 100644--- a/examples/web_ui/frontend/src/i18n/locales/en.json+++ b/examples/web_ui/frontend/src/i18n/locales/en.json@@ -37,6 +37,7 @@"switchToEn": "Switch to English","success": "Success","team": "Team",+ "uploading": "Uploading","leader": "Leader","worker": "Worker","time": "Time",@@ -99,14 +100,17 @@},"messageBubble": {"thinking": "Thinking",+ "thinkingFor": "Thinking for {{duration}}","audioGenerating": "Generating audio…","playAudio": "Play audio","pauseAudio": "Pause audio","running": "Running...","hintSource": {"tool_output": "Tool Output",- "team_message": "Team Message",- "schedule": "Schedule"+ "team": "Team",+ "team_message": "Team",+ "schedule": "Schedule",+ "system": "System"},"error": {"title": "Reply failed",diff --git a/examples/web_ui/frontend/src/i18n/locales/zh.json b/examples/web_ui/frontend/src/i18n/locales/zh.jsonindex a061f2fa5..57bdbe298 100644--- a/examples/web_ui/frontend/src/i18n/locales/zh.json+++ b/examples/web_ui/frontend/src/i18n/locales/zh.json@@ -31,12 +31,13 @@"save": "保存","saving": "保存中…","schedule": "日程",- "selectAgent": "选择 Agent",+ "selectAgent": "选择智能体","settings": "设置","switchToZh": "切换为中文","switchToEn": "Switch to English","success": "成功","team": "团队",+ "uploading": "上传中","leader": "队长","worker": "成员","time": "时间",@@ -99,14 +100,17 @@},"messageBubble": {"thinking": "思考中",+ "thinkingFor": "思考 {{duration}}","audioGenerating": "正在生成音频…","playAudio": "播放音频","pauseAudio": "暂停音频","running": "运行中...","hintSource": {"tool_output": "工具输出",+ "team": "团队","team_message": "团队消息",- "schedule": "定时任务"+ "schedule": "定时任务",+ "system": "系统消息"},"error": {"title": "回复失败",diff --git a/examples/web_ui/frontend/src/index.css b/examples/web_ui/frontend/src/index.cssindex 5e9595773..32cf15e63 100644--- a/examples/web_ui/frontend/src/index.css+++ b/examples/web_ui/frontend/src/index.css@@ -2,6 +2,8 @@@import 'tw-animate-css';@import 'shadcn/tailwind.css';@import '@fontsource-variable/geist';+@source '../node_modules/streamdown/dist/*.js';+@source '../node_modules/@streamdown/*/dist/*.js';@plugin '@tailwindcss/typography';diff --git a/examples/web_ui/frontend/src/pages/chat/ChatViewport.tsx b/examples/web_ui/frontend/src/pages/chat/ChatViewport.tsxindex 56f776329..dbff0c4b4 100644--- a/examples/web_ui/frontend/src/pages/chat/ChatViewport.tsx+++ b/examples/web_ui/frontend/src/pages/chat/ChatViewport.tsx@@ -622,22 +622,18 @@ export function ChatViewport({ agentId, sessionId, onTeamUpdated }: ChatViewportonInterrupt={interrupt}footerSlot={subagentHitl.length > 0 ? (- <div className="space-y-2 pb-2">- {subagentHitl.map((entry) => (- <SubagentHitlCard- key={`${entry.worker_session_id}:${entry.reply_id}`}- entry={entry}- onConfirm={(toolCall, confirm, rules) =>- onSubagentConfirm(- entry,- toolCall,- confirm,- rules,- )- }- />- ))}- </div>+ <SubagentHitlCard+ key={`${subagentHitl[0].worker_session_id}:${subagentHitl[0].reply_id}`}+ entry={subagentHitl[0]}+ onConfirm={(toolCall, confirm, rules) =>+ onSubagentConfirm(+ subagentHitl[0],+ toolCall,+ confirm,+ rules,+ )+ }+ />) : null}allowedInputTypes={(@@ -663,6 +659,7 @@ export function ChatViewport({ agentId, sessionId, onTeamUpdated }: ChatViewportfile.type || 'application/octet-stream',},name: file.name,+ created_at: new Date().toISOString(),};}if (file.type === 'text/plain') {@@ -671,6 +668,7 @@ export function ChatViewport({ agentId, sessionId, onTeamUpdated }: ChatViewportid: crypto.randomUUID(),type: 'text' as const,text: `[File: ${file.name}]\n${text}`,+ created_at: new Date().toISOString(),};}const buffer = await file.arrayBuffer();@@ -689,6 +687,7 @@ export function ChatViewport({ agentId, sessionId, onTeamUpdated }: ChatViewportdata: base64,},name: file.name,+ created_at: new Date().toISOString(),};}}/>diff --git a/examples/web_ui/pnpm-lock.yaml b/examples/web_ui/pnpm-lock.yamlindex 73c8ae8f0..741d3919b 100644--- a/examples/web_ui/pnpm-lock.yaml+++ b/examples/web_ui/pnpm-lock.yaml@@ -58,11 +58,26 @@ importers:frontend:dependencies:'@agentscope-ai/agentscope':- specifier: ^0.0.14- version: 0.0.14+ specifier: ^0.0.15+ version: 0.0.15'@fontsource-variable/geist':specifier: ^5.2.8version: 5.2.8+ '@shadcn/react':+ specifier: ^0.2.1+ version: 0.2.1(@types/[email protected])([email protected])+ '@streamdown/cjk':+ specifier: ^1.0.3+ version: 1.0.3(@types/[email protected])([email protected])([email protected])([email protected])([email protected])+ '@streamdown/code':+ specifier: ^1.1.1+ version: 1.1.1([email protected])+ '@streamdown/math':+ specifier: ^1.0.2+ version: 1.0.2([email protected])+ '@streamdown/mermaid':+ specifier: ^1.0.2+ version: 1.0.2([email protected])'@tailwindcss/vite':specifier: ^4.3.0@@ -93,6 +108,9 @@ importers:lucide-react:specifier: ^1.16.0version: 1.16.0([email protected])+ mime:+ specifier: ^4.1.0+ version: 4.1.0mime-types:specifier: ^3.0.2version: 3.0.2@@ -120,18 +138,12 @@ importers:react-i18next:specifier: ^17.0.8version: 17.0.8([email protected]([email protected]))([email protected]([email protected]))([email protected])([email protected])- react-markdown:- specifier: ^10.1.0- version: 10.1.0(@types/[email protected])([email protected])react-resizable-panels:specifier: ^4.11.2react-router-dom:specifier: ^7.15.1- remark-gfm:- specifier: ^4.0.1- version: 4.0.1shadcn:specifier: ^4.13.0version: 4.13.0(@cfworker/[email protected])([email protected])@@ -141,6 +153,9 @@ importers:sonner:specifier: ^2.0.7+ streamdown:+ specifier: ^2.5.0tailwind-merge:specifier: ^3.6.0version: 3.6.0@@ -183,7 +198,7 @@ importers:version: 10.3.0([email protected])eslint-plugin-import-x:specifier: ^4.16.2- version: 4.16.2(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])+ version: 4.16.2(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))eslint-plugin-react-hooks:specifier: ^7.1.1version: 7.1.1([email protected]([email protected]))@@ -198,7 +213,7 @@ importers:version: 6.0.3typescript-eslint:specifier: ^8.59.2vite:specifier: ^8.0.12@@ -208,8 +223,11 @@ importers:packages:- '@agentscope-ai/[email protected]':- resolution: {integrity: sha512-ZS2kv+lC8anT4R8PlL3L5jn2l4RTIqOEkvA3o9xJsR/8/++1Z/GsAFsNzTxbchnywWx/aULAsBN81xtdObCo+w==}+ '@agentscope-ai/[email protected]':+ resolution: {integrity: sha512-gpznyUOZB16pfxT8WagMv3np2/OHMdnAynKjXERBs+MM1IWyxpRQFtD5yubrmJ9SPFUoKFOtnEIc3ohJk3BS7w==}++ '@antfu/[email protected]':+ resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==}'@babel/[email protected]':resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==}@@ -344,9 +362,15 @@ packages:resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==}engines: {node: '>=6.9.0'}+ '@braintree/[email protected]':+ resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==}+'@cfworker/[email protected]':resolution: {integrity: sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==}+ '@chevrotain/[email protected]':+ resolution: {integrity: sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==}+'@cspotcode/[email protected]':resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}engines: {node: '>=12'}@@ -456,6 +480,12 @@ packages:resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}engines: {node: '>=18.18'}+ '@iconify/[email protected]':+ resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}++ '@iconify/[email protected]':+ resolution: {integrity: sha512-b1S7B1k9ohZ+iNTi2ATxbRYG9fTrJmUT0rc46bvVnNxqNRGW7dyo/vRREwyniI5IRN2RSJHDcm+s3BjWrSAjHw==}+'@img/[email protected]':resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==}engines: {node: '>=18'}@@ -628,6 +658,9 @@ packages:'@jridgewell/[email protected]':resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}+ '@mermaid-js/[email protected]':+ resolution: {integrity: sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==}+'@modelcontextprotocol/[email protected]':resolution: {integrity: sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==}engines: {node: '>=18'}@@ -1539,10 +1572,62 @@ packages:'@sec-ant/[email protected]':resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}+ '@shadcn/[email protected]':+ resolution: {integrity: sha512-5krgi3dRMKb5jH6a+qPzVJUy/54s0kKE4Rw4LjDfLqOdVQTWKUgxWf1kW8r912I0jX/Lzxqc+pgjkjWxUIK5BQ==}+ peerDependencies:+ '@types/react': '>=19'+ react: '>=19'+ peerDependenciesMeta:+ '@types/react':+ optional: true+ react:+ optional: true++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==}++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-aHt9eiGFobmWR5uqJUViySI1bHMqrAgamWE1TYSUoftkAeCCAiGawPMwM+VCadylQtF4V3VNOZ5LmfItH5f3yA==}++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==}++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==}++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==}++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==}++ '@shikijs/[email protected]':+ resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}+'@sindresorhus/[email protected]':resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==}engines: {node: '>=18'}+ '@streamdown/[email protected]':+ resolution: {integrity: sha512-WRg8HR/gHbBoTgsMd91OKFUClIoDcEFVofJvluvEAyjx3KpU0aGgD9tGDqHkHj14ShoMSkX0IYetWGegTcwIJw==}+ peerDependencies:+ react: ^18.0.0 || ^19.0.0++ '@streamdown/[email protected]':+ resolution: {integrity: sha512-i7HTNuDgZWb+VdrNVOam9gQhIc5MSSDXKWXgbUrn/4vSRaSMM+Rtl10MQj4wLWPNpF7p80waJsAqFP8HZfb0Jg==}+ peerDependencies:+ react: ^18.0.0 || ^19.0.0++ '@streamdown/[email protected]':+ resolution: {integrity: sha512-r8Ur9/lBuFnzZAFdEWrLUF2s/gRwRRRwruqltdZibyjbCBnuW7SJbFm26nXqvpJPW/gzpBUMrBVBzd88z05D5g==}+ peerDependencies:+ react: ^18.0.0 || ^19.0.0++ '@streamdown/[email protected]':+ resolution: {integrity: sha512-Fr/4sBWnAeSnxM3PcrV/+DiZe5oPMq9gOkUIAH7ZauJeuwrZ/DVzD4g0zlav6AH0axh2m/sOfrfLtY5aLT7niw==}+ peerDependencies:+ react: ^18.0.0 || ^19.0.0+'@svgr/[email protected]':resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==}engines: {node: '>=14'}@@ -1740,6 +1825,99 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==}+ '@types/[email protected]':+ resolution: {integrity: sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==}++ '@types/[email protected]':+ resolution: {integrity: sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==}++ '@types/[email protected]':+ resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==}++ '@types/[email protected]':+ resolution: {integrity: sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==}++ '@types/[email protected]':+ resolution: {integrity: sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==}++ '@types/[email protected]':+ resolution: {integrity: sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==}++ '@types/[email protected]':+ resolution: {integrity: sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==}++ '@types/[email protected]':+ resolution: {integrity: sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==}++ '@types/[email protected]':+ resolution: {integrity: sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==}++ '@types/[email protected]':+ resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==}++ '@types/[email protected]':+ resolution: {integrity: sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==}++ '@types/[email protected]':+ resolution: {integrity: sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==}++ '@types/[email protected]':+ resolution: {integrity: sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==}++ '@types/[email protected]':+ resolution: {integrity: sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==}++ '@types/[email protected]':+ resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==}++ '@types/[email protected]':+ resolution: {integrity: sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==}++ '@types/[email protected]':+ resolution: {integrity: sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==}++ '@types/[email protected]':+ resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==}+'@types/[email protected]':resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==}@@ -1758,6 +1936,9 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==}+ '@types/[email protected]':+ resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==}+'@types/[email protected]':resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}@@ -1767,6 +1948,9 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}+ '@types/[email protected]':+ resolution: {integrity: sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==}+'@types/[email protected]':resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==}@@ -1808,6 +1992,9 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==}+ '@types/[email protected]':+ resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}+'@types/[email protected]':resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==}@@ -1982,6 +2169,9 @@ packages:cpu: [x64]os: [win32]+ '@upsetjs/[email protected]':+ resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==}+'@vitejs/[email protected]':resolution: {integrity: sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ==}engines: {node: ^20.19.0 || >=22.12.0}@@ -2216,6 +2406,14 @@ packages:resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==}engines: {node: '>=20'}+ resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}+ engines: {node: '>= 10'}++ resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}+ engines: {node: '>= 12'}+resolution: {integrity: sha512-ObxuY6vnbWTN6Od72xfwN9DbzC7Y2vv8u1Soi9ahRKL37gb6y1qk6/dgjs+3JWuXJHWvsg3BXIwzd/rkmAwavg==}engines: {node: '>= 12.0.0'}@@ -2263,6 +2461,12 @@ packages:resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==}engines: {node: '>= 0.10'}+ resolution: {integrity: sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==}++ resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==}+resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==}engines: {node: '>=14'}@@ -2300,6 +2504,162 @@ packages:resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}+ resolution: {integrity: sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==}+ peerDependencies:+ cytoscape: ^3.2.0++ resolution: {integrity: sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==}+ peerDependencies:+ cytoscape: ^3.2.0++ resolution: {integrity: sha512-62rNSrioXw93uliKFBwjukeQyeWwH2PqDrTac31r2P6464u3AUvTk0xS4LVvT251g7IgkFunrI48ZEZGjywSOg==}+ engines: {node: '>=0.10'}++ resolution: {integrity: sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==}++ resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==}+ engines: {node: '>=12'}+ hasBin: true++ resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==}++ resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==}++ resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==}++ resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==}+ engines: {node: '>=12'}+ peerDependencies:+ d3-selection: 2 - 3++ resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==}+resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==}engines: {node: '>=0.11'}@@ -2307,6 +2667,9 @@ packages:resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==}+ resolution: {integrity: sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==}+resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}peerDependencies:@@ -2354,6 +2717,9 @@ packages:resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==}engines: {node: '>=12'}+ resolution: {integrity: sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==}+resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}engines: {node: '>= 0.8'}@@ -2391,6 +2757,9 @@ packages:resolution: {integrity: sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==}engines: {node: '>=0.3.1'}+ resolution: {integrity: sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==}+resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==}@@ -2430,6 +2799,10 @@ packages:resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}engines: {node: '>=0.12'}+ resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==}+ engines: {node: '>=0.12'}+resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}engines: {node: '>=6'}@@ -2453,6 +2826,9 @@ packages:resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==}+resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}engines: {node: '>=6'}@@ -2786,6 +3162,9 @@ packages:resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==}engines: {node: '>=6.0'}+ resolution: {integrity: sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==}+resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}engines: {node: '>=4'}@@ -2802,12 +3181,48 @@ packages:resolution: {integrity: sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-N+LqofjR2zuzTjCPzyDUdSshy4Ma6li7p/c3pA78uTwzFgENbgbUrm2ugwsOdcjI1muO+o6Dgzp9p8WHtn/39Q==}++ resolution: {integrity: sha512-zJfpXq44yff2hmE0XmwEOzdWin5xwH+QIhMLOScpX91e/NSGPsAzNCvLQDIEPyO2TXi+lBmU6hjLIhV8MwP2kw==}++ resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==}++ resolution: {integrity: sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==}++ resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==}++ resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==}++ resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==}++ resolution: {integrity: sha512-3yTWghByc50aGS7JlGhk61SPenfE/p1oaFeNwkOOyrscaOkMGrcW9+Cy/QAIOBpZxP1yqDIzFMR0+Np0i0+usg==}++ resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==}+resolution: {integrity: sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==}+ resolution: {integrity: sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA==}++ resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==}+resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==}+ resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==}+resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==}@@ -2824,6 +3239,9 @@ packages:resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==}+ resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==}+resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==}engines: {node: '>= 0.8'}@@ -2856,6 +3274,10 @@ packages:resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}+ engines: {node: '>=0.10.0'}+resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==}engines: {node: '>=0.10.0'}@@ -2875,6 +3297,9 @@ packages:resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}engines: {node: '>=6'}+ resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==}+resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}engines: {node: '>=0.8.19'}@@ -2885,6 +3310,13 @@ packages:resolution: {integrity: sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==}+ resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==}++ resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==}+ engines: {node: '>=12'}+resolution: {integrity: sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==}engines: {node: '>= 12'}@@ -3049,9 +3481,16 @@ packages:resolution: {integrity: sha512-tWPGKMZf/8UPim+fcW2EfcQ/d/7aKUrP6IECz9G3Tu6Q5dX0orSleqJ9z6sSw7qrQkjF8/Edo4DvsWBZ8H+HNg==}hasBin: true+ resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==}+ hasBin: true+resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}+ resolution: {integrity: sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==}+resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==}engines: {node: '>=0.10.0'}@@ -3064,6 +3503,12 @@ packages:resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}engines: {node: '>=6'}+ resolution: {integrity: sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==}++ resolution: {integrity: sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==}+resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}engines: {node: '>= 0.8.0'}@@ -3158,6 +3603,9 @@ packages:resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}engines: {node: '>=10'}+ resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==}+resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==}@@ -3203,6 +3651,16 @@ packages:resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}+ resolution: {integrity: sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==}+ engines: {node: '>= 20'}+ hasBin: true++ resolution: {integrity: sha512-gB0gkNafnonOw0obSTEGZTT86IuhILt2Wfx0mWH/1Au83kybTayroZ/V6nS25mN7u8ASy+5fMhgB3XPNrOZdmA==}+ engines: {node: '>= 20'}+ hasBin: true+resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}engines: {node: '>= 0.4'}@@ -3231,6 +3689,9 @@ packages:resolution: {integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==}+ resolution: {integrity: sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w==}+resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==}@@ -3246,6 +3707,24 @@ packages:resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==}+ resolution: {integrity: sha512-1ePVfB4P/vz3xSsm6H3D32r6VYGErxclnuLLFK02/2ReF+UdEKm7caulK6Vm0LBIp5gPRtB2Z1OYDznCkX3k2w==}+ engines: {node: '>=18'}+ peerDependencies:+ '@types/mdast': '*'+ peerDependenciesMeta:+ '@types/mdast':+ optional: true++ resolution: {integrity: sha512-BoaAm8mlJ+LAYz0Qs532Y3ciTuQYgBUPZcSFbvC/ZKmEMAKgulw84YvQK1gI34t/vL2euSfuaWlqczkTBgamkw==}+ engines: {node: '>=18'}+ peerDependencies:+ '@types/mdast': '*'+ peerDependenciesMeta:+ '@types/mdast':+ optional: true+resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==}@@ -3274,6 +3753,9 @@ packages:resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}engines: {node: '>= 8'}+ resolution: {integrity: sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==}+resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==}engines: {node: '>= 0.6'}@@ -3281,6 +3763,35 @@ packages:resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==}+ resolution: {integrity: sha512-wVC0zwjJNqQeX+bb07YTPu/CvSAyCTafyYb7sMhX1r62/Lw5M/df3JyYaANyp8g15c1ypJRFSsookTqA1IDsUg==}+ engines: {node: '>=18'}+ peerDependencies:+ micromark: ^4.0.0+ micromark-util-types: ^2.0.0+ peerDependenciesMeta:+ micromark-util-types:+ optional: true++ resolution: {integrity: sha512-GcbXqTTHOsiZHyF753oIddP/J2eH8j9zpyQPhkof6B2JNxfEJabnQqxbCgzJNuNes0Y2jTNJ3LiYPSXr6eJA8w==}+ engines: {node: '>=18'}+ peerDependencies:+ micromark-util-types: '*'+ peerDependenciesMeta:+ micromark-util-types:+ optional: true++ resolution: {integrity: sha512-OkzoYVTL1ChbvQ8Cc1ayTIz7paFQz8iS9oIYmewncweUSwmWR+hkJF9spJ1lxB90XldJl26A1F4IkPOKS3bDXw==}+ engines: {node: '>=18'}+ peerDependencies:+ micromark: ^4.0.0+ micromark-util-types: ^2.0.0+ peerDependenciesMeta:+ micromark-util-types:+ optional: true+resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==}@@ -3302,6 +3813,9 @@ packages:resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==}+ resolution: {integrity: sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg==}+resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==}@@ -3387,6 +3901,11 @@ packages:engines: {node: '>=4'}hasBin: true+ resolution: {integrity: sha512-X5ju04+cAzsojXKes0B/S4tcYtFAJ6tTMuSPBEn9CPGlrWr8Fiw7qYeLT0XyH80HSoAoqWCaz+MWKh22P7G1cw==}+ engines: {node: '>=16'}+ hasBin: true+resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}engines: {node: '>=6'}@@ -3524,6 +4043,12 @@ packages:resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}engines: {node: '>=18'}+ resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==}++ resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==}+resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==}engines: {node: '>=20'}@@ -3555,6 +4080,9 @@ packages:resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}engines: {node: '>=10'}+ resolution: {integrity: sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==}+resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}engines: {node: '>=6'}@@ -3570,6 +4098,9 @@ packages:resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==}engines: {node: '>=18'}+ resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==}+resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}engines: {node: '>= 0.8'}@@ -3577,6 +4108,9 @@ packages:resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}+ resolution: {integrity: sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==}+resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}engines: {node: '>=8'}@@ -3614,6 +4148,12 @@ packages:resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==}engines: {node: '>=16.20.0'}+ resolution: {integrity: sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==}++ resolution: {integrity: sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==}+resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==}engines: {node: '>=4'}@@ -3737,12 +4277,6 @@ packages:typescript:optional: true- resolution: {integrity: sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==}- peerDependencies:- '@types/react': '>=18'- react: '>=18'-resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==}engines: {node: '>=10'}@@ -3808,9 +4342,53 @@ packages:resolution: {integrity: sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==}engines: {node: '>= 4'}+ resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==}++ resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==}++ resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==}++ resolution: {integrity: sha512-Qn7vR1xrf6fZCrkm9TDWi/AB4ylrHy+jqsNm1EHOAmbARYA6gsnVJBq/sdBh6kmT4NEZxH5vgIjrscefJAOXcw==}++ resolution: {integrity: sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==}++ resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==}++ resolution: {integrity: sha512-CsnhKNsyI8Tub6L4sm5ZFsme4puGfc6pYylvXo1AeqaGbjOYyzNv3qZPwvs0oMJ39eryyeOdmxwUIo94IpEhqg==}++ resolution: {integrity: sha512-JE3TGgouk/sy92SemNMEUhO5mNP4on04cmzOV3s3R5Dbk160ewmpM4tgPiinKKvoJ5UW2fTu7FOYsjVbusSA9w==}+ engines: {node: '>=18'}+ peerDependencies:+ '@types/mdast': ^4.0.0+ unified: ^11.0.0+ peerDependenciesMeta:+ '@types/mdast':+ optional: true++ resolution: {integrity: sha512-f+pKZRxCRwNEGFBKNRAZAqU91GIK1SAo3ZyFHWRUgC9zcxRR0BXKd6YwqgSsxtW0rNpUDtONj7H5nje2WL3fcA==}+ engines: {node: '>=18'}+ peerDependencies:+ '@types/mdast': ^4.0.0+ unified: ^11.0.0+ peerDependenciesMeta:+ '@types/mdast':+ optional: true+resolution: {integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==}+ resolution: {integrity: sha512-MMqgnP74Igy+S3WwnhQ7kqGlEerTETXMvJhrUzDikVZ2/uogJCb+WHUg97hK9/jcfc0dkD73s3LN8zU49cTEtA==}+resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==}@@ -3820,6 +4398,9 @@ packages:resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==}+ resolution: {integrity: sha512-iIhggPkhW3hFImKtB10w0dz4EZbs28mV/dmbcYVonWEJ6UGHHpP+bFZnTh6GNWJONg5m+U56JrL+8IxZRdgWjw==}+resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}engines: {node: '>=0.10.0'}@@ -3846,11 +4427,17 @@ packages:resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}+ resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==}+resolution: {integrity: sha512-X0KQHljNnEkWNqqiz9zJrGunh1B0HgOxLXvnFpCOcadzcy5qohZ3tqMEUg00vncoRovXuK3ZqCT9KnnKzoInFQ==}engines: {node: ^20.19.0 || >=22.12.0}hasBin: true+ resolution: {integrity: sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==}+resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==}engines: {node: '>= 18'}@@ -3862,6 +4449,9 @@ packages:resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}+ resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==}+resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==}@@ -3942,6 +4532,9 @@ packages:resolution: {integrity: sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA==}+resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==}engines: {node: '>= 0.4'}@@ -4018,6 +4611,12 @@ packages:resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==}engines: {node: '>=18'}+ resolution: {integrity: sha512-/tTnURfIOxZK/pqJAxsfCvETG/XCJHoWnk3jq9xLcuz6CSpnjjuxSRBTTL4PKGhxiZQf0lqPxGhImdpwcZ2XwA==}+ peerDependencies:+ react: ^18.0.0 || ^19.0.0+ react-dom: ^18.0.0 || ^19.0.0+resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==}engines: {node: '>=0.6.19'}@@ -4087,6 +4686,9 @@ packages:babel-plugin-macros:optional: true+ resolution: {integrity: sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==}+resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}engines: {node: '>=4'}@@ -4155,6 +4757,10 @@ packages:peerDependencies:typescript: '>=4.8.4'+ resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==}+ engines: {node: '>=6.10'}+resolution: {integrity: sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug==}@@ -4234,12 +4840,18 @@ packages:resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==}+ resolution: {integrity: sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==}+resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==}resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==}+ resolution: {integrity: sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==}+resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==}@@ -4322,6 +4934,9 @@ packages:react: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rcreact-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc+ resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==}+resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==}@@ -4383,6 +4998,9 @@ packages:resolution: {integrity: sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==}+ resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==}+resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==}@@ -4477,7 +5095,7 @@ packages:snapshots:- '@agentscope-ai/[email protected]':+ '@agentscope-ai/[email protected]':dependencies:'@cfworker/json-schema': 4.1.1'@modelcontextprotocol/sdk': 1.29.0(@cfworker/[email protected])([email protected])@@ -4494,6 +5112,11 @@ snapshots:- supports-color- ws+ '@antfu/[email protected]':+ dependencies:+ package-manager-detector: 1.8.0+ tinyexec: 1.1.2+'@babel/[email protected]':dependencies:'@babel/helper-validator-identifier': 7.28.5@@ -4682,8 +5305,12 @@ snapshots:'@babel/helper-string-parser': 7.27.1'@babel/helper-validator-identifier': 7.28.5+ '@braintree/[email protected]': {}+'@cfworker/[email protected]': {}+ '@chevrotain/[email protected]': {}+'@cspotcode/[email protected]':dependencies:'@jridgewell/trace-mapping': 0.3.9@@ -4796,6 +5423,14 @@ snapshots:'@humanwhocodes/[email protected]': {}+ '@iconify/[email protected]': {}++ '@iconify/[email protected]':+ dependencies:+ '@antfu/install-pkg': 1.1.0+ '@iconify/types': 2.0.0+ import-meta-resolve: 4.2.0+'@img/[email protected]':optional: true@@ -4917,6 +5552,10 @@ snapshots:'@jridgewell/resolve-uri': 3.1.2'@jridgewell/sourcemap-codec': 1.5.5+ '@mermaid-js/[email protected]':+ dependencies:+ '@chevrotain/types': 11.1.2+dependencies:'@hono/node-server': 1.19.14([email protected])@@ -5839,8 +6478,78 @@ snapshots:'@sec-ant/[email protected]': {}+ optionalDependencies:+ '@types/react': 19.2.14+ react: 19.2.6++ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 3.23.0+ '@shikijs/vscode-textmate': 10.0.2+ '@types/hast': 3.0.4+ hast-util-to-html: 9.0.5++ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 3.23.0+ '@shikijs/vscode-textmate': 10.0.2+ oniguruma-to-es: 4.3.6++ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 3.23.0+ '@shikijs/vscode-textmate': 10.0.2++ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 3.23.0++ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/types': 3.23.0++ '@shikijs/[email protected]':+ dependencies:+ '@shikijs/vscode-textmate': 10.0.2+ '@types/hast': 3.0.4++ '@shikijs/[email protected]': {}+'@sindresorhus/[email protected]': {}+ '@streamdown/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])':+ dependencies:+ react: 19.2.6+ remark-cjk-friendly: 2.3.1(@types/[email protected])([email protected])([email protected])([email protected])+ remark-cjk-friendly-gfm-strikethrough: 2.3.1(@types/[email protected])([email protected])([email protected])([email protected])+ unist-util-visit: 5.1.0+ transitivePeerDependencies:+ - '@types/mdast'+ - micromark+ - micromark-util-types+ - supports-color+ - unified++ '@streamdown/[email protected]([email protected])':+ dependencies:+ react: 19.2.6+ shiki: 3.23.0++ '@streamdown/[email protected]([email protected])':+ dependencies:+ katex: 0.16.47+ react: 19.2.6+ rehype-katex: 7.0.1+ remark-math: 6.0.0+ transitivePeerDependencies:+ - supports-color++ '@streamdown/[email protected]([email protected])':+ dependencies:+ mermaid: 11.16.0+ react: 19.2.6+'@svgr/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.29.0@@ -6020,6 +6729,123 @@ snapshots:dependencies:'@types/node': 20.19.41+ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-selection': 3.0.11++ '@types/[email protected]':+ dependencies:+ '@types/d3-selection': 3.0.11++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-array': 3.2.2+ '@types/geojson': 7946.0.16++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-selection': 3.0.11++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-dsv': 3.0.7++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/geojson': 7946.0.16++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-color': 3.1.3++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-time': 3.0.4++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-path': 3.1.1++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/d3-selection': 3.0.11++ '@types/[email protected]':+ dependencies:+ '@types/d3-interpolate': 3.0.4+ '@types/d3-selection': 3.0.11++ '@types/[email protected]':+ dependencies:+ '@types/d3-array': 3.2.2+ '@types/d3-axis': 3.0.6+ '@types/d3-brush': 3.0.6+ '@types/d3-chord': 3.0.6+ '@types/d3-color': 3.1.3+ '@types/d3-contour': 3.0.6+ '@types/d3-delaunay': 6.0.4+ '@types/d3-dispatch': 3.0.7+ '@types/d3-drag': 3.0.7+ '@types/d3-dsv': 3.0.7+ '@types/d3-ease': 3.0.2+ '@types/d3-fetch': 3.0.7+ '@types/d3-force': 3.0.10+ '@types/d3-format': 3.0.4+ '@types/d3-geo': 3.1.0+ '@types/d3-hierarchy': 3.1.7+ '@types/d3-interpolate': 3.0.4+ '@types/d3-path': 3.1.1+ '@types/d3-polygon': 3.0.2+ '@types/d3-quadtree': 3.0.6+ '@types/d3-random': 3.0.4+ '@types/d3-scale': 4.0.9+ '@types/d3-scale-chromatic': 3.1.0+ '@types/d3-selection': 3.0.11+ '@types/d3-shape': 3.1.8+ '@types/d3-time': 3.0.4+ '@types/d3-time-format': 4.0.3+ '@types/d3-timer': 3.0.2+ '@types/d3-transition': 3.0.9+ '@types/d3-zoom': 3.0.8+'@types/[email protected]':dependencies:'@types/ms': 2.1.0@@ -6046,6 +6872,8 @@ snapshots:'@types/qs': 6.15.1'@types/serve-static': 1.15.10+ '@types/[email protected]': {}+'@types/[email protected]':dependencies:'@types/unist': 3.0.3@@ -6054,6 +6882,8 @@ snapshots:'@types/[email protected]': {}+ '@types/[email protected]': {}+'@types/[email protected]':dependencies:'@types/unist': 3.0.3@@ -6099,18 +6929,21 @@ snapshots:'@types/node': 20.19.41'@types/send': 0.17.6+ '@types/[email protected]':+ optional: true+'@types/[email protected]': {}'@types/[email protected]': {}'@types/[email protected]': {}- '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])':+ '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])':dependencies:'@eslint-community/regexpp': 4.12.2- '@typescript-eslint/parser': 8.59.3([email protected]([email protected]))([email protected])([email protected])'@typescript-eslint/scope-manager': 8.59.3- '@typescript-eslint/type-utils': 8.59.3([email protected]([email protected]))([email protected])([email protected])'@typescript-eslint/visitor-keys': 8.59.3eslint: 10.3.0([email protected])@@ -6121,7 +6954,7 @@ snapshots:transitivePeerDependencies:- supports-color- '@typescript-eslint/[email protected]([email protected]([email protected]))([email protected])([email protected])':dependencies:'@typescript-eslint/scope-manager': 8.59.3'@typescript-eslint/types': 8.59.3@@ -6151,7 +6984,7 @@ snapshots:dependencies:typescript: 6.0.3- '@typescript-eslint/[email protected]([email protected]([email protected]))([email protected])([email protected])':dependencies:'@typescript-eslint/types': 8.59.3'@typescript-eslint/typescript-estree': 8.59.3([email protected])@@ -6257,6 +7090,11 @@ snapshots:'@unrs/[email protected]':optional: true+ '@upsetjs/[email protected]':+ optionalDependencies:+ d3-selection: 3.0.0+ d3-transition: 3.0.1([email protected])+'@vitejs/[email protected]([email protected](@types/[email protected])([email protected])([email protected]))':dependencies:'@rolldown/pluginutils': 1.0.0-rc.7@@ -6484,6 +7322,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+@@ -6523,6 +7365,14 @@ snapshots:object-assign: 4.1.1vary: 1.1.2+ dependencies:+ layout-base: 1.0.2++ dependencies:+ layout-base: 2.0.1+dependencies:import-fresh: 3.3.1@@ -6557,12 +7407,198 @@ snapshots:+ dependencies:+ cose-base: 1.0.3+ cytoscape: 3.34.0++ dependencies:+ cose-base: 2.2.0+ cytoscape: 3.34.0++ [email protected]: {}++ dependencies:+ internmap: 1.0.1++ dependencies:+ internmap: 2.0.3++ [email protected]: {}++ dependencies:+ d3-dispatch: 3.0.1+ d3-drag: 3.0.0+ d3-interpolate: 3.0.1+ d3-selection: 3.0.0+ d3-transition: 3.0.1([email protected])++ dependencies:+ d3-path: 3.1.0++ [email protected]: {}++ dependencies:+ d3-array: 3.2.4++ dependencies:+ delaunator: 5.1.0++ [email protected]: {}++ dependencies:+ d3-dispatch: 3.0.1+ d3-selection: 3.0.0++ dependencies:+ commander: 7.2.0+ iconv-lite: 0.6.3+ rw: 1.3.3++ [email protected]: {}++ dependencies:+ d3-dsv: 3.0.1++ dependencies:+ d3-dispatch: 3.0.1+ d3-quadtree: 3.0.1+ d3-timer: 3.0.1++ [email protected]: {}++ dependencies:+ d3-array: 3.2.4++ [email protected]: {}++ dependencies:+ d3-color: 3.1.0++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ d3-array: 2.12.1+ d3-shape: 1.3.7++ dependencies:+ d3-color: 3.1.0+ d3-interpolate: 3.0.1++ dependencies:+ d3-array: 3.2.4+ d3-format: 3.1.2+ d3-interpolate: 3.0.1+ d3-time: 3.1.0+ d3-time-format: 4.1.0++ [email protected]: {}++ dependencies:+ d3-path: 1.0.9++ dependencies:+ d3-path: 3.1.0++ dependencies:+ d3-time: 3.1.0++ dependencies:+ d3-array: 3.2.4++ [email protected]: {}++ dependencies:+ d3-color: 3.1.0+ d3-dispatch: 3.0.1+ d3-ease: 3.0.1+ d3-interpolate: 3.0.1+ d3-selection: 3.0.0+ d3-timer: 3.0.1++ dependencies:+ d3-dispatch: 3.0.1+ d3-drag: 3.0.0+ d3-interpolate: 3.0.1+ d3-selection: 3.0.0+ d3-transition: 3.0.1([email protected])++ dependencies:+ d3-array: 3.2.4+ d3-axis: 3.0.0+ d3-brush: 3.0.0+ d3-chord: 3.0.1+ d3-color: 3.1.0+ d3-contour: 4.0.2+ d3-delaunay: 6.0.4+ d3-dispatch: 3.0.1+ d3-drag: 3.0.0+ d3-dsv: 3.0.1+ d3-ease: 3.0.1+ d3-fetch: 3.0.1+ d3-force: 3.0.0+ d3-format: 3.1.2+ d3-geo: 3.1.1+ d3-hierarchy: 3.1.2+ d3-interpolate: 3.0.1+ d3-path: 3.1.0+ d3-polygon: 3.0.1+ d3-quadtree: 3.0.1+ d3-random: 3.0.1+ d3-scale: 4.0.2+ d3-scale-chromatic: 3.1.0+ d3-selection: 3.0.0+ d3-shape: 3.2.0+ d3-time: 3.1.0+ d3-time-format: 4.1.0+ d3-timer: 3.0.1+ d3-transition: 3.0.1([email protected])+ d3-zoom: 3.0.0++ dependencies:+ d3: 7.9.0+ lodash-es: 4.18.1+dependencies:'@babel/runtime': 7.29.2+ [email protected]: {}+dependencies:ms: 2.0.0@@ -6592,6 +7628,10 @@ snapshots:+ dependencies:+ robust-predicates: 3.0.3+@@ -6614,6 +7654,10 @@ snapshots:+ optionalDependencies:+ '@types/trusted-types': 2.0.7+dependencies:no-case: 3.0.4@@ -6651,6 +7695,8 @@ snapshots:+ [email protected]: {}+@@ -6667,6 +7713,8 @@ snapshots:dependencies:es-errors: 1.3.0+ [email protected]: {}+@@ -6686,7 +7734,7 @@ snapshots:optionalDependencies:unrs-resolver: 1.11.1- [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]):+ [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])):dependencies:'@package-json/types': 0.0.12'@typescript-eslint/types': 8.59.3@@ -7080,6 +8128,8 @@ snapshots:section-matter: 1.0.0strip-bom-string: 1.0.0+ [email protected]: {}+@@ -7090,6 +8140,83 @@ snapshots:dependencies:function-bind: 1.1.2+ dependencies:+ '@types/hast': 3.0.4+ hastscript: 9.0.1+ web-namespaces: 2.0.1++ dependencies:+ '@types/hast': 3.0.4+ hast-util-from-dom: 5.0.1+ hast-util-from-html: 2.0.3+ unist-util-remove-position: 5.0.0++ dependencies:+ '@types/hast': 3.0.4+ devlop: 1.1.0+ hast-util-from-parse5: 8.0.3+ parse5: 7.3.0+ vfile: 6.0.3+ vfile-message: 4.0.3++ dependencies:+ '@types/hast': 3.0.4+ '@types/unist': 3.0.3+ devlop: 1.1.0+ hastscript: 9.0.1+ property-information: 7.1.0+ vfile: 6.0.3+ vfile-location: 5.0.3+ web-namespaces: 2.0.1++ dependencies:+ '@types/hast': 3.0.4++ dependencies:+ '@types/hast': 3.0.4++ dependencies:+ '@types/hast': 3.0.4+ '@types/unist': 3.0.3+ '@ungap/structured-clone': 1.3.1+ hast-util-from-parse5: 8.0.3+ hast-util-to-parse5: 8.0.1+ html-void-elements: 3.0.0+ mdast-util-to-hast: 13.2.1+ parse5: 7.3.0+ unist-util-position: 5.0.0+ unist-util-visit: 5.1.0+ vfile: 6.0.3+ web-namespaces: 2.0.1+ zwitch: 2.0.4++ dependencies:+ '@types/hast': 3.0.4+ '@ungap/structured-clone': 1.3.1+ unist-util-position: 5.0.0++ dependencies:+ '@types/hast': 3.0.4+ '@types/unist': 3.0.3+ ccount: 2.0.1+ comma-separated-tokens: 2.0.3+ hast-util-whitespace: 3.0.0+ html-void-elements: 3.0.0+ mdast-util-to-hast: 13.2.1+ property-information: 7.1.0+ space-separated-tokens: 2.0.2+ stringify-entities: 4.0.4+ zwitch: 2.0.4+dependencies:'@types/estree': 1.0.9@@ -7110,10 +8237,35 @@ snapshots:transitivePeerDependencies:- supports-color+ dependencies:+ '@types/hast': 3.0.4+ comma-separated-tokens: 2.0.3+ devlop: 1.1.0+ property-information: 7.1.0+ space-separated-tokens: 2.0.2+ web-namespaces: 2.0.1+ zwitch: 2.0.4++ dependencies:+ '@types/hast': 3.0.4+ '@types/unist': 3.0.3+ hast-util-is-element: 3.0.0+ unist-util-find-after: 5.0.0+dependencies:'@types/hast': 3.0.4+ dependencies:+ '@types/hast': 3.0.4+ comma-separated-tokens: 2.0.3+ hast-util-parse-selector: 4.0.0+ property-information: 7.1.0+ space-separated-tokens: 2.0.2+@@ -7128,6 +8280,8 @@ snapshots:+ [email protected]: {}+dependencies:depd: 2.0.0@@ -7154,6 +8308,10 @@ snapshots:dependencies:safer-buffer: 2.1.2+ dependencies:+ safer-buffer: 2.1.2+dependencies:safer-buffer: 2.1.2@@ -7169,12 +8327,18 @@ snapshots:parent-module: 1.0.1resolve-from: 4.0.0+ [email protected]: {}++ [email protected]: {}++ [email protected]: {}+@@ -7285,16 +8449,26 @@ snapshots:+ dependencies:+ commander: 8.3.0+dependencies:json-buffer: 3.0.1+ [email protected]: {}++ [email protected]: {}++ [email protected]: {}+dependencies:prelude-ls: 1.2.1@@ -7372,6 +8546,8 @@ snapshots:dependencies:p-locate: 5.0.0+ [email protected]: {}+@@ -7417,6 +8593,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+@@ -7500,6 +8680,18 @@ snapshots:transitivePeerDependencies:- supports-color+ dependencies:+ '@types/hast': 3.0.4+ '@types/mdast': 4.0.4+ devlop: 1.1.0+ longest-streak: 3.1.0+ mdast-util-from-markdown: 2.0.3+ mdast-util-to-markdown: 2.1.2+ unist-util-remove-position: 5.0.0+ transitivePeerDependencies:+ - supports-color+dependencies:'@types/estree-jsx': 1.0.5@@ -7556,6 +8748,28 @@ snapshots:unist-util-visit: 5.1.0vfile: 6.0.3+ dependencies:+ mdast-util-gfm-strikethrough: 2.0.0+ mdast-util-to-markdown: 2.1.2+ micromark-extension-cjk-friendly-util: 3.0.1([email protected])+ micromark-util-symbol: 2.0.1+ optionalDependencies:+ '@types/mdast': 4.0.4+ transitivePeerDependencies:+ - micromark-util-types+ - supports-color++ dependencies:+ mdast-util-to-markdown: 2.1.2+ micromark-extension-cjk-friendly-util: 3.0.1([email protected])+ micromark-util-symbol: 2.0.1+ optionalDependencies:+ '@types/mdast': 4.0.4+ transitivePeerDependencies:+ - micromark-util-types+dependencies:'@types/mdast': 4.0.4@@ -7584,6 +8798,30 @@ snapshots:+ dependencies:+ '@braintree/sanitize-url': 7.1.2+ '@iconify/utils': 3.1.4+ '@mermaid-js/parser': 1.2.0+ '@types/d3': 7.4.3+ '@upsetjs/venn.js': 2.0.0+ cytoscape: 3.34.0+ cytoscape-cose-bilkent: 4.1.0([email protected])+ cytoscape-fcose: 2.2.0([email protected])+ d3: 7.9.0+ d3-sankey: 0.12.3+ dagre-d3-es: 7.0.14+ dayjs: 1.11.21+ dompurify: 3.4.12+ es-toolkit: 1.49.0+ katex: 0.16.47+ khroma: 2.1.0+ marked: 16.4.2+ roughjs: 4.6.6+ stylis: 4.4.0+ ts-dedent: 2.3.0+ uuid: 13.0.2+@@ -7605,6 +8843,38 @@ snapshots:micromark-util-symbol: 2.0.1micromark-util-types: 2.0.2+ dependencies:+ devlop: 1.1.0+ get-east-asian-width: 1.6.0+ micromark: 4.0.2+ micromark-extension-cjk-friendly-util: 3.0.1([email protected])+ micromark-util-character: 2.1.1+ micromark-util-chunked: 2.0.1+ micromark-util-resolve-all: 2.0.1+ micromark-util-symbol: 2.0.1+ optionalDependencies:+ micromark-util-types: 2.0.2++ dependencies:+ get-east-asian-width: 1.6.0+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ optionalDependencies:+ micromark-util-types: 2.0.2++ dependencies:+ devlop: 1.1.0+ micromark: 4.0.2+ micromark-extension-cjk-friendly-util: 3.0.1([email protected])+ micromark-util-chunked: 2.0.1+ micromark-util-resolve-all: 2.0.1+ micromark-util-symbol: 2.0.1+ optionalDependencies:+ micromark-util-types: 2.0.2+dependencies:micromark-util-character: 2.1.1@@ -7663,6 +8933,16 @@ snapshots:micromark-util-combine-extensions: 2.0.1micromark-util-types: 2.0.2+ dependencies:+ '@types/katex': 0.16.8+ devlop: 1.1.0+ katex: 0.16.47+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2+dependencies:micromark-util-character: 2.1.1@@ -7796,6 +9076,8 @@ snapshots:+ [email protected]: {}+@@ -7920,6 +9202,14 @@ snapshots:dependencies:mimic-function: 5.0.1+ [email protected]: {}++ dependencies:+ oniguruma-parser: 0.12.2+ regex: 6.1.0+ regex-recursion: 6.0.2+dependencies:default-browser: 5.5.0@@ -7962,6 +9252,8 @@ snapshots:dependencies:p-limit: 3.1.0+ [email protected]: {}+dependencies:callsites: 3.1.0@@ -7985,10 +9277,16 @@ snapshots:+ dependencies:+ entities: 6.0.1++ [email protected]: {}+@@ -8009,6 +9307,13 @@ snapshots:+ [email protected]: {}++ dependencies:+ path-data-parser: 0.1.0+ points-on-curve: 0.2.0+dependencies:cssesc: 3.0.0@@ -8180,24 +9485,6 @@ snapshots:react-dom: 19.2.6([email protected])typescript: 6.0.3- dependencies:- '@types/hast': 3.0.4- '@types/mdast': 4.0.4- '@types/react': 19.2.14- devlop: 1.1.0- hast-util-to-jsx-runtime: 2.3.6- html-url-attributes: 3.0.1- mdast-util-to-hast: 13.2.1- react: 19.2.6- remark-parse: 11.0.0- remark-rehype: 11.1.2- unified: 11.0.5- unist-util-visit: 5.1.0- vfile: 6.0.3- transitivePeerDependencies:- - supports-color-dependencies:react: 19.2.6@@ -8258,6 +9545,64 @@ snapshots:tiny-invariant: 1.3.3tslib: 2.8.1+ dependencies:+ regex-utilities: 2.3.0++ [email protected]: {}++ dependencies:+ regex-utilities: 2.3.0++ dependencies:+ unist-util-visit: 5.1.0++ dependencies:+ '@types/hast': 3.0.4+ '@types/katex': 0.16.8+ hast-util-from-html-isomorphic: 2.0.0+ hast-util-to-text: 4.0.2+ katex: 0.16.47+ unist-util-visit-parents: 6.0.2+ vfile: 6.0.3++ dependencies:+ '@types/hast': 3.0.4+ hast-util-raw: 9.1.0+ vfile: 6.0.3++ dependencies:+ '@types/hast': 3.0.4+ hast-util-sanitize: 5.0.2++ [email protected](@types/[email protected])([email protected])([email protected])([email protected]):+ dependencies:+ mdast-util-to-markdown-cjk-friendly-gfm-strikethrough: 1.0.0(@types/[email protected])([email protected])+ micromark-extension-cjk-friendly-gfm-strikethrough: 2.0.1([email protected])([email protected])+ unified: 11.0.5+ optionalDependencies:+ '@types/mdast': 4.0.4+ transitivePeerDependencies:+ - micromark+ - micromark-util-types+ - supports-color++ [email protected](@types/[email protected])([email protected])([email protected])([email protected]):+ dependencies:+ mdast-util-to-markdown-cjk-friendly: 1.0.0(@types/[email protected])([email protected])+ micromark-extension-cjk-friendly: 2.0.1([email protected])([email protected])+ unified: 11.0.5+ optionalDependencies:+ '@types/mdast': 4.0.4+ transitivePeerDependencies:+ - micromark+ - micromark-util-types+dependencies:'@types/mdast': 4.0.4@@ -8269,6 +9614,15 @@ snapshots:transitivePeerDependencies:- supports-color+ dependencies:+ '@types/mdast': 4.0.4+ mdast-util-math: 3.0.0+ micromark-extension-math: 3.1.0+ unified: 11.0.5+ transitivePeerDependencies:+ - supports-color+dependencies:'@types/mdast': 4.0.4@@ -8292,6 +9646,8 @@ snapshots:mdast-util-to-markdown: 2.1.2unified: 11.0.5+ [email protected]: {}+@@ -8309,6 +9665,8 @@ snapshots:+ [email protected]: {}+dependencies:'@oxc-project/types': 0.130.0@@ -8330,6 +9688,13 @@ snapshots:'@rolldown/binding-win32-arm64-msvc': 1.0.1'@rolldown/binding-win32-x64-msvc': 1.0.1+ dependencies:+ hachure-fill: 0.5.2+ path-data-parser: 0.1.0+ points-on-curve: 0.2.0+ points-on-path: 0.2.1+dependencies:debug: 4.4.3([email protected])@@ -8346,6 +9711,8 @@ snapshots:dependencies:queue-microtask: 1.2.3+ [email protected]: {}+dependencies:tslib: 2.8.1@@ -8507,6 +9874,17 @@ snapshots:+ dependencies:+ '@shikijs/core': 3.23.0+ '@shikijs/engine-javascript': 3.23.0+ '@shikijs/engine-oniguruma': 3.23.0+ '@shikijs/langs': 3.23.0+ '@shikijs/themes': 3.23.0+ '@shikijs/types': 3.23.0+ '@shikijs/vscode-textmate': 10.0.2+ '@types/hast': 3.0.4+dependencies:es-errors: 1.3.0@@ -8581,6 +9959,29 @@ snapshots:+ dependencies:+ clsx: 2.1.1+ hast-util-to-jsx-runtime: 2.3.6+ html-url-attributes: 3.0.1+ marked: 17.0.6+ mermaid: 11.16.0+ react: 19.2.6+ react-dom: 19.2.6([email protected])+ rehype-harden: 1.1.8+ rehype-raw: 7.0.0+ rehype-sanitize: 6.0.0+ remark-gfm: 4.0.1+ remark-parse: 11.0.0+ remark-rehype: 11.1.2+ remend: 1.3.0+ tailwind-merge: 3.6.0+ unified: 11.0.5+ unist-util-visit: 5.1.0+ unist-util-visit-parents: 6.0.2+ transitivePeerDependencies:+ - supports-color+@@ -8644,6 +10045,8 @@ snapshots:optionalDependencies:'@babel/core': 7.29.0+ [email protected]: {}+dependencies:has-flag: 3.0.0@@ -8695,6 +10098,8 @@ snapshots:dependencies:typescript: 6.0.3+ [email protected]: {}+dependencies:'@ts-morph/common': 0.27.0@@ -8743,10 +10148,10 @@ snapshots:media-typer: 1.1.0mime-types: 3.0.2dependencies:- '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected])([email protected]))([email protected]([email protected]))([email protected])([email protected])- '@typescript-eslint/parser': 8.59.3([email protected]([email protected]))([email protected])([email protected])+ '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])'@typescript-eslint/typescript-estree': 8.59.3([email protected])eslint: 10.3.0([email protected])@@ -8782,6 +10187,11 @@ snapshots:trough: 2.2.0vfile: 6.0.3+ dependencies:+ '@types/unist': 3.0.3+ unist-util-is: 6.0.1+dependencies:'@types/unist': 3.0.3@@ -8790,6 +10200,11 @@ snapshots:dependencies:'@types/unist': 3.0.3+ dependencies:+ '@types/unist': 3.0.3+ unist-util-visit: 5.1.0+dependencies:'@types/unist': 3.0.3@@ -8883,6 +10298,11 @@ snapshots:- '@types/react'- '@types/react-dom'+ dependencies:+ '@types/unist': 3.0.3+ vfile: 6.0.3+dependencies:'@types/unist': 3.0.3@@ -8923,6 +10343,8 @@ snapshots:dependencies:loose-envify: 1.4.0+ [email protected]: {}+diff --git a/src/agentscope/__init__.py b/src/agentscope/__init__.pyindex f2ce72607..89813cfdf 100644--- a/src/agentscope/__init__.py+++ b/src/agentscope/__init__.py@@ -6,7 +6,7 @@ from ._logging import (logger,setup_logger,)-from ._utils._common import set_id_factory+from ._utils._common import set_id_factory, set_timestamp_factoryfrom ._version import __version__# Raise each warning only once@@ -17,5 +17,6 @@ __all__ = ["logger","setup_logger","set_id_factory",+ "set_timestamp_factory","__version__",]diff --git a/src/agentscope/_utils/_common.py b/src/agentscope/_utils/_common.pyindex 256d9d7fb..cd27c9da8 100644--- a/src/agentscope/_utils/_common.py+++ b/src/agentscope/_utils/_common.py@@ -16,11 +16,8 @@ from .._logging import loggerfrom ..exception import ToolJSONDecodeError-def _default_id_factory() -> str:- return uuid.uuid4().hex---_id_factory: Callable[[], str] = _default_id_factory+_id_factory: Callable[[], str] = lambda: uuid.uuid4().hex+_timestamp_factory: Callable[[], str] = lambda: datetime.now().isoformat()def set_id_factory(factory: Callable[[], str]) -> None:@@ -52,11 +49,35 @@ def set_id_factory(factory: Callable[[], str]) -> None:_id_factory = factory+def set_timestamp_factory(factory: Callable[[], str]) -> None:+ """Override the global timestamp factory used by all AgentScope entities.++ Args:+ factory (`Callable[[], str]`):+ A no-arg callable returning a string ID.++ Raises:+ TypeError: If ``factory`` is not callable.+ """+ if not callable(factory):+ raise TypeError(+ f"factory must be a callable, got {type(factory).__name__}",+ )+ global _timestamp_factory+ _timestamp_factory = factory++def _generate_id() -> str:"""Generate an ID string using the current global ID factory."""return _id_factory()+def _generate_timestamp() -> str:+ """Generate a timestamp string using the current global+ timestamp factory."""+ return _timestamp_factory()++def _normalize_local_path(path: str) -> str:"""Expand user-home shorthand and return an absolute local path."""return os.path.abspath(os.path.expanduser(path))diff --git a/src/agentscope/app/_tool/_team_say.py b/src/agentscope/app/_tool/_team_say.pyindex eaf7d5aa0..7effe868f 100644--- a/src/agentscope/app/_tool/_team_say.py+++ b/src/agentscope/app/_tool/_team_say.py@@ -1,5 +1,6 @@# -*- coding: utf-8 -*-"""The TeamSay tool — sends a message to one or all team members."""+import jsonfrom typing import Anyfrom pydantic import Field@@ -317,7 +318,10 @@ class TeamSay(_TeamToolBase):f"{content}\n"f"</team-message>"),- source=sender_name,+ source=json.dumps(+ {"label": "team", "sublabel": sender_name},+ ensure_ascii=False,+ ),)payload = hint.model_dump(mode="json")diff --git a/src/agentscope/message/_base.py b/src/agentscope/message/_base.pyindex 73009865b..0a7239d08 100644--- a/src/agentscope/message/_base.py+++ b/src/agentscope/message/_base.py@@ -237,7 +237,10 @@ class Msg(BaseModel):return blockreturn None- def append_event(self, event: AgentEvent) -> Self:+ def append_event( # pylint: disable=too-many-branches+ self,+ event: AgentEvent,+ ) -> Self:"""Update the message by applying a streaming event.Mutates ``self.content``, ``self.finished_at``, and ``self.usage``:@@ -288,18 +291,17 @@ class Msg(BaseModel):case EventType.TEXT_BLOCK_START:self.content.append(TextBlock(id=event.block_id, text=""))- case EventType.TEXT_BLOCK_DELTA:+ case EventType.TEXT_BLOCK_DELTA | EventType.TEXT_BLOCK_END:block = self._find_block("text", event.block_id)if block is None:logger.warning("TextBlock %r not found, skipping.",event.block_id,)- else:+ elif event.type == EventType.TEXT_BLOCK_DELTA:block.text += event.delta-- case EventType.TEXT_BLOCK_END:- pass+ else:+ block.finished_at = event.created_atcase EventType.DATA_BLOCK_START:self.content.append(@@ -312,14 +314,14 @@ class Msg(BaseModel):),)- case EventType.DATA_BLOCK_DELTA:+ case EventType.DATA_BLOCK_DELTA | EventType.DATA_BLOCK_END:block = self._find_block("data", event.block_id)if block is None:logger.warning("DataBlock %s not found, skipping.",event.block_id,)- elif event.data:+ elif event.type == EventType.DATA_BLOCK_DELTA and event.data:# Each delta is an independently base64-encoded chunk# (with its own padding); naive string concat would# corrupt the byte stream. Decode, concat bytes, re-encode.@@ -332,39 +334,37 @@ class Msg(BaseModel):block.source.data = base64.b64encode(existing + incoming,).decode("ascii")-- case EventType.DATA_BLOCK_END:- pass+ elif event.type == EventType.DATA_BLOCK_END:+ block.finished_at = event.created_atcase EventType.THINKING_BLOCK_START:self.content.append(ThinkingBlock(id=event.block_id, thinking=""),)- case EventType.THINKING_BLOCK_DELTA:+ case EventType.THINKING_BLOCK_DELTA | EventType.THINKING_BLOCK_END:block = self._find_block("thinking", event.block_id)if block is None:logger.warning("ThinkingBlock %r not found, skipping.",event.block_id,)- else:+ elif event.type == EventType.THINKING_BLOCK_DELTA:block.thinking += event.delta-- case EventType.THINKING_BLOCK_END:- pass+ else:+ block.finished_at = event.created_atcase EventType.HINT_BLOCK:# One-shot event — the full HintBlock content arrives in# a single event, so just append it to ``content`` for# persistence and replay.- self.content.append(- HintBlock(- id=event.block_id,- source=event.source,- hint=event.hint,- ),+ hint_block = HintBlock(+ id=event.block_id,+ source=event.source,+ hint=event.hint,)+ hint_block.finished_at = hint_block.created_at+ self.content.append(hint_block)case EventType.TOOL_CALL_START:self.content.append(@@ -375,19 +375,18 @@ class Msg(BaseModel):),)- case EventType.TOOL_CALL_DELTA:+ case EventType.TOOL_CALL_DELTA | EventType.TOOL_CALL_END:block = self._find_block("tool_call", event.tool_call_id)if block is None:logger.warning("ToolCallBlock %r not found, skipping.",event.tool_call_id,)- else:+ elif event.type == EventType.TOOL_CALL_DELTA:assert isinstance(block, ToolCallBlock)block.input += event.delta-- case EventType.TOOL_CALL_END:- pass+ else:+ block.finished_at = event.created_atcase EventType.TOOL_RESULT_START:self.content.append(@@ -399,14 +398,18 @@ class Msg(BaseModel):),)- case EventType.TOOL_RESULT_TEXT_DELTA:+ case (+ EventType.TOOL_RESULT_TEXT_DELTA+ | EventType.TOOL_RESULT_DATA_DELTA+ | EventType.TOOL_RESULT_END+ ):block = self._find_block("tool_result", event.tool_call_id)if block is None:logger.warning("ToolResultBlock %r not found, skipping.",event.tool_call_id,)- else:+ elif event.type == EventType.TOOL_RESULT_TEXT_DELTA:assert isinstance(block, ToolResultBlock)if isinstance(block.output, str):block.output = [TextBlock(text=block.output)]@@ -415,15 +418,7 @@ class Msg(BaseModel):block.output.append(TextBlock(text=event.delta))else:block.output[-1].text += event.delta-- case EventType.TOOL_RESULT_DATA_DELTA:- block = self._find_block("tool_result", event.tool_call_id)- if block is None:- logger.warning(- "ToolResultBlock %r not found, skipping.",- event.tool_call_id,- )- else:+ elif event.type == EventType.TOOL_RESULT_DATA_DELTA:assert isinstance(block, ToolResultBlock)if isinstance(block.output, str):block.output = [TextBlock(text=block.output)]@@ -441,26 +436,22 @@ class Msg(BaseModel):block.output.append(DataBlock(id=event.block_id, source=src),)-- case EventType.TOOL_RESULT_END:- block = self._find_block("tool_result", event.tool_call_id)- if block is None:- logger.warning(- "ToolResultBlock %r not found, skipping.",- event.tool_call_id,- )else:assert isinstance(block, ToolResultBlock)block.state = event.stateblock.metadata = event.metadata- # The paired ToolCallBlock's lifecycle ends with its- # result — flip it to FINISHED here so the SSE-rebuilt- # reply_msg matches ``agent.state.context``, which- # ``_update_tool_call_state`` mutates directly.- call_block = self._find_block("tool_call", event.tool_call_id)- if call_block is not None:- assert isinstance(call_block, ToolCallBlock)- call_block.state = ToolCallState.FINISHED+ block.finished_at = event.created_at+ # The paired ToolCallBlock's lifecycle ends with its+ # result — flip it to FINISHED here so the SSE-rebuilt+ # reply_msg matches ``agent.state.context``, which+ # ``_update_tool_call_state`` mutates directly.+ call_block = self._find_block(+ "tool_call",+ event.tool_call_id,+ )+ if call_block is not None:+ assert isinstance(call_block, ToolCallBlock)+ call_block.state = ToolCallState.FINISHEDcase EventType.REQUIRE_USER_CONFIRM:for tool_call in event.tool_calls:@@ -504,6 +495,8 @@ class Msg(BaseModel):for result in event.execution_results:if result.id in existing_ids:continue+ if result.finished_at is None:+ result.finished_at = event.created_atself.content.append(result)return selfdiff --git a/src/agentscope/message/_block.py b/src/agentscope/message/_block.pyindex ac5a5cccd..dd0a7aad1 100644--- a/src/agentscope/message/_block.py+++ b/src/agentscope/message/_block.py@@ -4,7 +4,7 @@ from enum import StrEnumfrom typing import Literal, List, TypeAlias, Anyfrom pydantic import BaseModel, Field, AnyUrl, field_serializer, ConfigDict-from .._utils._common import _generate_id+from .._utils._common import _generate_id, _generate_timestampfrom ..permission import PermissionRule@@ -17,6 +17,10 @@ class TextBlock(BaseModel):"""The text content of the block."""id: str = Field(default_factory=_generate_id)"""The unique identifier of the block."""+ created_at: str = Field(default_factory=_generate_timestamp)+ """The creation time of the block"""+ finished_at: str | None = None+ """The finished time of the block"""class ThinkingBlock(BaseModel):@@ -43,6 +47,10 @@ class ThinkingBlock(BaseModel):"""The thinking content of the block."""id: str = Field(default_factory=_generate_id)"""The unique identifier of the block."""+ created_at: str = Field(default_factory=_generate_timestamp)+ """The creation time of the block"""+ finished_at: str | None = None+ """The finished time of the block"""class Base64Source(BaseModel):@@ -84,6 +92,10 @@ class DataBlock(BaseModel):a URL."""name: str | None = None"""The name of the data block, which is optional."""+ created_at: str = Field(default_factory=_generate_timestamp)+ """The creation time of the block"""+ finished_at: str | None = None+ """The finished time of the block"""class HintBlock(BaseModel):@@ -107,6 +119,10 @@ class HintBlock(BaseModel):"""The sender or origin of this hint. For team messages this is thesender's display name (e.g. ``"alice"``); for system notificationsit may be ``"system"`` or ``None``."""+ created_at: str = Field(default_factory=_generate_timestamp)+ """The creation time of the block"""+ finished_at: str | None = Field(default_factory=_generate_timestamp)+ """The finished time of the block"""class ToolCallState(StrEnum):@@ -160,6 +176,10 @@ class ToolCallBlock(BaseModel):suggested_rules: list[PermissionRule] = Field(default_factory=list)"""The suggestions for this tool call when asking user, used to maintainthe suggestions across requests."""+ created_at: str = Field(default_factory=_generate_timestamp)+ """The creation time of the block"""+ finished_at: str | None = None+ """The finished time of the block"""class ToolResultState(StrEnum):@@ -190,6 +210,10 @@ class ToolResultBlock(BaseModel):"""The execution state of the tool."""metadata: dict[str, Any] = Field(default_factory=dict)"""The metadata of the tool result block."""+ created_at: str = Field(default_factory=_generate_timestamp)+ """The creation time of the block"""+ finished_at: str | None = None+ """The finished time of the block"""ContentBlock: TypeAlias = (diff --git a/tests/agent_basic_test.py b/tests/agent_basic_test.pyindex 1411f60f0..94ee77393 100644--- a/tests/agent_basic_test.py+++ b/tests/agent_basic_test.py@@ -307,6 +307,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hi",},@@ -321,6 +323,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello world!",},@@ -341,6 +345,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello world!",},@@ -365,6 +371,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hi",},@@ -382,6 +390,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello world!",},@@ -395,6 +405,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hi again",},@@ -412,6 +424,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello world!",},@@ -504,6 +518,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hi",},@@ -519,6 +535,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello world!",},@@ -549,6 +567,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello world!",},@@ -573,6 +593,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hi",},@@ -590,6 +612,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello world!",},@@ -603,6 +627,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hi again",},@@ -620,6 +646,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello world!",},@@ -666,6 +694,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Final answer",},@@ -685,6 +715,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Think",},@@ -696,11 +728,15 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "thinking",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"thinking": "Working on it",},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Final answer",},@@ -912,6 +948,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Test",},@@ -925,11 +963,15 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "I'll call the tool",},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": tool_call_id_1,"name": "mock_sequential_tool","input": '{"input": "test1"}',@@ -938,6 +980,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": tool_call_id_2,"name": "mock_sequential_tool","input": '{"input": "test2"}',@@ -946,10 +990,14 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Sequential result: test1",},@@ -960,10 +1008,14 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Sequential result: test2",},@@ -974,6 +1026,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "ended",},@@ -1168,6 +1222,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Test",},@@ -1181,6 +1237,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": tool_call_id_1,"name": "mock_concurrent_tool","input": '{"input": "test1"}',@@ -1189,6 +1247,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": tool_call_id_2,"name": "mock_concurrent_tool","input": '{"input": "test2"}',@@ -1197,10 +1257,14 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Concurrent result: test1",},@@ -1211,10 +1275,14 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Concurrent result: test2",},@@ -1225,6 +1293,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "All done",},@@ -1457,6 +1527,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Test",},@@ -1470,6 +1542,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": tool_call_id_1,"name": "mock_sequential_tool","input": '{"input": "seq1"}',@@ -1478,6 +1552,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": tool_call_id_2,"name": "mock_concurrent_tool","input": '{"input": "conc1"}',@@ -1486,6 +1562,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": tool_call_id_3,"name": "mock_concurrent_tool","input": '{"input": "conc2"}',@@ -1494,12 +1572,16 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": "mock_sequential_tool","state": "success","output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Sequential result: seq1",},@@ -1508,12 +1590,16 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": "mock_concurrent_tool","state": "success","output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Concurrent result: conc1",},@@ -1522,12 +1608,16 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": "mock_concurrent_tool","state": "success","output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Concurrent result: conc2",},@@ -1536,6 +1626,8 @@ class AgentBasicTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "All done",},diff --git a/tests/agent_injection_test.py b/tests/agent_injection_test.pyindex 0a63d87fa..79764f912 100644--- a/tests/agent_injection_test.py+++ b/tests/agent_injection_test.py@@ -103,6 +103,8 @@ class AgentInjectionTest(IsolatedAsyncioTestCase):"""Build the expected persisted ``HintBlock`` dump."""return {"type": "hint",+ "created_at": AnyString(),+ "finished_at": AnyString(),"hint": hint,"id": AnyString(),"source": INJECTION_SOURCE,diff --git a/tests/agent_interrupt_test.py b/tests/agent_interrupt_test.pyindex 7fa681fe9..4eaac32b0 100644--- a/tests/agent_interrupt_test.py+++ b/tests/agent_interrupt_test.py@@ -174,7 +174,13 @@ def _user_msg_dict(content: str) -> dict[str, Any]:"name": "user","role": "user","content": [- {"type": "text", "id": AnyString(), "text": content},+ {+ "type": "text",+ "id": AnyString(),+ "text": content,+ "created_at": AnyString(),+ "finished_at": None,+ },],"usage": None,}@@ -188,6 +194,8 @@ def _tool_call_dict() -> dict[str, Any]:return {"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": tc_id,"name": name,"input": input,@@ -215,12 +223,20 @@ def _interrupted_tool_result_dict(output: Anyif output_is_blocks:output = [- {"type": "text", "id": AnyString(), "text": _INTERRUPT_MSG},+ {+ "type": "text",+ "id": AnyString(),+ "text": _INTERRUPT_MSG,+ "created_at": AnyString(),+ "finished_at": None,+ },]else:output = _INTERRUPT_MSGreturn {"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": tc_id,"name": name,"output": output,@@ -342,6 +358,8 @@ class AgentInterruptCancelTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Calling.",},@@ -412,6 +430,8 @@ class AgentInterruptCancelTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Calling both.",},@@ -502,6 +522,8 @@ class AgentInterruptCancelTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Mixed batch.",},@@ -585,6 +607,8 @@ class AgentInterruptCancelTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Mixed batch.",},@@ -676,6 +700,8 @@ class AgentInterruptCancelTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Mixed batch.",},@@ -816,6 +842,8 @@ class AgentInterruptEventTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Need HITL.",},@@ -873,6 +901,8 @@ class AgentInterruptEventTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Need HITL.",},@@ -938,6 +968,8 @@ class AgentInterruptEventTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Need HITL.",},diff --git a/tests/agent_structured_output_test.py b/tests/agent_structured_output_test.pyindex fbbfec188..2d95f5a49 100644--- a/tests/agent_structured_output_test.py+++ b/tests/agent_structured_output_test.py@@ -126,6 +126,8 @@ class AgentStructuredOutputTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "The required structured output is generated.",},@@ -208,6 +210,8 @@ class AgentStructuredOutputTest(IsolatedAsyncioTestCase):[{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": "structured_call_0","name": "GenerateStructuredOutput","output": "Input validation failed for tool "@@ -218,11 +222,15 @@ class AgentStructuredOutputTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": "structured_call_1","name": "GenerateStructuredOutput","output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Structured output generated ""successfully.",@@ -284,6 +292,8 @@ class AgentStructuredOutputTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "The maximum reasoning-acting iterations ""are exceeded.",diff --git a/tests/builtin_glob_test.py b/tests/builtin_glob_test.pyindex 22d2c034c..d682e4ed5 100644--- a/tests/builtin_glob_test.py+++ b/tests/builtin_glob_test.py@@ -121,6 +121,8 @@ class GlobToolTest(IsolatedAsyncioTestCase):"test3.py",),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",diff --git a/tests/compress_context_test.py b/tests/compress_context_test.pyindex ae1fab988..2279ec09d 100644--- a/tests/compress_context_test.py+++ b/tests/compress_context_test.py@@ -235,6 +235,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "a" * 120,},],@@ -255,6 +257,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": "b","text": "b" * 40,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -279,6 +283,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": AnyString(),"text": "c" * 40,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -297,6 +303,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "d" * 40,},],@@ -346,6 +354,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "a" * 120,},],@@ -366,11 +376,15 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": "b","text": "b" * 40,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},{"id": "c","text": "c" * 60,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -394,6 +408,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "d" * 40,},],@@ -442,6 +458,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "a" * 120,},],@@ -462,6 +480,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": "b","text": "b" * 40,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -486,6 +506,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": "c","text": "c" * 20,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -504,6 +526,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "d" * 40,},],@@ -552,6 +576,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "a" * 120,},],@@ -577,11 +603,15 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": "b","text": "b" * 20,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},{"id": "c","text": "c" * 20,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -600,6 +630,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "d" * 40,},],@@ -652,11 +684,15 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": "b","text": "b" * 20,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},{"id": "c","text": "c" * 20,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -675,6 +711,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "d" * 40,},],@@ -763,6 +801,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "old" * 80,},],@@ -782,6 +822,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": "tc1","type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"name": "first_tool","input": json.dumps({"value": "a" * 80}),"state": "pending",@@ -790,6 +832,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": "tc2","type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"name": "second_tool","input": json.dumps({"value": "b" * 80}),"state": "pending",@@ -798,11 +842,15 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": "tc1","type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"name": "first_tool","output": [{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "first result " * 8,},],@@ -812,11 +860,15 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": "tc2","type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"name": "second_tool","output": [{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "second result " * 8,},],@@ -845,6 +897,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": "final-text","type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "Both tools completed.",},],@@ -864,6 +918,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):{"id": AnyString(),"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "latest question",},],@@ -957,6 +1013,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": AnyString(),"text": "2" * 40,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -976,6 +1034,8 @@ class ContextCompressionTest(IsolatedAsyncioTestCase):"id": AnyString(),"text": "3" * 40,"type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},diff --git a/tests/compress_tool_result_test.py b/tests/compress_tool_result_test.pyindex 33cc166aa..31587b982 100644--- a/tests/compress_tool_result_test.py+++ b/tests/compress_tool_result_test.py@@ -3,7 +3,7 @@# pylint: disable=protected-access, unused-argumentfrom unittest.async_case import IsolatedAsyncioTestCase-from utils import MockModel+from utils import MockModel, AnyStringfrom agentscope.agent import Agent, ContextConfigfrom agentscope.message import (@@ -134,11 +134,29 @@ class ToolResultCompressionTest(IsolatedAsyncioTestCase):# Verify results using assertListEqualexpected_reserved = [- {"type": "text", "text": "A" * 20, "id": "block1"},- {"type": "text", "text": "B" * 20 + "C" * 60, "id": "block2"},+ {+ "type": "text",+ "text": "A" * 20,+ "id": "block1",+ "created_at": AnyString(),+ "finished_at": None,+ },+ {+ "type": "text",+ "text": "B" * 20 + "C" * 60,+ "id": "block2",+ "created_at": AnyString(),+ "finished_at": None,+ },]expected_offload = [- {"type": "text", "text": "C" * 40, "id": "block3"},+ {+ "type": "text",+ "text": "C" * 40,+ "id": "block3",+ "created_at": AnyString(),+ "finished_at": None,+ },]self.assertListEqual(@@ -196,8 +214,20 @@ class ToolResultCompressionTest(IsolatedAsyncioTestCase):# Verify results using assertListEqualexpected_reserved = [- {"type": "text", "text": "A" * 20, "id": "block1"},- {"type": "text", "text": "B" * 20, "id": "block2"},+ {+ "type": "text",+ "text": "A" * 20,+ "id": "block1",+ "created_at": AnyString(),+ "finished_at": None,+ },+ {+ "type": "text",+ "text": "B" * 20,+ "id": "block2",+ "created_at": AnyString(),+ "finished_at": None,+ },]expected_offload = [{@@ -209,6 +239,8 @@ class ToolResultCompressionTest(IsolatedAsyncioTestCase):"media_type": "image/png",},"name": None,+ "created_at": AnyString(),+ "finished_at": None,},]@@ -255,11 +287,29 @@ class ToolResultCompressionTest(IsolatedAsyncioTestCase):# Verify results using assertListEqualexpected_reserved = [- {"type": "text", "text": "A" * 100, "id": "block1"},+ {+ "type": "text",+ "text": "A" * 100,+ "id": "block1",+ "created_at": AnyString(),+ "finished_at": None,+ },]expected_offload = [- {"type": "text", "text": "B" * 20, "id": "block2"},- {"type": "text", "text": "C" * 20, "id": "block3"},+ {+ "type": "text",+ "text": "B" * 20,+ "id": "block2",+ "created_at": AnyString(),+ "finished_at": None,+ },+ {+ "type": "text",+ "text": "C" * 20,+ "id": "block3",+ "created_at": AnyString(),+ "finished_at": None,+ },]self.assertListEqual(@@ -329,11 +379,25 @@ class ToolResultCompressionTest(IsolatedAsyncioTestCase):"media_type": "image/png",},"name": None,+ "created_at": AnyString(),+ "finished_at": None,+ },+ {+ "type": "text",+ "text": "B" * 20 + "C" * 5,+ "id": "block2",+ "created_at": AnyString(),+ "finished_at": None,},- {"type": "text", "text": "B" * 20 + "C" * 5, "id": "block2"},]expected_offload = [- {"type": "text", "text": "C" * 15, "id": "block3"},+ {+ "type": "text",+ "text": "C" * 15,+ "id": "block3",+ "created_at": AnyString(),+ "finished_at": None,+ },]self.assertListEqual(@@ -387,10 +451,22 @@ class ToolResultCompressionTest(IsolatedAsyncioTestCase):# Verify results using assertListEqualexpected_reserved = [- {"type": "text", "text": "A" * 20 + "B" * 80, "id": "block1"},+ {+ "type": "text",+ "text": "A" * 20 + "B" * 80,+ "id": "block1",+ "created_at": AnyString(),+ "finished_at": None,+ },]expected_offload = [- {"type": "text", "text": "B" * 20 + "C" * 20, "id": "block3"},+ {+ "type": "text",+ "text": "B" * 20 + "C" * 20,+ "id": "block3",+ "created_at": AnyString(),+ "finished_at": None,+ },]self.assertListEqual(@@ -450,7 +526,13 @@ class ToolResultCompressionTest(IsolatedAsyncioTestCase):# Verify results using assertListEqualexpected_reserved = [- {"type": "text", "text": "A" * 20, "id": "block1"},+ {+ "type": "text",+ "text": "A" * 20,+ "id": "block1",+ "created_at": AnyString(),+ "finished_at": None,+ },{"type": "data","id": "block2",@@ -460,11 +542,25 @@ class ToolResultCompressionTest(IsolatedAsyncioTestCase):"media_type": "image/png",},"name": None,+ "created_at": AnyString(),+ "finished_at": None,+ },+ {+ "type": "text",+ "text": "C" * 5,+ "id": "block3",+ "created_at": AnyString(),+ "finished_at": None,},- {"type": "text", "text": "C" * 5, "id": "block3"},]expected_offload = [- {"type": "text", "text": "C" * 15, "id": "block3"},+ {+ "type": "text",+ "text": "C" * 15,+ "id": "block3",+ "created_at": AnyString(),+ "finished_at": None,+ },]self.assertListEqual(diff --git a/tests/event_to_message_test.py b/tests/event_to_message_test.pyindex 484faab0f..98ff1f482 100644--- a/tests/event_to_message_test.py+++ b/tests/event_to_message_test.py@@ -87,37 +87,69 @@ _FIXED_END_TS = "2026-01-01T12:00:00" # deterministic finished_at# ----------------------------------------------------------------------------def _tb(block_id: str, text: str) -> dict:+def _tb(block_id: str, text: str, finished_at: Any = None) -> dict:"""Text block dict."""- return {"type": "text", "id": block_id, "text": text}+ return {+ "type": "text",+ "id": block_id,+ "text": text,+ "created_at": AnyString(),+ "finished_at": finished_at,+ }-def _thb(block_id: str, thinking: str) -> dict:+def _thb(block_id: str, thinking: str, finished_at: Any = None) -> dict:"""Thinking block dict."""- return {"type": "thinking", "id": block_id, "thinking": thinking}+ return {+ "type": "thinking",+ "id": block_id,+ "thinking": thinking,+ "created_at": AnyString(),+ "finished_at": finished_at,+ }-def _db_b64(block_id: str, data: str, media_type: str) -> dict:+def _db_b64(+ block_id: str,+ data: str,+ media_type: str,+ finished_at: Any = None,+) -> dict:"""DataBlock (base-64 source) dict."""return {"type": "data","id": block_id,"source": {"type": "base64", "data": data, "media_type": media_type},"name": None,+ "created_at": AnyString(),+ "finished_at": finished_at,}-def _db_url(block_id: str, url: str, media_type: str) -> dict:+def _db_url(+ block_id: str,+ url: str,+ media_type: str,+ finished_at: Any = None,+) -> dict:"""DataBlock (URL source) dict."""return {"type": "data","id": block_id,"source": {"type": "url", "url": url, "media_type": media_type},"name": None,+ "created_at": AnyString(),+ "finished_at": finished_at,}-def _tcb(tc_id: str, name: str, inp: str, state: str) -> dict:+def _tcb(+ tc_id: str,+ name: str,+ inp: str,+ state: str,+ finished_at: Any = None,+) -> dict:"""ToolCallBlock dict."""return {"type": "tool_call",@@ -126,10 +158,18 @@ def _tcb(tc_id: str, name: str, inp: str, state: str) -> dict:"input": inp,"state": state,"suggested_rules": [],+ "created_at": AnyString(),+ "finished_at": finished_at,}-def _trb(tc_id: str, name: str, output: Any, state: str) -> dict:+def _trb(+ tc_id: str,+ name: str,+ output: Any,+ state: str,+ finished_at: Any = None,+) -> dict:"""ToolResultBlock dict."""return {"type": "tool_result",@@ -138,6 +178,8 @@ def _trb(tc_id: str, name: str, output: Any, state: str) -> dict:"output": output,"state": state,"metadata": {},+ "created_at": AnyString(),+ "finished_at": finished_at,}@@ -203,7 +245,9 @@ class EventToMessageTest(IsolatedAsyncioTestCase):gt_text_delta2 = _base([_tb(_B_TEXT, "Hello World")])ev_text_end = TextBlockEndEvent(reply_id=_REPLY_ID, block_id=_B_TEXT)- gt_text_end = _base([_tb(_B_TEXT, "Hello World")]) # unchanged+ gt_text_end = _base(+ [_tb(_B_TEXT, "Hello World", AnyString())],+ ) # unchanged# ================================================================# Stage 2 – Thinking block streaming@@ -214,7 +258,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):)gt_think_start = _base([- _tb(_B_TEXT, "Hello World"),+ _tb(_B_TEXT, "Hello World", AnyString()),_thb(_B_THINK, ""),],)@@ -226,7 +270,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):)gt_think_delta1 = _base([- _tb(_B_TEXT, "Hello World"),+ _tb(_B_TEXT, "Hello World", AnyString()),_thb(_B_THINK, "Let me"),],)@@ -238,7 +282,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):)gt_think_delta2 = _base([- _tb(_B_TEXT, "Hello World"),+ _tb(_B_TEXT, "Hello World", AnyString()),_thb(_B_THINK, "Let me think"),],)@@ -249,8 +293,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):)gt_think_end = _base([ # unchanged- _tb(_B_TEXT, "Hello World"),- _thb(_B_THINK, "Let me think"),+ _tb(_B_TEXT, "Hello World", AnyString()),+ _thb(_B_THINK, "Let me think", AnyString()),],)@@ -264,8 +308,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):)gt_data_start = _base([- _tb(_B_TEXT, "Hello World"),- _thb(_B_THINK, "Let me think"),+ _tb(_B_TEXT, "Hello World", AnyString()),+ _thb(_B_THINK, "Let me think", AnyString()),_db_b64(_B_DATA, "", "image/png"),],)@@ -282,8 +326,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):)gt_data_delta1 = _base([- _tb(_B_TEXT, "Hello World"),- _thb(_B_THINK, "Let me think"),+ _tb(_B_TEXT, "Hello World", AnyString()),+ _thb(_B_THINK, "Let me think", AnyString()),_db_b64(_B_DATA, "YWJj", "image/png"),],)@@ -296,8 +340,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):)gt_data_delta2 = _base([- _tb(_B_TEXT, "Hello World"),- _thb(_B_THINK, "Let me think"),+ _tb(_B_TEXT, "Hello World", AnyString()),+ _thb(_B_THINK, "Let me think", AnyString()),_db_b64(_B_DATA, "YWJjZGVm", "image/png"),],)@@ -305,9 +349,9 @@ class EventToMessageTest(IsolatedAsyncioTestCase):ev_data_end = DataBlockEndEvent(reply_id=_REPLY_ID, block_id=_B_DATA)gt_data_end = _base([ # unchanged- _tb(_B_TEXT, "Hello World"),- _thb(_B_THINK, "Let me think"),- _db_b64(_B_DATA, "YWJjZGVm", "image/png"),+ _tb(_B_TEXT, "Hello World", AnyString()),+ _thb(_B_THINK, "Let me think", AnyString()),+ _db_b64(_B_DATA, "YWJjZGVm", "image/png", AnyString()),],)@@ -321,9 +365,9 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_call_name="search",)_s4_prefix = [- _tb(_B_TEXT, "Hello World"),- _thb(_B_THINK, "Let me think"),- _db_b64(_B_DATA, "YWJjZGVm", "image/png"),+ _tb(_B_TEXT, "Hello World", AnyString()),+ _thb(_B_THINK, "Let me think", AnyString()),+ _db_b64(_B_DATA, "YWJjZGVm", "image/png", AnyString()),]gt_tc_allow_start = _base(_s4_prefix + [_tcb(_TC_ALLOW, "search", "", "pending")],@@ -352,7 +396,16 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_call_id=_TC_ALLOW,)gt_tc_allow_end = _base( # unchanged- _s4_prefix + [_tcb(_TC_ALLOW, "search", '{"q": "hi"}', "pending")],+ _s4_prefix+ + [+ _tcb(+ _TC_ALLOW,+ "search",+ '{"q": "hi"}',+ "pending",+ AnyString(),+ ),+ ],)# RequireUserConfirmEvent → state: pending → asking@@ -366,7 +419,16 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_calls=[_tc_allow_block],)gt_require_confirm = _base(- _s4_prefix + [_tcb(_TC_ALLOW, "search", '{"q": "hi"}', "asking")],+ _s4_prefix+ + [+ _tcb(+ _TC_ALLOW,+ "search",+ '{"q": "hi"}',+ "asking",+ AnyString(),+ ),+ ],)# UserConfirmResultEvent (confirmed=True) → state: asking → allowed@@ -377,7 +439,16 @@ class EventToMessageTest(IsolatedAsyncioTestCase):],)gt_user_confirmed = _base(- _s4_prefix + [_tcb(_TC_ALLOW, "search", '{"q": "hi"}', "allowed")],+ _s4_prefix+ + [+ _tcb(+ _TC_ALLOW,+ "search",+ '{"q": "hi"}',+ "allowed",+ AnyString(),+ ),+ ],)# ToolResult for _TC_ALLOW – text output@@ -387,7 +458,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_call_name="search",)_s4b_prefix = _s4_prefix + [- _tcb(_TC_ALLOW, "search", '{"q": "hi"}', "allowed"),+ _tcb(_TC_ALLOW, "search", '{"q": "hi"}', "allowed", AnyString()),]gt_result_start = _base(_s4b_prefix + [_trb(_TC_ALLOW, "search", [], "running")],@@ -405,7 +476,15 @@ class EventToMessageTest(IsolatedAsyncioTestCase):_trb(_TC_ALLOW,"search",- [{"type": "text", "id": AnyString(), "text": "Found:"}],+ [+ {+ "type": "text",+ "id": AnyString(),+ "text": "Found:",+ "created_at": AnyString(),+ "finished_at": None,+ },+ ],"running",),],@@ -428,6 +507,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):"type": "text","id": AnyString(),"text": "Found: 3 items",+ "created_at": AnyString(),+ "finished_at": None,},],"running",@@ -444,7 +525,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):# tool_call state in the prefix changes from "allowed" to "finished"# from this point onward._s4b_done_prefix = _s4_prefix + [- _tcb(_TC_ALLOW, "search", '{"q": "hi"}', "finished"),+ _tcb(_TC_ALLOW, "search", '{"q": "hi"}', "finished", AnyString()),]gt_result_end_ok = _base(_s4b_done_prefix@@ -457,9 +538,12 @@ class EventToMessageTest(IsolatedAsyncioTestCase):"type": "text","id": AnyString(),"text": "Found: 3 items",+ "created_at": AnyString(),+ "finished_at": None,},],"success",+ AnyString(),),],)@@ -476,9 +560,12 @@ class EventToMessageTest(IsolatedAsyncioTestCase):"type": "text","id": AnyString(),"text": "Found: 3 items",+ "created_at": AnyString(),+ "finished_at": None,},],"success",+ AnyString(),),]@@ -496,7 +583,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_call_id=_TC_DENY,)gt_tc_deny_end = _base( # unchanged- _s5_prefix + [_tcb(_TC_DENY, "delete", "", "pending")],+ _s5_prefix+ + [_tcb(_TC_DENY, "delete", "", "pending", AnyString())],)_tc_deny_block = ToolCallBlock(id=_TC_DENY, name="delete", input="")@@ -505,7 +593,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_calls=[_tc_deny_block],)gt_require_confirm_deny = _base(- _s5_prefix + [_tcb(_TC_DENY, "delete", "", "asking")],+ _s5_prefix + [_tcb(_TC_DENY, "delete", "", "asking", AnyString())],)# UserConfirmResultEvent (confirmed=False) → state: asking → finished@@ -516,13 +604,16 @@ class EventToMessageTest(IsolatedAsyncioTestCase):],)gt_user_denied = _base(- _s5_prefix + [_tcb(_TC_DENY, "delete", "", "finished")],+ _s5_prefix+ + [_tcb(_TC_DENY, "delete", "", "finished", AnyString())],)# ================================================================# Stage 6 – ToolCall (TC_EXT): external execution flow# ================================================================- _s6_prefix = _s5_prefix + [_tcb(_TC_DENY, "delete", "", "finished")]+ _s6_prefix = _s5_prefix + [+ _tcb(_TC_DENY, "delete", "", "finished", AnyString()),+ ]ev_tc_ext_start = ToolCallStartEvent(reply_id=_REPLY_ID,@@ -538,7 +629,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_call_id=_TC_EXT,)gt_tc_ext_end = _base( # unchanged- _s6_prefix + [_tcb(_TC_EXT, "run_code", "", "pending")],+ _s6_prefix+ + [_tcb(_TC_EXT, "run_code", "", "pending", AnyString())],)_tc_ext_block = ToolCallBlock(id=_TC_EXT, name="run_code", input="")@@ -547,7 +639,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_calls=[_tc_ext_block],)gt_require_ext = _base(- _s6_prefix + [_tcb(_TC_EXT, "run_code", "", "submitted")],+ _s6_prefix+ + [_tcb(_TC_EXT, "run_code", "", "submitted", AnyString())],)# ExternalExecutionResultEvent – appends a ToolResultBlock directly.@@ -561,17 +654,27 @@ class EventToMessageTest(IsolatedAsyncioTestCase):reply_id=_REPLY_ID,execution_results=[_ext_result_block],)- _s6b_prefix = _s6_prefix + [_tcb(_TC_EXT, "run_code", "", "submitted")]+ _s6b_prefix = _s6_prefix + [+ _tcb(_TC_EXT, "run_code", "", "submitted", AnyString()),+ ]gt_ext_result = _base(_s6b_prefix- + [_trb(_TC_EXT, "run_code", "output: hello", "success")],+ + [+ _trb(+ _TC_EXT,+ "run_code",+ "output: hello",+ "success",+ AnyString(),+ ),+ ],)# ================================================================# Stage 7 – ToolResult with data output: base-64 + URL blocks# ================================================================_s7_prefix = _s6b_prefix + [- _trb(_TC_EXT, "run_code", "output: hello", "success"),+ _trb(_TC_EXT, "run_code", "output: hello", "success", AnyString()),]ev_tc_img_start = ToolCallStartEvent(@@ -588,7 +691,8 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_call_id=_TC_IMG,)gt_tc_img_end = _base( # unchanged- _s7_prefix + [_tcb(_TC_IMG, "screenshot", "", "pending")],+ _s7_prefix+ + [_tcb(_TC_IMG, "screenshot", "", "pending", AnyString())],)ev_res_img_start = ToolResultStartEvent(@@ -596,7 +700,9 @@ class EventToMessageTest(IsolatedAsyncioTestCase):tool_call_id=_TC_IMG,tool_call_name="screenshot",)- _s7b_prefix = _s7_prefix + [_tcb(_TC_IMG, "screenshot", "", "pending")]+ _s7b_prefix = _s7_prefix + [+ _tcb(_TC_IMG, "screenshot", "", "pending", AnyString()),+ ]gt_res_img_start = _base(_s7b_prefix + [_trb(_TC_IMG, "screenshot", [], "running")],)@@ -655,7 +761,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):)# TOOL_RESULT_END flips the paired ToolCallBlock to FINISHED._s7b_done_prefix = _s7_prefix + [- _tcb(_TC_IMG, "screenshot", "", "finished"),+ _tcb(_TC_IMG, "screenshot", "", "finished", AnyString()),]gt_res_img_end = _base(_s7b_done_prefix@@ -672,6 +778,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):),],"error",+ AnyString(),),],)@@ -693,6 +800,7 @@ class EventToMessageTest(IsolatedAsyncioTestCase):),],"error",+ AnyString(),),]ev_model_call_end_1 = ModelCallEndEvent(diff --git a/tests/hitl_external_execution_test.py b/tests/hitl_external_execution_test.pyindex 39f1bdc98..0ca00627f 100644--- a/tests/hitl_external_execution_test.py+++ b/tests/hitl_external_execution_test.py@@ -258,6 +258,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"tool_calls": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": id,"name": name,"input": tool_input,@@ -367,6 +369,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -380,6 +384,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -442,6 +448,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -455,6 +463,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -463,11 +473,15 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.sequential_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.sequential_result_1,},@@ -477,6 +491,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.final_response_text,},@@ -608,6 +624,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -621,6 +639,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -629,6 +649,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.sequential_tool_name,"input": self.tool_input_2,@@ -732,6 +754,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -745,6 +769,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -753,6 +779,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.sequential_tool_name,"input": self.tool_input_2,@@ -761,11 +789,15 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.sequential_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.sequential_result_1,},@@ -775,11 +807,15 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.sequential_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.sequential_result_2,},@@ -789,6 +825,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.final_response_text,},@@ -926,6 +964,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -939,6 +979,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.concurrent_tool_name,"input": self.tool_input_1,@@ -947,6 +989,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.concurrent_tool_name,"input": self.tool_input_2,@@ -1042,6 +1086,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -1055,6 +1101,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.concurrent_tool_name,"input": self.tool_input_1,@@ -1063,6 +1111,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.concurrent_tool_name,"input": self.tool_input_2,@@ -1071,11 +1121,15 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.concurrent_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.concurrent_result_1,},@@ -1085,11 +1139,15 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.concurrent_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.concurrent_result_2,},@@ -1099,6 +1157,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.final_response_text,},@@ -1230,6 +1290,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -1243,6 +1305,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.concurrent_tool_name,"input": self.tool_input_1,@@ -1251,6 +1315,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.concurrent_tool_name,"input": self.tool_input_2,@@ -1321,6 +1387,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -1334,6 +1402,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.concurrent_tool_name,"input": self.tool_input_1,@@ -1342,6 +1412,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.concurrent_tool_name,"input": self.tool_input_2,@@ -1350,11 +1422,15 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.concurrent_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.concurrent_result_1,},@@ -1364,11 +1440,15 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.concurrent_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.concurrent_result_2,},@@ -1378,6 +1458,8 @@ class AgentExternalExecutionTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.final_response_text,},diff --git a/tests/hitl_user_confirmation_test.py b/tests/hitl_user_confirmation_test.pyindex 030d9dac0..70aa38e13 100644--- a/tests/hitl_user_confirmation_test.py+++ b/tests/hitl_user_confirmation_test.py@@ -367,6 +367,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"tool_calls": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -399,6 +401,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -412,6 +416,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -481,6 +487,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -494,6 +502,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -509,11 +519,15 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.sequential_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.sequential_result_1,},@@ -523,6 +537,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.final_response_text,},@@ -638,6 +654,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"tool_calls": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -670,6 +688,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -683,6 +703,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -698,6 +720,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.sequential_tool_name,"input": self.tool_input_2,@@ -743,6 +767,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"tool_calls": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.sequential_tool_name,"input": self.tool_input_2,@@ -812,6 +838,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -825,6 +853,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.sequential_tool_name,"input": self.tool_input_1,@@ -840,6 +870,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.sequential_tool_name,"input": self.tool_input_2,@@ -855,11 +887,15 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.sequential_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.sequential_result_1,},@@ -869,11 +905,15 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.sequential_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.sequential_result_2,},@@ -883,6 +923,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.final_response_text,},@@ -1012,6 +1054,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"tool_calls": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.concurrent_tool_name,"input": self.tool_input_1,@@ -1038,6 +1082,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -1051,6 +1097,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.concurrent_tool_name,"input": self.tool_input_1,@@ -1059,6 +1107,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.concurrent_tool_name,"input": self.tool_input_2,@@ -1106,6 +1156,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"tool_calls": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.concurrent_tool_name,"input": self.tool_input_2,@@ -1166,6 +1218,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -1179,6 +1233,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": self.concurrent_tool_name,"input": self.tool_input_1,@@ -1187,6 +1243,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": self.concurrent_tool_name,"input": self.tool_input_2,@@ -1195,11 +1253,15 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.concurrent_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.concurrent_result_1,},@@ -1209,11 +1271,15 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"name": self.concurrent_tool_name,"output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.concurrent_result_2,},@@ -1223,6 +1289,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.final_response_text,},@@ -1468,6 +1536,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"tool_calls": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": name_a,"input": self.tool_input_1,@@ -1482,6 +1552,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"tool_calls": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": name_b,"input": self.tool_input_2,@@ -1503,6 +1575,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},@@ -1516,6 +1590,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_1,"name": name_a,"input": self.tool_input_1,@@ -1524,6 +1600,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):},{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": self.tool_call_id_2,"name": name_b,"input": self.tool_input_2,@@ -1626,6 +1704,8 @@ class AgentUserConfirmationTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": self.user_input_text,},diff --git a/tests/message_test.py b/tests/message_test.pyindex 13087a8dc..6731909bf 100644--- a/tests/message_test.py+++ b/tests/message_test.py@@ -37,6 +37,8 @@ class MessageTest(IsolatedAsyncioTestCase):"id": AnyString(),"text": "hello world","type": "text",+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -61,8 +63,20 @@ class MessageTest(IsolatedAsyncioTestCase):"name": "user","role": "user","content": [- {"type": "text", "text": "1", "id": AnyString()},- {"type": "text", "text": "2", "id": AnyString()},+ {+ "type": "text",+ "text": "1",+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },+ {+ "type": "text",+ "text": "2",+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"metadata": {},"created_at": AnyString(),@@ -101,7 +115,13 @@ class MessageTest(IsolatedAsyncioTestCase):"name": "user","role": "user","content": [- {"type": "text", "text": "1", "id": AnyString()},+ {+ "type": "text",+ "text": "1",+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },{"type": "data","id": AnyString(),@@ -111,6 +131,8 @@ class MessageTest(IsolatedAsyncioTestCase):"media_type": "image/png",},"name": None,+ "created_at": AnyString(),+ "finished_at": None,},{"type": "data",@@ -121,6 +143,8 @@ class MessageTest(IsolatedAsyncioTestCase):"media_type": "image/png",},"name": None,+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -149,6 +173,8 @@ class MessageTest(IsolatedAsyncioTestCase):"type": "thinking","thinking": "thinking...","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"metadata": {},@@ -178,6 +204,8 @@ class MessageTest(IsolatedAsyncioTestCase):"hint": "hint...","id": AnyString(),"source": None,+ "created_at": AnyString(),+ "finished_at": AnyString(),},],"metadata": {},diff --git a/tests/middleware_rag_test.py b/tests/middleware_rag_test.pyindex 49955b69e..0f0e72e60 100644--- a/tests/middleware_rag_test.py+++ b/tests/middleware_rag_test.py@@ -493,6 +493,8 @@ class RAGMiddlewareTest(IsolatedAsyncioTestCase):"[1] (source: doc-1.txt)\nParis is in France."),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",diff --git a/tests/model_anthropic_test.py b/tests/model_anthropic_test.pyindex d803de536..b469df2d5 100644--- a/tests/model_anthropic_test.py+++ b/tests/model_anthropic_test.py@@ -125,7 +125,10 @@ class TestAnthropicNonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello!")]),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hello!")],+ ),)self.assertEqual(result.id, "msg-1")@@ -155,7 +158,8 @@ class TestAnthropicNonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="toolu_1",name="get_weather",input=json.dumps({"city": "Beijing"}),@@ -187,10 +191,15 @@ class TestAnthropicNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Deep thought...",signature="sig123",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),)@@ -235,16 +244,19 @@ class TestAnthropicNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="visible thought",signature="sig_visible",),ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="",redacted_thinking_data="encrypted_data_abc",),TextBlock.model_construct(id=A,+ created_at=A,text="Answer",),],@@ -315,9 +327,36 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hello")]),- (False, [TextBlock.model_construct(id=A, text=" world")]),- (True, [TextBlock.model_construct(id=A, text="Hello world")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" world",+ ),+ ],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world",+ ),+ ],+ ),],)self.assertEqual(responses[-1].id, "msg-1")@@ -392,6 +431,7 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me think",),],@@ -401,21 +441,36 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="",signature="sig_abc",),],),- (False, [TextBlock.model_construct(id=A, text="Result")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Result",+ ),+ ],+ ),(True,[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me think",signature="sig_abc",),- TextBlock.model_construct(id=A, text="Result"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Result",+ ),],),],@@ -483,6 +538,7 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="",redacted_thinking_data="encrypted_stream_data",),@@ -493,6 +549,7 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):[TextBlock.model_construct(id=A,+ created_at=A,text="Result",),],@@ -502,11 +559,13 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="",redacted_thinking_data="encrypted_stream_data",),TextBlock.model_construct(id=A,+ created_at=A,text="Result",),],@@ -571,7 +630,8 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="toolu_1",name="get_weather",input="",@@ -581,7 +641,8 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="toolu_1",name="get_weather",input='{"city":',@@ -591,7 +652,8 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="toolu_1",name="get_weather",input='"BJ"}',@@ -601,7 +663,8 @@ class TestAnthropicStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="toolu_1",name="get_weather",input='{"city":"BJ"}',diff --git a/tests/model_base_test.py b/tests/model_base_test.pyindex db93734b1..06709cae5 100644--- a/tests/model_base_test.py+++ b/tests/model_base_test.py@@ -30,6 +30,9 @@ def _expected("""Build the expected serialized ``ChatResponse`` dict, with``AnyString`` placeholders for auto-generated fields (id,created_at)."""+ content = [+ {"created_at": AnyString(), "finished_at": None, **b} for b in content+ ]return {"content": content,"is_last": is_last,diff --git a/tests/model_dashscope_test.py b/tests/model_dashscope_test.pyindex f4ebc6830..1b7e3a4a2 100644--- a/tests/model_dashscope_test.py+++ b/tests/model_dashscope_test.py@@ -180,7 +180,10 @@ class TestDashScopeNonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello!")]),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hello!")],+ ),)self.assertEqual(result.id, "req-1")@@ -210,7 +213,8 @@ class TestDashScopeNonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="get_weather",input='{"city":"Hangzhou"}',@@ -242,9 +246,10 @@ class TestDashScopeNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Reasoning step...",),- TextBlock.model_construct(id=A, text="42"),+ TextBlock.model_construct(id=A, created_at=A, text="42"),],),)@@ -281,9 +286,36 @@ class TestDashScopeStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hello")]),- (False, [TextBlock.model_construct(id=A, text=" world")]),- (True, [TextBlock.model_construct(id=A, text="Hello world")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" world",+ ),+ ],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world",+ ),+ ],+ ),],)@@ -313,18 +345,47 @@ class TestDashScopeStream(IsolatedAsyncioTestCase):[(False,- [ThinkingBlock.model_construct(id=A, thinking="Think")],+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Think",+ ),+ ],+ ),+ (+ False,+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="ing",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),+ ],),- (False, [ThinkingBlock.model_construct(id=A, thinking="ing")]),- (False, [TextBlock.model_construct(id=A, text="Answer")]),(True,[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Thinking",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),],@@ -364,7 +425,8 @@ class TestDashScopeStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="search",input='{"q":',@@ -374,7 +436,8 @@ class TestDashScopeStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="search",input='"hello"}',@@ -384,7 +447,8 @@ class TestDashScopeStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="search",input='{"q":"hello"}',@@ -413,8 +477,14 @@ class TestDashScopeStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="X")]),- (True, [TextBlock.model_construct(id=A, text="X")]),+ (+ False,+ [TextBlock.model_construct(id=A, created_at=A, text="X")],+ ),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="X")],+ ),],)self.assertEqual(responses[-1].usage.input_tokens, 50)diff --git a/tests/model_deepseek_test.py b/tests/model_deepseek_test.pyindex f20006dae..bc182c136 100644--- a/tests/model_deepseek_test.py+++ b/tests/model_deepseek_test.py@@ -169,7 +169,16 @@ class TestDeepSeekNonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello world!")]),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world!",+ ),+ ],+ ),)self.assertEqual(result.id, "deepseek-1")@@ -204,12 +213,14 @@ class TestDeepSeekNonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="get_weather",input='{"city":"Beijing"}',),- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-2",name="get_time",input='{"tz":"UTC"}',@@ -241,9 +252,14 @@ class TestDeepSeekNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me think step by step...",),- TextBlock.model_construct(id=A, text="The answer is 42."),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="The answer is 42.",+ ),],),)@@ -285,10 +301,40 @@ class TestDeepSeekStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hello")]),- (False, [TextBlock.model_construct(id=A, text=" world")]),- (False, [TextBlock.model_construct(id=A, text="!")]),- (True, [TextBlock.model_construct(id=A, text="Hello world!")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" world",+ ),+ ],+ ),+ (+ False,+ [TextBlock.model_construct(id=A, created_at=A, text="!")],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world!",+ ),+ ],+ ),],)self.assertEqual(responses[-1].id, "deepseek-1")@@ -320,22 +366,57 @@ class TestDeepSeekStream(IsolatedAsyncioTestCase):[(False,- [ThinkingBlock.model_construct(id=A, thinking="Think")],+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Think",+ ),+ ],+ ),+ (+ False,+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="ing...",+ ),+ ],),(False,- [ThinkingBlock.model_construct(id=A, thinking="ing...")],+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" here.",+ ),+ ],),- (False, [TextBlock.model_construct(id=A, text="Answer")]),- (False, [TextBlock.model_construct(id=A, text=" here.")]),(True,[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Thinking...",),- TextBlock.model_construct(id=A, text="Answer here."),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer here.",+ ),],),],@@ -377,7 +458,8 @@ class TestDeepSeekStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="get_weather",input='{"ci',@@ -387,7 +469,8 @@ class TestDeepSeekStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="get_weather",input='ty":"BJ"}',@@ -397,7 +480,8 @@ class TestDeepSeekStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="get_weather",input='{"city":"BJ"}',@@ -446,18 +530,26 @@ class TestDeepSeekStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me check",),],),(False,- [TextBlock.model_construct(id=A, text="I'll look it up.")],+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="I'll look it up.",+ ),+ ],),(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="search",input='{"q":"weather"}',@@ -469,13 +561,16 @@ class TestDeepSeekStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me check",),TextBlock.model_construct(id=A,+ created_at=A,text="I'll look it up.",),- ToolCallBlock(+ ToolCallBlock.model_construct(+ created_at=A,id="call-1",name="search",input='{"q":"weather"}',@@ -511,8 +606,14 @@ class TestDeepSeekStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hi")]),- (True, [TextBlock.model_construct(id=A, text="Hi")]),+ (+ False,+ [TextBlock.model_construct(id=A, created_at=A, text="Hi")],+ ),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hi")],+ ),],)self.assertEqual(responses[-1].usage.input_tokens, 100)diff --git a/tests/model_gemini_test.py b/tests/model_gemini_test.pyindex c5dd3d9ad..fe5f56e60 100644--- a/tests/model_gemini_test.py+++ b/tests/model_gemini_test.py@@ -131,7 +131,10 @@ class TestGeminiNonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello!")]),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hello!")],+ ),)@patch("google.genai.Client")@@ -160,8 +163,9 @@ class TestGeminiNonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="get_weather",input=json.dumps({"city": "Tokyo"},@@ -200,6 +204,7 @@ class TestGeminiNonStream(IsolatedAsyncioTestCase):[ToolCallBlock.model_construct(id=A,+ created_at=A,name="get_weather",input=json.dumps({"city": "Tokyo"},@@ -235,9 +240,14 @@ class TestGeminiNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me think...",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),)@@ -271,9 +281,36 @@ class TestGeminiStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hello")]),- (False, [TextBlock.model_construct(id=A, text=" world")]),- (True, [TextBlock.model_construct(id=A, text="Hello world")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" world",+ ),+ ],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world",+ ),+ ],+ ),],)@@ -299,14 +336,37 @@ class TestGeminiStream(IsolatedAsyncioTestCase):[(False,- [ThinkingBlock.model_construct(id=A, thinking="Think")],+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Think",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),+ ],),- (False, [TextBlock.model_construct(id=A, text="Answer")]),(True,[- ThinkingBlock.model_construct(id=A, thinking="Think"),- TextBlock.model_construct(id=A, text="Answer"),+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Think",+ ),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),],@@ -338,8 +398,9 @@ class TestGeminiStream(IsolatedAsyncioTestCase):gen = await self.model([])responses = [r async for r in gen]- tool_block = ToolCallBlock(+ tool_block = ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input=json.dumps({"q": "test"}, ensure_ascii=False),)diff --git a/tests/model_moonshot_test.py b/tests/model_moonshot_test.pyindex a13cf8b29..d62953cc1 100644--- a/tests/model_moonshot_test.py+++ b/tests/model_moonshot_test.py@@ -162,7 +162,10 @@ class TestMoonshotNonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello!")]),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hello!")],+ ),)self.assertEqual(result.id, "kimi-1")@@ -192,8 +195,9 @@ class TestMoonshotNonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="get_weather",input='{"city":"Shanghai"}',),@@ -224,9 +228,10 @@ class TestMoonshotNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Step by step...",),- TextBlock.model_construct(id=A, text="42"),+ TextBlock.model_construct(id=A, created_at=A, text="42"),],),)@@ -279,9 +284,30 @@ class TestMoonshotStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hi")]),- (False, [TextBlock.model_construct(id=A, text=" there")]),- (True, [TextBlock.model_construct(id=A, text="Hi there")]),+ (+ False,+ [TextBlock.model_construct(id=A, created_at=A, text="Hi")],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" there",+ ),+ ],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hi there",+ ),+ ],+ ),],)@@ -311,21 +337,47 @@ class TestMoonshotStream(IsolatedAsyncioTestCase):[(False,- [ThinkingBlock.model_construct(id=A, thinking="Let me")],+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Let me",+ ),+ ],),(False,- [ThinkingBlock.model_construct(id=A, thinking=" think")],+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking=" think",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Result",+ ),+ ],),- (False, [TextBlock.model_construct(id=A, text="Result")]),(True,[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me think",),- TextBlock.model_construct(id=A, text="Result"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Result",+ ),],),],@@ -365,8 +417,9 @@ class TestMoonshotStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input='{"q":',),@@ -375,8 +428,9 @@ class TestMoonshotStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input='"test"}',),@@ -385,8 +439,9 @@ class TestMoonshotStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input='{"q":"test"}',),diff --git a/tests/model_ollama_test.py b/tests/model_ollama_test.pyindex fc7dd960a..84fe3676c 100644--- a/tests/model_ollama_test.py+++ b/tests/model_ollama_test.py@@ -131,7 +131,10 @@ class TestOllamaNonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello!")]),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hello!")],+ ),)@patch("ollama.AsyncClient")@@ -155,8 +158,9 @@ class TestOllamaNonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="0_get_weather",+ created_at=A,name="get_weather",input=json.dumps({"city": "SH"}),),@@ -187,9 +191,14 @@ class TestOllamaNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me think...",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),)@@ -223,9 +232,30 @@ class TestOllamaStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hi")]),- (False, [TextBlock.model_construct(id=A, text=" there")]),- (True, [TextBlock.model_construct(id=A, text="Hi there")]),+ (+ False,+ [TextBlock.model_construct(id=A, created_at=A, text="Hi")],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" there",+ ),+ ],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hi there",+ ),+ ],+ ),],)@@ -255,19 +285,34 @@ class TestOllamaStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Think step",),],),- (False, [TextBlock.model_construct(id=A, text="Result")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Result",+ ),+ ],+ ),(True,[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Think step",),- TextBlock.model_construct(id=A, text="Result"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Result",+ ),],),],@@ -294,8 +339,9 @@ class TestOllamaStream(IsolatedAsyncioTestCase):gen = await self.model([])responses = [r async for r in gen]- tool_block = ToolCallBlock(+ tool_block = ToolCallBlock.model_construct(id="0_search",+ created_at=A,name="search",input=json.dumps({"q": "hello"}),)diff --git a/tests/model_openai_chat_test.py b/tests/model_openai_chat_test.pyindex 106024037..142d631ce 100644--- a/tests/model_openai_chat_test.py+++ b/tests/model_openai_chat_test.py@@ -181,7 +181,16 @@ class TestOpenAIChatNonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello world!")]),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world!",+ ),+ ],+ ),)self.assertEqual(result.id, "resp-1")@@ -276,8 +285,9 @@ class TestOpenAIChatNonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="get_weather",input='{"city":"Beijing"}',),@@ -312,10 +322,12 @@ class TestOpenAIChatNonStream(IsolatedAsyncioTestCase):[TextBlock.model_construct(id=A,+ created_at=A,text="Hello from audio.",),DataBlock.model_construct(id=A,+ created_at=A,source=Base64Source.model_construct(type="base64",media_type="audio/wav",@@ -349,9 +361,14 @@ class TestOpenAIChatNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Let me think step by step...",),- TextBlock.model_construct(id=A, text="The answer is 42."),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="The answer is 42.",+ ),],),)@@ -393,10 +410,40 @@ class TestOpenAIChatStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hello")]),- (False, [TextBlock.model_construct(id=A, text=" world")]),- (False, [TextBlock.model_construct(id=A, text="!")]),- (True, [TextBlock.model_construct(id=A, text="Hello world!")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" world",+ ),+ ],+ ),+ (+ False,+ [TextBlock.model_construct(id=A, created_at=A, text="!")],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world!",+ ),+ ],+ ),],)self.assertEqual(responses[-1].id, "resp-1")@@ -427,21 +474,47 @@ class TestOpenAIChatStream(IsolatedAsyncioTestCase):[(False,- [ThinkingBlock.model_construct(id=A, thinking="Think")],+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Think",+ ),+ ],+ ),+ (+ False,+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="ing...",+ ),+ ],),(False,- [ThinkingBlock.model_construct(id=A, thinking="ing...")],+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),+ ],),- (False, [TextBlock.model_construct(id=A, text="Answer")]),(True,[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Thinking...",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),],@@ -481,8 +554,9 @@ class TestOpenAIChatStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="get_weather",input='{"ci',),@@ -491,8 +565,9 @@ class TestOpenAIChatStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="get_weather",input='ty":"BJ"}',),@@ -501,8 +576,9 @@ class TestOpenAIChatStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="get_weather",input='{"city":"BJ"}',),@@ -533,8 +609,14 @@ class TestOpenAIChatStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hi")]),- (True, [TextBlock.model_construct(id=A, text="Hi")]),+ (+ False,+ [TextBlock.model_construct(id=A, created_at=A, text="Hi")],+ ),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hi")],+ ),],)self.assertEqual(responses[-1].usage.input_tokens, 100)diff --git a/tests/model_openai_response_test.py b/tests/model_openai_response_test.pyindex 356dbe0b1..0a18a6731 100644--- a/tests/model_openai_response_test.py+++ b/tests/model_openai_response_test.py@@ -144,7 +144,10 @@ class TestOpenAIResponseNonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello!")]),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hello!")],+ ),)self.assertEqual(result.id, "resp-openai-1")@@ -175,8 +178,9 @@ class TestOpenAIResponseNonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="get_weather",input='{"city":"BJ"}',),@@ -208,10 +212,15 @@ class TestOpenAIResponseNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Thinking step...",reasoning_item_id="rs_abc999",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),)@@ -240,10 +249,15 @@ class TestOpenAIResponseNonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="",reasoning_item_id="rs_empty",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),)@@ -322,9 +336,36 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hello")]),- (False, [TextBlock.model_construct(id=A, text=" world")]),- (True, [TextBlock.model_construct(id=A, text="Hello world")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" world",+ ),+ ],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world",+ ),+ ],+ ),],)@@ -372,9 +413,24 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):[(False,- [ThinkingBlock.model_construct(id=A, thinking="Thinking")],+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Thinking",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),+ ],),- (False, [TextBlock.model_construct(id=A, text="Answer")]),# ``reasoning_item_id`` is only known at# ``response.completed``; it is emitted as a dedicated# carrier delta chunk (empty thinking text) that the base@@ -384,6 +440,7 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="",reasoning_item_id="rs_123",),@@ -394,10 +451,15 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Thinking",reasoning_item_id="rs_123",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),],@@ -443,12 +505,22 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Answer")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),+ ],+ ),(False,[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="",reasoning_item_id="rs_empty",),@@ -457,9 +529,14 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):(True,[- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="",reasoning_item_id="rs_empty",),@@ -520,8 +597,9 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input='{"q":',),@@ -530,8 +608,9 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input='"test"}',),@@ -540,8 +619,9 @@ class TestOpenAIResponseStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input='{"q":"test"}',),diff --git a/tests/model_response_test.py b/tests/model_response_test.pyindex 9e8ab334b..a9631c843 100644--- a/tests/model_response_test.py+++ b/tests/model_response_test.py@@ -32,6 +32,9 @@ def _expected() -> dict:"""Build the expected serialized-``ChatResponse`` dict, with``AnyString`` placeholders for auto-generated fields."""+ content = [+ {"created_at": AnyString(), "finished_at": None, **b} for b in content+ ]return {"content": content,"is_last": is_last,diff --git a/tests/model_xai_test.py b/tests/model_xai_test.pyindex 254f8155c..4e90ba6f1 100644--- a/tests/model_xai_test.py+++ b/tests/model_xai_test.py@@ -226,7 +226,10 @@ class TestXAINonStream(IsolatedAsyncioTestCase):self.assertEqual((result.is_last, result.content),- (True, [TextBlock.model_construct(id=A, text="Hello!")]),+ (+ True,+ [TextBlock.model_construct(id=A, created_at=A, text="Hello!")],+ ),)self.assertEqual(result.id, "xai-resp-1")@@ -257,8 +260,9 @@ class TestXAINonStream(IsolatedAsyncioTestCase):(True,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="get_weather",input='{"city":"NY"}',),@@ -291,9 +295,14 @@ class TestXAINonStream(IsolatedAsyncioTestCase):[ThinkingBlock.model_construct(id=A,+ created_at=A,thinking="Deep thinking...",),- TextBlock.model_construct(id=A, text="Answer"),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),)@@ -334,9 +343,36 @@ class TestXAIStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="Hello")]),- (False, [TextBlock.model_construct(id=A, text=" world")]),- (True, [TextBlock.model_construct(id=A, text="Hello world")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text=" world",+ ),+ ],+ ),+ (+ True,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Hello world",+ ),+ ],+ ),],)@@ -370,14 +406,37 @@ class TestXAIStream(IsolatedAsyncioTestCase):[(False,- [ThinkingBlock.model_construct(id=A, thinking="Think")],+ [+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Think",+ ),+ ],+ ),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),+ ],),- (False, [TextBlock.model_construct(id=A, text="Answer")]),(True,[- ThinkingBlock.model_construct(id=A, thinking="Think"),- TextBlock.model_construct(id=A, text="Answer"),+ ThinkingBlock.model_construct(+ id=A,+ created_at=A,+ thinking="Think",+ ),+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="Answer",+ ),],),],@@ -416,7 +475,16 @@ class TestXAIStream(IsolatedAsyncioTestCase):self.assertListEqual([(r.is_last, r.content) for r in responses],[- (False, [TextBlock.model_construct(id=A, text="I'll search")]),+ (+ False,+ [+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="I'll search",+ ),+ ],+ ),# ``xai_sdk`` does not stream tool calls — they only# appear on the final accumulated response object, so# the parser emits them as a dedicated trailing carrier@@ -424,8 +492,9 @@ class TestXAIStream(IsolatedAsyncioTestCase):(False,[- ToolCallBlock(+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input='{"q":"test"}',),@@ -434,9 +503,14 @@ class TestXAIStream(IsolatedAsyncioTestCase):(True,[- TextBlock.model_construct(id=A, text="I'll search"),- ToolCallBlock(+ TextBlock.model_construct(+ id=A,+ created_at=A,+ text="I'll search",+ ),+ ToolCallBlock.model_construct(id="call-1",+ created_at=A,name="search",input='{"q":"test"}',),diff --git a/tests/rag_chunker_approx_token_test.py b/tests/rag_chunker_approx_token_test.pyindex db18e3e2c..547996159 100644--- a/tests/rag_chunker_approx_token_test.py+++ b/tests/rag_chunker_approx_token_test.py@@ -46,6 +46,8 @@ class ApproxTokenChunkerTest(IsolatedAsyncioTestCase):"type": "text","text": "Hello world!","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "a.txt","chunk_index": 0,@@ -78,6 +80,8 @@ class ApproxTokenChunkerTest(IsolatedAsyncioTestCase):"type": "text","text": text[start : start + 40],"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "b.txt","chunk_index": index,@@ -116,6 +120,8 @@ class ApproxTokenChunkerTest(IsolatedAsyncioTestCase):"type": "text","text": "x" * 40,"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "c.pdf","chunk_index": 0,@@ -127,6 +133,8 @@ class ApproxTokenChunkerTest(IsolatedAsyncioTestCase):"type": "text","text": "x" * 40,"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "c.pdf","chunk_index": 1,@@ -138,6 +146,8 @@ class ApproxTokenChunkerTest(IsolatedAsyncioTestCase):"type": "text","text": "x" * 36,"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "c.pdf","chunk_index": 2,@@ -148,6 +158,8 @@ class ApproxTokenChunkerTest(IsolatedAsyncioTestCase):"content": {"type": "data","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,"source": {"type": "base64","data": "aGk=",@@ -183,6 +195,8 @@ class ApproxTokenChunkerTest(IsolatedAsyncioTestCase):"type": "text","text": "first","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "d.txt","chunk_index": 0,@@ -194,6 +208,8 @@ class ApproxTokenChunkerTest(IsolatedAsyncioTestCase):"type": "text","text": "second","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "d.txt","chunk_index": 1,diff --git a/tests/rag_parser_test.py b/tests/rag_parser_test.pyindex 2a2232fe4..a2eb4d83b 100644--- a/tests/rag_parser_test.py+++ b/tests/rag_parser_test.py@@ -195,6 +195,8 @@ class TextParserTest(IsolatedAsyncioTestCase):"type": "text","text": "hello","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "x.txt","metadata": {},@@ -214,6 +216,8 @@ class TextParserTest(IsolatedAsyncioTestCase):"type": "text","text": "preset","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "x.md","metadata": {},@@ -264,6 +268,8 @@ class PDFParserTest(IsolatedAsyncioTestCase):"type": "text","text": "First page text\n","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.pdf","metadata": {"page": 1},@@ -273,6 +279,8 @@ class PDFParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Second page text\n","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.pdf","metadata": {"page": 2},@@ -330,6 +338,8 @@ class ImageParserTest(IsolatedAsyncioTestCase):"content": {"type": "data","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,"source": {"type": "base64","data": _PNG_PIXEL_B64,@@ -355,6 +365,8 @@ class ImageParserTest(IsolatedAsyncioTestCase):"content": {"type": "data","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,"source": {"type": "base64","data": base64.b64encode(jpeg_bytes).decode(@@ -411,6 +423,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=1>\nAlpha\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.pptx","metadata": {"slide": 1},@@ -420,6 +434,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=2>\nBeta\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.pptx","metadata": {"slide": 2},@@ -444,6 +460,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Alpha","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.pptx","metadata": {"slide": 1},@@ -468,6 +486,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=1>\nHello\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 1},@@ -485,6 +505,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"</slide>"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -494,6 +516,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=3>\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 3},@@ -516,6 +540,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=1>\nHello\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 1},@@ -525,6 +551,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=2>\nHeader","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -536,6 +564,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"| A | B |\n" "| --- | --- |\n" "| 1 | 2 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -545,6 +575,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Footer\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -554,6 +586,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=3>\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 3},@@ -575,6 +609,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=1>\nHello\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 1},@@ -584,6 +620,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=2>\nHeader","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -595,6 +633,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"| A | B |\n" "| --- | --- |\n" "| 1 | 2 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -604,6 +644,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Footer\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -613,6 +655,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=3>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 3},@@ -621,6 +665,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"content": {"type": "data","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,"source": {"type": "base64","data": _PNG_PIXEL_B64,@@ -639,6 +685,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 3},@@ -664,6 +712,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=1>\nHello\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 1},@@ -673,6 +723,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=2>\nHeader","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -686,6 +738,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):'[["A", "B"], ["1", "2"]]'),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -695,6 +749,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Footer\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 2},@@ -704,6 +760,8 @@ class PPTParserTest(IsolatedAsyncioTestCase):"type": "text","text": "<slide index=3>\n</slide>","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.pptx","metadata": {"slide": 3},@@ -766,6 +824,8 @@ class ExcelParserTest(IsolatedAsyncioTestCase):"| Alice | 25 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.xlsx","metadata": {},@@ -795,6 +855,8 @@ class ExcelParserTest(IsolatedAsyncioTestCase):'["1", "2"]'),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.xlsx","metadata": {},@@ -831,6 +893,8 @@ class ExcelParserTest(IsolatedAsyncioTestCase):"| Q1 | 50 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "multi.xlsx","metadata": {},@@ -862,6 +926,8 @@ class ExcelParserTest(IsolatedAsyncioTestCase):"| Q1 | 100 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "multi.xlsx","metadata": {"sheet": "Sales"},@@ -876,6 +942,8 @@ class ExcelParserTest(IsolatedAsyncioTestCase):"| Q1 | 50 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "multi.xlsx","metadata": {"sheet": "Costs"},@@ -901,6 +969,8 @@ class ExcelParserTest(IsolatedAsyncioTestCase):"Sheet: MySheet\n" "| A |\n" "| --- |\n" "| 1 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.xlsx","metadata": {},@@ -924,6 +994,8 @@ class ExcelParserTest(IsolatedAsyncioTestCase):"type": "text","text": ("| A |\n" "| --- |\n" "| 1 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.xlsx","metadata": {},@@ -952,6 +1024,8 @@ class ExcelParserTest(IsolatedAsyncioTestCase):"| [A2] X |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.xlsx","metadata": {},@@ -1008,6 +1082,8 @@ class WordParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Hello\nWorld","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.docx","metadata": {},@@ -1036,6 +1112,8 @@ class WordParserTest(IsolatedAsyncioTestCase):"After table"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.docx","metadata": {},@@ -1058,6 +1136,8 @@ class WordParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Before table","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.docx","metadata": {},@@ -1069,6 +1149,8 @@ class WordParserTest(IsolatedAsyncioTestCase):"| A | B |\n" "| --- | --- |\n" "| 1 | 2 |\n"),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.docx","metadata": {},@@ -1078,6 +1160,8 @@ class WordParserTest(IsolatedAsyncioTestCase):"type": "text","text": "After table","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.docx","metadata": {},@@ -1103,6 +1187,8 @@ class WordParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Before table","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.docx","metadata": {},@@ -1116,6 +1202,8 @@ class WordParserTest(IsolatedAsyncioTestCase):'[["A", "B"], ["1", "2"]]'),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.docx","metadata": {},@@ -1125,6 +1213,8 @@ class WordParserTest(IsolatedAsyncioTestCase):"type": "text","text": "After table","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "demo.docx","metadata": {},@@ -1159,6 +1249,8 @@ class WordParserTest(IsolatedAsyncioTestCase):"type": "text","text": "Text before image\nText after image","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "rich.docx","metadata": {},diff --git a/tests/rag_vdb_milvus_lite_test.py b/tests/rag_vdb_milvus_lite_test.pyindex a565d302b..fd7878864 100644--- a/tests/rag_vdb_milvus_lite_test.py+++ b/tests/rag_vdb_milvus_lite_test.py@@ -128,6 +128,8 @@ class MilvusLiteStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "Hello world!","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 0,@@ -143,6 +145,8 @@ class MilvusLiteStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "Goodbye world!","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 1,diff --git a/tests/rag_vdb_mongodb_test.py b/tests/rag_vdb_mongodb_test.pyindex b4c3ed5a7..19c0b9211 100644--- a/tests/rag_vdb_mongodb_test.py+++ b/tests/rag_vdb_mongodb_test.py@@ -352,6 +352,8 @@ class MongoDBStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "Hello world!","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 0,@@ -367,6 +369,8 @@ class MongoDBStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "Goodbye world!","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 1,@@ -406,6 +410,8 @@ class MongoDBStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "A","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 0,@@ -463,6 +469,8 @@ class MongoDBStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "doc2-chunk0","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-2.txt","chunk_index": 0,@@ -609,6 +617,8 @@ class MongoDBStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "A","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 0,@@ -636,6 +646,8 @@ class MongoDBStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "B","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-2.txt","chunk_index": 0,diff --git a/tests/rag_vdb_qdrant_test.py b/tests/rag_vdb_qdrant_test.pyindex 54acd8499..6f4848c06 100644--- a/tests/rag_vdb_qdrant_test.py+++ b/tests/rag_vdb_qdrant_test.py@@ -134,6 +134,8 @@ class QdrantStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "Hello world!","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 0,@@ -149,6 +151,8 @@ class QdrantStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "Goodbye world!","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 1,@@ -188,6 +192,8 @@ class QdrantStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "A","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-1.txt","chunk_index": 0,@@ -245,6 +251,8 @@ class QdrantStoreTest(IsolatedAsyncioTestCase):"type": "text","text": "doc2-chunk0","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},"source": "doc-2.txt","chunk_index": 0,diff --git a/tests/service_inbox_middleware_test.py b/tests/service_inbox_middleware_test.pyindex ae6c28981..13a59e1c1 100644--- a/tests/service_inbox_middleware_test.py+++ b/tests/service_inbox_middleware_test.py@@ -274,11 +274,19 @@ class TestInboxMiddlewareInjection(IsolatedAsyncioTestCase):"name": "A","role": "assistant","content": [- {"type": "text", "text": "hello", "id": AnyString()},+ {+ "type": "text",+ "text": "hello",+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },{"type": "hint","hint": "poke","id": hint.id,+ "created_at": AnyString(),+ "finished_at": AnyString(),"source": "tester",},],@@ -340,6 +348,8 @@ class TestInboxMiddlewareInjection(IsolatedAsyncioTestCase):"type": "hint","hint": "hi","id": hint.id,+ "created_at": AnyString(),+ "finished_at": AnyString(),"source": "x",},],@@ -381,6 +391,8 @@ class TestInboxMiddlewareInjection(IsolatedAsyncioTestCase):"type": "hint","hint": "hi","id": hint.id,+ "created_at": AnyString(),+ "finished_at": AnyString(),"source": "x",},],diff --git a/tests/service_scheduler_test.py b/tests/service_scheduler_test.pyindex 8dc9af93b..de81a181f 100644--- a/tests/service_scheduler_test.py+++ b/tests/service_scheduler_test.py@@ -159,6 +159,8 @@ class TestSchedulerFireDelivery(_SchedulerFireTestBase):{"type": "hint","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": AnyString(),"hint": AnyString(),"source": json.dumps({"label": "schedule", "sublabel": record.data.name},diff --git a/tests/service_team_tools_test.py b/tests/service_team_tools_test.pyindex d4c21f95b..025f18846 100644--- a/tests/service_team_tools_test.py+++ b/tests/service_team_tools_test.py@@ -153,7 +153,13 @@ class TestTeamCreate(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "running","is_last": True,@@ -199,7 +205,13 @@ class TestTeamCreate(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "error","is_last": True,@@ -247,7 +259,13 @@ class TestAgentCreate(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "running","is_last": True,@@ -297,6 +315,8 @@ class TestAgentCreate(_TeamToolsTestBase):{"type": "hint","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": AnyString(),"hint": AnyString(),"source": '{"label": "team_message", "sublabel": "leader"}',},@@ -575,7 +595,13 @@ class TestAgentCreate(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "error","is_last": True,@@ -604,7 +630,13 @@ class TestAgentCreate(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "error","is_last": True,@@ -916,7 +948,13 @@ class TestTeamSay(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "running","is_last": True,@@ -938,6 +976,8 @@ class TestTeamSay(_TeamToolsTestBase):{"type": "hint","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": AnyString(),"hint": AnyString(),"source": AnyString(),},@@ -976,7 +1016,13 @@ class TestTeamSay(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "running","is_last": True,@@ -1023,7 +1069,13 @@ class TestTeamSay(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "error","is_last": True,@@ -1049,7 +1101,13 @@ class TestTeamSay(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "error","is_last": True,@@ -1075,7 +1133,13 @@ class TestTeamSay(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "error","is_last": True,@@ -1162,7 +1226,13 @@ class TestTeamDelete(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "running","is_last": True,@@ -1199,7 +1269,13 @@ class TestTeamDelete(_TeamToolsTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "error","is_last": True,@@ -1328,7 +1404,13 @@ class TestAgentInviteSuccess(_AgentInviteTestBase):chunk.model_dump(),{"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "running","is_last": True,@@ -1392,7 +1474,13 @@ class TestAgentInviteRejections(_AgentInviteTestBase):_EXPECTED_ERROR_CHUNK = {"content": [- {"type": "text", "text": AnyString(), "id": AnyString()},+ {+ "type": "text",+ "text": AnyString(),+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },],"state": "error","is_last": True,diff --git a/tests/task_tool_test.py b/tests/task_tool_test.pyindex 3c498cba1..c722eed5e 100644--- a/tests/task_tool_test.py+++ b/tests/task_tool_test.py@@ -34,6 +34,8 @@ class TestTaskCreate(IsolatedAsyncioTestCase):f"Test Task 1","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -78,6 +80,8 @@ class TestTaskCreate(IsolatedAsyncioTestCase):f"Task 1","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -101,6 +105,8 @@ class TestTaskCreate(IsolatedAsyncioTestCase):f"Task 2","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -125,6 +131,8 @@ class TestTaskCreate(IsolatedAsyncioTestCase):f"Task 3","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -195,6 +203,8 @@ class TestTaskCreate(IsolatedAsyncioTestCase):f"Bug Fix","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -276,6 +286,8 @@ class TestTaskList(IsolatedAsyncioTestCase):f"{task3_id} [pending] Task 3","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -324,6 +336,8 @@ class TestTaskGet(IsolatedAsyncioTestCase):f"Metadata: {{'priority': 'high'}}","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -348,6 +362,8 @@ class TestTaskGet(IsolatedAsyncioTestCase):"text": "Task not found","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "error",@@ -392,6 +408,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Update task (id={task_id}) subject.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -445,6 +463,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Update task (id={task_id}) description.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -498,6 +518,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Update task (id={task_id}) status.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -544,6 +566,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):f"task or see if your work unblocked others.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -583,6 +607,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Task (id={task_to_delete_id}) has been deleted.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -621,6 +647,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Update task (id={task_id}) owner.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -675,6 +703,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Update task (id={task_id}) metadata.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -739,6 +769,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Update task (id={task1_id}) add_blocks.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -810,6 +842,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Update task (id={task2_id}) add_blocked_by.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -908,6 +942,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"text": f"Task (id={task2_id}) has been deleted.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "running",@@ -950,6 +986,8 @@ class TestTaskUpdate(IsolatedAsyncioTestCase):"The task (id=nonexistent-id) does not exist.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "error",diff --git a/tests/tool_middleware_test.py b/tests/tool_middleware_test.pyindex c9e83fab8..8957f65d7 100644--- a/tests/tool_middleware_test.py+++ b/tests/tool_middleware_test.py@@ -22,7 +22,15 @@ def _expected_chunk(text: str) -> dict:"""Build the full expected ``ToolChunk.model_dump()`` dict for the giventext, with random ``id`` fields matched by :class:`AnyString`."""return {- "content": [{"type": "text", "text": text, "id": AnyString()}],+ "content": [+ {+ "type": "text",+ "text": text,+ "id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,+ },+ ],"state": ToolResultState.RUNNING,"is_last": True,"metadata": {},diff --git a/tests/tool_offload_middleware_test.py b/tests/tool_offload_middleware_test.pyindex 6b82bb572..9e7bfc9b3 100644--- a/tests/tool_offload_middleware_test.py+++ b/tests/tool_offload_middleware_test.py@@ -251,6 +251,8 @@ class ToolOffloadMiddlewareTest(IsolatedAsyncioTestCase):"type": "text","text": AnyString(),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -308,6 +310,8 @@ class ToolOffloadMiddlewareTest(IsolatedAsyncioTestCase):{"type": "hint","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": AnyString(),"source": '{"label": "tool_output", "sublabel": "slow_tool · ''call_bg"}',"hint": [@@ -315,6 +319,8 @@ class ToolOffloadMiddlewareTest(IsolatedAsyncioTestCase):"type": "text","text": AnyString(),"id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],},diff --git a/tests/toolkit_skill_test.py b/tests/toolkit_skill_test.pyindex 519435234..2c37a95f9 100644--- a/tests/toolkit_skill_test.py+++ b/tests/toolkit_skill_test.py@@ -282,6 +282,8 @@ class ToolkitSkillViewerTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "# My Skill\nThis is the skill content.",},@@ -300,6 +302,8 @@ class ToolkitSkillViewerTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "# My Skill\nThis is the skill content.",},@@ -338,6 +342,8 @@ class ToolkitSkillViewerTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "SkillNotFoundError: ""Skill 'non_existent_skill' not found.",@@ -357,6 +363,8 @@ class ToolkitSkillViewerTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "SkillNotFoundError: ""Skill 'non_existent_skill' not found.",diff --git a/tests/toolkit_task_test.py b/tests/toolkit_task_test.pyindex 280e67f1f..f05f2c63d 100644--- a/tests/toolkit_task_test.py+++ b/tests/toolkit_task_test.py@@ -86,6 +86,8 @@ class TestToolkitTaskCreate(_ToolkitTaskTestBase):"Test Task 1","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -131,6 +133,8 @@ class TestToolkitTaskCreate(_ToolkitTaskTestBase):f"Task 1","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -157,6 +161,8 @@ class TestToolkitTaskCreate(_ToolkitTaskTestBase):f"Task 2","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -184,6 +190,8 @@ class TestToolkitTaskCreate(_ToolkitTaskTestBase):f"Task 3","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -256,6 +264,8 @@ class TestToolkitTaskCreate(_ToolkitTaskTestBase):f"Bug Fix","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -304,6 +314,8 @@ class TestToolkitTaskList(_ToolkitTaskTestBase):"text": "No tasks available.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -360,6 +372,8 @@ class TestToolkitTaskList(_ToolkitTaskTestBase):f"{task_3_id} [pending] Task 3","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -441,6 +455,8 @@ class TestToolkitTaskGet(_ToolkitTaskTestBase):"Metadata: {'priority': 'high'}","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -482,6 +498,8 @@ class TestToolkitTaskGet(_ToolkitTaskTestBase):"text": "Task not found","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "error",@@ -524,6 +542,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"text": f"Update task (id={task_id}) subject.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -578,6 +598,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"text": f"Update task (id={task_id}) description.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -631,6 +653,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"text": f"Update task (id={task_id}) status.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -674,6 +698,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"unblocked others.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -725,6 +751,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):f"deleted.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -778,6 +806,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"text": f"Update task (id={task_id}) owner.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -839,6 +869,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"text": f"Update task (id={task_id}) metadata.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -906,6 +938,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"text": f"Update task (id={task_1_id}) add_blocks.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -981,6 +1015,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):f"add_blocked_by.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -1121,6 +1157,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"text": f"Task (id={task_2_id}) has been deleted.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "success",@@ -1177,6 +1215,8 @@ class TestToolkitTaskUpdate(_ToolkitTaskTestBase):"The task (id=nonexistent-id) does not exist.","type": "text","id": AnyString(),+ "created_at": AnyString(),+ "finished_at": None,},],"state": "error",diff --git a/tests/toolkit_test.py b/tests/toolkit_test.pyindex 3be91d10b..0d3d96846 100644--- a/tests/toolkit_test.py+++ b/tests/toolkit_test.py@@ -207,6 +207,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello, world!",},@@ -226,6 +228,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Hello, world!",},@@ -261,6 +265,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": "a","text": "123",},@@ -279,6 +285,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": "b","text": "456",},@@ -297,6 +305,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": "b","text": "789",},@@ -315,6 +325,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "data",+ "created_at": AnyString(),+ "finished_at": None,"id": "1","name": None,"source": {@@ -338,6 +350,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "data",+ "created_at": AnyString(),+ "finished_at": None,"id": "2","name": None,"source": {@@ -361,6 +375,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "data",+ "created_at": AnyString(),+ "finished_at": None,"id": "1","name": None,"source": {@@ -389,12 +405,16 @@ class ToolkitTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": "a",# All consecutive TextBlocks merged"text": "123456789",},{"type": "data",+ "created_at": AnyString(),+ "finished_at": None,"id": "1","name": None,"source": {@@ -405,6 +425,8 @@ class ToolkitTest(IsolatedAsyncioTestCase):},{"type": "data",+ "created_at": AnyString(),+ "finished_at": None,"id": "2","name": None,"source": {@@ -536,6 +558,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Result: 8",},@@ -555,6 +579,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Result: 8",},@@ -602,6 +628,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "The weather in Chengdu is sunny.",},@@ -620,6 +648,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "The weather in Chengdu is sunny.",},@@ -755,6 +785,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": str(i),},@@ -774,6 +806,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "123", # All consecutive TextBlocks merged},@@ -905,6 +939,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Product: 10.0",},@@ -924,6 +960,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "Product: 10.0",},@@ -1009,6 +1047,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": f"Number: {num}",},@@ -1028,6 +1068,8 @@ class RegisterFunctionTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),# All consecutive TextBlocks merged"text": "Number: 5Number: 6Number: 7",@@ -1240,6 +1282,8 @@ class ToolGroupTest(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": """The currently activated tool group(s): group_2.<tool-instructions>@@ -1274,6 +1318,8 @@ The tool instructions are a collection of suggestions, rules and notifications a"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": """The currently activated tool group(s): group_1, group_2.<tool-instructions>@@ -1308,6 +1354,8 @@ The tool instructions are a collection of suggestions, rules and notifications a"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"id": AnyString(),"text": "All tool groups are currently deactivated.",},diff --git a/tests/workspace_local_test.py b/tests/workspace_local_test.pyindex 7700c6b4a..75eedef03 100644--- a/tests/workspace_local_test.py+++ b/tests/workspace_local_test.py@@ -327,11 +327,13 @@ class TestLocalWorkspaceOffload(IsolatedAsyncioTestCase):TextBlock(text="Check this image:",id=loaded_msg.content[0].id,+ created_at=loaded_msg.content[0].created_at,),DataBlock(id=loaded_msg.content[1].id,source=loaded_msg.content[1].source,name="test_image",+ created_at=loaded_msg.content[1].created_at,),],id=loaded_msg.id,@@ -1085,6 +1087,8 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):"content": [{"type": "tool_call",+ "created_at": AnyString(),+ "finished_at": None,"id": "1","name": "long_result_tool","input": "{}",@@ -1093,11 +1097,15 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):},{"type": "tool_result",+ "created_at": AnyString(),+ "finished_at": None,"id": "1","name": "long_result_tool","output": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "0" * 200 + reminder_1,"id": AnyString(),},@@ -1107,6 +1115,8 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):},{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "End_1.","id": AnyString(),},@@ -1217,8 +1227,13 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):data=b64_data,media_type="image/png",),+ created_at="2026-01-01T00:00:00",+ ),+ TextBlock(+ id="text_block_a",+ text="A" * 500,+ created_at="2026-01-01T00:00:00",),- TextBlock(id="text_block_a", text="A" * 500),],id="msg_a",created_at="2026-01-01T00:00:00",@@ -1230,6 +1245,17 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):async with aiofiles.open(offload_path, "r") as f:content_after_first = await f.read()+ # The offloader rewrites the DataBlock (Base64Source → URLSource)+ # as a fresh block, so its ``created_at`` is regenerated rather+ # than preserved; capture the actual value for the assertion.+ offloaded_data_created_at = (+ Msg.model_validate_json(+ content_after_first.strip(),+ )+ .content[0]+ .created_at+ )+# The DataBlock is persisted to ``{workdir}/data/`` as soon as# it is included in an offloaded line — this happens during the# first compression because both blocks land on the compress@@ -1256,9 +1282,12 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):'{"name":"user","content":[''{"type":"data","id":"data_block_a","source":''{"type":"url","url":"' + data_url + '",'- '"media_type":"image/png"},"name":"fake_image_a.png"},'+ '"media_type":"image/png"},"name":"fake_image_a.png",'+ '"created_at":"' + offloaded_data_created_at + '",'+ '"finished_at":null},''{"type":"text","text":"' + "A" * 500 + '",'- '"id":"text_block_a"}'+ '"id":"text_block_a",'+ '"created_at":"2026-01-01T00:00:00","finished_at":null}''],"role":"user","id":"msg_a","metadata":{},''"created_at":"2026-01-01T00:00:00",''"usage":null,'@@ -1284,7 +1313,11 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):user_msg_b = UserMsg(name="user",content=[- TextBlock(id="text_block_b", text="B" * 500),+ TextBlock(+ id="text_block_b",+ text="B" * 500,+ created_at="2026-01-02T00:00:00",+ ),],id="msg_b",created_at="2026-01-02T00:00:00",@@ -1304,7 +1337,11 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):'{"name":"Friday","content":[''{"type":"text","text":"End_1.","id":"'+ assistant_1.content[0].id- + '"}'+ + '","created_at":"'+ + assistant_1.content[0].created_at+ + '","finished_at":'+ + json.dumps(assistant_1.content[0].finished_at)+ + "}"'],"role":"assistant","id":"' + assistant_1.id + '",''"metadata":{},"created_at":"' + assistant_1.created_at + '",''"usage":null,'@@ -1315,7 +1352,8 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):expected_user_msg_b_json = ('{"name":"user","content":[''{"type":"text","text":"' + "B" * 500 + '",'- '"id":"text_block_b"}'+ '"id":"text_block_b",'+ '"created_at":"2026-01-02T00:00:00","finished_at":null}''],"role":"user","id":"msg_b","metadata":{},''"created_at":"2026-01-02T00:00:00",''"usage":null,'@@ -1363,6 +1401,8 @@ class TestLocalWorkspaceWithAgent(IsolatedAsyncioTestCase):"content": [{"type": "text",+ "created_at": AnyString(),+ "finished_at": None,"text": "End_2.","id": AnyString(),},