# v0.11.0-alpha.5

> 新功能

Source: https://kcq.nebutra.com/zh/docs/changelog/v0-11-0-alpha-5


> v0.11.0-alpha.4 的发布流水线未跑通，GitHub Releases 缺失其发版说明。本说明在 v0.11.0-alpha.5 上合并 v0.11.0-alpha.4 的全部变更，以及 v0.11.0-alpha.5 的发布修复。

新功能 [#新功能]

* **绘图拖拽策略与复合锚点持久化（破坏性）**: Persist all composite anchors — parallel-channel / flat-line / disjoint-channel now store 4 anchors — and introduce `DrawingDragTarget` with per-primitive drag strategies. (BREAKING)
* **锁定图元可选中但不可编辑（破坏性）**: Locked drawings become selectable and hittable while drag and edit stay gated; write commands on locked targets return null/false and the toolbar disables delete. (BREAKING)
* **通道线中点手柄与悬停提示**: Add vertical midpoint handles to channel lines, hint the cursor over anchors and midpoint handles, and unify the hover cursor target.
* **平行通道虚线与填充区选择**: Add a dashed midline to parallel channels, drive the right endpoint by cursor, and select channel composites by their fill region.
* **绘图交互打磨**: Clamp the next anchor to the pane edge, hold the drawing cursor through anchor drags, and refine selected-state and handle visuals.
* **OHLC 磁吸编辑路径**: Sink OHLC magnet snapping into the drawing engine so dragged anchors snap to OHLC, invert the magnet while Ctrl/Command is held, and skip snapping while Shift is held.
* **绘图命中查询与锚点表**: Expose `hitTestAt` as a public hit query on the drawing controller, export tool anchor-count tables from the public entry, and treat Shift+click as a multi-select toggle like Ctrl.
* **对比视图与主标的解耦（破坏性）**: Decouple the comparison view from the kline primary symbol — `comparisonState.specs` becomes the single writable source, `Chart` gains `setComparisonSpecs`, and the render context drops `primarySymbol`. (BREAKING)
* **歧义对比品种交由用户确认**: Reject ambiguous comparison targets instead of picking the first, and ask the user to resolve ambiguous tool results.
* **code\_interpreter 工具**: Add a `code_interpreter` tool with a provider-agnostic sandbox (local / Fly / Cloud Run).
* **桌面端凭据加密**: Encrypt the provider API key with Electron `safeStorage`.
* **工具图标悬停提示**: Add a themable hover tooltip for drawing tool icons.
* **标的信息查询全字段表格（破坏性）**: Format instrument lookup as a full-field markdown table; `lookupInstrumentsBySymbol` now returns a string. (BREAKING)
* **极值标记限定可见区间**: Bound extrema markers to the visible bar range.

Bug 修复 [#bug-修复]

* **对齐 WebGL 与 WebGPU 渲染结果**: Align WebGL rendering with WebGPU.
* **虚线选中锚点环保持实心**: Keep selected anchor rings solid on dashed lines.
* **标签命中区与编辑器对齐渲染文本**: Align the line label hotspot and editor with the rendered text.
* **新建即选中，并按类型标注坐标轴**: Select the drawing on create and label axes by kind.
* **对比基线锚定首个完整可见 K 线**: Anchor the comparison baseline on the first fully visible bar.
* **稀疏序列类型修正**: Type indicator sparse series as possibly undefined.
* **真实凭据进入脱敏列表**: Feed real credentials into the run redaction list.
* **负 Retry-After 直接拒绝**: Reject a negative `Retry-After` instead of date-parsing it.
* **assetClass 拒绝 unknown（破坏性）**: Reject `unknown` assetClass in comparison and market-data tool input schemas. (BREAKING)
* **ask\_user 选项值与显示分离（破坏性）**: Separate the `ask_user` option value from its display label; `selectedLabels` is renamed to `selectedValues`. (BREAKING)
* **Linux 沙箱隔离探测**: Probe `unshare -rn` before isolating the code interpreter on Linux.
* **预览 HMR 可靠**: Watch workspace sources so preview HMR stays reliable.
* **复合通道批量填充编辑**: Allow batch fill edits for all-channel selections.
* **锁定图元在各命中路径生效**: Enforce locked drawings in the hit, marquee and drag paths.
* **发布构建始终产出**: Make the publish build always emit output.
* **发布入口与声明解析修正**: Correct published entry points and declaration resolution.
* **web-component 类型入口**: Emit a typed web-component entry and drop stale react types.
* **修复 lockfile 悬空项**: Repair the dangling `vite-plugin-babel` lockfile entry.
* **修复发布流水线在冻结锁文件下失败**: Publish prebuilt tarballs through `pnpm pack` + `npm publish <tarball>`, so pnpm resolves the `workspace:` protocol at pack time and no pnpm script runs against a rewritten manifest.
* **修复 agent-runtime 发布依赖损坏**: Translate the missing `workspace:` specs — agent-runtime's core dependency and vue's devDependency — when publishing the GitHub Packages mirror.

架构与重构 [#架构与重构]

* **指标契约注册表（破坏性）**: Derive indicator pipeline types from a contract registry; an unregistered `@Indicator` name now fails at compile time. (BREAKING)
* **指标身份统一为 displayName（破坏性）**: Unify indicator identity on `displayName` across Core, UI and Agent, with `resolveIndicatorDefinitionId` as the only resolver. (BREAKING)
* **移除废弃 ai-runtime 与 MCP 桥接（破坏性）**: Remove the deprecated ai-runtime package and MCP bridge; agent tools now register through core-native `@Tool`. (BREAKING)
* **移除工具轮次上限（破坏性）**: Remove the tool loop limit — the 10-minute inactivity deadline is the only guard. (BREAKING)
* **设置解析分层与后端默认值检测（破坏性）**: Layer settings resolution per key, reuse `normalizeSettings`, and detect the renderer backend default; `resolveRuntimeSettings` is removed. (BREAKING)
* **移除废弃 semanticConfig 再导出（破坏性）**: Drop the deprecated `SemanticChartConfig` re-export from the web-component entry. (BREAKING)
* **渲染上下文按角色拆分并强类型帧数据**: Split the render context by role and type frame data.
* **绘图适配器拆分为职责端口**: Split the drawing adapter into responsibility ports.
* **可见画布契约**: Add a visible surface canvas contract.
* **绘图锚点可视化统一**: Unify anchor visuals in the renderer, drop line-edge drag, and fix the disjoint channel.
* **对比基线索引泛化为可见 K 线查找**: Generalize the comparison baseline index as a visible-bar lookup.
* **UI 原语统一**: Unify selector popover primitives, consolidate underline tabs into `BaseTabs`, and use native `<dialog>` for modals.
* **相对导入显式 .js 后缀**: Use explicit `.js` extensions in relative imports.

性能 [#性能]

* **Agent 面板折叠不再逐帧触发图表 resize**: Collapse the agent panel without a per-frame chart resize.
* **自选列表折叠改为无重排动画**: Animate watchlist collapse without chart relayout.
* **增量构建缓存**: Enable and restore incremental tsc builds, and persist the vue-tsc incremental cache.
* **持久化 vitest 模块转换缓存**: Persist the vitest module transform cache.

工程 [#工程]

* **Biome 落地与 LF 统一**: Adopt Biome for lint/format, switch vue tests to happy-dom, normalize EOL to LF, and refresh dependencies.
* **升级 Babel 8 与 vitest 5**: Upgrade to Babel 8 and the vitest 5 family across the workspace.
* **attw 门禁集中且必过**: Centralize the attw gate, make it required, and cover agent-runtime.
* **agent-runtime 发布准备**: Publish agent-runtime from the release workflows and prepare the package (README under the generator, marked available on npm).
* **清理死代码与冗余流程**: Remove the dead ui-schema package and the dead 302.ai live-provider workflow, and drop the stale web-component ignore pattern.
* **CI 与工程杂项**: Pin workflows to pnpm 12, correct the warn-only recursive build rationale and the CI gate matrix, add code/docs PDF export utilities, ignore `.trellis`, and align the commit skill directory.
* **测试夹具收敛**: Consolidate core test doubles into shared fixture kits and share drawing test fixtures via a helper kit.
* **发布文档同步**: Update the release guide to OIDC trusted publishing and the `pnpm pack` + `npm publish <tarball>` flow.

文档 [#文档]

* **README Agent-native 架构**: Add the Agent-native architecture section and replace the legacy MCP docs with the AI-native agent runtime.
* **博客：Vite monorepo HMR outside-root**: Add a post on Vite monorepo HMR outside the root.
* **博客：WebGL/WebGPU 宽线连接差异**: Add a post on WebGL/WebGPU wide-line join divergence.
* **绘图交互加固设计文档**: Add drawing interaction hardening design notes.
* **测试夹具与稀疏序列类型说明**: Document shared test fixtures and sparse series typing.
* **绘图坐标工具与样式键注释**: Annotate drawing coordinate utils and style keys.
