diff --git a/.gitignore b/.gitignore index 225306ac1..10ba29240 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ backend/cmd/server/server backend/tmp_* # Keep the runtime in source control; its optional debug map is not deployed. /web/public/live2d/live2dcubismcore.min.js.map +.zocde/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index fad0a2206..bb625c052 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## v1.5.8.1 + +- 修复 v1.5.8 发布后的 Agent 消息、用户消息和推理区域视觉标记回归,恢复对应的可见图标与实时状态标记。 +- 修复 Cloud Agent 仅对参数契约错误执行自动纠错,避免把权限、存储和已提交任务错误误判为可重试。 +- 同步 Cloud Agent 系统策略文档版本测试和平台工具 schema 预算,修复发布质量检查失败。 + ## v1.5.8 - 优化云端 Agent 运行时、导演工具、工作台交互和技能库组织;将内置 Markdown 技能包移至 `backend/builtin/`。 diff --git a/VERSION b/VERSION index 1097babbd..d635de0d1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.5.8 +v1.5.8.1 diff --git a/backend/internal/app/cloud_agent_tool_repair.go b/backend/internal/app/cloud_agent_tool_repair.go index 2ec2f33d7..7394724d5 100644 --- a/backend/internal/app/cloud_agent_tool_repair.go +++ b/backend/internal/app/cloud_agent_tool_repair.go @@ -39,8 +39,7 @@ func cloudAgentTrackToolRepair(runID string, state *cloudAgentRuntime, call clou } detail, _ := result.(map[string]any) var argumentErr *cloudAgentArgumentError - retryable, _ := detail["retryable"].(bool) - if (!errors.As(err, &argumentErr) && !retryable) || detail["taskSubmitted"] == true || detail["phase"] == "completion" { + if !errors.As(err, &argumentErr) || detail["taskSubmitted"] == true || detail["phase"] == "completion" { return false } if state.ToolRepairs == nil { diff --git a/backend/internal/app/cloud_agent_tool_schema_budget_test.go b/backend/internal/app/cloud_agent_tool_schema_budget_test.go index 941aafd6f..7c4a54e0e 100644 --- a/backend/internal/app/cloud_agent_tool_schema_budget_test.go +++ b/backend/internal/app/cloud_agent_tool_schema_budget_test.go @@ -52,11 +52,11 @@ func TestCloudAgentToolSchemaStaysCompact(t *testing.T) { t.Fatal("canvas_apply_ops 未暴露") } - // 体积预算:上游 20 个工具实测 22,777 字节(预算 24000);本 PR 新增 canvas_arrange_nodes - // 并把描述、patch 字段补齐后实测 21 个工具 24,788 字节,因此把预算显式上调到 25000 - // (约 0.9% 余量)。新增工具或字段时请重新测量并有意识地调整这个数字,而不是让 schema - // 悄悄膨胀(它每一步都要发、还在前缀最前面)。 - if len(raw) > 25000 { - t.Fatalf("平台工具 schema 体积 %d 字节超出预算 25000:请压缩描述或显式调整预算", len(raw)) + // 体积预算:导演台、技能检索和上下文读取工具合入后,当前平台工具为 24 个,实测 + // 27,812 字节,因此把预算显式上调到 29,000(约 4.3% 余量)。新增工具或字段时请 + // 重新测量并有意识地调整这个数字,而不是让 schema 悄悄膨胀(它每一步都要发、还在 + // 前缀最前面)。 + if len(raw) > 29000 { + t.Fatalf("平台工具 schema 体积 %d 字节超出预算 29000:请压缩描述或显式调整预算", len(raw)) } } diff --git a/backend/internal/prompts/agent_policy_test.go b/backend/internal/prompts/agent_policy_test.go index 41183b457..ff0fe8634 100644 --- a/backend/internal/prompts/agent_policy_test.go +++ b/backend/internal/prompts/agent_policy_test.go @@ -10,7 +10,7 @@ func TestLoadAgentPoliciesUsesDocumentMetadata(t *testing.T) { if err != nil { t.Fatal(err) } - if system.ID != "cloud-agent-system" || system.Version != 10 || media.ID != "cloud-agent-media" || media.Version != 4 { + if system.ID != "cloud-agent-system" || system.Version != 12 || media.ID != "cloud-agent-media" || media.Version != 4 { t.Fatalf("unexpected policy metadata: system=%+v media=%+v", system, media) } if strings.Contains(system.Text, "id: cloud-agent-system") || !strings.HasPrefix(system.Text, "# 影策 Cloud Agent") { diff --git a/web/src/components/canvas/canvas-cloud-agent-chat-ui.tsx b/web/src/components/canvas/canvas-cloud-agent-chat-ui.tsx index 002d7cd75..daef34c12 100644 --- a/web/src/components/canvas/canvas-cloud-agent-chat-ui.tsx +++ b/web/src/components/canvas/canvas-cloud-agent-chat-ui.tsx @@ -4,7 +4,7 @@ import { Tooltip } from "@/components/ui/base/tooltip"; import { useCallback, useEffect, useId, useMemo, useRef, useState, type ClipboardEvent as ReactClipboardEvent, type CSSProperties, type KeyboardEvent as ReactKeyboardEvent, type PointerEvent as ReactPointerEvent, type ReactNode } from "react"; import { AnimatePresence, motion, useReducedMotion } from "motion/react"; -import { ArrowLeft, ArrowUp, AtSign, Bookmark, CheckCircle2, ChevronDown, ChevronUp, CircleAlert, CircleDot, Clapperboard, Eye, HelpCircle, ImagePlus, Layers3, List, ListChecks, LoaderCircle, Palette, Pencil, Plus, RotateCcw, Shapes, Share2, ShoppingBag, Sparkles, Square, Wrench, X, XCircle } from "lucide-react"; +import { ArrowLeft, ArrowUp, AtSign, Bookmark, BrainCircuit, CheckCircle2, ChevronDown, ChevronUp, CircleAlert, CircleDot, Clapperboard, Eye, HelpCircle, ImagePlus, Layers3, List, ListChecks, LoaderCircle, MessageCircle, Palette, Pencil, Plus, RotateCcw, Shapes, Share2, ShoppingBag, Sparkles, Square, UserRound, Wrench, X, XCircle } from "lucide-react"; import { canvasThemes } from "@/lib/canvas-theme"; import { AIMessageMarkdown } from "@/components/ai/ai-message-markdown"; @@ -321,6 +321,11 @@ export function AgentChatMessage({ } return (