@capyclaw/ppt-suite 2.4.10 → 2.5.67

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 (766) hide show
  1. package/README.md +45 -42
  2. package/composition.lock.json +46 -70
  3. package/contract/ppt-contract.json +310 -11
  4. package/cordis.patch.yml +5 -25
  5. package/dsh-suite.json +108 -194
  6. package/lib/index.mjs +1 -1
  7. package/node_modules/@capyclaw/asset-service/README.md +48 -0
  8. package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
  9. package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
  10. package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
  11. package/node_modules/@capyclaw/asset-service/package.json +59 -0
  12. package/node_modules/@capyclaw/asset-service/src/index.mjs +223 -0
  13. package/node_modules/@capyclaw/document-workbench/README.md +125 -0
  14. package/node_modules/@capyclaw/document-workbench/package.json +44 -0
  15. package/node_modules/@capyclaw/document-workbench/src/bridge/index.mjs +321 -0
  16. package/node_modules/@capyclaw/document-workbench/src/client/index.mjs +625 -0
  17. package/node_modules/@capyclaw/document-workbench/src/client/screenshot.mjs +98 -0
  18. package/node_modules/@capyclaw/document-workbench/src/index.mjs +9 -0
  19. package/node_modules/@capyclaw/document-workbench/src/model/audit.mjs +101 -0
  20. package/node_modules/@capyclaw/document-workbench/src/model/conformance.mjs +92 -0
  21. package/node_modules/@capyclaw/document-workbench/src/model/ids.mjs +56 -0
  22. package/node_modules/@capyclaw/document-workbench/src/model/index.mjs +18 -0
  23. package/node_modules/@capyclaw/document-workbench/src/model/locate.mjs +118 -0
  24. package/node_modules/@capyclaw/document-workbench/src/model/manifest.mjs +148 -0
  25. package/node_modules/@capyclaw/document-workbench/src/model/ops.mjs +160 -0
  26. package/node_modules/@capyclaw/document-workbench/src/model/validate.mjs +72 -0
  27. package/node_modules/@capyclaw/document-workbench/src/ops/index.mjs +93 -0
  28. package/node_modules/@capyclaw/document-workbench/src/session/context.mjs +91 -0
  29. package/node_modules/@capyclaw/document-workbench/src/session/index.mjs +394 -0
  30. package/node_modules/@capyclaw/document-workbench/src/session/lease.mjs +105 -0
  31. package/node_modules/@capyclaw/document-workbench/src/session/mode.mjs +80 -0
  32. package/node_modules/@capyclaw/document-workbench/src/session/sanitize.mjs +107 -0
  33. package/node_modules/@capyclaw/document-workbench/src/session/state.mjs +159 -0
  34. package/node_modules/@capyclaw/document-workbench/src/session/watch.mjs +63 -0
  35. package/node_modules/@capyclaw/document-workbench/src/store/file-backend.mjs +158 -0
  36. package/node_modules/@capyclaw/document-workbench/src/testing/index.mjs +75 -0
  37. package/node_modules/@capyclaw/editor-host/README.md +37 -0
  38. package/node_modules/@capyclaw/editor-host/cordis.patch.yml +4 -0
  39. package/node_modules/@capyclaw/editor-host/dsh-suite.json +29 -0
  40. package/node_modules/@capyclaw/editor-host/lib/host.mjs +14 -0
  41. package/node_modules/@capyclaw/editor-host/package.json +59 -0
  42. package/node_modules/@capyclaw/editor-host/src/index.mjs +159 -0
  43. package/node_modules/@capyclaw/foundation/README.md +51 -0
  44. package/node_modules/@capyclaw/foundation/abi/bridge.mjs +86 -0
  45. package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
  46. package/node_modules/@capyclaw/foundation/abi/index.mjs +35 -0
  47. package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
  48. package/node_modules/@capyclaw/foundation/abi/loader.mjs +345 -0
  49. package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
  50. package/node_modules/@capyclaw/foundation/abi/spec.mjs +255 -0
  51. package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
  52. package/node_modules/@capyclaw/foundation/abi/version.mjs +82 -0
  53. package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
  54. package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
  55. package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
  56. package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
  57. package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
  58. package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +55 -0
  59. package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
  60. package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +68 -0
  61. package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +113 -0
  62. package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
  63. package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
  64. package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
  65. package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
  66. package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
  67. package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +34 -0
  68. package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +85 -0
  69. package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +50 -0
  70. package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +160 -0
  71. package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
  72. package/node_modules/@capyclaw/foundation/lib/kernel.mjs +185 -0
  73. package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +87 -0
  74. package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
  75. package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
  76. package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +188 -0
  77. package/node_modules/@capyclaw/foundation/package.json +53 -0
  78. package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
  79. package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
  80. package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
  81. package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
  82. package/node_modules/@capyclaw/plugin-kit/package.json +69 -0
  83. package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
  84. package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
  85. package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +129 -0
  86. package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +139 -0
  87. package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
  88. package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
  89. package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
  90. package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
  91. package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
  92. package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
  93. package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
  94. package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
  95. package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +143 -0
  96. package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
  97. package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
  98. package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
  99. package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
  100. package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
  101. package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +41 -0
  102. package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
  103. package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
  104. package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
  105. package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
  106. package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +656 -0
  107. package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
  108. package/node_modules/@capyclaw/portal/README.md +70 -0
  109. package/node_modules/@capyclaw/portal/lib/index.mjs +387 -0
  110. package/node_modules/@capyclaw/portal/lib/ledger.mjs +194 -0
  111. package/node_modules/@capyclaw/portal/lib/portal-agent.ps1 +811 -0
  112. package/node_modules/@capyclaw/portal/lib/portal-darwin.mjs +183 -0
  113. package/node_modules/@capyclaw/portal/package.json +40 -0
  114. package/node_modules/@capyclaw/ppt-editor/LICENSE +661 -0
  115. package/node_modules/@capyclaw/ppt-editor/README.md +86 -0
  116. package/node_modules/@capyclaw/ppt-editor/THIRD_PARTY_NOTICES.md +21 -0
  117. package/node_modules/@capyclaw/ppt-editor/app.js +6298 -0
  118. package/node_modules/@capyclaw/ppt-editor/contract/ppt-contract.json +1828 -0
  119. package/node_modules/@capyclaw/ppt-editor/heartbeat-worker.js +129 -0
  120. package/node_modules/@capyclaw/ppt-editor/index.html +176 -0
  121. package/node_modules/@capyclaw/ppt-editor/lib/index.mjs +8 -0
  122. package/node_modules/@capyclaw/ppt-editor/package.json +57 -0
  123. package/node_modules/@capyclaw/ppt-editor/ppt-full-app.js +381 -0
  124. package/node_modules/@capyclaw/ppt-skill-api/README.md +3 -0
  125. package/node_modules/@capyclaw/ppt-skill-api/contract/ppt-contract.json +1828 -0
  126. package/node_modules/@capyclaw/ppt-skill-api/cordis.patch.yml +4 -0
  127. package/node_modules/@capyclaw/ppt-skill-api/package.json +49 -0
  128. package/node_modules/@capyclaw/ppt-skill-api/plugin.mjs +15 -0
  129. package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/SKILL.md +137 -0
  130. package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/references/tool-contract.md +1646 -0
  131. package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/references/visual-qa.md +28 -0
  132. package/node_modules/@capyclaw/ppt-skill-proposal/README.md +3 -0
  133. package/node_modules/@capyclaw/ppt-skill-proposal/contract/ppt-contract.json +1828 -0
  134. package/node_modules/@capyclaw/ppt-skill-proposal/cordis.patch.yml +4 -0
  135. package/node_modules/@capyclaw/ppt-skill-proposal/package.json +49 -0
  136. package/node_modules/@capyclaw/ppt-skill-proposal/plugin.mjs +15 -0
  137. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/SKILL.md +83 -0
  138. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/anti-ai-slop.md +18 -0
  139. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/deck-structure.md +42 -0
  140. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/design-tokens.md +36 -0
  141. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/layout-system.md +30 -0
  142. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/page-craft.md +31 -0
  143. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/scqa-pyramid.md +26 -0
  144. package/node_modules/@capyclaw/ppt-workbench/LICENSE +661 -0
  145. package/node_modules/@capyclaw/ppt-workbench/README.md +173 -0
  146. package/node_modules/@capyclaw/ppt-workbench/THIRD_PARTY_NOTICES.md +21 -0
  147. package/node_modules/@capyclaw/ppt-workbench/contract/ppt-contract.json +1828 -0
  148. package/node_modules/@capyclaw/ppt-workbench/core/audit.js +507 -0
  149. package/node_modules/@capyclaw/ppt-workbench/core/chart.js +199 -0
  150. package/node_modules/@capyclaw/ppt-workbench/core/color.js +170 -0
  151. package/node_modules/@capyclaw/ppt-workbench/core/deck-layout.js +375 -0
  152. package/node_modules/@capyclaw/ppt-workbench/core/formula.js +80 -0
  153. package/node_modules/@capyclaw/ppt-workbench/core/hfmath/hershey.js +1763 -0
  154. package/node_modules/@capyclaw/ppt-workbench/core/hfmath/index.js +1176 -0
  155. package/node_modules/@capyclaw/ppt-workbench/core/hfmath/stretch.js +41 -0
  156. package/node_modules/@capyclaw/ppt-workbench/core/hfmath/symbols.js +408 -0
  157. package/node_modules/@capyclaw/ppt-workbench/core/inspect.js +366 -0
  158. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/compare.mjs +103 -0
  159. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/compile.mjs +322 -0
  160. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/edit.mjs +239 -0
  161. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/parse.mjs +346 -0
  162. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/render-html.mjs +84 -0
  163. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/sync.mjs +101 -0
  164. package/node_modules/@capyclaw/ppt-workbench/core/measure.js +104 -0
  165. package/node_modules/@capyclaw/ppt-workbench/core/ops/browser.js +28 -0
  166. package/node_modules/@capyclaw/ppt-workbench/core/ops/chart.js +64 -0
  167. package/node_modules/@capyclaw/ppt-workbench/core/ops/deck.js +21 -0
  168. package/node_modules/@capyclaw/ppt-workbench/core/ops/element.js +55 -0
  169. package/node_modules/@capyclaw/ppt-workbench/core/ops/history.js +11 -0
  170. package/node_modules/@capyclaw/ppt-workbench/core/ops/import.js +95 -0
  171. package/node_modules/@capyclaw/ppt-workbench/core/ops/index.js +39 -0
  172. package/node_modules/@capyclaw/ppt-workbench/core/ops/playback.js +9 -0
  173. package/node_modules/@capyclaw/ppt-workbench/core/ops/recolor.js +87 -0
  174. package/node_modules/@capyclaw/ppt-workbench/core/ops/slide.js +66 -0
  175. package/node_modules/@capyclaw/ppt-workbench/core/ops/table.js +85 -0
  176. package/node_modules/@capyclaw/ppt-workbench/core/ops/text.js +35 -0
  177. package/node_modules/@capyclaw/ppt-workbench/core/ops/view.js +13 -0
  178. package/node_modules/@capyclaw/ppt-workbench/core/ops.js +12 -0
  179. package/node_modules/@capyclaw/ppt-workbench/core/quick.js +52 -0
  180. package/node_modules/@capyclaw/ppt-workbench/core/shape-library.js +122 -0
  181. package/node_modules/@capyclaw/ppt-workbench/core/table.js +178 -0
  182. package/node_modules/@capyclaw/ppt-workbench/core/text.js +200 -0
  183. package/node_modules/@capyclaw/ppt-workbench/lib/host.mjs +1 -0
  184. package/node_modules/@capyclaw/ppt-workbench/package.json +73 -0
  185. package/node_modules/@capyclaw/ppt-workbench/plugin.mjs +1 -0
  186. package/node_modules/@capyclaw/ppt-workbench/server/audit.mjs +2 -0
  187. package/node_modules/@capyclaw/ppt-workbench/server/bridge-client.mjs +308 -0
  188. package/node_modules/@capyclaw/ppt-workbench/server/constants.mjs +21 -0
  189. package/node_modules/@capyclaw/ppt-workbench/server/contract-snapshots.mjs +89 -0
  190. package/node_modules/@capyclaw/ppt-workbench/server/contract.mjs +24 -0
  191. package/node_modules/@capyclaw/ppt-workbench/server/deck-layout.mjs +2 -0
  192. package/node_modules/@capyclaw/ppt-workbench/server/editor-assets.mjs +132 -0
  193. package/node_modules/@capyclaw/ppt-workbench/server/embedded-host.mjs +252 -0
  194. package/node_modules/@capyclaw/ppt-workbench/server/http-utils.mjs +2 -0
  195. package/node_modules/@capyclaw/ppt-workbench/server/infra/http.mjs +2 -0
  196. package/node_modules/@capyclaw/ppt-workbench/server/infra/runtime/context.mjs +2 -0
  197. package/node_modules/@capyclaw/ppt-workbench/server/infra/store/blob-store.mjs +2 -0
  198. package/node_modules/@capyclaw/ppt-workbench/server/infra/tuning.mjs +2 -0
  199. package/node_modules/@capyclaw/ppt-workbench/server/infra/util/fs-lock.mjs +2 -0
  200. package/node_modules/@capyclaw/ppt-workbench/server/infra/workspace/manager.mjs +2 -0
  201. package/node_modules/@capyclaw/ppt-workbench/server/mcp/dispatch.mjs +2 -0
  202. package/node_modules/@capyclaw/ppt-workbench/server/mcp/handler.mjs +2 -0
  203. package/node_modules/@capyclaw/ppt-workbench/server/mcp/instructions.mjs +66 -0
  204. package/node_modules/@capyclaw/ppt-workbench/server/ppt-shim.mjs +168 -0
  205. package/node_modules/@capyclaw/ppt-workbench/server/relay.mjs +282 -0
  206. package/node_modules/@capyclaw/ppt-workbench/server/routes/assets.mjs +2 -0
  207. package/node_modules/@capyclaw/ppt-workbench/server/routes/bridge.mjs +74 -0
  208. package/node_modules/@capyclaw/ppt-workbench/server/routes/editor.mjs +9 -0
  209. package/node_modules/@capyclaw/ppt-workbench/server/routes/import.mjs +260 -0
  210. package/node_modules/@capyclaw/ppt-workbench/server/routes/manuscript.mjs +414 -0
  211. package/node_modules/@capyclaw/ppt-workbench/server/routes/mcp.mjs +17 -0
  212. package/node_modules/@capyclaw/ppt-workbench/server/routes/session.mjs +29 -0
  213. package/node_modules/@capyclaw/ppt-workbench/server/runtime/recovery.mjs +9 -0
  214. package/node_modules/@capyclaw/ppt-workbench/server/runtime/watch.mjs +17 -0
  215. package/node_modules/@capyclaw/ppt-workbench/server/session-context.mjs +5 -0
  216. package/node_modules/@capyclaw/ppt-workbench/server/shared/SHARED_MANIFEST.json +70 -0
  217. package/node_modules/@capyclaw/ppt-workbench/server/shared/asset-service.mjs +2 -0
  218. package/node_modules/@capyclaw/ppt-workbench/server/shared/editor-host.mjs +2 -0
  219. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/editor/lease.mjs +2 -0
  220. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/api.mjs +2 -0
  221. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/http.mjs +2 -0
  222. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/mcp-http.mjs +2 -0
  223. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/tools/validate.mjs +2 -0
  224. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/tuning.mjs +2 -0
  225. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/util/fs-lock.mjs +2 -0
  226. package/node_modules/@capyclaw/ppt-workbench/server/shared/service-host.mjs +2 -0
  227. package/node_modules/@capyclaw/ppt-workbench/server/shared/tool-host.mjs +2 -0
  228. package/node_modules/@capyclaw/ppt-workbench/server/shared/tuning.mjs +2 -0
  229. package/node_modules/@capyclaw/ppt-workbench/server/store/backends/file-backend.mjs +13 -0
  230. package/node_modules/@capyclaw/ppt-workbench/server/store/checkpoints.mjs +28 -0
  231. package/node_modules/@capyclaw/ppt-workbench/server/store/deck-sanitize.mjs +68 -0
  232. package/node_modules/@capyclaw/ppt-workbench/server/store/doc.mjs +56 -0
  233. package/node_modules/@capyclaw/ppt-workbench/server/store/index.mjs +34 -0
  234. package/node_modules/@capyclaw/ppt-workbench/server/store/journal.mjs +9 -0
  235. package/node_modules/@capyclaw/ppt-workbench/server/store/lease.mjs +2 -0
  236. package/node_modules/@capyclaw/ppt-workbench/server/store/sanitize.mjs +33 -0
  237. package/node_modules/@capyclaw/ppt-workbench/server/store/sessions.mjs +303 -0
  238. package/node_modules/@capyclaw/ppt-workbench/server/store.mjs +2 -0
  239. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/apply.mjs +33 -0
  240. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/audit.mjs +28 -0
  241. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/chart.mjs +83 -0
  242. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/compose.mjs +97 -0
  243. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/contract.mjs +38 -0
  244. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/deck.mjs +27 -0
  245. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/element.mjs +67 -0
  246. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/export.mjs +99 -0
  247. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/formula.mjs +72 -0
  248. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/history.mjs +29 -0
  249. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/image.mjs +174 -0
  250. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/imagesearch.mjs +203 -0
  251. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/import.mjs +180 -0
  252. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/index.mjs +64 -0
  253. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/inspect.mjs +46 -0
  254. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/line.mjs +58 -0
  255. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/manuscript.mjs +208 -0
  256. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/notes.mjs +33 -0
  257. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/present.mjs +34 -0
  258. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/recolor.mjs +62 -0
  259. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/screenshot.mjs +191 -0
  260. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/shape.mjs +64 -0
  261. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/slide.mjs +81 -0
  262. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/style.mjs +48 -0
  263. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/table.mjs +127 -0
  264. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/task.mjs +52 -0
  265. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/text.mjs +82 -0
  266. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/color.mjs +4 -0
  267. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/image.mjs +78 -0
  268. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/index.mjs +7 -0
  269. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/manuscript-media.mjs +159 -0
  270. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/offline-render.mjs +256 -0
  271. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/pptx-export.mjs +577 -0
  272. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/recolor.mjs +25 -0
  273. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/remote-image.mjs +443 -0
  274. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/slide.mjs +21 -0
  275. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/text-style.mjs +11 -0
  276. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/tooling.mjs +13 -0
  277. package/node_modules/@capyclaw/ppt-workbench/server/tools/index.mjs +14 -0
  278. package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/define.mjs +5 -0
  279. package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/ports.mjs +52 -0
  280. package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/registry.mjs +17 -0
  281. package/node_modules/@capyclaw/ppt-workbench/server/tools/model/deck-schema.mjs +105 -0
  282. package/node_modules/@capyclaw/ppt-workbench/server/tools.mjs +18 -0
  283. package/node_modules/@capyclaw/ppt-workbench/server/tuning.mjs +93 -0
  284. package/node_modules/@capyclaw/ppt-workbench/server/validate.mjs +2 -0
  285. package/node_modules/@capyclaw/ppt-workbench/server/workbench-framework.mjs +305 -0
  286. package/node_modules/@capyclaw/service-broker/README.md +104 -0
  287. package/node_modules/@capyclaw/service-broker/cordis.patch.yml +8 -0
  288. package/node_modules/@capyclaw/service-broker/dsh-suite.json +21 -0
  289. package/node_modules/@capyclaw/service-broker/lib/control.mjs +193 -0
  290. package/node_modules/@capyclaw/service-broker/lib/discovery.mjs +109 -0
  291. package/node_modules/@capyclaw/service-broker/lib/engine.mjs +1236 -0
  292. package/node_modules/@capyclaw/service-broker/lib/host.mjs +182 -0
  293. package/node_modules/@capyclaw/service-broker/lib/manifest.mjs +249 -0
  294. package/node_modules/@capyclaw/service-broker/lib/recovery.mjs +325 -0
  295. package/node_modules/@capyclaw/service-broker/lib/skills-client.mjs +28 -0
  296. package/node_modules/@capyclaw/service-broker/lib/spec.mjs +78 -0
  297. package/node_modules/@capyclaw/service-broker/package.json +65 -0
  298. package/node_modules/@capyclaw/service-broker/server.mjs +81 -0
  299. package/node_modules/@capyclaw/service-broker/service.schema.json +62 -0
  300. package/node_modules/@capyclaw/service-broker/services.json +3 -0
  301. package/node_modules/@capyclaw/service-host/README.md +86 -0
  302. package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
  303. package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
  304. package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
  305. package/node_modules/@capyclaw/service-host/package.json +60 -0
  306. package/node_modules/@capyclaw/service-host/src/index.mjs +571 -0
  307. package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
  308. package/node_modules/@capyclaw/skills-service/README.md +31 -0
  309. package/node_modules/@capyclaw/skills-service/package.json +30 -0
  310. package/node_modules/@capyclaw/skills-service/server.mjs +237 -0
  311. package/node_modules/@capyclaw/tool-host/README.md +56 -0
  312. package/node_modules/@capyclaw/tool-host/cordis.patch.yml +4 -0
  313. package/node_modules/@capyclaw/tool-host/dsh-suite.json +30 -0
  314. package/node_modules/@capyclaw/tool-host/lib/host.mjs +16 -0
  315. package/node_modules/@capyclaw/tool-host/package.json +59 -0
  316. package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +142 -0
  317. package/node_modules/@capyclaw/tool-host/src/index.mjs +390 -0
  318. package/node_modules/@types/node/LICENSE +21 -0
  319. package/node_modules/@types/node/README.md +15 -0
  320. package/node_modules/@types/node/assert/strict.d.ts +8 -0
  321. package/node_modules/@types/node/assert.d.ts +1005 -0
  322. package/node_modules/@types/node/async_hooks.d.ts +586 -0
  323. package/node_modules/@types/node/buffer.buffer.d.ts +457 -0
  324. package/node_modules/@types/node/buffer.d.ts +1901 -0
  325. package/node_modules/@types/node/child_process.d.ts +1453 -0
  326. package/node_modules/@types/node/cluster.d.ts +578 -0
  327. package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
  328. package/node_modules/@types/node/compatibility/index.d.ts +9 -0
  329. package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  330. package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
  331. package/node_modules/@types/node/console.d.ts +452 -0
  332. package/node_modules/@types/node/constants.d.ts +21 -0
  333. package/node_modules/@types/node/crypto.d.ts +4504 -0
  334. package/node_modules/@types/node/dgram.d.ts +596 -0
  335. package/node_modules/@types/node/diagnostics_channel.d.ts +551 -0
  336. package/node_modules/@types/node/dns/promises.d.ts +477 -0
  337. package/node_modules/@types/node/dns.d.ts +860 -0
  338. package/node_modules/@types/node/domain.d.ts +170 -0
  339. package/node_modules/@types/node/events.d.ts +863 -0
  340. package/node_modules/@types/node/fs/promises.d.ts +1208 -0
  341. package/node_modules/@types/node/fs.d.ts +4332 -0
  342. package/node_modules/@types/node/globals.d.ts +170 -0
  343. package/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  344. package/node_modules/@types/node/http.d.ts +1919 -0
  345. package/node_modules/@types/node/http2.d.ts +2580 -0
  346. package/node_modules/@types/node/https.d.ts +549 -0
  347. package/node_modules/@types/node/index.d.ts +92 -0
  348. package/node_modules/@types/node/inspector.generated.d.ts +2775 -0
  349. package/node_modules/@types/node/module.d.ts +503 -0
  350. package/node_modules/@types/node/net.d.ts +924 -0
  351. package/node_modules/@types/node/os.d.ts +480 -0
  352. package/node_modules/@types/node/package.json +145 -0
  353. package/node_modules/@types/node/path.d.ts +191 -0
  354. package/node_modules/@types/node/perf_hooks.d.ts +860 -0
  355. package/node_modules/@types/node/process.d.ts +1632 -0
  356. package/node_modules/@types/node/punycode.d.ts +117 -0
  357. package/node_modules/@types/node/querystring.d.ts +140 -0
  358. package/node_modules/@types/node/readline/promises.d.ts +154 -0
  359. package/node_modules/@types/node/readline.d.ts +715 -0
  360. package/node_modules/@types/node/repl.d.ts +430 -0
  361. package/node_modules/@types/node/stream/consumers.d.ts +38 -0
  362. package/node_modules/@types/node/stream/promises.d.ts +90 -0
  363. package/node_modules/@types/node/stream/web.d.ts +527 -0
  364. package/node_modules/@types/node/stream.d.ts +1680 -0
  365. package/node_modules/@types/node/string_decoder.d.ts +67 -0
  366. package/node_modules/@types/node/test.d.ts +1208 -0
  367. package/node_modules/@types/node/timers/promises.d.ts +108 -0
  368. package/node_modules/@types/node/timers.d.ts +286 -0
  369. package/node_modules/@types/node/tls.d.ts +1204 -0
  370. package/node_modules/@types/node/trace_events.d.ts +171 -0
  371. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +455 -0
  372. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  373. package/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  374. package/node_modules/@types/node/tty.d.ts +206 -0
  375. package/node_modules/@types/node/url.d.ts +957 -0
  376. package/node_modules/@types/node/util.d.ts +2083 -0
  377. package/node_modules/@types/node/v8.d.ts +753 -0
  378. package/node_modules/@types/node/vm.d.ts +704 -0
  379. package/node_modules/@types/node/wasi.d.ts +160 -0
  380. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  381. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  382. package/node_modules/@types/node/web-globals/events.d.ts +81 -0
  383. package/node_modules/@types/node/web-globals/fetch.d.ts +38 -0
  384. package/node_modules/@types/node/worker_threads.d.ts +698 -0
  385. package/node_modules/@types/node/zlib.d.ts +517 -0
  386. package/node_modules/core-util-is/LICENSE +19 -0
  387. package/node_modules/core-util-is/README.md +3 -0
  388. package/node_modules/core-util-is/lib/util.js +107 -0
  389. package/node_modules/core-util-is/package.json +38 -0
  390. package/node_modules/https/package.json +15 -0
  391. package/node_modules/image-size/LICENSE +9 -0
  392. package/node_modules/image-size/Readme.md +184 -0
  393. package/node_modules/image-size/bin/image-size.js +53 -0
  394. package/node_modules/image-size/dist/detector.d.ts +2 -0
  395. package/node_modules/image-size/dist/detector.js +30 -0
  396. package/node_modules/image-size/dist/index.d.ts +10 -0
  397. package/node_modules/image-size/dist/index.js +129 -0
  398. package/node_modules/image-size/dist/types/bmp.d.ts +2 -0
  399. package/node_modules/image-size/dist/types/bmp.js +11 -0
  400. package/node_modules/image-size/dist/types/cur.d.ts +2 -0
  401. package/node_modules/image-size/dist/types/cur.js +17 -0
  402. package/node_modules/image-size/dist/types/dds.d.ts +2 -0
  403. package/node_modules/image-size/dist/types/dds.js +11 -0
  404. package/node_modules/image-size/dist/types/gif.d.ts +2 -0
  405. package/node_modules/image-size/dist/types/gif.js +12 -0
  406. package/node_modules/image-size/dist/types/heif.d.ts +2 -0
  407. package/node_modules/image-size/dist/types/heif.js +40 -0
  408. package/node_modules/image-size/dist/types/icns.d.ts +2 -0
  409. package/node_modules/image-size/dist/types/icns.js +101 -0
  410. package/node_modules/image-size/dist/types/ico.d.ts +2 -0
  411. package/node_modules/image-size/dist/types/ico.js +68 -0
  412. package/node_modules/image-size/dist/types/index.d.ts +23 -0
  413. package/node_modules/image-size/dist/types/index.js +46 -0
  414. package/node_modules/image-size/dist/types/interface.d.ts +13 -0
  415. package/node_modules/image-size/dist/types/interface.js +2 -0
  416. package/node_modules/image-size/dist/types/j2c.d.ts +2 -0
  417. package/node_modules/image-size/dist/types/j2c.js +12 -0
  418. package/node_modules/image-size/dist/types/jp2.d.ts +2 -0
  419. package/node_modules/image-size/dist/types/jp2.js +27 -0
  420. package/node_modules/image-size/dist/types/jpg.d.ts +2 -0
  421. package/node_modules/image-size/dist/types/jpg.js +123 -0
  422. package/node_modules/image-size/dist/types/jxl-stream.d.ts +2 -0
  423. package/node_modules/image-size/dist/types/jxl-stream.js +45 -0
  424. package/node_modules/image-size/dist/types/jxl.d.ts +2 -0
  425. package/node_modules/image-size/dist/types/jxl.js +59 -0
  426. package/node_modules/image-size/dist/types/ktx.d.ts +2 -0
  427. package/node_modules/image-size/dist/types/ktx.js +19 -0
  428. package/node_modules/image-size/dist/types/png.d.ts +2 -0
  429. package/node_modules/image-size/dist/types/png.js +35 -0
  430. package/node_modules/image-size/dist/types/pnm.d.ts +2 -0
  431. package/node_modules/image-size/dist/types/pnm.js +72 -0
  432. package/node_modules/image-size/dist/types/psd.d.ts +2 -0
  433. package/node_modules/image-size/dist/types/psd.js +11 -0
  434. package/node_modules/image-size/dist/types/svg.d.ts +2 -0
  435. package/node_modules/image-size/dist/types/svg.js +90 -0
  436. package/node_modules/image-size/dist/types/tga.d.ts +2 -0
  437. package/node_modules/image-size/dist/types/tga.js +15 -0
  438. package/node_modules/image-size/dist/types/tiff.d.ts +2 -0
  439. package/node_modules/image-size/dist/types/tiff.js +95 -0
  440. package/node_modules/image-size/dist/types/utils.d.ts +15 -0
  441. package/node_modules/image-size/dist/types/utils.js +75 -0
  442. package/node_modules/image-size/dist/types/webp.d.ts +2 -0
  443. package/node_modules/image-size/dist/types/webp.js +60 -0
  444. package/node_modules/image-size/dist/utils/bit-reader.d.ts +10 -0
  445. package/node_modules/image-size/dist/utils/bit-reader.js +44 -0
  446. package/node_modules/image-size/package.json +81 -0
  447. package/node_modules/immediate/LICENSE.txt +20 -0
  448. package/node_modules/immediate/README.md +93 -0
  449. package/node_modules/immediate/dist/immediate.js +75 -0
  450. package/node_modules/immediate/dist/immediate.min.js +1 -0
  451. package/node_modules/immediate/lib/browser.js +69 -0
  452. package/node_modules/immediate/lib/index.js +73 -0
  453. package/node_modules/immediate/package.json +42 -0
  454. package/node_modules/inherits/LICENSE +16 -0
  455. package/node_modules/inherits/README.md +42 -0
  456. package/node_modules/inherits/inherits.js +9 -0
  457. package/node_modules/inherits/inherits_browser.js +27 -0
  458. package/node_modules/inherits/package.json +29 -0
  459. package/node_modules/isarray/.npmignore +1 -0
  460. package/node_modules/isarray/.travis.yml +4 -0
  461. package/node_modules/isarray/Makefile +6 -0
  462. package/node_modules/isarray/README.md +60 -0
  463. package/node_modules/isarray/component.json +19 -0
  464. package/node_modules/isarray/index.js +5 -0
  465. package/node_modules/isarray/package.json +45 -0
  466. package/node_modules/isarray/test.js +20 -0
  467. package/node_modules/jszip/.codeclimate.yml +16 -0
  468. package/node_modules/jszip/.editorconfig +8 -0
  469. package/node_modules/jszip/.eslintrc.js +43 -0
  470. package/node_modules/jszip/CHANGES.md +210 -0
  471. package/node_modules/jszip/LICENSE.markdown +651 -0
  472. package/node_modules/jszip/README.markdown +33 -0
  473. package/node_modules/jszip/dist/jszip.js +11586 -0
  474. package/node_modules/jszip/dist/jszip.min.js +13 -0
  475. package/node_modules/jszip/index.d.ts +344 -0
  476. package/node_modules/jszip/lib/base64.js +106 -0
  477. package/node_modules/jszip/lib/compressedObject.js +74 -0
  478. package/node_modules/jszip/lib/compressions.js +14 -0
  479. package/node_modules/jszip/lib/crc32.js +77 -0
  480. package/node_modules/jszip/lib/defaults.js +11 -0
  481. package/node_modules/jszip/lib/external.js +18 -0
  482. package/node_modules/jszip/lib/flate.js +85 -0
  483. package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
  484. package/node_modules/jszip/lib/generate/index.js +57 -0
  485. package/node_modules/jszip/lib/index.js +55 -0
  486. package/node_modules/jszip/lib/license_header.js +11 -0
  487. package/node_modules/jszip/lib/load.js +88 -0
  488. package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
  489. package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
  490. package/node_modules/jszip/lib/nodejsUtils.js +57 -0
  491. package/node_modules/jszip/lib/object.js +384 -0
  492. package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
  493. package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
  494. package/node_modules/jszip/lib/reader/DataReader.js +116 -0
  495. package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
  496. package/node_modules/jszip/lib/reader/StringReader.js +38 -0
  497. package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
  498. package/node_modules/jszip/lib/reader/readerFor.js +28 -0
  499. package/node_modules/jszip/lib/signature.js +7 -0
  500. package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
  501. package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
  502. package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
  503. package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
  504. package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
  505. package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
  506. package/node_modules/jszip/lib/support.js +38 -0
  507. package/node_modules/jszip/lib/utf8.js +275 -0
  508. package/node_modules/jszip/lib/utils.js +510 -0
  509. package/node_modules/jszip/lib/zipEntries.js +261 -0
  510. package/node_modules/jszip/lib/zipEntry.js +293 -0
  511. package/node_modules/jszip/lib/zipObject.js +133 -0
  512. package/node_modules/jszip/package.json +67 -0
  513. package/node_modules/jszip/sponsors.md +21 -0
  514. package/node_modules/jszip/tsconfig.json +101 -0
  515. package/node_modules/jszip/vendor/FileSaver.js +247 -0
  516. package/node_modules/lie/README.md +62 -0
  517. package/node_modules/lie/dist/lie.js +350 -0
  518. package/node_modules/lie/dist/lie.min.js +1 -0
  519. package/node_modules/lie/dist/lie.polyfill.js +358 -0
  520. package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
  521. package/node_modules/lie/lib/browser.js +273 -0
  522. package/node_modules/lie/lib/index.js +298 -0
  523. package/node_modules/lie/license.md +7 -0
  524. package/node_modules/lie/lie.d.ts +244 -0
  525. package/node_modules/lie/package.json +69 -0
  526. package/node_modules/lie/polyfill.js +4 -0
  527. package/node_modules/pako/LICENSE +21 -0
  528. package/node_modules/pako/README.md +191 -0
  529. package/node_modules/pako/dist/pako.js +6818 -0
  530. package/node_modules/pako/dist/pako.min.js +1 -0
  531. package/node_modules/pako/dist/pako_deflate.js +3997 -0
  532. package/node_modules/pako/dist/pako_deflate.min.js +1 -0
  533. package/node_modules/pako/dist/pako_inflate.js +3300 -0
  534. package/node_modules/pako/dist/pako_inflate.min.js +1 -0
  535. package/node_modules/pako/index.js +14 -0
  536. package/node_modules/pako/lib/deflate.js +400 -0
  537. package/node_modules/pako/lib/inflate.js +423 -0
  538. package/node_modules/pako/lib/utils/common.js +105 -0
  539. package/node_modules/pako/lib/utils/strings.js +187 -0
  540. package/node_modules/pako/lib/zlib/README +59 -0
  541. package/node_modules/pako/lib/zlib/adler32.js +51 -0
  542. package/node_modules/pako/lib/zlib/constants.js +68 -0
  543. package/node_modules/pako/lib/zlib/crc32.js +59 -0
  544. package/node_modules/pako/lib/zlib/deflate.js +1874 -0
  545. package/node_modules/pako/lib/zlib/gzheader.js +58 -0
  546. package/node_modules/pako/lib/zlib/inffast.js +345 -0
  547. package/node_modules/pako/lib/zlib/inflate.js +1556 -0
  548. package/node_modules/pako/lib/zlib/inftrees.js +343 -0
  549. package/node_modules/pako/lib/zlib/messages.js +32 -0
  550. package/node_modules/pako/lib/zlib/trees.js +1222 -0
  551. package/node_modules/pako/lib/zlib/zstream.js +47 -0
  552. package/node_modules/pako/package.json +44 -0
  553. package/node_modules/playwright-core/LICENSE +202 -0
  554. package/node_modules/playwright-core/NOTICE +5 -0
  555. package/node_modules/playwright-core/README.md +3 -0
  556. package/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
  557. package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
  558. package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
  559. package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  560. package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  561. package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  562. package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  563. package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  564. package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  565. package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  566. package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  567. package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  568. package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  569. package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  570. package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  571. package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  572. package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  573. package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  574. package/node_modules/playwright-core/browsers.json +52 -0
  575. package/node_modules/playwright-core/cli.js +22 -0
  576. package/node_modules/playwright-core/index.d.ts +17 -0
  577. package/node_modules/playwright-core/index.js +17 -0
  578. package/node_modules/playwright-core/index.mjs +28 -0
  579. package/node_modules/playwright-core/lib/bootstrap.js +149 -0
  580. package/node_modules/playwright-core/lib/coreBundle.js +78041 -0
  581. package/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
  582. package/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
  583. package/node_modules/playwright-core/lib/entry/mcp.js +10 -0
  584. package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
  585. package/node_modules/playwright-core/lib/package.js +50 -0
  586. package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  587. package/node_modules/playwright-core/lib/server/electron/loader.js +123 -0
  588. package/node_modules/playwright-core/lib/serverRegistry.js +1939 -0
  589. package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +65 -0
  590. package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
  591. package/node_modules/playwright-core/lib/tools/cli-client/cli.js +7 -0
  592. package/node_modules/playwright-core/lib/tools/cli-client/help.json +808 -0
  593. package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
  594. package/node_modules/playwright-core/lib/tools/cli-client/output.js +352 -0
  595. package/node_modules/playwright-core/lib/tools/cli-client/program.js +422 -0
  596. package/node_modules/playwright-core/lib/tools/cli-client/registry.js +180 -0
  597. package/node_modules/playwright-core/lib/tools/cli-client/session.js +261 -0
  598. package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
  599. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +493 -0
  600. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
  601. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
  602. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
  603. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
  604. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
  605. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
  606. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
  607. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
  608. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
  609. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
  610. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
  611. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
  612. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
  613. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
  614. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
  615. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
  616. package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
  617. package/node_modules/playwright-core/lib/tools/utils/extension.js +112 -0
  618. package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
  619. package/node_modules/playwright-core/lib/utilsBundle.js +86078 -0
  620. package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +1890 -0
  621. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
  622. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
  623. package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  624. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  625. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  626. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  627. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
  628. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
  629. package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  630. package/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
  631. package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
  632. package/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
  633. package/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
  634. package/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
  635. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  636. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +32 -0
  637. package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  638. package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
  639. package/node_modules/playwright-core/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
  640. package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
  641. package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  642. package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +32 -0
  643. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
  644. package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  645. package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +7 -0
  646. package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  647. package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  648. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
  649. package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  650. package/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
  651. package/node_modules/playwright-core/lib/vite/traceViewer/index.oNry3Hjv.js +1 -0
  652. package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  653. package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  654. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  655. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
  656. package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
  657. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CYwC_gH1.js +5 -0
  658. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
  659. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
  660. package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  661. package/node_modules/playwright-core/lib/webp_codec.LICENSE +173 -0
  662. package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
  663. package/node_modules/playwright-core/lib/xdg-open +1267 -0
  664. package/node_modules/playwright-core/package.json +34 -0
  665. package/node_modules/playwright-core/types/protocol.d.ts +24776 -0
  666. package/node_modules/playwright-core/types/structs.d.ts +52 -0
  667. package/node_modules/playwright-core/types/types.d.ts +27167 -0
  668. package/node_modules/pptxgenjs/LICENSE +21 -0
  669. package/node_modules/pptxgenjs/README.md +284 -0
  670. package/node_modules/pptxgenjs/dist/pptxgen.bundle.js +3 -0
  671. package/node_modules/pptxgenjs/dist/pptxgen.bundle.js.map +1 -0
  672. package/node_modules/pptxgenjs/dist/pptxgen.cjs.js +7445 -0
  673. package/node_modules/pptxgenjs/dist/pptxgen.es.js +7439 -0
  674. package/node_modules/pptxgenjs/dist/pptxgen.min.js +3 -0
  675. package/node_modules/pptxgenjs/dist/pptxgen.min.js.map +1 -0
  676. package/node_modules/pptxgenjs/package.json +89 -0
  677. package/node_modules/pptxgenjs/types/index.d.ts +2670 -0
  678. package/node_modules/process-nextick-args/index.js +45 -0
  679. package/node_modules/process-nextick-args/license.md +19 -0
  680. package/node_modules/process-nextick-args/package.json +25 -0
  681. package/node_modules/process-nextick-args/readme.md +18 -0
  682. package/node_modules/queue/LICENSE +8 -0
  683. package/node_modules/queue/index.d.ts +173 -0
  684. package/node_modules/queue/index.js +195 -0
  685. package/node_modules/queue/package.json +43 -0
  686. package/node_modules/queue/readme.md +221 -0
  687. package/node_modules/readable-stream/.travis.yml +34 -0
  688. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  689. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  690. package/node_modules/readable-stream/LICENSE +47 -0
  691. package/node_modules/readable-stream/README.md +58 -0
  692. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  693. package/node_modules/readable-stream/duplex-browser.js +1 -0
  694. package/node_modules/readable-stream/duplex.js +1 -0
  695. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  696. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  697. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  698. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  699. package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
  700. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
  701. package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
  702. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  703. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  704. package/node_modules/readable-stream/package.json +52 -0
  705. package/node_modules/readable-stream/passthrough.js +1 -0
  706. package/node_modules/readable-stream/readable-browser.js +7 -0
  707. package/node_modules/readable-stream/readable.js +19 -0
  708. package/node_modules/readable-stream/transform.js +1 -0
  709. package/node_modules/readable-stream/writable-browser.js +1 -0
  710. package/node_modules/readable-stream/writable.js +8 -0
  711. package/node_modules/safe-buffer/LICENSE +21 -0
  712. package/node_modules/safe-buffer/README.md +584 -0
  713. package/node_modules/safe-buffer/index.d.ts +187 -0
  714. package/node_modules/safe-buffer/index.js +62 -0
  715. package/node_modules/safe-buffer/package.json +37 -0
  716. package/node_modules/setimmediate/LICENSE.txt +20 -0
  717. package/node_modules/setimmediate/package.json +30 -0
  718. package/node_modules/setimmediate/setImmediate.js +186 -0
  719. package/node_modules/string_decoder/.travis.yml +50 -0
  720. package/node_modules/string_decoder/LICENSE +48 -0
  721. package/node_modules/string_decoder/README.md +47 -0
  722. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  723. package/node_modules/string_decoder/package.json +31 -0
  724. package/node_modules/undici-types/README.md +6 -0
  725. package/node_modules/undici-types/agent.d.ts +31 -0
  726. package/node_modules/undici-types/api.d.ts +43 -0
  727. package/node_modules/undici-types/balanced-pool.d.ts +18 -0
  728. package/node_modules/undici-types/cache.d.ts +36 -0
  729. package/node_modules/undici-types/client.d.ts +97 -0
  730. package/node_modules/undici-types/connector.d.ts +34 -0
  731. package/node_modules/undici-types/content-type.d.ts +21 -0
  732. package/node_modules/undici-types/cookies.d.ts +28 -0
  733. package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  734. package/node_modules/undici-types/dispatcher.d.ts +241 -0
  735. package/node_modules/undici-types/errors.d.ts +128 -0
  736. package/node_modules/undici-types/fetch.d.ts +209 -0
  737. package/node_modules/undici-types/file.d.ts +39 -0
  738. package/node_modules/undici-types/filereader.d.ts +54 -0
  739. package/node_modules/undici-types/formdata.d.ts +108 -0
  740. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  741. package/node_modules/undici-types/global-origin.d.ts +7 -0
  742. package/node_modules/undici-types/handlers.d.ts +9 -0
  743. package/node_modules/undici-types/header.d.ts +4 -0
  744. package/node_modules/undici-types/index.d.ts +63 -0
  745. package/node_modules/undici-types/interceptors.d.ts +5 -0
  746. package/node_modules/undici-types/mock-agent.d.ts +50 -0
  747. package/node_modules/undici-types/mock-client.d.ts +25 -0
  748. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  749. package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  750. package/node_modules/undici-types/mock-pool.d.ts +25 -0
  751. package/node_modules/undici-types/package.json +55 -0
  752. package/node_modules/undici-types/patch.d.ts +71 -0
  753. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  754. package/node_modules/undici-types/pool.d.ts +28 -0
  755. package/node_modules/undici-types/proxy-agent.d.ts +30 -0
  756. package/node_modules/undici-types/readable.d.ts +61 -0
  757. package/node_modules/undici-types/webidl.d.ts +220 -0
  758. package/node_modules/undici-types/websocket.d.ts +131 -0
  759. package/node_modules/util-deprecate/History.md +16 -0
  760. package/node_modules/util-deprecate/LICENSE +24 -0
  761. package/node_modules/util-deprecate/README.md +53 -0
  762. package/node_modules/util-deprecate/browser.js +67 -0
  763. package/node_modules/util-deprecate/node.js +6 -0
  764. package/node_modules/util-deprecate/package.json +27 -0
  765. package/package.json +54 -21
  766. package/services.json +1 -20
@@ -0,0 +1,68 @@
1
+ /**
2
+ * deck 净化闸:落盘前把内联 `data:image/…;base64,…` 抽进对象资产仓(assetStore),
3
+ * deck 里只留 `<urlBase>/media/<sha256>` 引用。
4
+ *
5
+ * 为什么需要:稿件路径的图片早已进仓(@media→URL),但画布粘贴 / pptx 导入 /
6
+ * 旧稿会把整张图的 base64 直接塞进 el.src,一份 deck 动辄几百 KB——违反
7
+ * 「结构化进库、非结构化只存引用」的原则。这道闸在 writeState 落盘前兜住所有
8
+ * 写入路径(runBatch / state 镜像都经它),把字节挪进内容寻址仓。
9
+ *
10
+ * URL 用 /media/<sha>:这是 deck 的规范地址(稿件 expandMediaRefs 也展开成它),
11
+ * 物理上由统一资产仓(assets/)经 /media 别名路由直出——与稿件落盘形式一致,
12
+ * inSync/diff 不会因为地址方案不同而误判。
13
+ *
14
+ * 同步约定:assetStore.put 声明 async 但函数体全同步(file/workspace 后端皆然),
15
+ * 副作用在返回 Promise 前就写就。这里本地算 sha、调用 put 触发同步写,再用
16
+ * has() 复核——万一某个后端真异步(has 此刻为 false),就保留原 data URI 不丢数据。
17
+ */
18
+ import crypto from 'node:crypto'
19
+
20
+ const DATA_IMAGE = /^data:(image\/[a-z0-9.+-]+);base64,/i
21
+ /* 小于这个长度的 data URI 多是占位/图标,不值得进仓,留在原地。 */
22
+ const MIN_EXTRACT = 2048
23
+
24
+ function sha256(buffer) {
25
+ return crypto.createHash('sha256').update(buffer).digest('hex')
26
+ }
27
+
28
+ /**
29
+ * @param {{ assetStore: object, urlBase: string }} opts
30
+ * @returns {(doc: object) => object} 同步净化器(就地改 doc.deck,返回 doc)
31
+ */
32
+ export function makeDeckSanitizer({ assetStore, urlBase }) {
33
+ const base = String(urlBase || '').replace(/\/+$/, '')
34
+ return function sanitize(doc) {
35
+ if (!assetStore || !doc || typeof doc !== 'object') return doc
36
+ const deck = doc.deck
37
+ if (!deck || typeof deck !== 'object') return doc
38
+ let extracted = 0
39
+ const walk = (node) => {
40
+ if (!node || typeof node !== 'object') return
41
+ if (Array.isArray(node)) { for (const item of node) walk(item); return }
42
+ for (const key of Object.keys(node)) {
43
+ const value = node[key]
44
+ if (typeof value === 'string') {
45
+ const m = DATA_IMAGE.exec(value)
46
+ if (m && value.length >= MIN_EXTRACT) {
47
+ try {
48
+ const buf = Buffer.from(value.slice(m[0].length), 'base64')
49
+ if (buf.length) {
50
+ const id = sha256(buf)
51
+ assetStore.put(buf, m[1].toLowerCase())
52
+ if (assetStore.has(id)) {
53
+ node[key] = `${base}/media/${id}`
54
+ extracted += 1
55
+ }
56
+ }
57
+ } catch { /* 抽取失败保留原值,不丢数据 */ }
58
+ }
59
+ } else if (value && typeof value === 'object') {
60
+ walk(value)
61
+ }
62
+ }
63
+ }
64
+ walk(deck)
65
+ if (extracted) doc.__sanitized = (doc.__sanitized | 0) + extracted
66
+ return doc
67
+ }
68
+ }
@@ -0,0 +1,56 @@
1
+ /** PPT 兼容层:标准会话信封 + PPT 的 deck 初始文档与标题同步。 */
2
+ import {
3
+ applyAck as baseAck,
4
+ applyPush as basePush,
5
+ applyServer as baseServer,
6
+ applyShotRequest as baseShotRequest,
7
+ applyShotResult as baseShotResult,
8
+ applyState as baseState,
9
+ applyUi as baseUi,
10
+ createSessionState,
11
+ pendingOf,
12
+ } from '@capyclaw/document-workbench/session'
13
+
14
+ export const EMPTY_DECK = () => ({ title: '', slides: [] })
15
+
16
+ /* 空稿子也要有 `deck` 键:编辑器靠「有没有这份文档」判断要不要清空画布,
17
+ * 缺键会被当成「还没有文档」而保留它自带的示例页(界面 4 页、工具 0 页)。
18
+ * 老 state 文件经 DocumentSession._load 的 `{...initialDoc, ...state}` 合并后
19
+ * 也会补上这个键。 */
20
+ export const EMPTY_DOC = () => createSessionState({ title: '', deck: EMPTY_DECK() })
21
+
22
+ export function applyPush(doc, cmds, title, now) {
23
+ return basePush(doc, cmds, title, now)
24
+ }
25
+
26
+ export function applyServer(doc, seq, applied, error, now) {
27
+ return baseServer(doc, seq, applied, error, {
28
+ now,
29
+ stateCompact: true,
30
+ onApplied: (next) => {
31
+ if (next.title && next.deck) next.deck.title = next.title
32
+ },
33
+ })
34
+ }
35
+
36
+ export function applyAck(doc, seq, applied, error, now) {
37
+ return baseAck(doc, seq, applied, error, now)
38
+ }
39
+
40
+ export function applyState(doc, deck, seq, now) {
41
+ return baseState(doc, deck, seq, { now, documentKey: 'deck' })
42
+ }
43
+
44
+ export function applyUi(doc, cmds, now) {
45
+ return baseUi(doc, cmds, now)
46
+ }
47
+
48
+ export function applyShotRequest(doc, opts, now) {
49
+ return baseShotRequest(doc, opts, now ? { now } : {})
50
+ }
51
+
52
+ export function applyShotResult(doc, req, data, now) {
53
+ return baseShotResult(doc, req, data, now)
54
+ }
55
+
56
+ export { pendingOf }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * PPT 桥存储 facade:通用版本化会话来自 @capyclaw/document-workbench,
3
+ * 本文件只保留 deck 的初始文档、summary 与标题同步。
4
+ */
5
+ import { DocumentSession, OWNER_TTL } from '@capyclaw/document-workbench/session'
6
+ import { FileBridgeBackend } from './backends/file-backend.mjs'
7
+ import { EMPTY_DOC } from './doc.mjs'
8
+
9
+ export * from './sanitize.mjs'
10
+ export { OWNER_TTL, FileBridgeBackend }
11
+
12
+ export class BridgeStore extends DocumentSession {
13
+ constructor(fileOrOptions) {
14
+ let backend
15
+ if (typeof fileOrOptions === 'string') backend = new FileBridgeBackend(fileOrOptions)
16
+ else if (fileOrOptions && fileOrOptions.backend) backend = fileOrOptions.backend
17
+ else throw new Error('BridgeStore 需要 file 路径或 backend')
18
+
19
+ super({
20
+ backend,
21
+ initialDoc: EMPTY_DOC(),
22
+ documentKey: 'deck',
23
+ stateCompact: true,
24
+ summary: (doc) => ({
25
+ title: doc.deck && doc.deck.title ? doc.deck.title : '未命名',
26
+ slides: doc.deck && Array.isArray(doc.deck.slides) ? doc.deck.slides.length : 0,
27
+ }),
28
+ checkpointDocument: () => ({ title: '未命名', slides: [] }),
29
+ onApplied: (doc) => {
30
+ if (doc.title && doc.deck) doc.deck.title = doc.title
31
+ },
32
+ })
33
+ }
34
+ }
@@ -0,0 +1,9 @@
1
+ /** journal:把事件写入 backend(失败不影响主流程)。 */
2
+
3
+ export function appendJournal(backend, event) {
4
+ backend.appendJournal(event)
5
+ }
6
+
7
+ export function journalTail(backend, limit = 8) {
8
+ return backend.journalTail(limit)
9
+ }
@@ -0,0 +1,2 @@
1
+ /** 兼容层:deck owner 租约的通用实现位于 @capyclaw/document-workbench/session。 */
2
+ export { OWNER_TTL, claimOwner, ownerStatus, releaseOwner } from '@capyclaw/document-workbench/session'
@@ -0,0 +1,33 @@
1
+ /** 桥协议白名单:通用信封来自 @capyclaw/document-workbench,PPT 只需声明 deck 字段与上限。 */
2
+ import { createSessionSanitizers } from '@capyclaw/document-workbench/session'
3
+
4
+ export const MAX_CMDS = 100 // 单队指令条数上限
5
+ export const MAX_TOTAL = 8 * 1024 * 1024 // 单队总量上限(字节)
6
+ export const MAX_SHOT = 4 * 1024 * 1024 // 截图 dataURL 上限
7
+
8
+ const sanitizers = createSessionSanitizers({
9
+ documentKey: 'deck',
10
+ maxCmds: MAX_CMDS,
11
+ maxTotal: MAX_TOTAL,
12
+ maxShot: MAX_SHOT,
13
+ maxTitle: 120,
14
+ maxError: 2000,
15
+ maxId: 64,
16
+ })
17
+
18
+ const {
19
+ sanitizeAck,
20
+ sanitizeClaim,
21
+ sanitizePush,
22
+ sanitizeShotResult,
23
+ sanitizeState: baseSanitizeState,
24
+ } = sanitizers
25
+
26
+ export { sanitizeAck, sanitizeClaim, sanitizePush, sanitizeShotResult }
27
+
28
+ /** 兼容旧 API:返回 { deck, seq };通用 bridge 会把它归一化为 value。
29
+ * E:clientId/sessionId 原样透传,供 journal 留痕与 validateState 会话一致性校验。 */
30
+ export function sanitizeState(body) {
31
+ const data = baseSanitizeState(body)
32
+ return data ? { deck: data.value, seq: data.seq, clientId: data.clientId, sessionId: data.sessionId } : null
33
+ }
@@ -0,0 +1,303 @@
1
+ /**
2
+ * 会话级 store:**每个会话一份独立 deck**。
3
+ *
4
+ * 之前 `ctx.store` 是一个 `BridgeStore` 单例,于是两个会话打开工作台看到的是
5
+ * 同一份稿子——地址按会话分了也没用,内容还是同一份。这里把「哪份稿子」变成
6
+ * 请求期属性:
7
+ *
8
+ * - 请求带会话(`/s/<会话id>/…` 被 service-host 剥掉后落在 `req.sessionId`)
9
+ * → 用该会话的 store;
10
+ * - 请求不带会话(MCP 工具)→ 用「最近聚焦的那个窗口」的会话,也就是用户此刻
11
+ * 正在看的会话;
12
+ * - 都没有 → `default` 那份,保证升级前就存在的稿子还在。
13
+ *
14
+ * **存储形态对齐 DSH 会话**:一个会话一个目录,目录名就是 DSH 的会话 id。
15
+ * 在 DSH 里落在 `$DSH_HOME/ppt-sessions/<会话id>/`(默认 `~/.dsh/ppt-sessions/`),
16
+ * 里面是 `deck.json`(当前状态快照)+ `journal.jsonl`(append-only 追加日志)+
17
+ * `checkpoints/`——和 `~/.dsh/sessions/<workspace>/<会话id>/session.v4.jsonl.zstd`
18
+ * 一一对应,人能直接翻,删一个目录就清掉一个会话的稿子。
19
+ *
20
+ * 不写进 DSH 自己的 `sessions/` 目录:那个目录归 DSH 管(清理/迁移会话都在动它),
21
+ * 插件往里写不在 ABI 承诺里,容易在 DSH 升级时被一起带走。
22
+ *
23
+ * 旧数据迁移(只做一次,`<sessionsHome>/.seeded` 标记):
24
+ * 1. 上一版的 `<sessionsHome>/<会话id>/state.json`;
25
+ * 2. 再上一版 work store 里的 `sessions/<会话id>/state.json`;
26
+ * 3. 拆库前的全局 `state.json`(文件 `<hostDir>/state.json` 或 work 里的 `state.json`)。
27
+ *
28
+ * 租约天然隔离:每份 store 有自己的 doc(`documentKey: 'deck'` 不变),owner 写在
29
+ * 各自的 doc 里,两个会话可以同时各有一个活着的编辑器。
30
+ */
31
+ import fs from 'node:fs'
32
+ import os from 'node:os'
33
+ import path from 'node:path'
34
+ import { BridgeStore } from './index.mjs'
35
+ import { currentSession } from '../session-context.mjs'
36
+
37
+ export const DEFAULT_SESSION = 'default'
38
+ export const DECK_FILE = 'deck.json'
39
+
40
+ /** 会话目录的根:DSH 里是 `$DSH_HOME/ppt-sessions`,独立运行是 `<hostDir>/sessions`。 */
41
+ export function sessionsHomeFor({ hostDir, embedded = false, env = process.env } = {}) {
42
+ const explicit = String(env.PPT_SESSIONS_HOME || '').trim()
43
+ if (explicit) return path.resolve(explicit)
44
+ if (embedded) return path.join(path.resolve(env.DSH_HOME || path.join(os.homedir(), '.dsh')), 'ppt-sessions')
45
+ return path.join(path.resolve(hostDir || '.'), 'sessions')
46
+ }
47
+ /* 与 gateway / service-host 的会话段同一形状,避免目录穿越。 */
48
+ const SID_RE = /^[A-Za-z0-9][A-Za-z0-9._~-]{0,127}$/
49
+
50
+ export function normalizeSessionId(value) {
51
+ const sid = String(value || '').trim()
52
+ return SID_RE.test(sid) ? sid : ''
53
+ }
54
+
55
+ /* (workId, key, …) 形态的方法:只把这些的键前缀化,别的照原样绑定,
56
+ * 免得把 `ensureWork(workId, options)` 的 options 当成键。 */
57
+ const KEYED_METHODS = new Set(['put', 'putJson', 'get', 'getJson', 'append', 'delete', 'tail'])
58
+
59
+ /**
60
+ * 给 workspace 客户端套一层会话前缀。现在只用来**读旧数据**:上一版把每个会话的
61
+ * deck 存在 work 里的 `sessions/<会话id>/state.json` 键上,迁移时按同样的前缀取回来。
62
+ */
63
+ export function scopedWorkspaceClient(client, prefix) {
64
+ return new Proxy(client, {
65
+ get(target, prop) {
66
+ if (prop === 'list') {
67
+ /* checkpoint 列表要过滤,否则一个会话会看到所有会话的检查点。 */
68
+ return (workId, ...rest) => target.list(workId, ...rest)
69
+ .filter((item) => item && typeof item.key === 'string' && item.key.startsWith(prefix))
70
+ .map((item) => ({ ...item, key: item.key.slice(prefix.length) }))
71
+ }
72
+ const value = target[prop]
73
+ if (typeof value !== 'function') return value
74
+ if (!KEYED_METHODS.has(prop)) return value.bind(target)
75
+ return (workId, key, ...rest) => value.call(target, workId, prefix + key, ...rest)
76
+ },
77
+ })
78
+ }
79
+
80
+ export class SessionStores {
81
+ constructor({ hostDir, backend = null, sessionsHome = '', getWorkStore = null } = {}) {
82
+ if (!hostDir) throw new Error('SessionStores 需要 hostDir')
83
+ this.hostDir = hostDir
84
+ /* 真机形态下 DSH 会塞一个 workspace 后端进来。它现在只当「旧数据的来源」用:
85
+ * 新数据一律写本地会话目录,形态才和 DSH 会话一致、也能直接翻。 */
86
+ this.backend = backend || null
87
+ /* embedded 只认真实 workspace 后端(带 client):测试注入的内存后端不是
88
+ * 宿主内嵌形态,必须留在 hostDir/sessions 里,否则多个测试 relay 会共用
89
+ * $DSH_HOME/ppt-sessions 的全局 default 文档,互相串写。 */
90
+ this.sessionsHome = sessionsHome
91
+ ? path.resolve(sessionsHome)
92
+ : sessionsHomeFor({ hostDir, embedded: !!(backend && backend.client) })
93
+ this.active = ''
94
+ this.cache = new Map()
95
+ /* 通用作品底座(@capyclaw/work-store)的懒解析器:宿主 provide 了 ctx.workStore
96
+ * 就由 relay 的 prepare 钩子塞进来。解析成功 ⇒ deck 落 SQLite 作品库;解析不到
97
+ * (独立运行 / 底座未装载 / 版本不符)⇒ 优雅降级回文件后端,行为与从前完全一致。 */
98
+ this.getWorkStore = getWorkStore
99
+ this._workStore = null
100
+ this.sanitizer = null
101
+ }
102
+
103
+ /** relay prepare 钩子在 createStore 之后、首个请求之前塞入懒解析器。 */
104
+ setWorkStore(getter) {
105
+ this.getWorkStore = getter || null
106
+ this._workStore = null
107
+ /* 解析器换了,旧句柄绑定的每会话 store 一律作废,下次访问重建。 */
108
+ this.cache.clear()
109
+ }
110
+
111
+ /** 落盘净化器(base64 闸):由 relay prepare 注入,绑定 assetStore + urlBase。 */
112
+ setDeckSanitizer(fn) {
113
+ this.sanitizer = typeof fn === 'function' ? fn : null
114
+ }
115
+
116
+ /**
117
+ * 现取并校验底座服务(major 1)。**不缓存死句柄**:work-store 被宿主重载
118
+ * (disable→enable)后是一个全新实例,旧实例的 SQLite statements 已 finalize,
119
+ * 拿着旧句柄只会一直撞 "statement has been finalized"。所以每次现取当前服务,
120
+ * 与上次比对身份——拿到不同的有效实例(首次解析 或 宿主重载)就清空每会话缓存,
121
+ * 让下一次 create 用新底座重建 backend。暂取不到(null / 重载窗口)时保留旧缓存,
122
+ * 避免抖动;未就绪下次再试。
123
+ */
124
+ resolveWorkStore() {
125
+ let ws = null
126
+ try {
127
+ const cur = typeof this.getWorkStore === 'function' ? this.getWorkStore() : this.getWorkStore
128
+ if (cur && cur.api && cur.api.name === 'workStore' && typeof cur.backendFor === 'function'
129
+ && String(cur.api.version || '1.0.0').split('.')[0] === '1') {
130
+ ws = cur
131
+ }
132
+ } catch { /* 解析失败就当没有底座,降级文件 */ }
133
+ if (ws && ws !== this._workStore) {
134
+ this._workStore = ws
135
+ this.cache.clear()
136
+ }
137
+ return this._workStore || null
138
+ }
139
+
140
+ /** 已经出现过的会话(不含 fallback)。 */
141
+ sessions() {
142
+ return [...this.cache.keys()].filter((key) => key !== DEFAULT_SESSION)
143
+ }
144
+
145
+ /** 拆库前那份全局稿子归了哪个会话(没迁过就是空串)。 */
146
+ legacySeedOwner() {
147
+ try {
148
+ return fs.readFileSync(path.join(this.sessionsHome, '.seeded'), 'utf8').trim()
149
+ } catch { return '' }
150
+ }
151
+
152
+ /** 当前请求解析到的会话键(不带 store)。 */
153
+ currentKey() {
154
+ return normalizeSessionId(currentSession()) || normalizeSessionId(this.active) || DEFAULT_SESSION
155
+ }
156
+
157
+ activeSession() {
158
+ return this.active
159
+ }
160
+
161
+ /** 记下「用户现在在看哪个会话的窗口」。 */
162
+ setActive(value) {
163
+ const sid = normalizeSessionId(value)
164
+ if (sid) this.active = sid
165
+ return this.active
166
+ }
167
+
168
+ forSession(value) {
169
+ const key = normalizeSessionId(value) || DEFAULT_SESSION
170
+ /* 命中缓存也要先验底座新鲜度:缓存里的 store 绑的是解析时的 backend,
171
+ * 底座重载后必须作废重建,否则一直撞 finalized statements。 */
172
+ this.resolveWorkStore()
173
+ let store = this.cache.get(key)
174
+ if (!store) {
175
+ store = this.create(key)
176
+ this.cache.set(key, store)
177
+ }
178
+ return store
179
+ }
180
+
181
+ /** 会话目录:`<sessionsHome>/<会话id>/`,和 DSH 的会话目录一一对应。 */
182
+ sessionDir(key) {
183
+ return path.join(this.sessionsHome, key)
184
+ }
185
+
186
+ create(key) {
187
+ const dir = this.sessionDir(key)
188
+ const file = path.join(dir, DECK_FILE)
189
+ const ws = this.resolveWorkStore()
190
+ if (ws) {
191
+ /* 底座形态:deck 落 SQLite 作品库(自然键 ppt:deck:<会话id>)。
192
+ * 旧文件数据在首次访问时一次性导入(只读种子,不覆盖已有库数据),
193
+ * 旧 deck.json 保留作备份。文件专属的崩溃安全由 SQLite WAL 接管。 */
194
+ const backend = ws.backendFor({ suite: 'ppt', kind: 'deck', sessionId: key, transform: this.sanitizer })
195
+ this.seedIntoDb(key, file, backend)
196
+ return new BridgeStore({ backend })
197
+ }
198
+ this.seed(key, file)
199
+ return new BridgeStore(file)
200
+ }
201
+
202
+ /** 把旧文件/三级 seed 数据导入 SQLite(仅当库里还没有这份作品时)。 */
203
+ seedIntoDb(key, file, backend) {
204
+ try {
205
+ if (backend.readState() != null) return
206
+ const state = readJson(file) || this.readSeed(key)
207
+ if (!state) return
208
+ backend.writeState(state)
209
+ } catch { /* 导入失败就当新会话,不能因此起不来 */ }
210
+ }
211
+
212
+ /**
213
+ * 升级迁移:把旧位置的稿子搬到新的会话目录。
214
+ * 顺序是「越新越优先」——上一版已经按会话分过,那份最准;全局 state.json 只在
215
+ * 第一次出现会话时给一次,免得每个新会话都抄一遍别人的稿子。
216
+ */
217
+ seed(key, file) {
218
+ try {
219
+ if (fs.existsSync(file)) return
220
+ const state = this.readSeed(key)
221
+ if (!state) return
222
+ fs.mkdirSync(path.dirname(file), { recursive: true })
223
+ fs.writeFileSync(file, JSON.stringify(state), 'utf8')
224
+ } catch { /* 迁移失败就当新会话,不能因此起不来 */ }
225
+ }
226
+
227
+ readSeed(key) {
228
+ /* 1) 上一版的文件布局:<sessionsHome>/<会话id>/state.json */
229
+ const previous = path.join(this.sessionDir(key), 'state.json')
230
+ const fromFile = readJson(previous)
231
+ if (fromFile) return fromFile
232
+
233
+ /* 2) 更早一版:work store 里按会话前缀的键。 */
234
+ const backend = this.backend
235
+ if (backend && typeof backend.client?.getJson === 'function') {
236
+ try {
237
+ const scoped = scopedWorkspaceClient(backend.client, `sessions/${key}/`)
238
+ const scopedState = scoped.getJson(backend.workId, 'state.json', null)
239
+ if (scopedState) return scopedState
240
+ } catch { /* 读不到就当没有 */ }
241
+ }
242
+
243
+ /* 3) 拆库前的全局稿子:只给第一个出现的会话,写 .seeded 记住。 */
244
+ const marker = path.join(this.sessionsHome, '.seeded')
245
+ if (fs.existsSync(marker)) return null
246
+ const legacyFile = readJson(path.join(this.hostDir, 'state.json'))
247
+ let legacy = legacyFile
248
+ if (!legacy && backend && typeof backend.client?.getJson === 'function') {
249
+ try { legacy = backend.client.getJson(backend.workId, 'state.json', null) } catch { legacy = null }
250
+ }
251
+ if (!legacy) return null
252
+ writeMarker(marker, key)
253
+ return legacy
254
+ }
255
+
256
+ /** 当前请求该用哪一份:请求里的会话 → 最近聚焦的窗口 → 默认那份。 */
257
+ current() {
258
+ return this.forSession(this.currentKey())
259
+ }
260
+ }
261
+
262
+ function readJson(file) {
263
+ try {
264
+ const parsed = JSON.parse(fs.readFileSync(file, 'utf8'))
265
+ return parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : null
266
+ } catch { return null }
267
+ }
268
+
269
+ function writeMarker(file, key) {
270
+ try {
271
+ fs.mkdirSync(path.dirname(file), { recursive: true })
272
+ fs.writeFileSync(file, String(key), 'utf8')
273
+ } catch { /* 标记失败最多多重一次迁移 */ }
274
+ }
275
+
276
+ /**
277
+ * 给路由用的 store 门面:每次属性访问/方法调用都现场解析成当前会话的 store。
278
+ * 路由闭包在装配时就拿到了它,所以整个请求链(bridge/manuscript/import/jsonP)
279
+ * 都不需要知道会话是怎么来的。
280
+ */
281
+ export function createSessionStoreFacade(stores) {
282
+ const target = { __stores: stores }
283
+ return new Proxy(target, {
284
+ get(t, prop, receiver) {
285
+ if (prop === '__stores') return stores
286
+ /* 别把 then/toJSON 之类转成 store 上的方法,否则会被当成 thenable。 */
287
+ if (typeof prop === 'symbol' || prop === 'then' || prop === 'toJSON') {
288
+ return Reflect.get(t, prop, receiver)
289
+ }
290
+ const store = stores.current()
291
+ const value = store[prop]
292
+ return typeof value === 'function' ? value.bind(store) : value
293
+ },
294
+ set(t, prop, value) {
295
+ if (prop === '__stores') return true
296
+ stores.current()[prop] = value
297
+ return true
298
+ },
299
+ has(t, prop) {
300
+ return prop === '__stores' || prop in stores.current()
301
+ },
302
+ })
303
+ }
@@ -0,0 +1,2 @@
1
+ /** 兼容入口:桥存储已拆到 server/store/*。 */
2
+ export * from './store/index.mjs'
@@ -0,0 +1,33 @@
1
+ /** 底层指令逃生口:一次提交任意 op 数组。 */
2
+ import { okText } from '../domains/tooling.mjs'
3
+ import { defineCapability, defineTool } from '../kernel/define.mjs'
4
+
5
+ export const applyCapability = defineCapability({
6
+ id: 'apply',
7
+ title: '底层指令',
8
+ tags: ['advanced'],
9
+ requires: ['deck'],
10
+ features: ['deck.write'],
11
+ tools: [
12
+ defineTool({
13
+ name: 'ppt_apply',
14
+ description: '通用逃生口:一次提交任意底层指令数组(load / update-slide / add-element / set-background / theme / …),复杂组合动作用。',
15
+ inputSchema: {
16
+ type: 'object',
17
+ properties: {
18
+ ops: { type: 'array', maxItems: 100, items: { type: 'object' }, description: '底层 op 数组(≤100)' },
19
+ title: { type: 'string', maxLength: 120, description: 'deck 标题(可选)' },
20
+ },
21
+ additionalProperties: false,
22
+ },
23
+ kind: 'write',
24
+ since: '1.0.0',
25
+ handler: async ({ ops, title }, ctx) => {
26
+ const list = Array.isArray(ops) ? ops : []
27
+ if (!list.length && !title) throw new Error('ops 为空且未提供 title:请提供操作或标题')
28
+ const r = await ctx.deck.write(list, title)
29
+ return okText(r, list.length ? `已应用 ${list.length} 条指令` : '已更新标题')
30
+ },
31
+ }),
32
+ ],
33
+ })
@@ -0,0 +1,28 @@
1
+ /** 确定性 deck 审计能力。 */
2
+ import { auditDeck } from '../../../core/audit.js'
3
+ import { mergeFindings } from '@capyclaw/document-workbench/model'
4
+ import { auditDeckModel } from '../model/deck-schema.mjs'
5
+ import { defineCapability, defineTool } from '../kernel/define.mjs'
6
+
7
+ export const auditCapability = defineCapability({
8
+ id: 'audit',
9
+ title: '确定性审计',
10
+ tags: ['read', 'quality'],
11
+ requires: ['deck'],
12
+ features: ['deck.audit'],
13
+ tools: [
14
+ defineTool({
15
+ name: 'ppt_audit',
16
+ description: '确定性审计当前 deck:文字越界/溢出/重叠、同文案重复、文字隐形/被遮挡、有效背景对比度、重复版式、配色漂移、重复图片、页面密度。返回 pass/blocking;交付前或截图前调用,pass=false 不得说审计通过。',
17
+ inputSchema: { type: 'object', properties: {}, additionalProperties: false },
18
+ kind: 'read',
19
+ since: '2.1.0',
20
+ handler: async (args, ctx) => {
21
+ const doc = await ctx.deck.read()
22
+ /* 领域审计 + 通用模型审计(重复 ID / 空页 / 越界 / 重复文案)。 */
23
+ const merged = mergeFindings(auditDeck(doc.deck), auditDeckModel(doc.deck))
24
+ return { text: JSON.stringify(merged, null, 2) }
25
+ },
26
+ }),
27
+ ],
28
+ })
@@ -0,0 +1,83 @@
1
+ /** 图表能力:把数据直接变成 PPTist 原生图表(echarts 渲染,不再手绘形状拼图)。 */
2
+ import { CHART_TYPES } from '../../../core/chart.js'
3
+ import { clamp, okText } from '../domains/tooling.mjs'
4
+ import { defineCapability, defineTool } from '../kernel/define.mjs'
5
+
6
+ const chartDataDesc =
7
+ '数据,支持多种格式:{labels:[...], series:[[...]]} / {labels:[...], values:[...]} 单系列 / ' +
8
+ '{headers:[...], rows:[[...]]} 表格式(首列类目,其余列系列) / {items:[[name,value]...]} 饼图式'
9
+
10
+ export const chartCapability = defineCapability({
11
+ id: 'chart',
12
+ title: '图表',
13
+ tags: ['write', 'data'],
14
+ requires: ['deck'],
15
+ features: ['deck.chart'],
16
+ tools: [
17
+ defineTool({
18
+ name: 'ppt_chart',
19
+ description:
20
+ '插入或更新图表(PPTist 原生 echarts 图表)。给定数据即可生成柱/条/折线/面积/饼/环/雷达/散点图,' +
21
+ '支持多种数据格式(labels+series、表格 rows、键值对 items)。带 element_id 时为更新已有图表。',
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ slide: { type: 'integer', description: '0 起页号,默认 0' },
26
+ chart_type: { type: 'string', enum: CHART_TYPES, description: '图表类型,新增必填' },
27
+ data: { type: 'object', description: chartDataDesc },
28
+ element_id: { type: 'string', description: '更新模式:要更新的图表元素 id' },
29
+ options: {
30
+ type: 'object',
31
+ description: '渲染选项 {lineSmooth?:折线平滑, stack?:堆叠}',
32
+ properties: {
33
+ lineSmooth: { type: 'boolean' },
34
+ stack: { type: 'boolean' },
35
+ },
36
+ additionalProperties: false,
37
+ },
38
+ colors: { type: 'array', items: { type: 'string' }, description: '系列配色(缺省用幻灯片主题色)' },
39
+ text_color: { type: 'string', description: '图表文字颜色' },
40
+ left: { type: 'number' },
41
+ top: { type: 'number' },
42
+ width: { type: 'number' },
43
+ height: { type: 'number' },
44
+ },
45
+ required: ['slide'],
46
+ additionalProperties: false,
47
+ },
48
+ kind: 'write',
49
+ since: '2.2.0',
50
+ handler: async (args, ctx) => {
51
+ const i = clamp(Number(args.slide) | 0, 0, 999)
52
+ const p = args || {}
53
+ if (p.element_id) {
54
+ const props = {}
55
+ if (p.chart_type) props.chartType = p.chart_type
56
+ if (p.data != null) props.data = p.data
57
+ if (p.options != null) props.options = p.options
58
+ if (Array.isArray(p.colors)) props.colors = p.colors
59
+ if (p.text_color) props.textColor = p.text_color
60
+ for (const k of ['left', 'top', 'width', 'height']) {
61
+ if (p[k] != null) props[k] = p[k]
62
+ }
63
+ const r = await ctx.deck.write([{ op: 'update-chart', slide: i, elementId: String(p.element_id), props }])
64
+ return okText(r, `已更新图表 ${p.element_id}`)
65
+ }
66
+ if (!p.chart_type) throw new Error('新增图表需要 chart_type(' + CHART_TYPES.join('/') + ')')
67
+ if (p.data == null) throw new Error('新增图表需要 data(' + chartDataDesc + ')')
68
+ const element = {
69
+ chartType: p.chart_type,
70
+ data: p.data,
71
+ ...(p.options != null ? { options: p.options } : {}),
72
+ ...(Array.isArray(p.colors) ? { colors: p.colors } : {}),
73
+ ...(p.text_color ? { textColor: p.text_color } : {}),
74
+ }
75
+ for (const k of ['left', 'top', 'width', 'height']) {
76
+ if (p[k] != null) element[k] = p[k]
77
+ }
78
+ const r = await ctx.deck.write([{ op: 'add-chart', slide: i, element }])
79
+ return okText(r, `已在第 ${i} 页插入 ${p.chart_type} 图表`)
80
+ },
81
+ }),
82
+ ],
83
+ })