@capyclaw/ppt-suite 2.4.9 → 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.
- package/README.md +45 -42
- package/composition.lock.json +46 -70
- package/contract/ppt-contract.json +310 -11
- package/cordis.patch.yml +5 -25
- package/dsh-suite.json +108 -194
- package/lib/index.mjs +1 -1
- package/node_modules/@capyclaw/asset-service/README.md +48 -0
- package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
- package/node_modules/@capyclaw/asset-service/package.json +59 -0
- package/node_modules/@capyclaw/asset-service/src/index.mjs +223 -0
- package/node_modules/@capyclaw/document-workbench/README.md +125 -0
- package/node_modules/@capyclaw/document-workbench/package.json +44 -0
- package/node_modules/@capyclaw/document-workbench/src/bridge/index.mjs +321 -0
- package/node_modules/@capyclaw/document-workbench/src/client/index.mjs +625 -0
- package/node_modules/@capyclaw/document-workbench/src/client/screenshot.mjs +98 -0
- package/node_modules/@capyclaw/document-workbench/src/index.mjs +9 -0
- package/node_modules/@capyclaw/document-workbench/src/model/audit.mjs +101 -0
- package/node_modules/@capyclaw/document-workbench/src/model/conformance.mjs +92 -0
- package/node_modules/@capyclaw/document-workbench/src/model/ids.mjs +56 -0
- package/node_modules/@capyclaw/document-workbench/src/model/index.mjs +18 -0
- package/node_modules/@capyclaw/document-workbench/src/model/locate.mjs +118 -0
- package/node_modules/@capyclaw/document-workbench/src/model/manifest.mjs +148 -0
- package/node_modules/@capyclaw/document-workbench/src/model/ops.mjs +160 -0
- package/node_modules/@capyclaw/document-workbench/src/model/validate.mjs +72 -0
- package/node_modules/@capyclaw/document-workbench/src/ops/index.mjs +93 -0
- package/node_modules/@capyclaw/document-workbench/src/session/context.mjs +91 -0
- package/node_modules/@capyclaw/document-workbench/src/session/index.mjs +394 -0
- package/node_modules/@capyclaw/document-workbench/src/session/lease.mjs +105 -0
- package/node_modules/@capyclaw/document-workbench/src/session/mode.mjs +80 -0
- package/node_modules/@capyclaw/document-workbench/src/session/sanitize.mjs +107 -0
- package/node_modules/@capyclaw/document-workbench/src/session/state.mjs +159 -0
- package/node_modules/@capyclaw/document-workbench/src/session/watch.mjs +63 -0
- package/node_modules/@capyclaw/document-workbench/src/store/file-backend.mjs +158 -0
- package/node_modules/@capyclaw/document-workbench/src/testing/index.mjs +75 -0
- package/node_modules/@capyclaw/editor-host/README.md +37 -0
- package/node_modules/@capyclaw/editor-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/editor-host/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/editor-host/lib/host.mjs +14 -0
- package/node_modules/@capyclaw/editor-host/package.json +59 -0
- package/node_modules/@capyclaw/editor-host/src/index.mjs +159 -0
- package/node_modules/@capyclaw/foundation/README.md +51 -0
- package/node_modules/@capyclaw/foundation/abi/bridge.mjs +86 -0
- package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
- package/node_modules/@capyclaw/foundation/abi/index.mjs +35 -0
- package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
- package/node_modules/@capyclaw/foundation/abi/loader.mjs +345 -0
- package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
- package/node_modules/@capyclaw/foundation/abi/spec.mjs +255 -0
- package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
- package/node_modules/@capyclaw/foundation/abi/version.mjs +82 -0
- package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
- package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +55 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +68 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +113 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
- package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
- package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +34 -0
- package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +85 -0
- package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +160 -0
- package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
- package/node_modules/@capyclaw/foundation/lib/kernel.mjs +185 -0
- package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +87 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +188 -0
- package/node_modules/@capyclaw/foundation/package.json +53 -0
- package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
- package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
- package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
- package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
- package/node_modules/@capyclaw/plugin-kit/package.json +69 -0
- package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
- package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +129 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +139 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
- package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
- package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +143 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
- package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +41 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
- package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
- package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +656 -0
- package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
- package/node_modules/@capyclaw/portal/README.md +70 -0
- package/node_modules/@capyclaw/portal/lib/index.mjs +387 -0
- package/node_modules/@capyclaw/portal/lib/ledger.mjs +194 -0
- package/node_modules/@capyclaw/portal/lib/portal-agent.ps1 +811 -0
- package/node_modules/@capyclaw/portal/lib/portal-darwin.mjs +183 -0
- package/node_modules/@capyclaw/portal/package.json +40 -0
- package/node_modules/@capyclaw/ppt-editor/LICENSE +661 -0
- package/node_modules/@capyclaw/ppt-editor/README.md +86 -0
- package/node_modules/@capyclaw/ppt-editor/THIRD_PARTY_NOTICES.md +21 -0
- package/node_modules/@capyclaw/ppt-editor/app.js +6298 -0
- package/node_modules/@capyclaw/ppt-editor/contract/ppt-contract.json +1828 -0
- package/node_modules/@capyclaw/ppt-editor/heartbeat-worker.js +129 -0
- package/node_modules/@capyclaw/ppt-editor/index.html +176 -0
- package/node_modules/@capyclaw/ppt-editor/lib/index.mjs +8 -0
- package/node_modules/@capyclaw/ppt-editor/package.json +57 -0
- package/node_modules/@capyclaw/ppt-editor/ppt-full-app.js +381 -0
- package/node_modules/@capyclaw/ppt-skill-api/README.md +3 -0
- package/node_modules/@capyclaw/ppt-skill-api/contract/ppt-contract.json +1828 -0
- package/node_modules/@capyclaw/ppt-skill-api/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/ppt-skill-api/package.json +49 -0
- package/node_modules/@capyclaw/ppt-skill-api/plugin.mjs +15 -0
- package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/SKILL.md +137 -0
- package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/references/tool-contract.md +1646 -0
- package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/references/visual-qa.md +28 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/README.md +3 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/contract/ppt-contract.json +1828 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/package.json +49 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/plugin.mjs +15 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/SKILL.md +83 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/anti-ai-slop.md +18 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/deck-structure.md +42 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/design-tokens.md +36 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/layout-system.md +30 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/page-craft.md +31 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/scqa-pyramid.md +26 -0
- package/node_modules/@capyclaw/ppt-workbench/LICENSE +661 -0
- package/node_modules/@capyclaw/ppt-workbench/README.md +173 -0
- package/node_modules/@capyclaw/ppt-workbench/THIRD_PARTY_NOTICES.md +21 -0
- package/node_modules/@capyclaw/ppt-workbench/contract/ppt-contract.json +1828 -0
- package/node_modules/@capyclaw/ppt-workbench/core/audit.js +507 -0
- package/node_modules/@capyclaw/ppt-workbench/core/chart.js +199 -0
- package/node_modules/@capyclaw/ppt-workbench/core/color.js +170 -0
- package/node_modules/@capyclaw/ppt-workbench/core/deck-layout.js +375 -0
- package/node_modules/@capyclaw/ppt-workbench/core/formula.js +80 -0
- package/node_modules/@capyclaw/ppt-workbench/core/hfmath/hershey.js +1763 -0
- package/node_modules/@capyclaw/ppt-workbench/core/hfmath/index.js +1176 -0
- package/node_modules/@capyclaw/ppt-workbench/core/hfmath/stretch.js +41 -0
- package/node_modules/@capyclaw/ppt-workbench/core/hfmath/symbols.js +408 -0
- package/node_modules/@capyclaw/ppt-workbench/core/inspect.js +366 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/compare.mjs +103 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/compile.mjs +322 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/edit.mjs +239 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/parse.mjs +346 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/render-html.mjs +84 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/sync.mjs +101 -0
- package/node_modules/@capyclaw/ppt-workbench/core/measure.js +104 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/browser.js +28 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/chart.js +64 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/deck.js +21 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/element.js +55 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/history.js +11 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/import.js +95 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/index.js +39 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/playback.js +9 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/recolor.js +87 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/slide.js +66 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/table.js +85 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/text.js +35 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/view.js +13 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops.js +12 -0
- package/node_modules/@capyclaw/ppt-workbench/core/quick.js +52 -0
- package/node_modules/@capyclaw/ppt-workbench/core/shape-library.js +122 -0
- package/node_modules/@capyclaw/ppt-workbench/core/table.js +178 -0
- package/node_modules/@capyclaw/ppt-workbench/core/text.js +200 -0
- package/node_modules/@capyclaw/ppt-workbench/lib/host.mjs +1 -0
- package/node_modules/@capyclaw/ppt-workbench/package.json +73 -0
- package/node_modules/@capyclaw/ppt-workbench/plugin.mjs +1 -0
- package/node_modules/@capyclaw/ppt-workbench/server/audit.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/bridge-client.mjs +308 -0
- package/node_modules/@capyclaw/ppt-workbench/server/constants.mjs +21 -0
- package/node_modules/@capyclaw/ppt-workbench/server/contract-snapshots.mjs +89 -0
- package/node_modules/@capyclaw/ppt-workbench/server/contract.mjs +24 -0
- package/node_modules/@capyclaw/ppt-workbench/server/deck-layout.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/editor-assets.mjs +132 -0
- package/node_modules/@capyclaw/ppt-workbench/server/embedded-host.mjs +252 -0
- package/node_modules/@capyclaw/ppt-workbench/server/http-utils.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/http.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/runtime/context.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/store/blob-store.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/tuning.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/util/fs-lock.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/workspace/manager.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/mcp/dispatch.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/mcp/handler.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/mcp/instructions.mjs +66 -0
- package/node_modules/@capyclaw/ppt-workbench/server/ppt-shim.mjs +168 -0
- package/node_modules/@capyclaw/ppt-workbench/server/relay.mjs +282 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/assets.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/bridge.mjs +74 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/editor.mjs +9 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/import.mjs +260 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/manuscript.mjs +414 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/mcp.mjs +17 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/session.mjs +29 -0
- package/node_modules/@capyclaw/ppt-workbench/server/runtime/recovery.mjs +9 -0
- package/node_modules/@capyclaw/ppt-workbench/server/runtime/watch.mjs +17 -0
- package/node_modules/@capyclaw/ppt-workbench/server/session-context.mjs +5 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/SHARED_MANIFEST.json +70 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/asset-service.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/editor-host.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/editor/lease.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/api.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/http.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/mcp-http.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/tools/validate.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/tuning.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/util/fs-lock.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/service-host.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/tool-host.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/tuning.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/backends/file-backend.mjs +13 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/checkpoints.mjs +28 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/deck-sanitize.mjs +68 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/doc.mjs +56 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/index.mjs +34 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/journal.mjs +9 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/lease.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/sanitize.mjs +33 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/sessions.mjs +303 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/apply.mjs +33 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/audit.mjs +28 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/chart.mjs +83 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/compose.mjs +97 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/contract.mjs +38 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/deck.mjs +27 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/element.mjs +67 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/export.mjs +99 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/formula.mjs +72 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/history.mjs +29 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/image.mjs +174 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/imagesearch.mjs +203 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/import.mjs +180 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/index.mjs +64 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/inspect.mjs +46 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/line.mjs +58 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/manuscript.mjs +208 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/notes.mjs +33 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/present.mjs +34 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/recolor.mjs +62 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/screenshot.mjs +191 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/shape.mjs +64 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/slide.mjs +81 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/style.mjs +48 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/table.mjs +127 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/task.mjs +52 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/text.mjs +82 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/color.mjs +4 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/image.mjs +78 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/index.mjs +7 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/manuscript-media.mjs +159 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/offline-render.mjs +256 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/pptx-export.mjs +577 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/recolor.mjs +25 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/remote-image.mjs +443 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/slide.mjs +21 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/text-style.mjs +11 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/tooling.mjs +13 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/index.mjs +14 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/define.mjs +5 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/ports.mjs +52 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/registry.mjs +17 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/model/deck-schema.mjs +105 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools.mjs +18 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tuning.mjs +93 -0
- package/node_modules/@capyclaw/ppt-workbench/server/validate.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/workbench-framework.mjs +305 -0
- package/node_modules/@capyclaw/service-broker/README.md +104 -0
- package/node_modules/@capyclaw/service-broker/cordis.patch.yml +8 -0
- package/node_modules/@capyclaw/service-broker/dsh-suite.json +21 -0
- package/node_modules/@capyclaw/service-broker/lib/control.mjs +193 -0
- package/node_modules/@capyclaw/service-broker/lib/discovery.mjs +109 -0
- package/node_modules/@capyclaw/service-broker/lib/engine.mjs +1236 -0
- package/node_modules/@capyclaw/service-broker/lib/host.mjs +182 -0
- package/node_modules/@capyclaw/service-broker/lib/manifest.mjs +249 -0
- package/node_modules/@capyclaw/service-broker/lib/recovery.mjs +325 -0
- package/node_modules/@capyclaw/service-broker/lib/skills-client.mjs +28 -0
- package/node_modules/@capyclaw/service-broker/lib/spec.mjs +78 -0
- package/node_modules/@capyclaw/service-broker/package.json +65 -0
- package/node_modules/@capyclaw/service-broker/server.mjs +81 -0
- package/node_modules/@capyclaw/service-broker/service.schema.json +62 -0
- package/node_modules/@capyclaw/service-broker/services.json +3 -0
- package/node_modules/@capyclaw/service-host/README.md +86 -0
- package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
- package/node_modules/@capyclaw/service-host/package.json +60 -0
- package/node_modules/@capyclaw/service-host/src/index.mjs +571 -0
- package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
- package/node_modules/@capyclaw/skills-service/README.md +31 -0
- package/node_modules/@capyclaw/skills-service/package.json +30 -0
- package/node_modules/@capyclaw/skills-service/server.mjs +237 -0
- package/node_modules/@capyclaw/tool-host/README.md +56 -0
- package/node_modules/@capyclaw/tool-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/tool-host/dsh-suite.json +30 -0
- package/node_modules/@capyclaw/tool-host/lib/host.mjs +16 -0
- package/node_modules/@capyclaw/tool-host/package.json +59 -0
- package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +142 -0
- package/node_modules/@capyclaw/tool-host/src/index.mjs +390 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/node/assert.d.ts +1005 -0
- package/node_modules/@types/node/async_hooks.d.ts +586 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +457 -0
- package/node_modules/@types/node/buffer.d.ts +1901 -0
- package/node_modules/@types/node/child_process.d.ts +1453 -0
- package/node_modules/@types/node/cluster.d.ts +578 -0
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/node_modules/@types/node/console.d.ts +452 -0
- package/node_modules/@types/node/constants.d.ts +21 -0
- package/node_modules/@types/node/crypto.d.ts +4504 -0
- package/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +551 -0
- package/node_modules/@types/node/dns/promises.d.ts +477 -0
- package/node_modules/@types/node/dns.d.ts +860 -0
- package/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@types/node/events.d.ts +863 -0
- package/node_modules/@types/node/fs/promises.d.ts +1208 -0
- package/node_modules/@types/node/fs.d.ts +4332 -0
- package/node_modules/@types/node/globals.d.ts +170 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +21 -0
- package/node_modules/@types/node/http.d.ts +1919 -0
- package/node_modules/@types/node/http2.d.ts +2580 -0
- package/node_modules/@types/node/https.d.ts +549 -0
- package/node_modules/@types/node/index.d.ts +92 -0
- package/node_modules/@types/node/inspector.generated.d.ts +2775 -0
- package/node_modules/@types/node/module.d.ts +503 -0
- package/node_modules/@types/node/net.d.ts +924 -0
- package/node_modules/@types/node/os.d.ts +480 -0
- package/node_modules/@types/node/package.json +145 -0
- package/node_modules/@types/node/path.d.ts +191 -0
- package/node_modules/@types/node/perf_hooks.d.ts +860 -0
- package/node_modules/@types/node/process.d.ts +1632 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +140 -0
- package/node_modules/@types/node/readline/promises.d.ts +154 -0
- package/node_modules/@types/node/readline.d.ts +715 -0
- package/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/node_modules/@types/node/stream/web.d.ts +527 -0
- package/node_modules/@types/node/stream.d.ts +1680 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/test.d.ts +1208 -0
- package/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/node_modules/@types/node/timers.d.ts +286 -0
- package/node_modules/@types/node/tls.d.ts +1204 -0
- package/node_modules/@types/node/trace_events.d.ts +171 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +455 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +92 -0
- package/node_modules/@types/node/tty.d.ts +206 -0
- package/node_modules/@types/node/url.d.ts +957 -0
- package/node_modules/@types/node/util.d.ts +2083 -0
- package/node_modules/@types/node/v8.d.ts +753 -0
- package/node_modules/@types/node/vm.d.ts +704 -0
- package/node_modules/@types/node/wasi.d.ts +160 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +81 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +38 -0
- package/node_modules/@types/node/worker_threads.d.ts +698 -0
- package/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/https/package.json +15 -0
- package/node_modules/image-size/LICENSE +9 -0
- package/node_modules/image-size/Readme.md +184 -0
- package/node_modules/image-size/bin/image-size.js +53 -0
- package/node_modules/image-size/dist/detector.d.ts +2 -0
- package/node_modules/image-size/dist/detector.js +30 -0
- package/node_modules/image-size/dist/index.d.ts +10 -0
- package/node_modules/image-size/dist/index.js +129 -0
- package/node_modules/image-size/dist/types/bmp.d.ts +2 -0
- package/node_modules/image-size/dist/types/bmp.js +11 -0
- package/node_modules/image-size/dist/types/cur.d.ts +2 -0
- package/node_modules/image-size/dist/types/cur.js +17 -0
- package/node_modules/image-size/dist/types/dds.d.ts +2 -0
- package/node_modules/image-size/dist/types/dds.js +11 -0
- package/node_modules/image-size/dist/types/gif.d.ts +2 -0
- package/node_modules/image-size/dist/types/gif.js +12 -0
- package/node_modules/image-size/dist/types/heif.d.ts +2 -0
- package/node_modules/image-size/dist/types/heif.js +40 -0
- package/node_modules/image-size/dist/types/icns.d.ts +2 -0
- package/node_modules/image-size/dist/types/icns.js +101 -0
- package/node_modules/image-size/dist/types/ico.d.ts +2 -0
- package/node_modules/image-size/dist/types/ico.js +68 -0
- package/node_modules/image-size/dist/types/index.d.ts +23 -0
- package/node_modules/image-size/dist/types/index.js +46 -0
- package/node_modules/image-size/dist/types/interface.d.ts +13 -0
- package/node_modules/image-size/dist/types/interface.js +2 -0
- package/node_modules/image-size/dist/types/j2c.d.ts +2 -0
- package/node_modules/image-size/dist/types/j2c.js +12 -0
- package/node_modules/image-size/dist/types/jp2.d.ts +2 -0
- package/node_modules/image-size/dist/types/jp2.js +27 -0
- package/node_modules/image-size/dist/types/jpg.d.ts +2 -0
- package/node_modules/image-size/dist/types/jpg.js +123 -0
- package/node_modules/image-size/dist/types/jxl-stream.d.ts +2 -0
- package/node_modules/image-size/dist/types/jxl-stream.js +45 -0
- package/node_modules/image-size/dist/types/jxl.d.ts +2 -0
- package/node_modules/image-size/dist/types/jxl.js +59 -0
- package/node_modules/image-size/dist/types/ktx.d.ts +2 -0
- package/node_modules/image-size/dist/types/ktx.js +19 -0
- package/node_modules/image-size/dist/types/png.d.ts +2 -0
- package/node_modules/image-size/dist/types/png.js +35 -0
- package/node_modules/image-size/dist/types/pnm.d.ts +2 -0
- package/node_modules/image-size/dist/types/pnm.js +72 -0
- package/node_modules/image-size/dist/types/psd.d.ts +2 -0
- package/node_modules/image-size/dist/types/psd.js +11 -0
- package/node_modules/image-size/dist/types/svg.d.ts +2 -0
- package/node_modules/image-size/dist/types/svg.js +90 -0
- package/node_modules/image-size/dist/types/tga.d.ts +2 -0
- package/node_modules/image-size/dist/types/tga.js +15 -0
- package/node_modules/image-size/dist/types/tiff.d.ts +2 -0
- package/node_modules/image-size/dist/types/tiff.js +95 -0
- package/node_modules/image-size/dist/types/utils.d.ts +15 -0
- package/node_modules/image-size/dist/types/utils.js +75 -0
- package/node_modules/image-size/dist/types/webp.d.ts +2 -0
- package/node_modules/image-size/dist/types/webp.js +60 -0
- package/node_modules/image-size/dist/utils/bit-reader.d.ts +10 -0
- package/node_modules/image-size/dist/utils/bit-reader.js +44 -0
- package/node_modules/image-size/package.json +81 -0
- package/node_modules/immediate/LICENSE.txt +20 -0
- package/node_modules/immediate/README.md +93 -0
- package/node_modules/immediate/dist/immediate.js +75 -0
- package/node_modules/immediate/dist/immediate.min.js +1 -0
- package/node_modules/immediate/lib/browser.js +69 -0
- package/node_modules/immediate/lib/index.js +73 -0
- package/node_modules/immediate/package.json +42 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +60 -0
- package/node_modules/isarray/component.json +19 -0
- package/node_modules/isarray/index.js +5 -0
- package/node_modules/isarray/package.json +45 -0
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/jszip/.codeclimate.yml +16 -0
- package/node_modules/jszip/.editorconfig +8 -0
- package/node_modules/jszip/.eslintrc.js +43 -0
- package/node_modules/jszip/CHANGES.md +210 -0
- package/node_modules/jszip/LICENSE.markdown +651 -0
- package/node_modules/jszip/README.markdown +33 -0
- package/node_modules/jszip/dist/jszip.js +11586 -0
- package/node_modules/jszip/dist/jszip.min.js +13 -0
- package/node_modules/jszip/index.d.ts +344 -0
- package/node_modules/jszip/lib/base64.js +106 -0
- package/node_modules/jszip/lib/compressedObject.js +74 -0
- package/node_modules/jszip/lib/compressions.js +14 -0
- package/node_modules/jszip/lib/crc32.js +77 -0
- package/node_modules/jszip/lib/defaults.js +11 -0
- package/node_modules/jszip/lib/external.js +18 -0
- package/node_modules/jszip/lib/flate.js +85 -0
- package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
- package/node_modules/jszip/lib/generate/index.js +57 -0
- package/node_modules/jszip/lib/index.js +55 -0
- package/node_modules/jszip/lib/license_header.js +11 -0
- package/node_modules/jszip/lib/load.js +88 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
- package/node_modules/jszip/lib/nodejsUtils.js +57 -0
- package/node_modules/jszip/lib/object.js +384 -0
- package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
- package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
- package/node_modules/jszip/lib/reader/DataReader.js +116 -0
- package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
- package/node_modules/jszip/lib/reader/StringReader.js +38 -0
- package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
- package/node_modules/jszip/lib/reader/readerFor.js +28 -0
- package/node_modules/jszip/lib/signature.js +7 -0
- package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
- package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
- package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
- package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
- package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
- package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
- package/node_modules/jszip/lib/support.js +38 -0
- package/node_modules/jszip/lib/utf8.js +275 -0
- package/node_modules/jszip/lib/utils.js +510 -0
- package/node_modules/jszip/lib/zipEntries.js +261 -0
- package/node_modules/jszip/lib/zipEntry.js +293 -0
- package/node_modules/jszip/lib/zipObject.js +133 -0
- package/node_modules/jszip/package.json +67 -0
- package/node_modules/jszip/sponsors.md +21 -0
- package/node_modules/jszip/tsconfig.json +101 -0
- package/node_modules/jszip/vendor/FileSaver.js +247 -0
- package/node_modules/lie/README.md +62 -0
- package/node_modules/lie/dist/lie.js +350 -0
- package/node_modules/lie/dist/lie.min.js +1 -0
- package/node_modules/lie/dist/lie.polyfill.js +358 -0
- package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
- package/node_modules/lie/lib/browser.js +273 -0
- package/node_modules/lie/lib/index.js +298 -0
- package/node_modules/lie/license.md +7 -0
- package/node_modules/lie/lie.d.ts +244 -0
- package/node_modules/lie/package.json +69 -0
- package/node_modules/lie/polyfill.js +4 -0
- package/node_modules/pako/LICENSE +21 -0
- package/node_modules/pako/README.md +191 -0
- package/node_modules/pako/dist/pako.js +6818 -0
- package/node_modules/pako/dist/pako.min.js +1 -0
- package/node_modules/pako/dist/pako_deflate.js +3997 -0
- package/node_modules/pako/dist/pako_deflate.min.js +1 -0
- package/node_modules/pako/dist/pako_inflate.js +3300 -0
- package/node_modules/pako/dist/pako_inflate.min.js +1 -0
- package/node_modules/pako/index.js +14 -0
- package/node_modules/pako/lib/deflate.js +400 -0
- package/node_modules/pako/lib/inflate.js +423 -0
- package/node_modules/pako/lib/utils/common.js +105 -0
- package/node_modules/pako/lib/utils/strings.js +187 -0
- package/node_modules/pako/lib/zlib/README +59 -0
- package/node_modules/pako/lib/zlib/adler32.js +51 -0
- package/node_modules/pako/lib/zlib/constants.js +68 -0
- package/node_modules/pako/lib/zlib/crc32.js +59 -0
- package/node_modules/pako/lib/zlib/deflate.js +1874 -0
- package/node_modules/pako/lib/zlib/gzheader.js +58 -0
- package/node_modules/pako/lib/zlib/inffast.js +345 -0
- package/node_modules/pako/lib/zlib/inflate.js +1556 -0
- package/node_modules/pako/lib/zlib/inftrees.js +343 -0
- package/node_modules/pako/lib/zlib/messages.js +32 -0
- package/node_modules/pako/lib/zlib/trees.js +1222 -0
- package/node_modules/pako/lib/zlib/zstream.js +47 -0
- package/node_modules/pako/package.json +44 -0
- package/node_modules/playwright-core/LICENSE +202 -0
- package/node_modules/playwright-core/NOTICE +5 -0
- package/node_modules/playwright-core/README.md +3 -0
- package/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/browsers.json +52 -0
- package/node_modules/playwright-core/cli.js +22 -0
- package/node_modules/playwright-core/index.d.ts +17 -0
- package/node_modules/playwright-core/index.js +17 -0
- package/node_modules/playwright-core/index.mjs +28 -0
- package/node_modules/playwright-core/lib/bootstrap.js +149 -0
- package/node_modules/playwright-core/lib/coreBundle.js +78041 -0
- package/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/playwright-core/lib/entry/mcp.js +10 -0
- package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/playwright-core/lib/package.js +50 -0
- package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/server/electron/loader.js +123 -0
- package/node_modules/playwright-core/lib/serverRegistry.js +1939 -0
- package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +65 -0
- package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/playwright-core/lib/tools/cli-client/cli.js +7 -0
- package/node_modules/playwright-core/lib/tools/cli-client/help.json +808 -0
- package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/playwright-core/lib/tools/cli-client/output.js +352 -0
- package/node_modules/playwright-core/lib/tools/cli-client/program.js +422 -0
- package/node_modules/playwright-core/lib/tools/cli-client/registry.js +180 -0
- package/node_modules/playwright-core/lib/tools/cli-client/session.js +261 -0
- package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +493 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/node_modules/playwright-core/lib/tools/utils/extension.js +112 -0
- package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/playwright-core/lib/utilsBundle.js +86078 -0
- package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +1890 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
- package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +32 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +7 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.oNry3Hjv.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CYwC_gH1.js +5 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/playwright-core/lib/webp_codec.LICENSE +173 -0
- package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/playwright-core/lib/xdg-open +1267 -0
- package/node_modules/playwright-core/package.json +34 -0
- package/node_modules/playwright-core/types/protocol.d.ts +24776 -0
- package/node_modules/playwright-core/types/structs.d.ts +52 -0
- package/node_modules/playwright-core/types/types.d.ts +27167 -0
- package/node_modules/pptxgenjs/LICENSE +21 -0
- package/node_modules/pptxgenjs/README.md +284 -0
- package/node_modules/pptxgenjs/dist/pptxgen.bundle.js +3 -0
- package/node_modules/pptxgenjs/dist/pptxgen.bundle.js.map +1 -0
- package/node_modules/pptxgenjs/dist/pptxgen.cjs.js +7445 -0
- package/node_modules/pptxgenjs/dist/pptxgen.es.js +7439 -0
- package/node_modules/pptxgenjs/dist/pptxgen.min.js +3 -0
- package/node_modules/pptxgenjs/dist/pptxgen.min.js.map +1 -0
- package/node_modules/pptxgenjs/package.json +89 -0
- package/node_modules/pptxgenjs/types/index.d.ts +2670 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/queue/LICENSE +8 -0
- package/node_modules/queue/index.d.ts +173 -0
- package/node_modules/queue/index.js +195 -0
- package/node_modules/queue/package.json +43 -0
- package/node_modules/queue/readme.md +221 -0
- package/node_modules/readable-stream/.travis.yml +34 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +58 -0
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/readable-stream/duplex-browser.js +1 -0
- package/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +52 -0
- package/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/readable-stream/readable-browser.js +7 -0
- package/node_modules/readable-stream/readable.js +19 -0
- package/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/readable-stream/writable-browser.js +1 -0
- package/node_modules/readable-stream/writable.js +8 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +62 -0
- package/node_modules/safe-buffer/package.json +37 -0
- package/node_modules/setimmediate/LICENSE.txt +20 -0
- package/node_modules/setimmediate/package.json +30 -0
- package/node_modules/setimmediate/setImmediate.js +186 -0
- package/node_modules/string_decoder/.travis.yml +50 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +31 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +97 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/node_modules/undici-types/errors.d.ts +128 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +9 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +63 -0
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +71 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +28 -0
- package/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/node_modules/undici-types/readable.d.ts +61 -0
- package/node_modules/undici-types/webidl.d.ts +220 -0
- package/node_modules/undici-types/websocket.d.ts +131 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/package.json +54 -21
- package/services.json +1 -20
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 编辑计划:定位器 + 补丁 → 规范化 op 列表(id/path 都已解析)。
|
|
3
|
+
*
|
|
4
|
+
* 分层原则:
|
|
5
|
+
* - 本模块只产出「要改哪个节点、改什么」,不假设引擎命令名;
|
|
6
|
+
* - 插件可以拿 plan 去映射自己的 exec 命令(setValue / updateById / patchElement…),
|
|
7
|
+
* 也可以直接用 applyPlan 做纯树改写(工具侧无引擎也能跑,便于测试)。
|
|
8
|
+
*/
|
|
9
|
+
import { locate } from './locate.mjs'
|
|
10
|
+
|
|
11
|
+
const isObj = (value) => !!value && typeof value === 'object' && !Array.isArray(value)
|
|
12
|
+
|
|
13
|
+
function parsePath(path) {
|
|
14
|
+
const m = /^p(\d+)\/n(\d+)((?:\/c\d+)*)$/.exec(String(path || ''))
|
|
15
|
+
if (!m) return null
|
|
16
|
+
const children = (m[3] || '').split('/').filter(Boolean).map((seg) => Number(seg.slice(1)))
|
|
17
|
+
return { page: Number(m[1]), node: Number(m[2]), children }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function targetOf(manifest, locator) {
|
|
21
|
+
const hit = locate(manifest, locator)
|
|
22
|
+
return { id: hit.id, path: hit.path, page: hit.page, index: hit.index, role: hit.role, type: hit.type }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param {object} manifest buildManifest 的结果
|
|
27
|
+
* @param {Array<{
|
|
28
|
+
* op?: 'update'|'remove'|'move'|'insert',
|
|
29
|
+
* locate?: object|string,
|
|
30
|
+
* patch?: object,
|
|
31
|
+
* page?: number,
|
|
32
|
+
* index?: number,
|
|
33
|
+
* node?: object,
|
|
34
|
+
* }>} edits
|
|
35
|
+
*/
|
|
36
|
+
export function planEdit(manifest, edits) {
|
|
37
|
+
const list = Array.isArray(edits) ? edits : [edits]
|
|
38
|
+
return list.map((edit, i) => {
|
|
39
|
+
if (!isObj(edit)) throw new Error(`第 ${i} 条编辑不是对象`)
|
|
40
|
+
const op = edit.op || 'update'
|
|
41
|
+
if (op === 'insert') {
|
|
42
|
+
if (!Number.isInteger(edit.page)) throw new Error(`第 ${i} 条 insert 缺少 page`)
|
|
43
|
+
return { op, page: edit.page, index: Number.isInteger(edit.index) ? edit.index : null, node: edit.node || {} }
|
|
44
|
+
}
|
|
45
|
+
const target = targetOf(manifest, edit.locate ?? edit.target ?? edit.id)
|
|
46
|
+
if (op === 'update') {
|
|
47
|
+
if (!isObj(edit.patch) || !Object.keys(edit.patch).length) throw new Error(`第 ${i} 条 update 缺少 patch`)
|
|
48
|
+
return { op, target, patch: edit.patch }
|
|
49
|
+
}
|
|
50
|
+
if (op === 'remove') return { op, target }
|
|
51
|
+
if (op === 'move') {
|
|
52
|
+
if (!Number.isInteger(edit.page)) throw new Error(`第 ${i} 条 move 缺少目标 page`)
|
|
53
|
+
return { op, target, page: edit.page, index: Number.isInteger(edit.index) ? edit.index : null }
|
|
54
|
+
}
|
|
55
|
+
throw new Error(`第 ${i} 条编辑的 op 不支持:${op}`)
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function listAt(doc, schema, path) {
|
|
60
|
+
const parsed = parsePath(path)
|
|
61
|
+
if (!parsed) return null
|
|
62
|
+
const pagesOf = schema.pages || ((d) => (Array.isArray(d?.pages) ? d.pages : Array.isArray(d?.slides) ? d.slides : d?.deck?.slides || [d]))
|
|
63
|
+
const nodesOf = schema.nodes || ((p) => (Array.isArray(p?.elements) ? p.elements : Array.isArray(p?.children) ? p.children : []))
|
|
64
|
+
const childrenOf = typeof schema.children === 'function' ? schema.children : () => null
|
|
65
|
+
const page = pagesOf(doc)?.[parsed.page]
|
|
66
|
+
if (!page) return null
|
|
67
|
+
let list = nodesOf(page, parsed.page)
|
|
68
|
+
let node = list?.[parsed.node]
|
|
69
|
+
for (const childIndex of parsed.children) {
|
|
70
|
+
if (!node) return null
|
|
71
|
+
list = childrenOf(node)
|
|
72
|
+
node = list?.[childIndex]
|
|
73
|
+
}
|
|
74
|
+
return { list, node, page, parsed }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function setText(node, text, schema) {
|
|
78
|
+
if (typeof schema.setText === 'function') {
|
|
79
|
+
schema.setText(node, text)
|
|
80
|
+
return
|
|
81
|
+
}
|
|
82
|
+
if ('value' in node && !('content' in node)) node.value = text
|
|
83
|
+
else if ('content' in node) node.content = text
|
|
84
|
+
else node.text = text
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function setBox(node, box) {
|
|
88
|
+
if (!isObj(box)) return
|
|
89
|
+
const { x, y, w, h } = box
|
|
90
|
+
if ('left' in node || 'top' in node) {
|
|
91
|
+
if (Number.isFinite(x)) node.left = x
|
|
92
|
+
if (Number.isFinite(y)) node.top = y
|
|
93
|
+
if (Number.isFinite(w)) node.width = w
|
|
94
|
+
if (Number.isFinite(h)) node.height = h
|
|
95
|
+
return
|
|
96
|
+
}
|
|
97
|
+
if (Number.isFinite(x)) node.x = x
|
|
98
|
+
if (Number.isFinite(y)) node.y = y
|
|
99
|
+
if (Number.isFinite(w)) node.w = w
|
|
100
|
+
if (Number.isFinite(h)) node.h = h
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function applyPatch(node, patch, schema) {
|
|
104
|
+
if (patch.text !== undefined) setText(node, patch.text, schema)
|
|
105
|
+
if (patch.box !== undefined) setBox(node, patch.box)
|
|
106
|
+
if (isObj(patch.style)) Object.assign(node, patch.style)
|
|
107
|
+
if (isObj(patch.attrs)) Object.assign(node, patch.attrs)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 纯树改写:不抛“找不到”(默认记 skipped),便于批量编辑一次返回全部问题。
|
|
112
|
+
* @returns {{ doc: object, applied: Array, skipped: Array }}
|
|
113
|
+
*/
|
|
114
|
+
export function applyPlan(doc, plan, schema = {}) {
|
|
115
|
+
const next = structuredClone(doc)
|
|
116
|
+
const applied = []
|
|
117
|
+
const skipped = []
|
|
118
|
+
for (const op of plan) {
|
|
119
|
+
if (op.op === 'insert') {
|
|
120
|
+
const pagesOf = schema.pages || ((d) => (Array.isArray(d?.pages) ? d.pages : Array.isArray(d?.slides) ? d.slides : d?.deck?.slides))
|
|
121
|
+
const nodesOf = schema.nodes || ((p) => (Array.isArray(p?.elements) ? p.elements : p.children || []))
|
|
122
|
+
const page = pagesOf(next)?.[op.page]
|
|
123
|
+
if (!page) { skipped.push({ op, reason: 'NO_PAGE' }); continue }
|
|
124
|
+
const list = nodesOf(page, op.page)
|
|
125
|
+
if (!Array.isArray(list)) { skipped.push({ op, reason: 'NO_NODE_LIST' }); continue }
|
|
126
|
+
const at = op.index === null || op.index === undefined ? list.length : Math.max(0, Math.min(op.index, list.length))
|
|
127
|
+
list.splice(at, 0, structuredClone(op.node))
|
|
128
|
+
applied.push(op)
|
|
129
|
+
continue
|
|
130
|
+
}
|
|
131
|
+
const hit = listAt(next, schema, op.target.path)
|
|
132
|
+
if (!hit || !hit.node) { skipped.push({ op, reason: 'NOT_FOUND' }); continue }
|
|
133
|
+
if (op.op === 'update') {
|
|
134
|
+
applyPatch(hit.node, op.patch, schema)
|
|
135
|
+
applied.push(op)
|
|
136
|
+
} else if (op.op === 'remove') {
|
|
137
|
+
hit.list.splice(hit.parsed.children.length ? hit.list.indexOf(hit.node) : hit.parsed.node, 1)
|
|
138
|
+
applied.push(op)
|
|
139
|
+
} else if (op.op === 'move') {
|
|
140
|
+
const raw = hit.list.splice(hit.parsed.children.length ? hit.list.indexOf(hit.node) : hit.parsed.node, 1)[0]
|
|
141
|
+
const dest = listAt(next, schema, `p${op.page}/n0`)
|
|
142
|
+
if (!dest || !Array.isArray(dest.list)) { skipped.push({ op, reason: 'NO_PAGE' }); continue }
|
|
143
|
+
const at = op.index === null || op.index === undefined ? dest.list.length : Math.max(0, Math.min(op.index, dest.list.length))
|
|
144
|
+
dest.list.splice(at, 0, raw)
|
|
145
|
+
applied.push(op)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (isObj(next)) next.rev = (next.rev | 0) + (applied.length ? 1 : 0)
|
|
149
|
+
return { doc: next, applied, skipped }
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** 便利:一次「定位 + 打补丁」(最常用的编辑形态)。 */
|
|
153
|
+
export function patchAt(manifest, locator, patch) {
|
|
154
|
+
const hit = locate(manifest, locator)
|
|
155
|
+
return {
|
|
156
|
+
op: 'update',
|
|
157
|
+
target: { id: hit.id, path: hit.path, page: hit.page, index: hit.index, role: hit.role, type: hit.type },
|
|
158
|
+
patch,
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 模型校验:把「能不能安全地按 ID 编辑」变成机器可判定的检查。
|
|
3
|
+
*
|
|
4
|
+
* 检查项(与 generate-then-edit 的工作流直接相关):
|
|
5
|
+
* ID_DUPLICATE 同一 ID 出现两次 → 寻址会指错元素
|
|
6
|
+
* ID_MISSING 节点没有 ID → 只能按路径改,移动后就断
|
|
7
|
+
* PAGE_EMPTY 空页 → 通常是生成失败
|
|
8
|
+
* BOX_OUT_OF_PAGE 元素越界 → 排版问题(需要 pageSize)
|
|
9
|
+
* TEXT_TOO_LONG 单节点文本超限 → 版面溢出
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const isObj = (value) => !!value && typeof value === 'object' && !Array.isArray(value)
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @param {ReturnType<import('./manifest.mjs').buildManifest>} manifest
|
|
16
|
+
* @param {{ pageSize?: (pageIndex:number)=> {w:number,h:number}|null, maxChars?: number, allowMissingIds?: boolean }} options
|
|
17
|
+
*/
|
|
18
|
+
export function validateManifest(manifest, options = {}) {
|
|
19
|
+
const issues = []
|
|
20
|
+
const seen = new Map()
|
|
21
|
+
const maxChars = Number(options.maxChars) || 0
|
|
22
|
+
const checkPageEmpty = options.pageEmpty !== false
|
|
23
|
+
|
|
24
|
+
for (const node of manifest.nodes) {
|
|
25
|
+
if (!node.id) {
|
|
26
|
+
if (!options.allowMissingIds) issues.push({ code: 'ID_MISSING', path: node.path, message: '元素缺少稳定 ID' })
|
|
27
|
+
continue
|
|
28
|
+
}
|
|
29
|
+
if (seen.has(node.id)) {
|
|
30
|
+
issues.push({ code: 'ID_DUPLICATE', path: node.path, message: `ID 重复:${node.id}(另一处 ${seen.get(node.id)})` })
|
|
31
|
+
} else {
|
|
32
|
+
seen.set(node.id, node.path)
|
|
33
|
+
}
|
|
34
|
+
if (maxChars && node.charCount > maxChars) {
|
|
35
|
+
issues.push({ code: 'TEXT_TOO_LONG', path: node.path, message: `${node.id} 文本 ${node.charCount} 字,超过 ${maxChars}` })
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (typeof options.pageSize === 'function') {
|
|
40
|
+
for (const page of manifest.pages) {
|
|
41
|
+
const size = options.pageSize(page.index)
|
|
42
|
+
if (!size || !Number.isFinite(size.w) || !Number.isFinite(size.h)) continue
|
|
43
|
+
for (const node of manifest.nodes.filter((n) => n.page === page.index)) {
|
|
44
|
+
if (!node.box) continue
|
|
45
|
+
const { x, y, w, h } = node.box
|
|
46
|
+
if (x < -1 || y < -1 || x + w > size.w + 1 || y + h > size.h + 1) {
|
|
47
|
+
issues.push({
|
|
48
|
+
code: 'BOX_OUT_OF_PAGE',
|
|
49
|
+
path: node.path,
|
|
50
|
+
message: `${node.id} 越界:(${x},${y}) ${w}×${h} 超出页面 ${size.w}×${size.h}`,
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
for (const page of manifest.pages) {
|
|
58
|
+
if (checkPageEmpty && !page.count) {
|
|
59
|
+
issues.push({ code: 'PAGE_EMPTY', path: `p${page.index}`, message: `第 ${page.index} 页没有任何元素` })
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return { ok: issues.length === 0, issues }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** 把校验结果压成给模型看的一行摘要。 */
|
|
67
|
+
export function describeIssues(result, limit = 6) {
|
|
68
|
+
if (result.ok) return '模型校验通过'
|
|
69
|
+
const head = result.issues.slice(0, limit).map((issue) => `${issue.code} ${issue.path}:${issue.message}`)
|
|
70
|
+
const more = result.issues.length > limit ? `…(共 ${result.issues.length} 条)` : ''
|
|
71
|
+
return head.join('\n') + (more ? '\n' + more : '')
|
|
72
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 文档 op 注册与分发:把「查表 + snapshot 策略 + 未知指令」收敛到一处。
|
|
3
|
+
* op 实现按域放在调用方,注册表只提供统一元数据与分发。
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export function defineOp({ name, run, apply, mutates = true, view = false, description = '' } = {}) {
|
|
7
|
+
if (!name || typeof name !== 'string') throw new Error('defineOp 需要 name')
|
|
8
|
+
const fn = run || apply
|
|
9
|
+
if (typeof fn !== 'function') throw new Error(`op "${name}" 需要 run 函数`)
|
|
10
|
+
return {
|
|
11
|
+
name,
|
|
12
|
+
run: fn,
|
|
13
|
+
mutates: mutates !== false,
|
|
14
|
+
view: view === true,
|
|
15
|
+
description,
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function normalizeDefinition(name, raw) {
|
|
20
|
+
if (!raw || typeof raw !== 'object') throw new Error(`op "${name}" 定义不合法`)
|
|
21
|
+
const fn = raw.run || raw.apply
|
|
22
|
+
if (typeof fn !== 'function') throw new Error(`op "${name}" 需要 run 函数`)
|
|
23
|
+
return {
|
|
24
|
+
...raw,
|
|
25
|
+
name,
|
|
26
|
+
run: fn,
|
|
27
|
+
mutates: raw.mutates !== false,
|
|
28
|
+
view: raw.view === true,
|
|
29
|
+
description: raw.description || '',
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 把 { domain: { opName: definition } } 摊平成一张 op 表。 */
|
|
34
|
+
export function mergeOpModules(modules = {}) {
|
|
35
|
+
const out = {}
|
|
36
|
+
for (const table of Object.values(modules)) {
|
|
37
|
+
Object.assign(out, table)
|
|
38
|
+
}
|
|
39
|
+
return out
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function createOpRegistry({
|
|
43
|
+
ops = {},
|
|
44
|
+
modules = null,
|
|
45
|
+
snapshot = null,
|
|
46
|
+
assertReady = null,
|
|
47
|
+
unknownMessage = null,
|
|
48
|
+
} = {}) {
|
|
49
|
+
const source = modules ? mergeOpModules(modules) : ops
|
|
50
|
+
const definitions = {}
|
|
51
|
+
for (const [name, raw] of Object.entries(source)) {
|
|
52
|
+
if (Object.hasOwn(definitions, name)) throw new Error(`重复的 op: ${name}`)
|
|
53
|
+
definitions[name] = normalizeDefinition(name, raw)
|
|
54
|
+
}
|
|
55
|
+
const names = Object.keys(definitions)
|
|
56
|
+
const viewNames = names.filter((name) => definitions[name].view)
|
|
57
|
+
|
|
58
|
+
async function apply(target, cmd, ctx = {}) {
|
|
59
|
+
if (assertReady) assertReady(target)
|
|
60
|
+
else if (target && typeof target.isMounted === 'function' && !target.isMounted()) {
|
|
61
|
+
throw new Error('编辑器未就绪')
|
|
62
|
+
}
|
|
63
|
+
const name = cmd && cmd.op
|
|
64
|
+
const def = definitions[name]
|
|
65
|
+
if (!def) {
|
|
66
|
+
const detail = unknownMessage
|
|
67
|
+
? unknownMessage(name)
|
|
68
|
+
: '未知指令: ' + String(name || JSON.stringify(cmd).slice(0, 40))
|
|
69
|
+
throw new Error(detail)
|
|
70
|
+
}
|
|
71
|
+
if (def.mutates && snapshot) snapshot(target)
|
|
72
|
+
return def.run(target, cmd || {}, ctx)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function isViewOp(cmdOrName) {
|
|
76
|
+
const name = typeof cmdOrName === 'string' ? cmdOrName : cmdOrName && cmdOrName.op
|
|
77
|
+
return !!(name && definitions[name] && definitions[name].view)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
definitions,
|
|
82
|
+
names,
|
|
83
|
+
viewNames,
|
|
84
|
+
has: (name) => Object.hasOwn(definitions, name),
|
|
85
|
+
isViewOp,
|
|
86
|
+
apply,
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** 兼容旧调用:用 definitions 建一个 applyOp。 */
|
|
91
|
+
export function createOpDispatcher(definitions, options = {}) {
|
|
92
|
+
return createOpRegistry({ ops: definitions, ...options }).apply
|
|
93
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 会话上下文(共享单一真源):把「这次请求属于哪个会话」带到不经过 HTTP 的深处。
|
|
3
|
+
*
|
|
4
|
+
* 为什么需要它:工作台不再是一份全局 store,而是每会话一份。路由在装配时
|
|
5
|
+
* 只拿到 store 门面,真正用哪一份必须等到**请求发生时**才知道;而桥 / 稿件 /
|
|
6
|
+
* 导入 / 领域 shim 之间的调用链全在同一个请求里。AsyncLocalStorage 让这条链上
|
|
7
|
+
* 的每一层都能读到同一个会话 id,不需要把 sid 逐层透传。
|
|
8
|
+
*
|
|
9
|
+
* 除 HTTP 之外还有一个入口:工具调用。DSH 同进程注册的工具会拿到执行上下文
|
|
10
|
+
* (`exec.agent.session.id`),`bindToolsToCallerSession` 就借它把「调用者会话」
|
|
11
|
+
* 缝进来——工具永远改调用它的那个会话,而不是"用户此刻在看的那个窗口"。
|
|
12
|
+
* 只有在拿不到执行上下文(MCP 传输形态)时,才回落到最近聚焦的窗口。
|
|
13
|
+
*
|
|
14
|
+
* 三个 bridge(ppt/canvas/browser)共用本模块:embedded 形态同进程,ALS 单例
|
|
15
|
+
* 天然按异步链隔离各自的会话上下文,互不串扰。
|
|
16
|
+
*/
|
|
17
|
+
import { AsyncLocalStorage } from 'node:async_hooks'
|
|
18
|
+
|
|
19
|
+
const storage = new AsyncLocalStorage()
|
|
20
|
+
|
|
21
|
+
/** 在指定会话的上下文里跑一段逻辑(await 链与定时器都会继承)。 */
|
|
22
|
+
export function runWithSession(sessionId, fn) {
|
|
23
|
+
return storage.run(String(sessionId || ''), fn)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** 当前请求所属的会话 id;不在请求里时返回空串。 */
|
|
27
|
+
export function currentSession() {
|
|
28
|
+
const value = storage.getStore()
|
|
29
|
+
return typeof value === 'string' ? value : ''
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 从原生工具调用的执行上下文里取「调用者会话」。
|
|
34
|
+
*
|
|
35
|
+
* DSH 同进程注册的工具会拿到 `exec`(`ctx.tools.register({ execute(args, exec) })`),
|
|
36
|
+
* 其中 `exec.agent.session.id` 就是发起这次工具调用的会话。有了它,工具写入不再
|
|
37
|
+
* 依赖「用户此刻在看哪个窗口」,而是落到**调用它的那个会话**自己的文档上。
|
|
38
|
+
*
|
|
39
|
+
* 拿不到(MCP 传输形态、旧宿主)返回空串,由 store 门面回落到最近聚焦的窗口。
|
|
40
|
+
*/
|
|
41
|
+
export function sessionFromExec(exec) {
|
|
42
|
+
const sid = exec && exec.agent && exec.agent.session ? exec.agent.session.id : ''
|
|
43
|
+
return typeof sid === 'string' ? sid.trim() : ''
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 把工具实现包一层:有调用者会话就在它的上下文里跑,没有就按原样跑。
|
|
48
|
+
*
|
|
49
|
+
* 为什么包在实现层而不是路由层:工具不经过 HTTP,store 门面拿不到 `req.sessionId`,
|
|
50
|
+
* 只能靠 ALS 把会话缝进去。包装后所有工具都不用改签名。
|
|
51
|
+
*/
|
|
52
|
+
export function bindToolsToCallerSession(registry) {
|
|
53
|
+
const impls = registry && registry.TOOL_IMPL
|
|
54
|
+
if (!impls || typeof impls !== 'object') return registry
|
|
55
|
+
for (const name of Object.keys(impls)) {
|
|
56
|
+
const impl = impls[name]
|
|
57
|
+
if (typeof impl !== 'function' || impl.__sessionBound) continue
|
|
58
|
+
const bound = (args, exec) => {
|
|
59
|
+
const sid = sessionFromExec(exec)
|
|
60
|
+
/* exec 原样透传:今天的实现体只用 args,但未来若有工具要执行上下文
|
|
61
|
+
* (进度/中止等),不能在这层被静默丢掉。 */
|
|
62
|
+
return sid ? runWithSession(sid, () => impl(args, exec)) : impl(args, exec)
|
|
63
|
+
}
|
|
64
|
+
bound.__sessionBound = true
|
|
65
|
+
impls[name] = bound
|
|
66
|
+
}
|
|
67
|
+
return registry
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 把所有路由包成一条:先定会话,再按原顺序跑到第一个接手的路由。
|
|
72
|
+
*
|
|
73
|
+
* 顺序必须保持(mcp → assets → editor → import → manuscript → bridge),
|
|
74
|
+
* 否则 bridge 会先把 POST 当桥协议读走。
|
|
75
|
+
*/
|
|
76
|
+
export function createSessionDispatch(handlers, stores) {
|
|
77
|
+
return async function dispatchSession(req, res, u) {
|
|
78
|
+
const sessionId = String((req && req.sessionId) || (u && u.sessionId) || '')
|
|
79
|
+
/* 打开/刷新某会话的编辑器页面本身就是「用户现在在这个会话里」的信号。
|
|
80
|
+
* 轮询(/watch)不参与,否则两扇窗会互相抢「当前会话」。 */
|
|
81
|
+
if (sessionId && stores && (u.pathname === '/' || u.pathname === '/index.html')) {
|
|
82
|
+
stores.setActive(sessionId)
|
|
83
|
+
}
|
|
84
|
+
return runWithSession(sessionId, async () => {
|
|
85
|
+
for (const handler of handlers) {
|
|
86
|
+
if (await handler(req, res, u)) return true
|
|
87
|
+
}
|
|
88
|
+
return false
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
}
|