Repository navigation
v1.0.2
[1.0.2] - 2026-10-20
Windows 安装版
- 新增完整离线安装包、中文品牌欢迎页、樱花深浅色引导图片、步骤提示与快速上手介绍。
- 可选安装位置、开始菜单及桌面快捷方式;支持覆盖安装和卸载,保留用户对话与配置,不添加开机自启。
- 新增
npm run pack:installer与 SHA256 校验输出,独立暂存构建,不再清空整个 release。版本保持 1.0.2。 - 安装说明与代码签名现状见 docs/WINDOWS-INSTALLER.md。
免费模型、对话选择与思考深度
- 补齐免费目录刷新、总开关与逐模型开关、最小连接检测、用于对话入口;不可用通道不放行,关闭时不自动换服务。
- 输入框模型按钮改为可搜索的分组菜单,直接切换模型;新增模型感知的思考深度滑块与逐模型记忆,保存并恢复会话选择。
- 深度实际映射 OpenAI / DeepSeek / OpenRouter 参数;未知型号保留默认或显式指定适配。免费请求不沿用付费密钥,取消信号传入网络层。
- 交互参考 dsh-codex-effort-slider,独立适配现有桌面界面;保留减少动态效果,版本仍为 1.0.2。说明见 docs/CHAT-MODELS-AND-EFFORT.md。
功能插画与图标动效
- 新增四张透明功能插画,用于首页快捷入口、工具分类、搜索空状态与模型协作引导。
- 设置、通知、文件夹、工具、搜索等图标响应悬停与键盘聚焦;复制成功显示短暂勾选,子任务图标对应真实运行状态。
- 支持系统减少动态效果,保留文字反馈;不引入网络图标或动画依赖。
- 资源与最终提示词见 docs/FEATURE-VISUALS.md。
界面与风险交互
- 重做默认启动开场,新增樱花晴窗插画,保留本地自定义素材与减少动态效果支持。
- 新增分级通知卡片和通知中心;错误手动关闭,提示可回看。
- 风险窗口优先展示后果、目标和目录,高风险需勾选确认;完全控制与本机环境切换增加事前说明。
- 统一设置页层级、字号、卡片和按压反馈;开发工具增加中文字段及空状态,命令工具纠正过期白名单表单。
- 详见 docs/UI-EXPERIENCE.md,包含素材来源及最终提示词。
开发工具能力补全
- 桌面 Agent 新增 36 项开发工具接口,覆盖分页文件读写/补丁/备份回滚、HTTP、diff/grep/replace、真实持久 ConPTY、进程/端口、图片处理、Git、项目脚本/测试解析、项目记忆/待办、上下文归因与图片剪贴板。
- 破坏性文件修改默认预览,使用参数与快照绑定的一次性令牌提交;拒绝路径及 junction 越界。
- 项目策略提案不自动信任,Shell 和终端输入即使完全控制也必须人工批准;域名授权与 DNS 地址固定阻止 SSRF。
- 新增“开发与授权”操作界面、结构化结果、预览执行按钮与策略编辑。大段工具结果压缩时仍保留有效 JSON 和令牌。
- 详见 docs/WORKBENCH.md(含安全收敛与边界)。
回复、评价与场景工作流
- 复用 Marked 和 DOMPurify 渲染 Markdown,新增正文、Markdown 与代码块复制;工具轨迹折叠、文件工具中文名称。
- 新增有帮助 / 不准确评价,影响后续参考与历史过滤;明确确认后保存长期记忆,支持修改和移除,差评撤销对应已存记忆并重建摘要。
- 新增任务场景、自动流程选择、依赖调度、上游交付传递、失败阻断与可选验收 / 一次修正。
- 复用官方 MCP Filesystem 的 10 项文件能力,执行模式下子项目独立目录落盘,协调模型整合;写入继续使用批准机制。便携打包包含完整生产依赖。
- 详见 docs/RESPONSES-AND-WORKFLOWS.md。
上下文洞察(能力方向致敬 dsh-context)
- 新增
src/core/context.ts:token 固定密度估算(中文≈1.5 字符/token、西文≈4 字符/token)、六成分分解(系统提示词 / 工具 Schema / 用户消息 / 注入上下文 / 助手回复 / 工具结果)、趋势点与事件的追加与裁剪、紧凑 token 展示。 - 新增 CLI
cupbox context [--text 文本] [--file 路径] [--window 128000] [--json]:估算文本占用;不传文本时返回 Agent 基线开销(系统提示词 + 全部工具 Schema 合计)。 - MCP 新增
context_stats工具(只读),工具总数 20 → 21;编排层TOOL_DEFS同步至 19。 - AI 调用开始采集提供方上报的真实 usage:
aiChat读取 Anthropicinput_tokens/output_tokens与 OpenAIprompt_tokens/completion_tokens,aiAgent循环内累加并返回请求数。 - 桌面版:每轮对话把成分分解、占用趋势(含真实 in/out)、四类事件(注入 / 压缩 / 切换模型 / 切换模式)写进会话记录;对话页新增「上下文」按钮,弹窗展示 KPI(最近占用、累计请求、累计输入 / 输出)、六成分堆叠条、逐请求趋势柱与事件流;
CUPBOX_CONTEXT_WINDOW可调整窗口大小。 - 估算为启发式(≈),非精确 tokenizer 计数,仅作占用参考。
同版本既有更新(2026-10-19)
存储与模型管理
- 数据目录默认迁到系统「文档」
Documents/Cupbox(配置、密钥、模型库、会话、记忆全在此),旧~/.cupbox首次启动自动迁移:只复制不删除、新目录已有内容绝不覆盖、失败静默不影响启动;CUPBOX_HOME仍可整体覆盖(便携/测试隔离)。 - 新增
src/core/paths.ts统一解析数据目录(CLI / MCP / 桌面三形态同一语义),CLImain与 MCPstartMcpServer启动时自动迁移。 - 设置 → 模型连接新增**「API 储存管理」卡片**:显示当前数据目录、一键打开储存文件夹、定位
config.json。 - 侧栏新增**「模型管理」入口**:直达模型库(多模型增删、文本 / 视觉 / 绘图 / 语音 / 视频能力多选、启用开关)。
工具调用可视化与对话气泡
- Agent 执行任务时工具调用实时直播:每次调用以卡片逐条出现(工具名、参数、执行中动画 → 完成耗时 / 失败红字与错误详情),像看现场直播;完成后由最终消息的完整工具轨迹接管。
aiAgent新增onToolStart回调(早于完成事件),主进程经chat:toolIPC 推送到渲染进程(phase=start/done),runId过滤防串台。- AI 回复改为气泡样式:卡片底色 + 左下尖角 + 标识头,与用户气泡对偶;带入场动画,错误气泡红色描边。
三层记忆与上下文压缩(架构参考 dsh-mnemon)
- 新增
src/core/memory.ts:运行时记忆(用户画像 / 协作约定,常驻注入 system prompt)、长期事实(facts.jsonl追加式存储,中文二元组 + 拉丁词相关性召回)、会话摘要三层。 - 新增上下文压缩:历史超过预算(默认 24000 字符)时,旧轮次由模型浓缩为 ≤400 字摘要,只保留最近 8 条原文;摘要并入 system prompt 持续生效。无 AI 配置时降级为纯截断,绝不阻塞对话。
- CLI 新增
cupbox memory add|search|list|stats|forget|user|collab子命令。 - MCP 新增
memory_remember/memory_recall/memory_manage/memory_profile四个工具,工具总数 16 → 20;编排层TOOL_DEFS同步至 18(桌面 Agent 可直接调用记忆工具跨会话记事)。 - 桌面版
chat:send每次对话自动注入相关记忆;触发压缩时对话框显示「已压缩 N 条早前消息为摘要」提示条。 - 修复
cupbox memory add <文本> --source <标签>时标签值被误并入文本的解析问题。
多模型与项目工作流
- 新增独立模型库与文本、视觉、绘图、语音、视频能力路由,多模型工作默认关闭。
- 新增直接处理、顺序制作、并行大项目与审阅工作流;可指定参与项目制作的文本模型,分栏查看子项目真实进度。
- 新增参考图片、媒体本地保存、子项目复制与失败重试、停止请求、Markdown 导出及草稿恢复。
- 修正窗口最小化定位并新增 Ctrl+M。视频目前适配硅基流动协议。详见 docs/DESKTOP-MODELS.md。
模型连接与工具执行
- 新增硅基流动、DeepSeek、GPT、Claude、OpenRouter、Ollama、LM Studio 和自定义服务预设,支持获取模型列表与连接测试,更换服务或地址不复用旧密钥。
- 新增请求批准、智能批准、完全控制,以及文件沙箱 / 本机运行。手动工具和桌面 Agent 共用批准与执行边界。
- 本地工具改为独立工作区,提供分类卡片、搜索、路径选择器、示例、输入与结果保留,以及结构化结果列表和表格。
桌面外观与启动体验
- 新增可配置启动动画:光轨启程、风景开场、极简呼吸,以及本地 GIF、MP4、WebM 或图片素材;支持预览、开关、时长、文案、跳过和减少动态效果。
- 扩展为 8 款内置主题:樱晴、绽放、月湖、花庭、极光、沙丘、水墨和纯色;新增分类筛选与配套界面色调,保留自定义背景。
- 重新设计几何折叠盒 Logo,同步 SVG、PNG、ICO 与桌面窗口标识。
- 统一 CLI、桌面和便携包版本号为 1.0.2。
测试
- 用例 198 → 331 全绿,新增 12 个测试文件(freemodel、context、memory、paths、workbench、execution、model-workflow、chat-choice、workflow-scenes、response-context、filesystem-tools、workbench-http)。
完整变更记录:v1.0.1...v1.0.2
English
## [1.0.2] - 2026-10-20 ### Windows installer- Added a complete offline installer, a Chinese branded welcome page, light/dark sakura wizard images, step hints, and a quick-start walkthrough.
- Optional install location, Start-menu and desktop shortcuts; in-place upgrade and uninstall preserve user conversations and configuration, and no auto-start entry is added.
- Added
npm run pack:installerwith SHA256 checksum output; the installer builds into its own staging directory and no longer clears the whole release folder. Version stays at 1.0.2. - Installation notes and the current code-signing status are documented in docs/WINDOWS-INSTALLER.md.
Free models, chat model picker & effort slider
- Completed the free-model catalog refresh, the global toggle plus per-model toggles, minimal connection checks, and the "use in chat" entry; unavailable channels are never allowed through, and turning models off never silently switches providers.
- The model button in the input box is now a searchable grouped menu for direct switching; added a model-aware effort slider with per-model memory that persists and restores per-session choices.
- Effort maps to real OpenAI / DeepSeek / OpenRouter parameters; unknown models keep their defaults or accept an explicit override. Free requests never reuse paid API keys, and the cancellation signal is propagated into the network layer.
- The interaction references dsh-codex-effort-slider, adapted independently to the existing desktop UI; reduced-motion remains respected and the version stays at 1.0.2. See docs/CHAT-MODELS-AND-EFFORT.md.
Feature illustrations & icon motion
- Added four transparent feature illustrations used by the home quick actions, tool categories, search empty state, and model-collaboration guidance.
- Settings, notifications, folder, tool and search icons respond to hover and keyboard focus; copying shows a brief checkmark, and sub-task icons reflect real run states.
- Honors the system reduced-motion setting while keeping text feedback; no network-hosted icons or animation dependencies are introduced.
- Assets and final prompts are documented in docs/FEATURE-VISUALS.md.
UI & risk interactions
- Redesigned the default startup sequence with a new "sakura clear-window" illustration, keeping local custom media and reduced-motion support.
- Added tiered notification cards and a notification center; errors are dismissed manually and informational prompts can be reviewed later.
- Risk dialogs lead with consequences, targets and directories, with a checkbox required for high-risk actions; switching into full control or the native environment now requires an up-front explanation.
- Unified the settings pages' hierarchy, type scale, cards and press feedback; the developer tools gained Chinese labels and empty states, and the command tool's stale allowlist form was corrected.
- See docs/UI-EXPERIENCE.md for asset sources and the final prompts.
Dev-tool capability completion
- The desktop Agent gained 36 dev-tool interfaces covering paginated file read/write, patch, backup & rollback, HTTP, diff/grep/replace, a real persistent ConPTY, processes/ports, image processing, Git, project script/test parsing, project memory/todos, context attribution, and the image clipboard.
- Destructive file modifications default to preview and commit with a one-time token bound to the parameters and snapshot; out-of-repository paths and junction escapes are rejected.
- Project policy proposals are never auto-trusted; Shell and terminal input require human approval even in full-control mode; domain authorization plus DNS pinning block SSRF.
- Added the "Development & authorization" interface with structured results, preview-then-run buttons and policy editing. When long tool results are compacted, valid JSON and tokens are preserved.
- See docs/WORKBENCH.md (security convergence and boundaries included).
Responses, feedback & scene workflows
- Markdown is rendered with Marked and DOMPurify, with copy actions for the body, Markdown and code blocks; tool traces collapse and file tools show Chinese names.
- Added helpful / inaccurate feedback that affects later reference and history filtering; long-term memories are saved only after explicit confirmation, can be edited and removed, and a negative rating revokes the stored memory and rebuilds the summary.
- Added task scenes, automatic flow selection, dependency scheduling, upstream delivery hand-off, failure blocking, and optional acceptance / one-shot correction.
- Reuses the official MCP Filesystem's 10 file capabilities; in execution mode sub-projects land in independent directories for the coordinating model to integrate, and writes still go through approval. The portable build ships the full production dependencies.
- See docs/RESPONSES-AND-WORKFLOWS.md.
Context insight (capability direction inspired by dsh-context)
- Added
src/core/context.ts: fixed-density token estimation (≈1.5 chars/token for CJK, ≈4 for others), six-part breakdown (system prompt / tool schemas / user messages / injected context / assistant replies / tool results), capped trend points and events, compact token formatting. - Added CLI
cupbox context [--text TEXT] [--file PATH] [--window 128000] [--json]: estimates text occupancy; with no text it returns the Agent baseline overhead (system prompt + all tool schemas). - Added MCP tool
context_stats(read-only) — tool count 20 → 21; orchestration layerTOOL_DEFSnow has 19 entries. - AI calls now capture provider-reported usage:
aiChatreads Anthropicinput_tokens/output_tokensand OpenAIprompt_tokens/completion_tokens;aiAgentaccumulates them across the loop and returns the request count. - Desktop: each turn stores the breakdown, occupancy trend (including real in/out tokens) and four event kinds (inject / compact / model switch / mode switch) in the session record; a new "Context" button in the chat header opens an insight panel with KPIs, a stacked composition bar, a per-request trend chart and the event feed.
CUPBOX_CONTEXT_WINDOWadjusts the window size. - Estimates are heuristic (≈), not exact tokenizer counts, meant as a rough occupancy reference.
Earlier updates in the same version (2026-10-19)
Storage & model management
- Data now lives in your OS Documents folder (
Documents/Cupbox) — config, API keys, model library, sessions and memory. On first launch the legacy~/.cupboxis migrated automatically: copy-only (never deletes), never overwrites a non-empty target, and failures are silent so startup is never blocked.CUPBOX_HOMEstill overrides everything (portable / test isolation). - Added
src/core/paths.tsas the single source of truth for the data directory (same semantics across CLI / MCP / desktop); both the CLImainandstartMcpServermigrate on startup. - Settings → Model connection now has an API storage card: shows the current data directory with one-click "open storage folder" and "reveal
config.json". - Added a Model management entry in the sidebar that jumps straight to the model library (add/remove multiple models, capability multi-select for text / vision / image / audio / video, per-model enable toggle).
Live tool-call visualization & chat bubbles
- While the agent executes a task, tool calls stream live as cards — tool name, arguments, an "executing" animation, then completion time or a red failure line with the error detail; the final message's full trace takes over afterwards.
aiAgentgained anonToolStartcallback (fires before completion); the main process pusheschat:toolIPC events (phase=start/done) to the renderer, filtered byrunId.- Assistant replies are now bubbles: card surface with a bottom-left tail and a header, mirroring the user bubble, with an entrance animation and a red-outlined error bubble.
Three-tier memory & context compaction (architecture inspired by dsh-mnemon)
- Added
src/core/memory.ts: runtime memory (user profile & working agreements, always injected into the system prompt), long-term facts (facts.jsonl, relevance-recalled via CJK bigrams + Latin tokens), and session summaries. - Added context compaction: when history exceeds the budget (24 000 characters by default) older turns are distilled by the model into a ≤400-character summary, keeping only the last 8 messages verbatim. The summary is merged into the system prompt and carries forward. Without an AI configuration it degrades to plain truncation and never blocks the chat.
- Added the CLI subcommand
cupbox memory add|search|list|stats|forget|user|collab. - Added four MCP tools —
memory_remember/memory_recall/memory_manage/memory_profile— bringing the MCP tool count 16 → 20; the toolkit layerTOOL_DEFSis now 18 so the desktop agent can remember things across sessions. - Desktop
chat:sendnow auto-injects relevant memories into every conversation and shows a "compacted N earlier messages" chip when compaction triggers. - Fixed
cupbox memory add <text> --source <tag>parsing where the tag value leaked into the text.
Multi-model & project workflows
- Added independent model profiles and text, vision, image, speech and video routing; multi-model mode is off by default.
- Added direct handling, sequential production, parallel large-project and review workflows with explicit worker selection and progress panes showing each sub-project's real progress.
- Added reference images, local media persistence, sub-project duplication with failure retries, stop requests, Markdown export and draft recovery.
- Fixed window-minimize positioning and added Ctrl+M. Video currently uses the SiliconFlow submit/status protocol. See docs/DESKTOP-MODELS.md.
Model connections and tool execution
- Added provider presets for SiliconFlow, DeepSeek, GPT, Claude, OpenRouter, Ollama, LM Studio and custom endpoints, with model listing and connection checks; changing the provider or address never reuses old credentials.
- Added request approval, smart approval and full control, plus a file sandbox / native execution mode, shared by manual tools and the desktop Agent.
- Replaced the tool drawer with a dedicated workspace featuring category cards, search, path pickers, examples, retained inputs and results, and structured result lists and tables.
Desktop appearance and startup
- Added configurable startup animations: light-track departure, scenic opening, minimal breathing, plus local GIF, MP4, WebM or image media; with preview, toggle, duration, caption, skip controls and reduced-motion support.
- Expanded to eight built-in themes — Sakura Clear, Bloom, Moon Lake, Flower Garden, Aurora, Dunes, Ink and Solid — with category filters and matching interface tones, while retaining custom backgrounds.
- Redesigned the geometric folded-box logo, synchronized across SVG, PNG, ICO and the desktop window icon.
- Aligned the CLI, desktop and portable package versions at 1.0.2.
Testing
- 198 → 331 test cases, all green, with 12 new test files (freemodel, context, memory, paths, workbench, execution, model-workflow, chat-choice, workflow-scenes, response-context, filesystem-tools, workbench-http).
Full Changelog: v1.0.1...v1.0.2