Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## Unreleased

## 2.0.11 - 2026-09-10

Candidate small release for scanned PDF visual preview and background subagent wakeup merging. GitHub CI, tag and Release status will be recorded after publication.

- Text-layer PDFs are answered from extracted text; scanned PDFs render the first few full pages for vision and cite those page numbers.
- Full visual PDF reading is explicit: set start and end pages on the paperclip and resend. PNG pastes without MIME are classified by extension.
- Joining a background subagent group can strengthen wakeup (`wakeParent` OR, `waitForGroup` all > any > none) but cannot disable an existing wakeup request.
- Windows executable distributions include `@napi-rs/canvas` and the Windows x64 native binary beside the exe.

Validation, upgrade steps and limitations: [Chinese release note](docs/releases/2.0.11-pdf-scan-vision-wakeup_zh.md).

## 2.0.10 - 2026-09-10

Published 2026-09-10 03:38:31 UTC (2026-09-10 11:38:31 UTC+08:00): [v2.0.10](https://github.com/wicm84266964/Ant-Code/releases/tag/v2.0.10).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ant-code doctor
ant-code
```

`ant-code --version` should print `2.0.10`. If you previously linked a
`ant-code --version` should print `2.0.11`. If you previously linked a
JavaScript install, run `npm link` again so the global command points at
`src/cli/index.ts`.

Expand Down
1 change: 1 addition & 0 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ runtime assets from the following third-party packages:
| `katex` | math rendering runtime dependency; Dashboard CSS and font assets | MIT |
| `mermaid` | Dashboard diagram rendering bundle input | MIT |
| `unpdf` | PDF text-layer extraction for document_intake and Dashboard paperclip | MIT |
| `@napi-rs/canvas` | PDF full-page rendering backend for scanned composer attachments | MIT |
| `yaml` | Dashboard YAML parsing bundle input | ISC |
| `esbuild` | development/build tool for Dashboard assets | MIT |
| `postject` | development/build tool for optional executable packaging | MIT |
Expand Down
4 changes: 3 additions & 1 deletion config/skills/document-intake/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ argument_hint: 提供文档路径、需要提取的内容类型、摘要粒度
- 支持轻量解析 docx/pptx/xlsx。
- PDF 抽取内嵌文本层,默认每次最多 20 页;需要后续页时传 `pageStart`。
- Dashboard 回形针也可直接附上这些文件;发送时会写入 `ant-code-uploads/` 并抽文本。
- 扫描件没有 OCR。回形针附上的无文本层 PDF 会把前几页内嵌图送给视觉模型。
- 有文字层的 PDF:用抽取的文字回答;预览不够时用 `document_intake` 按页补读,不要自动逐页走视觉。
- 无文字层的扫描件:先完整渲染前几页做视觉识别,尽快参与对话,并标明已读页码;不能假定这些页包含摘要。
- 还需要更多扫描页时:说明未覆盖范围,询问是继续后几页还是全量视觉,并提示额外耗时和费用。全量视觉必须由用户在回形针上填写起止页后重新发送。失败或取消不能视为已读完整文档。没有本地 OCR 引擎。
3. 只有文本层为空、且用户允许时,才考虑本机 MarkItDown 或其他 OCR 转换器。
4. 对大文件只提取目录、标题、表格预览和关键段落,不输出全文。

Expand Down
37 changes: 37 additions & 0 deletions docs/releases/2.0.11-pdf-scan-vision-wakeup_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Ant Code v2.0.11:扫描件 PDF 视觉预读与子任务唤醒合并

发布日期:2026-09-10

这是面向文档阅读和后台子任务编排的小版本更新。回形针附上的 PDF 不再默认逐页全量视觉识别:有文字层时直接抽文本,扫描件先完整渲染前几页参与对话;全量视觉改为明确选择。同时修复同组后台子任务唤醒参数互相覆盖、主控不再接续的问题。本说明为发布候选记录,线上 CI、标签和 Release 状态以实际发布记录为准。

## 对用户工作流的直接变化

- 有可用文字层的 PDF:抽取文本参与回答。预览不够时按需用 `document_intake` 补读,不自动把每一页送入视觉模型。
- 无文字层的扫描件:用完整页面渲染(文字、矢量图和内嵌图)识别前 2 页,尽快开始对话,并标明已读页码。不得把这几页当作摘要或目录。
- 还需要更多扫描页时:说明尚未覆盖的范围,询问是继续后几页还是全量视觉,并提示额外耗时和费用。全量视觉须在回形针上填写起始页和结束页后重新发送;只在对话里说「继续」不会再渲染更多页。
- PDF 附件保留页码输入。空着表示默认(扫描件前几页,文字层按文本窗口抽取);填写起止页才覆盖指定范围。
- 粘贴或上传 PNG 等图片时,即使浏览器没带 MIME,也会按已支持的扩展名补全,粘贴与回形针上传共用同一套分类。
- 同组后台子任务若携带相反的 `wakeParent` / `waitForGroup`,加入任务时在组文件锁内合并:唤醒采用 OR,等待条件采用 `all > any > none`。后写入的关闭参数不能取消已经开启的唤醒。全部明确关闭的组仍保持关闭。工具结果返回实际生效设置,并在发生合并时提示。
- TUI 和 Dashboard 显示 PDF 识别进度与失败/取消状态;失败、空报告或取消不会伪装成已经读完整份文档。视觉页面图只驻留内存,不写入会话 transcript。

## 配置、数据与安全边界

- 不要求手动迁移配置或历史任务记录。已有会话、网关和权限设置可继续使用。
- 回形针文档仍保存到工作区 `ant-code-uploads/`,并沿用现有忽略规则。渲染出的 PDF 页面图不进入 transcript 存储。
- 扫描件视觉识别需要支持图片的主模型,或同一网关下的视觉路由。没有本地 OCR 引擎。
- 新增运行时依赖 `@napi-rs/canvas` 1.0.9(MIT)。Windows 可执行分发包会附带该 JS 包和 Windows x64 原生组件;不能只复制 `ant-code.exe` 代替完整包。
- 本次不更新其他产品的内嵌运行时,不同步真实会话、凭据或研究数据。自动化测试不等于所有供应商、字体、复杂排版或私人研究 PDF 均已验证。

## 升级与产物位置

需要 Node.js 22.18+。源码安装更新后执行 `npm ci`、`npm run verify:install`;使用全局链接的用户可执行 `npm link`。`ant-code --version` 应显示 `2.0.11`。完整重启 TUI/Dashboard,浏览器刷新以加载当前资源。

已有配置和会话继续使用。审计产物仍由发布检查写入既有审计目录。

## 验证、限制与待完成门禁

- 开发阶段已覆盖文字层不自动视觉、扫描件默认前两页、显式页范围全量分批、整页渲染的矢量/文字/多图像素、取消、损坏文件、网关错误、空报告、视觉路由,以及同组唤醒相反顺序、并发合并、静默组和实际唤醒事件;用户已完成本地验收。
- 开发仓完整 `verify:release` 通过:单元/集成 1,331 项、浏览器 38 项,均无失败或跳过;语法 342 个文件、类型检查 0 诊断、依赖、来源、安装、网关兼容、资源一致性和发布封印检查通过。额外进程测试 8 项通过,与完整套件重叠,不累计为独立覆盖。
- 跨仓一致性检查和正式仓复验在脱敏同步后进行。候选提交后仍须 GitHub PR 和 main CI 通过,随后创建标签与 Release;实际完成状态记录在公开 CHANGELOG。
- 报告累计超过 240,000 字符时会明确失败,需要缩小页范围后重试。网关传输重试沿用现有策略;重新发送任务会重跑指定页范围。
- 未调用真实外部模型验收所有科研 PDF。复杂字体、扫描质量和表格结构仍可能影响视觉报告,不能替代人工核对关键数字。
254 changes: 252 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading