@web-ppt/edit-core 0.6.0 → 0.8.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +8 -0
  3. package/dist/agent/base64.d.ts +2 -0
  4. package/dist/agent/errors.d.ts +9 -0
  5. package/dist/agent/generated-schema.d.ts +6038 -0
  6. package/dist/agent/generated-validator.d.ts +6 -0
  7. package/dist/agent/index.d.ts +6 -0
  8. package/dist/agent/query.d.ts +3 -0
  9. package/dist/agent/session.d.ts +33 -0
  10. package/dist/agent/targets.d.ts +5 -0
  11. package/dist/agent/tools.d.ts +2 -0
  12. package/dist/agent/types.d.ts +126 -0
  13. package/dist/agent/validation.d.ts +2 -0
  14. package/dist/agent.js +46364 -0
  15. package/dist/commands/types.d.ts +23 -23
  16. package/dist/fill/api.d.ts +29 -0
  17. package/dist/fill/chart-seed-chart.d.ts +7 -0
  18. package/dist/fill/chart-seed-workbook.d.ts +12 -0
  19. package/dist/fill/chart-seed-xml.d.ts +12 -0
  20. package/dist/fill/chart-seed.d.ts +17 -0
  21. package/dist/fill/content.d.ts +16 -0
  22. package/dist/fill/errors.d.ts +10 -0
  23. package/dist/fill/generated-schema.d.ts +291 -0
  24. package/dist/fill/generated-validator.d.ts +6 -0
  25. package/dist/fill/index.d.ts +10 -0
  26. package/dist/fill/layouts.d.ts +24 -0
  27. package/dist/fill/package.d.ts +2 -0
  28. package/dist/fill/repair.d.ts +32 -0
  29. package/dist/fill/text-validation.d.ts +3 -0
  30. package/dist/fill/types.d.ts +60 -0
  31. package/dist/fill/validation.d.ts +10 -0
  32. package/dist/fill.js +12 -0
  33. package/dist/generate.js +53 -53
  34. package/dist/index-2ti1e4_F.js +411 -0
  35. package/dist/index-BbsPmmoy.js +4046 -0
  36. package/dist/save/notes-master.d.ts +12 -0
  37. package/dist/save.js +650 -484
  38. package/dist/{slide-parts-D0o_DDhi.js → slide-parts-zyOP9lia.js} +5 -5
  39. package/dist/types.d.ts +4 -4
  40. package/package.json +13 -3
  41. package/schemas/agent-tools.schema.json +7999 -0
  42. package/schemas/template-fill.schema.json +371 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  本文件记录对使用者可见的变化。版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## 0.8.0-beta.1 - 2026-11-03
6
+
7
+ 本版使用 npm `next` 通道,九包需安装同一版本。`0.7.0` 的发布流水线因 `agent-mcp` 未完成首发而终止,其已实现能力一并纳入本次 beta;稳定版仍为 `0.6.0`。
8
+
9
+ - 新增 `@web-ppt/edit-core/fill`:按结构化大纲选择模板版式,生成标题、章节、正文、双栏、图片及八种原生图表;生成副本可修复出血、字体、对比度和文字适配,完整检查后保存并规范化重开。输入保持不变,大纲 Schema 公开,跨进程产物字节确定。
10
+ - 修复备注增量保存缺少备注母版闭包导致独立读取器超时;仅作用显式改写或新建备注,保持未编辑来源字节、已有母版设计和完整撤销语义。
11
+ - 官网编辑器按需提供八个原生 WebMCP 工具,浏览器 Agent 可读取、检查、修改、撤销重做、渲染和下载当前文稿,复用现有历史、恢复与协同。切换或关闭文稿时注销并取消工具;不支持接口时不加载插件。
12
+ - 修复 Agent `SetLink` 命令误把超链接目标当作母版或版式目标而拒绝合法链接。
13
+ - 修复本机 MCP 保存和渲染的文件写入未完整纳入会话队列;关闭与后续操作等待交付结束,保存写入成功后才确认保存点。
14
+ - 新增 `@web-ppt/edit-core/agent` 命令工具面:全部公开命令由 TypeScript 生成 JSON Schema,支持单条 / 批量原子编辑、受影响页布局观察、单元素样式查询、撤销 / 重做、Node SVG / PNG 渲染及保存;独立按需入口不引入 MCP / 模型依赖。
15
+ - 新增 `@web-ppt/agent-mcp` 本机 stdio MCP server 与 Agent Skill:打开、describe、单元素查询、lint、SVG/PNG 渲染、原子编辑、撤销/重做、保存和关闭;会话串行、关闭取消、原子落盘且无网络请求。真实 Claude Code 与 Codex 固定任务产物已通过 LibreOffice 与 Quick Look。
16
+
17
+ `@web-ppt/collab` 发布入口为 12.20KB gzip;排除 peer 的完整测试薄包为 14,333B gzip。
18
+
19
+ Windows PowerPoint 真机验收继续延后,未记为通过;稳定版仍需 beta 反馈与真机验收。
20
+
5
21
  ## 0.6.0 - 2026-11-02
6
22
 
7
23
  0.6.0 稳定版:`0.6.0-beta.1` 的全部内容转正到 `latest`,包括 Agent 结构化读出、布局检查与 Node 无 Office 渲染,矢量 PDF 正式入口,视频音轨与内嵌视频合成,以及 OLE DOCX / XLSX 深度编辑官网入口。相对 0.5.0 的逐项变化见下方 `0.6.0-beta.1` 条目。
package/README.md CHANGED
@@ -14,6 +14,14 @@ The opt-in entry and its published JSON Schema are documented in [Agent describe
14
14
  explicit resource failures and cancellation. Complex paint can use the opt-in SVG contrast sampler;
15
15
  see [Layout lint](https://github.com/unStone/web-ppt/blob/master/docs/api/agent-layout-lint.md).
16
16
 
17
+ `@web-ppt/edit-core/agent` exposes every editor command through generated JSON Schemas, atomic batches,
18
+ post-edit lint observations, undo/redo, Node rendering, and patch/generated saving. It is transport-neutral
19
+ and has no MCP or model dependency; see [Agent command tools](https://github.com/unStone/web-ppt/blob/master/docs/api/agent-command-tools.md).
20
+
21
+ `@web-ppt/edit-core/fill` creates native editable presentations from a template and a structured outline.
22
+ It validates the outline, matches placeholder roles, preserves input bytes, repairs the generated copy,
23
+ and returns the final file, canonical description, and complete layout report. See [Template fill](https://github.com/unStone/web-ppt/blob/master/docs/api/agent-template-fill.md).
24
+
17
25
  ```bash
18
26
  npm i @web-ppt/core@next @web-ppt/edit-core@next
19
27
  ```
@@ -0,0 +1,2 @@
1
+ export declare function decodeBase64(value: string, commandIndex: number): Uint8Array;
2
+ export declare function encodeBase64(bytes: Uint8Array): string;
@@ -0,0 +1,9 @@
1
+ import type { AgentToolFailure } from './types';
2
+ export declare class AgentToolError extends Error {
3
+ readonly reason: string;
4
+ readonly commandIndex: number | null;
5
+ readonly elementId: string | null;
6
+ readonly slideNumber: number | null;
7
+ constructor(reason: string, message: string, commandIndex?: number | null, elementId?: string | null, slideNumber?: number | null);
8
+ }
9
+ export declare function failure(error: unknown): AgentToolFailure;