@imgly/codesign-mcp 0.7.2 → 0.7.3-next.20261125135902.gfdc6ee3
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 +35 -17
- package/dist/cli/license.js +1 -1
- package/dist/runtime/cli/commands.d.ts +2 -0
- package/dist/runtime/cli/commands.d.ts.map +1 -1
- package/dist/runtime/cli/commands.js +56 -1
- package/dist/runtime/cli/commands.js.map +1 -1
- package/dist/runtime/cli/main.d.ts.map +1 -1
- package/dist/runtime/cli/main.js +5 -0
- package/dist/runtime/cli/main.js.map +1 -1
- package/dist/runtime/codesign-shim/codesign-router/protocol/types.mjs +1 -0
- package/dist/runtime/codesign-shim/codesign-router/release-build.generated.mjs +1 -1
- package/dist/server-client-types/protocol/types.d.ts +25 -3
- package/dist/server-client.mjs +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +4 -2
- package/dist/server.js.map +1 -1
- package/node_modules/@imgly/codesign-billing/README.md +138 -0
- package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/charge.d.ts +30 -5
- package/node_modules/@imgly/codesign-billing/dist/charge.d.ts.map +1 -0
- package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/charge.js +16 -1
- package/node_modules/@imgly/codesign-billing/dist/charge.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/charges.d.ts +71 -0
- package/node_modules/@imgly/codesign-billing/dist/charges.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/charges.js +198 -0
- package/node_modules/@imgly/codesign-billing/dist/charges.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/index.d.ts +6 -0
- package/node_modules/@imgly/codesign-billing/dist/index.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/index.js +6 -0
- package/node_modules/@imgly/codesign-billing/dist/index.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/ledger.d.ts +55 -0
- package/node_modules/@imgly/codesign-billing/dist/ledger.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/ledger.js +80 -0
- package/node_modules/@imgly/codesign-billing/dist/ledger.js.map +1 -0
- package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/metering.d.ts +9 -1
- package/node_modules/@imgly/codesign-billing/dist/metering.d.ts.map +1 -0
- package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/metering.js +77 -21
- package/node_modules/@imgly/codesign-billing/dist/metering.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/refusal.d.ts +20 -0
- package/node_modules/@imgly/codesign-billing/dist/refusal.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/refusal.js +13 -0
- package/node_modules/@imgly/codesign-billing/dist/refusal.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/package.json +30 -0
- package/node_modules/@imgly/codesign-router/dist/config/unit-config.d.ts +13 -5
- package/node_modules/@imgly/codesign-router/dist/config/unit-config.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/config/unit-config.js +18 -12
- package/node_modules/@imgly/codesign-router/dist/config/unit-config.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/consent.d.ts +6 -2
- package/node_modules/@imgly/codesign-router/dist/consent.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/consent.js +65 -9
- package/node_modules/@imgly/codesign-router/dist/consent.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/protocol/types.d.ts +25 -3
- package/node_modules/@imgly/codesign-router/dist/protocol/types.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/protocol/types.js +1 -0
- package/node_modules/@imgly/codesign-router/dist/protocol/types.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts +1 -1
- package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/release-build.generated.js +1 -1
- package/node_modules/@imgly/codesign-router/dist/release-build.generated.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/router/channels-v2.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/router/channels-v2.js +14 -4
- package/node_modules/@imgly/codesign-router/dist/router/channels-v2.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/router/main.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/router/main.js +9 -1
- package/node_modules/@imgly/codesign-router/dist/router/main.js.map +1 -1
- package/node_modules/@imgly/codesign-sdk/CHANGELOG.md +24 -0
- package/node_modules/@imgly/codesign-sdk/README.md +8 -7
- package/node_modules/@imgly/codesign-sdk/dist/abort.d.ts +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/abort.js +18 -0
- package/node_modules/@imgly/codesign-sdk/dist/assets/inline.generated.js +12 -12
- package/node_modules/@imgly/codesign-sdk/dist/browser/index.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/browser/worker.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/browser/worker.js +15 -8
- package/node_modules/@imgly/codesign-sdk/dist/cesdk-utils/index.js +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/codesign-error.d.ts +38 -1
- package/node_modules/@imgly/codesign-sdk/dist/codesign-error.js +9 -0
- package/node_modules/@imgly/codesign-sdk/dist/codesign.d.ts +19 -12
- package/node_modules/@imgly/codesign-sdk/dist/codesign.js +268 -43
- package/node_modules/@imgly/codesign-sdk/dist/design/animatable.generated.js +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/capabilities.generated.js +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/facade.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/design/facade.js +128 -36
- package/node_modules/@imgly/codesign-sdk/dist/design/keyframes.js +2 -1
- package/node_modules/@imgly/codesign-sdk/dist/design/lint.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/design/lint.js +82 -5
- package/node_modules/@imgly/codesign-sdk/dist/design/props.generated.js +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/run-offsets.d.ts +10 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/run-offsets.js +26 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/scene-lint.d.ts +23 -1
- package/node_modules/@imgly/codesign-sdk/dist/design/scene-lint.js +194 -3
- package/node_modules/@imgly/codesign-sdk/dist/design/timeline-poses.d.ts +8 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/timeline-poses.js +53 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/variables.d.ts +14 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/variables.js +250 -37
- package/node_modules/@imgly/codesign-sdk/dist/designs/s3-presigner.d.ts +50 -0
- package/node_modules/@imgly/codesign-sdk/dist/designs/s3-presigner.js +116 -0
- package/node_modules/@imgly/codesign-sdk/dist/designs/types.d.ts +79 -3
- package/node_modules/@imgly/codesign-sdk/dist/engine/audio-extract.d.ts +12 -1
- package/node_modules/@imgly/codesign-sdk/dist/engine/audio-extract.js +20 -4
- package/node_modules/@imgly/codesign-sdk/dist/engine/engine-capacity.d.ts +20 -7
- package/node_modules/@imgly/codesign-sdk/dist/engine/engine-capacity.js +31 -14
- package/node_modules/@imgly/codesign-sdk/dist/engine/headless.d.ts +4 -0
- package/node_modules/@imgly/codesign-sdk/dist/engine/headless.js +20 -0
- package/node_modules/@imgly/codesign-sdk/dist/executor/billing/check.d.ts +1 -14
- package/node_modules/@imgly/codesign-sdk/dist/executor/billing/check.js +2 -7
- package/node_modules/@imgly/codesign-sdk/dist/executor/billing/metered.d.ts +1 -2
- package/node_modules/@imgly/codesign-sdk/dist/executor/billing/metered.js +120 -91
- package/node_modules/@imgly/codesign-sdk/dist/executor/encode-watchdog.d.ts +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/executor/encode-watchdog.js +10 -4
- package/node_modules/@imgly/codesign-sdk/dist/executor/engine-protocol.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/executor/engine-protocol.js +13 -3
- package/node_modules/@imgly/codesign-sdk/dist/executor/executor-options.d.ts +6 -7
- package/node_modules/@imgly/codesign-sdk/dist/executor/executor-options.js +14 -7
- package/node_modules/@imgly/codesign-sdk/dist/executor/handler.d.ts +47 -2
- package/node_modules/@imgly/codesign-sdk/dist/executor/handler.js +519 -8
- package/node_modules/@imgly/codesign-sdk/dist/executor/node.d.ts +42 -6
- package/node_modules/@imgly/codesign-sdk/dist/executor/node.js +231 -9
- package/node_modules/@imgly/codesign-sdk/dist/exporters/fig.d.ts +13 -0
- package/node_modules/@imgly/codesign-sdk/dist/exporters/fig.js +28 -0
- package/node_modules/@imgly/codesign-sdk/dist/exporters/html.d.ts +18 -2
- package/node_modules/@imgly/codesign-sdk/dist/exporters/html.js +129 -15
- package/node_modules/@imgly/codesign-sdk/dist/exporters/index.d.ts +5 -2
- package/node_modules/@imgly/codesign-sdk/dist/exporters/index.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/exporters/node.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/exporters/node.js +4 -3
- package/node_modules/@imgly/codesign-sdk/dist/exporters/psd.js +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/formats/av-limit.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/av-limit.js +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/formats/design-sniff.d.ts +3 -1
- package/node_modules/@imgly/codesign-sdk/dist/formats/design-sniff.js +7 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/import-registry.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/formats/import-registry.js +4 -2
- package/node_modules/@imgly/codesign-sdk/dist/formats/import-warnings.d.ts +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/import-warnings.js +31 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/media-facts.d.ts +15 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/media-facts.js +26 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/mime.d.ts +6 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/mime.js +37 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/refuse-media.d.ts +7 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/refuse-media.js +46 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/svg-export.d.ts +6 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/svg-export.js +20 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/svg-import.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/svg-import.js +25 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/zip-entries.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/zip-entries.js +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/gateway/asset-generate.d.ts +10 -4
- package/node_modules/@imgly/codesign-sdk/dist/gateway/asset-generate.js +205 -79
- package/node_modules/@imgly/codesign-sdk/dist/gateway/client.d.ts +23 -2
- package/node_modules/@imgly/codesign-sdk/dist/gateway/client.js +40 -41
- package/node_modules/@imgly/codesign-sdk/dist/gateway/index.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/gateway/index.js +4 -0
- package/node_modules/@imgly/codesign-sdk/dist/gateway/types.d.ts +18 -3
- package/node_modules/@imgly/codesign-sdk/dist/gateway/upload-origin.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/gateway/upload-origin.js +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/host/edit-code.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/host/edit-code.js +8 -1
- package/node_modules/@imgly/codesign-sdk/dist/host/preview-size.d.ts +4 -2
- package/node_modules/@imgly/codesign-sdk/dist/host/preview-size.js +7 -4
- package/node_modules/@imgly/codesign-sdk/dist/host.d.ts +34 -5
- package/node_modules/@imgly/codesign-sdk/dist/host.js +6 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/fig.d.ts +4 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/fig.js +57 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/index.d.ts +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/importers/index.js +38 -25
- package/node_modules/@imgly/codesign-sdk/dist/importers/node.d.ts +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/node.js +8 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/pdf-fonts.d.ts +20 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/pdf-fonts.js +76 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/shared.d.ts +14 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/shared.js +18 -0
- package/node_modules/@imgly/codesign-sdk/dist/index.d.ts +5 -4
- package/node_modules/@imgly/codesign-sdk/dist/index.js +2 -1
- package/node_modules/@imgly/codesign-sdk/dist/internal/index.d.ts +24 -17
- package/node_modules/@imgly/codesign-sdk/dist/internal/index.js +19 -10
- package/node_modules/@imgly/codesign-sdk/dist/node/edit-renders.d.ts +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/node/edit-renders.js +73 -0
- package/node_modules/@imgly/codesign-sdk/dist/node/engine-child.js +18 -2
- package/node_modules/@imgly/codesign-sdk/dist/node/engine-http.js +8 -2
- package/node_modules/@imgly/codesign-sdk/dist/node/index.d.ts +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/node/index.js +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/node/media-probe.js +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/sdk-version.generated.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/session/engine-session.d.ts +59 -13
- package/node_modules/@imgly/codesign-sdk/dist/session/engine-session.js +19 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/export-facts.d.ts +1 -14
- package/node_modules/@imgly/codesign-sdk/dist/session/export-facts.js +15 -4
- package/node_modules/@imgly/codesign-sdk/dist/session/file-formats.d.ts +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/guarded-engine-session.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/guarded-engine-session.js +18 -7
- package/node_modules/@imgly/codesign-sdk/dist/session/local-engine-session.js +247 -68
- package/node_modules/@imgly/codesign-sdk/dist/session/local-engine.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/session/multipart.js +10 -2
- package/node_modules/@imgly/codesign-sdk/dist/session/pending-video.js +2 -3
- package/node_modules/@imgly/codesign-sdk/dist/session/read-resolved.js +93 -6
- package/node_modules/@imgly/codesign-sdk/dist/session/remote.d.ts +34 -10
- package/node_modules/@imgly/codesign-sdk/dist/session/remote.js +377 -87
- package/node_modules/@imgly/codesign-sdk/dist/session/render-id.js +11 -2
- package/node_modules/@imgly/codesign-sdk/dist/session/session.d.ts +67 -6
- package/node_modules/@imgly/codesign-sdk/dist/session/session.js +213 -32
- package/node_modules/@imgly/codesign-sdk/dist/session/silent-audio.d.ts +18 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/silent-audio.js +47 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/transfers.d.ts +85 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/transfers.js +80 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/url-guard.d.ts +30 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/url-guard.js +187 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/url-source.d.ts +21 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/url-source.js +163 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/wire.d.ts +8 -1
- package/node_modules/@imgly/codesign-sdk/dist/session/wire.js +2 -1
- package/node_modules/@imgly/codesign-sdk/dist/session-instructions.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/sessions/state.d.ts +3 -1
- package/node_modules/@imgly/codesign-sdk/dist/sessions/state.js +5 -1
- package/node_modules/@imgly/codesign-sdk/dist/signed-urls.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/signed-urls.js +30 -0
- package/node_modules/@imgly/codesign-sdk/dist/skill-tool.js +12 -12
- package/node_modules/@imgly/codesign-sdk/dist/sources/handshake.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/sources/mime.js +0 -1
- package/node_modules/@imgly/codesign-sdk/dist/sources/route.d.ts +8 -1
- package/node_modules/@imgly/codesign-sdk/dist/sources/route.js +17 -2
- package/node_modules/@imgly/codesign-sdk/dist/sources/search.js +9 -2
- package/node_modules/@imgly/codesign-sdk/dist/sources/types.d.ts +8 -1
- package/node_modules/@imgly/codesign-sdk/dist/testing/conformance.js +11 -6
- package/node_modules/@imgly/codesign-sdk/dist/testing/fake-engine.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/testing/fake-engine.js +11 -4
- package/node_modules/@imgly/codesign-sdk/dist/tools/edit.js +11 -4
- package/node_modules/@imgly/codesign-sdk/dist/tools/errors.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/tools/export-formats/table.d.ts +4 -4
- package/node_modules/@imgly/codesign-sdk/dist/tools/export-formats/table.js +8 -0
- package/node_modules/@imgly/codesign-sdk/dist/tools/export.d.ts +3 -1
- package/node_modules/@imgly/codesign-sdk/dist/tools/export.js +75 -12
- package/node_modules/@imgly/codesign-sdk/dist/tools/omit-defaults.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/tools/omit-defaults.js +7 -0
- package/node_modules/@imgly/codesign-sdk/dist/tools/preview.js +42 -19
- package/node_modules/@imgly/codesign-sdk/dist/tools/source-tools.js +11 -4
- package/node_modules/@imgly/codesign-sdk/package.json +18 -10
- package/node_modules/@imgly/codesign-server/assets/ai-plugins/apps.mjs +5 -5
- package/node_modules/@imgly/codesign-server/assets/ai-plugins/image-gateway.mjs +5 -5
- package/node_modules/@imgly/codesign-server/assets/ai-plugins/version.json +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/link.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/link.js +2 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/link.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/local-server.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/local-server.js +1 -0
- package/node_modules/@imgly/codesign-server/dist/catalog/local-server.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.d.ts +59 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.js +127 -23
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.d.ts +7 -0
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.js +65 -15
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.js +15 -5
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.d.ts +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.js +7 -6
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.d.ts +2 -2
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.js +14 -4
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.d.ts +10 -0
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.js +106 -22
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/connectors.js +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/connectors.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/doctor/checks/mcp-servers.js +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/doctor/checks/mcp-servers.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/pack.d.ts +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/pack.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/pack.js +24 -18
- package/node_modules/@imgly/codesign-server/dist/cli/pack.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/instructions.js +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/instructions.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/main.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/main.js +4 -3
- package/node_modules/@imgly/codesign-server/dist/conversation/main.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/stage.d.ts +4 -0
- package/node_modules/@imgly/codesign-server/dist/conversation/stage.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/stage.js +13 -0
- package/node_modules/@imgly/codesign-server/dist/conversation/stage.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.d.ts +0 -6
- package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.js +0 -58
- package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/credentials/keychain.d.ts +10 -0
- package/node_modules/@imgly/codesign-server/dist/credentials/keychain.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/credentials/keychain.js +84 -0
- package/node_modules/@imgly/codesign-server/dist/credentials/keychain.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/credentials/token-store.d.ts +1 -3
- package/node_modules/@imgly/codesign-server/dist/credentials/token-store.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/credentials/token-store.js +3 -23
- package/node_modules/@imgly/codesign-server/dist/credentials/token-store.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.d.ts +59 -8
- package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.js +317 -40
- package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/engine.js +4 -9
- package/node_modules/@imgly/codesign-server/dist/design/engine.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/engines.d.ts +5 -0
- package/node_modules/@imgly/codesign-server/dist/design/engines.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/engines.js +49 -0
- package/node_modules/@imgly/codesign-server/dist/design/engines.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/host.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/design/host.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/host.js +10 -6
- package/node_modules/@imgly/codesign-server/dist/design/host.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.js +34 -5
- package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-design.d.ts +42 -5
- package/node_modules/@imgly/codesign-server/dist/design/local-design.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-design.js +175 -38
- package/node_modules/@imgly/codesign-server/dist/design/local-design.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-tools.d.ts +27 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-tools.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-tools.js +65 -7
- package/node_modules/@imgly/codesign-server/dist/design/local-tools.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/main.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/main.js +23 -10
- package/node_modules/@imgly/codesign-server/dist/design/main.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/node-exporters.d.ts +4 -0
- package/node_modules/@imgly/codesign-server/dist/design/node-exporters.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/design/node-exporters.js +13 -0
- package/node_modules/@imgly/codesign-server/dist/design/node-exporters.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/design/probe-media.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/design/probe-media.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/design/probe-media.js +16 -0
- package/node_modules/@imgly/codesign-server/dist/design/probe-media.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/design/remote-resources.d.ts +22 -3
- package/node_modules/@imgly/codesign-server/dist/design/remote-resources.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/remote-resources.js +123 -32
- package/node_modules/@imgly/codesign-server/dist/design/remote-resources.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/save.d.ts +5 -0
- package/node_modules/@imgly/codesign-server/dist/design/save.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/save.js +9 -0
- package/node_modules/@imgly/codesign-server/dist/design/save.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/sessions/store.d.ts +33 -4
- package/node_modules/@imgly/codesign-server/dist/design/sessions/store.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/sessions/store.js +121 -43
- package/node_modules/@imgly/codesign-server/dist/design/sessions/store.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/workspace-files.d.ts +8 -0
- package/node_modules/@imgly/codesign-server/dist/design/workspace-files.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/workspace-files.js +50 -61
- package/node_modules/@imgly/codesign-server/dist/design/workspace-files.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/workspace-library.d.ts +24 -2
- package/node_modules/@imgly/codesign-server/dist/design/workspace-library.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/workspace-library.js +132 -17
- package/node_modules/@imgly/codesign-server/dist/design/workspace-library.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/create.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/create.js +19 -6
- package/node_modules/@imgly/codesign-server/dist/services/archives/create.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.js +10 -7
- package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/pack.d.ts +3 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/pack.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/pack.js +5 -4
- package/node_modules/@imgly/codesign-server/dist/services/archives/pack.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.d.ts +56 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.js +218 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed.js +33 -124
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/template.d.ts +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/template.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/template.js +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/template.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.js +2 -1
- package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.d.ts +9 -5
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.js +14 -19
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.js +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.js +4 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.d.ts +5 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.js +67 -6
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/flags/manifest.js +2 -2
- package/node_modules/@imgly/codesign-server/dist/services/flags/manifest.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts +3 -3
- package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js +3 -3
- package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.d.ts +15 -0
- package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.js +14 -0
- package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.js +36 -0
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.d.ts +2 -2
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.js +3 -5
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.js +5 -4
- package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.js +0 -64
- package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.d.ts +4 -0
- package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.js +4 -0
- package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.js +2 -24
- package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.d.ts +4 -2
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.js +15 -14
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.d.ts +12 -2
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.js +42 -12
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.js +1 -2
- package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.js +24 -2
- package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.d.ts +47 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.js +167 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.js +2 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.d.ts +32 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.js +79 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.d.ts +35 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.js +185 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.d.ts +74 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.js +82 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/types.d.ts +10 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/types.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/types.js +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/types.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.js +5 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.js.map +1 -1
- package/node_modules/@imgly/codesign-server/package.json +13 -11
- package/node_modules/@imgly/design-lint/dist/rules/text-legibility.d.ts +2 -1
- package/node_modules/@imgly/design-lint/dist/rules/text-legibility.d.ts.map +1 -1
- package/node_modules/@imgly/design-lint/dist/rules/text-legibility.js +5 -1
- package/node_modules/@imgly/design-lint/dist/rules/text-legibility.js.map +1 -1
- package/node_modules/@imgly/design-lint/package.json +2 -2
- package/node_modules/@imgly/figma-exporter/CHANGELOG.md +79 -0
- package/node_modules/@imgly/figma-exporter/LICENSE.md +137 -0
- package/node_modules/@imgly/figma-exporter/README.md +201 -0
- package/node_modules/@imgly/figma-exporter/THIRD_PARTY_NOTICES.md +475 -0
- package/node_modules/@imgly/figma-exporter/dist/index.cjs +1 -0
- package/node_modules/@imgly/figma-exporter/dist/index.d.cts +8833 -0
- package/node_modules/@imgly/figma-exporter/dist/index.d.ts +8833 -0
- package/node_modules/@imgly/figma-exporter/dist/index.js +1 -0
- package/node_modules/@imgly/figma-exporter/package.json +92 -0
- package/node_modules/@imgly/figma-importer/CHANGELOG.md +84 -0
- package/node_modules/@imgly/figma-importer/LICENSE.md +137 -0
- package/node_modules/@imgly/figma-importer/README.md +256 -0
- package/node_modules/@imgly/figma-importer/THIRD_PARTY_NOTICES.md +446 -0
- package/node_modules/@imgly/figma-importer/dist/index.cjs +2 -0
- package/node_modules/@imgly/figma-importer/dist/index.d.cts +12831 -0
- package/node_modules/@imgly/figma-importer/dist/index.d.ts +12831 -0
- package/node_modules/@imgly/figma-importer/dist/index.js +2 -0
- package/node_modules/@imgly/figma-importer/package.json +85 -0
- package/node_modules/@imgly/html-exporter/CHANGELOG.md +35 -0
- package/node_modules/@imgly/html-exporter/README.md +45 -4
- package/node_modules/@imgly/html-exporter/dist/index.cjs +610 -493
- package/node_modules/@imgly/html-exporter/dist/index.d.cts +235 -216
- package/node_modules/@imgly/html-exporter/dist/index.d.ts +235 -216
- package/node_modules/@imgly/html-exporter/dist/index.js +610 -493
- package/node_modules/@imgly/html-exporter/package.json +15 -10
- package/node_modules/@imgly/idml-exporter/CHANGELOG.md +10 -0
- package/node_modules/@imgly/idml-exporter/README.md +17 -18
- package/node_modules/@imgly/idml-exporter/dist/harfbuzz.browser.js +1 -1
- package/node_modules/@imgly/idml-exporter/dist/index.cjs +8 -11
- package/node_modules/@imgly/idml-exporter/dist/index.d.cts +14480 -10275
- package/node_modules/@imgly/idml-exporter/dist/index.d.ts +14480 -10275
- package/node_modules/@imgly/idml-exporter/dist/index.js +8 -10
- package/node_modules/@imgly/idml-exporter/dist/woff2.browser.js +14 -14
- package/node_modules/@imgly/idml-exporter/package.json +17 -12
- package/node_modules/@imgly/idml-importer/CHANGELOG.md +37 -0
- package/node_modules/@imgly/idml-importer/README.md +148 -17
- package/node_modules/@imgly/idml-importer/dist/index.cjs +6 -5
- package/node_modules/@imgly/idml-importer/dist/index.d.cts +1003 -632
- package/node_modules/@imgly/idml-importer/dist/index.d.ts +1003 -632
- package/node_modules/@imgly/idml-importer/dist/index.js +6 -5
- package/node_modules/@imgly/idml-importer/package.json +9 -9
- package/node_modules/@imgly/pdf-importer/CHANGELOG.md +59 -0
- package/node_modules/@imgly/pdf-importer/README.md +71 -7
- package/node_modules/@imgly/pdf-importer/dist/browser.d.ts +940 -788
- package/node_modules/@imgly/pdf-importer/dist/browser.js +17 -15
- package/node_modules/@imgly/pdf-importer/dist/node.cjs +17 -16
- package/node_modules/@imgly/pdf-importer/dist/node.d.cts +940 -788
- package/node_modules/@imgly/pdf-importer/dist/node.d.ts +940 -788
- package/node_modules/@imgly/pdf-importer/dist/node.js +17 -15
- package/node_modules/@imgly/pdf-importer/dist/pdf.worker.mjs +80265 -61990
- package/node_modules/@imgly/pdf-importer/package.json +13 -13
- package/node_modules/@imgly/psd-exporter/CHANGELOG.md +12 -0
- package/node_modules/@imgly/psd-exporter/README.md +50 -7
- package/node_modules/@imgly/psd-exporter/dist/index.cjs +5 -7
- package/node_modules/@imgly/psd-exporter/dist/index.d.cts +14332 -10063
- package/node_modules/@imgly/psd-exporter/dist/index.d.ts +14332 -10063
- package/node_modules/@imgly/psd-exporter/dist/index.js +5 -6
- package/node_modules/@imgly/psd-exporter/dist/wawoff2-LICENSE.txt +19 -0
- package/node_modules/@imgly/psd-exporter/dist/woff2.browser.js +19 -0
- package/node_modules/@imgly/psd-exporter/package.json +26 -9
- package/node_modules/@imgly/psd-importer/CHANGELOG.md +29 -1
- package/node_modules/@imgly/psd-importer/README.md +22 -30
- package/node_modules/@imgly/psd-importer/dist/index.cjs +11 -11
- package/node_modules/@imgly/psd-importer/dist/index.d.cts +10479 -12978
- package/node_modules/@imgly/psd-importer/dist/index.d.ts +10479 -12978
- package/node_modules/@imgly/psd-importer/dist/index.js +11 -11
- package/node_modules/@imgly/psd-importer/package.json +8 -11
- package/package.json +28 -17
- package/node_modules/@imgly/pdf-importer/dist/browser.d.cts +0 -941
|
@@ -41,6 +41,8 @@ export declare function verifyChecklist(items: readonly ChecklistItem[], opts: {
|
|
|
41
41
|
export declare function checklistNoticeText(unmet: readonly UnmetItem[]): string;
|
|
42
42
|
export declare function createChecklistTool(opts: {
|
|
43
43
|
list: Checklist;
|
|
44
|
+
/** `output` items: files on this machine's disk. A remote runtime (CoDesign Cloud) has none of the client's. Default true. */
|
|
45
|
+
outputs?: boolean;
|
|
44
46
|
}): HostTool;
|
|
45
47
|
/** After a successful export, name the registered items still unmet. Never blocks the deliverable. */
|
|
46
48
|
export declare function withChecklistCheck(exportTool: HostTool, opts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../../src/catalog/tools/checklist.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,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M,GAAG,SAAS,CAAC,CAAC;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CAC7C,GACA,OAAO,CAAC,SAAS,EAAE,CAAC,CA2BtB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,CAgBvE;AAuBD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,8HAA8H;IAC9H,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,QAAQ,CA2EX;AAED,sGAAsG;AACtG,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,QAAQ,EACpB,IAAI,EAAE;IACJ,IAAI,EAAE,SAAS,CAAC;IAChB,yEAAyE;IACzE,UAAU,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IAChD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC/D,GACA,QAAQ,CAmCV;AAED,6FAA6F;AAC7F,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,GAAG,QAAQ,CASxE"}
|
|
@@ -87,18 +87,26 @@ const json = (body) => ({
|
|
|
87
87
|
});
|
|
88
88
|
export function createChecklistTool(opts) {
|
|
89
89
|
const { list } = opts;
|
|
90
|
+
const outputs = opts.outputs !== false;
|
|
91
|
+
const kinds = outputs ? ['output', 'copy', 'note'] : ['copy', 'note'];
|
|
90
92
|
return {
|
|
91
93
|
name: 'checklist',
|
|
92
94
|
annotations: { readOnlyHint: true },
|
|
93
95
|
description: [
|
|
94
|
-
|
|
96
|
+
outputs
|
|
97
|
+
? "Register the brief's ACCEPTANCE CHECKLIST — the machine-checkable claims that must hold before the work counts as done. Do this right after intake, before the first edit: extract from the brief every required output file, every string of approved copy that must land verbatim, and note the constraints only you can check. Skip it only when the brief fixes no outputs or copy."
|
|
98
|
+
: "Register the brief's ACCEPTANCE CHECKLIST — the machine-checkable claims that must hold before the work counts as done. Do this right after intake, before the first edit: extract from the brief every string of approved copy that must land verbatim, and note the constraints only you can check. Skip it only when the brief fixes no copy.",
|
|
95
99
|
'',
|
|
96
100
|
'Item kinds:',
|
|
97
|
-
|
|
101
|
+
...(outputs
|
|
102
|
+
? [
|
|
103
|
+
"- { kind: 'output', path } — a file that must exist when the work is delivered (absolute path, e.g. every variant the brief orders exported with `outPath`)."
|
|
104
|
+
]
|
|
105
|
+
: []),
|
|
98
106
|
"- { kind: 'copy', text } — approved copy that must appear VERBATIM in the design's text (whitespace variants are folded; wording, case and punctuation are exact).",
|
|
99
107
|
"- { kind: 'note', text } — a self-check the server cannot verify. Kept on record; never machine-checked.",
|
|
100
108
|
'',
|
|
101
|
-
|
|
109
|
+
`Every \`export\` checks the list against the design${outputs ? ' and the disk' : ''} and names the unmet items — treat one exactly like a failing test. Calling \`checklist\` again REPLACES the whole list; it lasts for this conversation.`,
|
|
102
110
|
'',
|
|
103
111
|
'Returns `{ itemCount }`, or `{ items }` (the current list) when called without `items`.'
|
|
104
112
|
].join('\n'),
|
|
@@ -113,7 +121,7 @@ export function createChecklistTool(opts) {
|
|
|
113
121
|
properties: {
|
|
114
122
|
kind: {
|
|
115
123
|
type: 'string',
|
|
116
|
-
enum:
|
|
124
|
+
enum: kinds
|
|
117
125
|
},
|
|
118
126
|
path: { type: 'string' },
|
|
119
127
|
text: { type: 'string' }
|
|
@@ -132,7 +140,9 @@ export function createChecklistTool(opts) {
|
|
|
132
140
|
if (!Array.isArray(args.items) || args.items.length > MAX_ITEMS) {
|
|
133
141
|
return errorAnswer(`checklist: \`items\` must be an array of at most ${MAX_ITEMS} items.`, 'bad_args', 'items.type');
|
|
134
142
|
}
|
|
135
|
-
const parsed = args.items.map(
|
|
143
|
+
const parsed = args.items.map((it, i) => !outputs && it?.kind === 'output'
|
|
144
|
+
? `items[${i}]: \`kind\` must be 'copy' | 'note' (files are not checked here)`
|
|
145
|
+
: parseItem(it, i));
|
|
136
146
|
const errors = parsed.filter((p) => typeof p === 'string');
|
|
137
147
|
if (errors.length > 0) {
|
|
138
148
|
return errorAnswer(`checklist: ${errors.join('; ')}. Nothing was registered.`, 'bad_args', 'items.invalid');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist.js","sourceRoot":"","sources":["../../../src/catalog/tools/checklist.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAoB3D,gGAAgG;AAChG,MAAM,UAAU,YAAY,CAAC,IAAe,EAAE,MAAc;IAC1D,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC9B,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,QAAQ,IAAI,EAAE;YAC1C,IAAI,EAAE,KAAK,SAAS;gBAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACzD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;YAChC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACvB,CAAC;AAED,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,8GAA8G;AAC9G,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B,kGAAkG;AAClG,MAAM,UAA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S,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACzD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// `checklist`: the brief's acceptance items for this conversation; every `export` reports the unmet ones.\n\nimport { isAbsolute } from 'node:path';\n\nimport type { HostTool } from '@imgly/codesign-sdk/internal';\nimport { errorAnswer } from '@imgly/codesign-sdk/internal';\n\nexport type ChecklistItem =\n | { kind: 'output'; path: string }\n | { kind: 'copy'; text: string }\n | { kind: 'note'; text: string };\n\n/** The session's registered list; `checklist` replaces it, `export` reads it. */\nexport interface Checklist {\n items: ChecklistItem[];\n /** When the design last changed; an output file older than this is stale. */\n changedAt?: number;\n /** The design the session works on; undefined until it has one. */\n design?: string;\n /** Each file an export wrote, and the design it was of: a file of another design is never stale. */\n wroteFor?: Map<string, string | undefined>;\n /** Each design's texts at its last export, so a brief over several designs finds its copy. */\n textsOf?: Map<string | undefined, string[]>;\n}\n\n/** The session moved to `design`; a design that had none yet keeps what was recorded for it. */\nexport function switchDesign(list: Checklist, design: string): void {\n if (list.design === undefined) {\n for (const [path, of] of list.wroteFor ?? [])\n if (of === undefined) list.wroteFor?.set(path, design);\n const texts = list.textsOf?.get(undefined);\n if (texts !== undefined) {\n list.textsOf?.delete(undefined);\n list.textsOf?.set(design, texts);\n }\n }\n list.design = design;\n}\n\nconst MAX_ITEMS = 64;\n\n/** FAT stores mtimes in 2 s steps, HFS+ in 1 s: a file written just after a change can look older than it. */\nconst MTIME_SLACK_MS = 2000;\n\n/** Space variants folded, whitespace collapsed, ends trimmed; case and punctuation stay exact. */\nexport function foldCopy(text: string): string {\n return text\n .replace(/[\\u00a0\\u202f\\u2009]/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n}\n\nexport interface UnmetItem {\n item: ChecklistItem;\n reason: string;\n}\n\n/** `sceneTexts` undefined ⇒ copy items are skipped rather than false-alarmed. */\nexport async function verifyChecklist(\n items: readonly ChecklistItem[],\n opts: {\n sceneTexts?: string[];\n /** A file's mtime in ms; undefined when there is none. */\n fileModifiedAt: (path: string) => Promise<number | undefined>;\n changedAt?: number;\n /** The file is of another design, so this design's changes do not date it. */\n ofAnotherDesign?: (path: string) => boolean;\n }\n): Promise<UnmetItem[]> {\n const unmet: UnmetItem[] = [];\n const folded = opts.sceneTexts?.map(foldCopy);\n for (const item of items) {\n if (item.kind === 'output') {\n const at = await opts.fileModifiedAt(item.path).catch(() => undefined);\n if (at === undefined)\n unmet.push({ item, reason: `no file at ${item.path} (yet)` });\n else if (\n opts.changedAt !== undefined &&\n at + MTIME_SLACK_MS < opts.changedAt &&\n opts.ofAnotherDesign?.(item.path) !== true\n )\n unmet.push({\n item,\n reason: \"older than the design's last change — export it again\"\n });\n } else if (item.kind === 'copy' && folded !== undefined) {\n const want = foldCopy(item.text);\n if (want.length > 0 && !folded.some((t) => t.includes(want)))\n unmet.push({\n item,\n reason: 'this copy does not appear in the design'\n });\n }\n }\n return unmet;\n}\n\nexport function checklistNoticeText(unmet: readonly UnmetItem[]): string {\n const lines = unmet.slice(0, 12).map(({ item, reason }) => {\n const what =\n item.kind === 'output'\n ? `required output ${item.path}`\n : `approved copy \"${item.text.length > 80 ? item.text.slice(0, 77) + '…' : item.text}\"`;\n return ` - ${what} — ${reason}`;\n });\n const more =\n unmet.length > 12 ? `\\n … and ${unmet.length - 12} more item(s)` : '';\n return (\n `Note: ${unmet.length} registered acceptance item(s) are UNMET:\\n` +\n lines.join('\\n') +\n more +\n '\\nIf work remains, finish it before reporting done; if an item is genuinely obsolete, register the checklist again without it.'\n );\n}\n\nfunction parseItem(raw: unknown, i: number): ChecklistItem | string {\n if (typeof raw !== 'object' || raw === null)\n return `items[${i}]: not an object`;\n const it = raw as { kind?: unknown; path?: unknown; text?: unknown };\n if (it.kind === 'output') {\n if (typeof it.path !== 'string' || !isAbsolute(it.path))\n return `items[${i}]: kind 'output' needs an absolute \\`path\\``;\n return { kind: 'output', path: it.path };\n }\n if (it.kind === 'copy' || it.kind === 'note') {\n if (typeof it.text !== 'string' || it.text.trim().length === 0)\n return `items[${i}]: kind '${it.kind}' needs a non-empty \\`text\\``;\n return { kind: it.kind, text: it.text };\n }\n return `items[${i}]: \\`kind\\` must be 'output' | 'copy' | 'note'`;\n}\n\nconst json = (body: unknown) => ({\n content: [{ type: 'text' as const, text: JSON.stringify(body) }]\n});\n\nexport function createChecklistTool(opts: { list: Checklist }): HostTool {\n const { list } = opts;\n return {\n name: 'checklist',\n annotations: { readOnlyHint: true },\n description: [\n \"Register the brief's ACCEPTANCE CHECKLIST — the machine-checkable claims that must hold before the work counts as done. Do this right after intake, before the first edit: extract from the brief every required output file, every string of approved copy that must land verbatim, and note the constraints only you can check. Skip it only when the brief fixes no outputs or copy.\",\n '',\n 'Item kinds:',\n \"- { kind: 'output', path } — a file that must exist when the work is delivered (absolute path, e.g. every variant the brief orders exported with `outPath`).\",\n \"- { kind: 'copy', text } — approved copy that must appear VERBATIM in the design's text (whitespace variants are folded; wording, case and punctuation are exact).\",\n \"- { kind: 'note', text } — a self-check the server cannot verify. Kept on record; never machine-checked.\",\n '',\n 'Every `export` checks the list against the design and the disk and names the unmet items — treat one exactly like a failing test. Calling `checklist` again REPLACES the whole list; it lasts for this conversation.',\n '',\n 'Returns `{ itemCount }`, or `{ items }` (the current list) when called without `items`.'\n ].join('\\n'),\n inputSchema: {\n type: 'object' as const,\n properties: {\n items: {\n type: 'array' as const,\n description: `The full checklist (at most ${MAX_ITEMS} items); replaces the current one. Omit to read the current list.`,\n items: {\n type: 'object' as const,\n properties: {\n kind: {\n type: 'string' as const,\n enum: ['output', 'copy', 'note']\n },\n path: { type: 'string' as const },\n text: { type: 'string' as const }\n },\n required: ['kind'],\n additionalProperties: false\n }\n }\n },\n additionalProperties: false\n },\n call: async (rawArgs) => {\n const args = (rawArgs ?? {}) as { items?: unknown };\n if (args.items === undefined) return json({ items: list.items });\n if (!Array.isArray(args.items) || args.items.length > MAX_ITEMS) {\n return errorAnswer(\n `checklist: \\`items\\` must be an array of at most ${MAX_ITEMS} items.`,\n 'bad_args',\n 'items.type'\n );\n }\n const parsed = args.items.map(parseItem);\n const errors = parsed.filter((p): p is string => typeof p === 'string');\n if (errors.length > 0) {\n return errorAnswer(\n `checklist: ${errors.join('; ')}. Nothing was registered.`,\n 'bad_args',\n 'items.invalid'\n );\n }\n list.items = parsed as ChecklistItem[];\n return json({ itemCount: list.items.length });\n }\n };\n}\n\n/** After a successful export, name the registered items still unmet. Never blocks the deliverable. */\nexport function withChecklistCheck(\n exportTool: HostTool,\n opts: {\n list: Checklist;\n /** Every text string in the design; undefined when it cannot be read. */\n sceneTexts: () => Promise<string[] | undefined>;\n fileModifiedAt: (path: string) => Promise<number | undefined>;\n }\n): HostTool {\n return {\n ...exportTool,\n call: async (args, ctx) => {\n const result = await exportTool.call(args, ctx);\n const { list } = opts;\n if (result.isError === true) return result;\n const outPath = (args as { outPath?: unknown } | undefined)?.outPath;\n if (typeof outPath === 'string')\n (list.wroteFor ??= new Map()).set(outPath, list.design);\n if (list.items.length === 0) return result;\n const current = await opts.sceneTexts().catch(() => undefined);\n if (current !== undefined)\n (list.textsOf ??= new Map()).set(list.design, current);\n const unmet = await verifyChecklist(list.items, {\n sceneTexts:\n current === undefined\n ? undefined\n : [...(list.textsOf?.values() ?? [])].flat(),\n fileModifiedAt: opts.fileModifiedAt,\n ofAnotherDesign: (path) =>\n list.wroteFor?.has(path) === true &&\n list.wroteFor.get(path) !== list.design,\n ...(list.changedAt !== undefined ? { changedAt: list.changedAt } : {})\n });\n if (unmet.length === 0) return result;\n return {\n ...result,\n content: [\n ...result.content,\n { type: 'text' as const, text: checklistNoticeText(unmet) }\n ]\n };\n }\n };\n}\n\n/** A successful call of a tool that changes the design dates every output file before it. */\nexport function withChangeMark(tool: HostTool, list: Checklist): HostTool {\n return {\n ...tool,\n call: async (args, ctx) => {\n const result = await tool.call(args, ctx);\n if (result.isError !== true) list.changedAt = Date.now();\n return result;\n }\n };\n}\n"]}
|
|
1
|
+
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,IAAc,EAAE,IAAe;IAC5D,OAAO;QACL,GAAG,IAAI;QACP,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YACxB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAC1C,IAAI,MAAM,CAAC,OAAO,KAAK,IAAI;gBAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACzD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// `checklist`: the brief's acceptance items for this conversation; every `export` reports the unmet ones.\n\nimport { isAbsolute } from 'node:path';\n\nimport type { HostTool } from '@imgly/codesign-sdk/internal';\nimport { errorAnswer } from '@imgly/codesign-sdk/internal';\n\nexport type ChecklistItem =\n | { kind: 'output'; path: string }\n | { kind: 'copy'; text: string }\n | { kind: 'note'; text: string };\n\n/** The session's registered list; `checklist` replaces it, `export` reads it. */\nexport interface Checklist {\n items: ChecklistItem[];\n /** When the design last changed; an output file older than this is stale. */\n changedAt?: number;\n /** The design the session works on; undefined until it has one. */\n design?: string;\n /** Each file an export wrote, and the design it was of: a file of another design is never stale. */\n wroteFor?: Map<string, string | undefined>;\n /** Each design's texts at its last export, so a brief over several designs finds its copy. */\n textsOf?: Map<string | undefined, string[]>;\n}\n\n/** The session moved to `design`; a design that had none yet keeps what was recorded for it. */\nexport function switchDesign(list: Checklist, design: string): void {\n if (list.design === undefined) {\n for (const [path, of] of list.wroteFor ?? [])\n if (of === undefined) list.wroteFor?.set(path, design);\n const texts = list.textsOf?.get(undefined);\n if (texts !== undefined) {\n list.textsOf?.delete(undefined);\n list.textsOf?.set(design, texts);\n }\n }\n list.design = design;\n}\n\nconst MAX_ITEMS = 64;\n\n/** FAT stores mtimes in 2 s steps, HFS+ in 1 s: a file written just after a change can look older than it. */\nconst MTIME_SLACK_MS = 2000;\n\n/** Space variants folded, whitespace collapsed, ends trimmed; case and punctuation stay exact. */\nexport function foldCopy(text: string): string {\n return text\n .replace(/[\\u00a0\\u202f\\u2009]/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n}\n\nexport interface UnmetItem {\n item: ChecklistItem;\n reason: string;\n}\n\n/** `sceneTexts` undefined ⇒ copy items are skipped rather than false-alarmed. */\nexport async function verifyChecklist(\n items: readonly ChecklistItem[],\n opts: {\n sceneTexts?: string[];\n /** A file's mtime in ms; undefined when there is none. */\n fileModifiedAt: (path: string) => Promise<number | undefined>;\n changedAt?: number;\n /** The file is of another design, so this design's changes do not date it. */\n ofAnotherDesign?: (path: string) => boolean;\n }\n): Promise<UnmetItem[]> {\n const unmet: UnmetItem[] = [];\n const folded = opts.sceneTexts?.map(foldCopy);\n for (const item of items) {\n if (item.kind === 'output') {\n const at = await opts.fileModifiedAt(item.path).catch(() => undefined);\n if (at === undefined)\n unmet.push({ item, reason: `no file at ${item.path} (yet)` });\n else if (\n opts.changedAt !== undefined &&\n at + MTIME_SLACK_MS < opts.changedAt &&\n opts.ofAnotherDesign?.(item.path) !== true\n )\n unmet.push({\n item,\n reason: \"older than the design's last change — export it again\"\n });\n } else if (item.kind === 'copy' && folded !== undefined) {\n const want = foldCopy(item.text);\n if (want.length > 0 && !folded.some((t) => t.includes(want)))\n unmet.push({\n item,\n reason: 'this copy does not appear in the design'\n });\n }\n }\n return unmet;\n}\n\nexport function checklistNoticeText(unmet: readonly UnmetItem[]): string {\n const lines = unmet.slice(0, 12).map(({ item, reason }) => {\n const what =\n item.kind === 'output'\n ? `required output ${item.path}`\n : `approved copy \"${item.text.length > 80 ? item.text.slice(0, 77) + '…' : item.text}\"`;\n return ` - ${what} — ${reason}`;\n });\n const more =\n unmet.length > 12 ? `\\n … and ${unmet.length - 12} more item(s)` : '';\n return (\n `Note: ${unmet.length} registered acceptance item(s) are UNMET:\\n` +\n lines.join('\\n') +\n more +\n '\\nIf work remains, finish it before reporting done; if an item is genuinely obsolete, register the checklist again without it.'\n );\n}\n\nfunction parseItem(raw: unknown, i: number): ChecklistItem | string {\n if (typeof raw !== 'object' || raw === null)\n return `items[${i}]: not an object`;\n const it = raw as { kind?: unknown; path?: unknown; text?: unknown };\n if (it.kind === 'output') {\n if (typeof it.path !== 'string' || !isAbsolute(it.path))\n return `items[${i}]: kind 'output' needs an absolute \\`path\\``;\n return { kind: 'output', path: it.path };\n }\n if (it.kind === 'copy' || it.kind === 'note') {\n if (typeof it.text !== 'string' || it.text.trim().length === 0)\n return `items[${i}]: kind '${it.kind}' needs a non-empty \\`text\\``;\n return { kind: it.kind, text: it.text };\n }\n return `items[${i}]: \\`kind\\` must be 'output' | 'copy' | 'note'`;\n}\n\nconst json = (body: unknown) => ({\n content: [{ type: 'text' as const, text: JSON.stringify(body) }]\n});\n\nexport function createChecklistTool(opts: {\n list: Checklist;\n /** `output` items: files on this machine's disk. A remote runtime (CoDesign Cloud) has none of the client's. Default true. */\n outputs?: boolean;\n}): HostTool {\n const { list } = opts;\n const outputs = opts.outputs !== false;\n const kinds = outputs ? ['output', 'copy', 'note'] : ['copy', 'note'];\n return {\n name: 'checklist',\n annotations: { readOnlyHint: true },\n description: [\n outputs\n ? \"Register the brief's ACCEPTANCE CHECKLIST — the machine-checkable claims that must hold before the work counts as done. Do this right after intake, before the first edit: extract from the brief every required output file, every string of approved copy that must land verbatim, and note the constraints only you can check. Skip it only when the brief fixes no outputs or copy.\"\n : \"Register the brief's ACCEPTANCE CHECKLIST — the machine-checkable claims that must hold before the work counts as done. Do this right after intake, before the first edit: extract from the brief every string of approved copy that must land verbatim, and note the constraints only you can check. Skip it only when the brief fixes no copy.\",\n '',\n 'Item kinds:',\n ...(outputs\n ? [\n \"- { kind: 'output', path } — a file that must exist when the work is delivered (absolute path, e.g. every variant the brief orders exported with `outPath`).\"\n ]\n : []),\n \"- { kind: 'copy', text } — approved copy that must appear VERBATIM in the design's text (whitespace variants are folded; wording, case and punctuation are exact).\",\n \"- { kind: 'note', text } — a self-check the server cannot verify. Kept on record; never machine-checked.\",\n '',\n `Every \\`export\\` checks the list against the design${outputs ? ' and the disk' : ''} and names the unmet items — treat one exactly like a failing test. Calling \\`checklist\\` again REPLACES the whole list; it lasts for this conversation.`,\n '',\n 'Returns `{ itemCount }`, or `{ items }` (the current list) when called without `items`.'\n ].join('\\n'),\n inputSchema: {\n type: 'object' as const,\n properties: {\n items: {\n type: 'array' as const,\n description: `The full checklist (at most ${MAX_ITEMS} items); replaces the current one. Omit to read the current list.`,\n items: {\n type: 'object' as const,\n properties: {\n kind: {\n type: 'string' as const,\n enum: kinds\n },\n path: { type: 'string' as const },\n text: { type: 'string' as const }\n },\n required: ['kind'],\n additionalProperties: false\n }\n }\n },\n additionalProperties: false\n },\n call: async (rawArgs) => {\n const args = (rawArgs ?? {}) as { items?: unknown };\n if (args.items === undefined) return json({ items: list.items });\n if (!Array.isArray(args.items) || args.items.length > MAX_ITEMS) {\n return errorAnswer(\n `checklist: \\`items\\` must be an array of at most ${MAX_ITEMS} items.`,\n 'bad_args',\n 'items.type'\n );\n }\n const parsed = args.items.map((it: unknown, i: number) =>\n !outputs && (it as { kind?: unknown } | null)?.kind === 'output'\n ? `items[${i}]: \\`kind\\` must be 'copy' | 'note' (files are not checked here)`\n : parseItem(it, i)\n );\n const errors = parsed.filter((p): p is string => typeof p === 'string');\n if (errors.length > 0) {\n return errorAnswer(\n `checklist: ${errors.join('; ')}. Nothing was registered.`,\n 'bad_args',\n 'items.invalid'\n );\n }\n list.items = parsed as ChecklistItem[];\n return json({ itemCount: list.items.length });\n }\n };\n}\n\n/** After a successful export, name the registered items still unmet. Never blocks the deliverable. */\nexport function withChecklistCheck(\n exportTool: HostTool,\n opts: {\n list: Checklist;\n /** Every text string in the design; undefined when it cannot be read. */\n sceneTexts: () => Promise<string[] | undefined>;\n fileModifiedAt: (path: string) => Promise<number | undefined>;\n }\n): HostTool {\n return {\n ...exportTool,\n call: async (args, ctx) => {\n const result = await exportTool.call(args, ctx);\n const { list } = opts;\n if (result.isError === true) return result;\n const outPath = (args as { outPath?: unknown } | undefined)?.outPath;\n if (typeof outPath === 'string')\n (list.wroteFor ??= new Map()).set(outPath, list.design);\n if (list.items.length === 0) return result;\n const current = await opts.sceneTexts().catch(() => undefined);\n if (current !== undefined)\n (list.textsOf ??= new Map()).set(list.design, current);\n const unmet = await verifyChecklist(list.items, {\n sceneTexts:\n current === undefined\n ? undefined\n : [...(list.textsOf?.values() ?? [])].flat(),\n fileModifiedAt: opts.fileModifiedAt,\n ofAnotherDesign: (path) =>\n list.wroteFor?.has(path) === true &&\n list.wroteFor.get(path) !== list.design,\n ...(list.changedAt !== undefined ? { changedAt: list.changedAt } : {})\n });\n if (unmet.length === 0) return result;\n return {\n ...result,\n content: [\n ...result.content,\n { type: 'text' as const, text: checklistNoticeText(unmet) }\n ]\n };\n }\n };\n}\n\n/** A successful call of a tool that changes the design dates every output file before it. */\nexport function withChangeMark(tool: HostTool, list: Checklist): HostTool {\n return {\n ...tool,\n call: async (args, ctx) => {\n const result = await tool.call(args, ctx);\n if (result.isError !== true) list.changedAt = Date.now();\n return result;\n }\n };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CreateExportToolOptions, type HostTool, type ExportFormat } from '@imgly/codesign-sdk/internal';
|
|
2
|
-
export declare function exportDescription(allowLocalPath: boolean, formats: readonly ExportFormat[], fileDelivery: boolean, viewer: boolean): string;
|
|
2
|
+
export declare function exportDescription(allowLocalPath: boolean, formats: readonly ExportFormat[], fileDelivery: boolean, viewer: boolean, onePageDefault: boolean): string;
|
|
3
3
|
/** What to do when the design file changed under a change this session has not written yet. */
|
|
4
4
|
export declare const conflictChoice: (uri: string) => string;
|
|
5
5
|
/** `preview`'s pointer to `export`, for a block alone or at full resolution. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-description.d.ts","sourceRoot":"","sources":["../../../src/catalog/tools/export-description.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"export-description.d.ts","sourceRoot":"","sources":["../../../src/catalog/tools/export-description.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,YAAY,EAClB,MAAM,8BAA8B,CAAC;AAKtC,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,YAAY,EAAE,OAAO,EACrB,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,OAAO,GACtB,MAAM,CAsDR;AAED,+FAA+F;AAC/F,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MACgE,CAAC;AAE9G,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,GAAI,cAAc,OAAO,KAAG,MACiJ,CAAC;AAE9M,2DAA2D;AAC3D,wBAAgB,qBAAqB,CAAC,EACpC,QAA2B,EAC3B,GAAG,IAAI,EACR,EAAE,IAAI,CACL,uBAAuB,EACvB,aAAa,GAAG,UAAU,GAAG,gBAAgB,GAAG,OAAO,CACxD,GAAG;IACF,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;CAC5B,GAAG,QAAQ,CAgDX"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// `export` on this server: the design is saved after every change, so every format, `imgly` included, delivers a copy.
|
|
2
|
-
import { AUDIO_PARAGRAPH, createExportTool, formatPhrases, isAbsolutePath, MP4_FACTS } from '@imgly/codesign-sdk/internal';
|
|
2
|
+
import { AUDIO_PARAGRAPH, createExportTool, formatPhrases, blockIdPhrase, isAbsolutePath, MP4_FACTS, WEBM_PARAGRAPH } from '@imgly/codesign-sdk/internal';
|
|
3
3
|
import { windowsNameRefusal } from './windows-outpath-names.js';
|
|
4
4
|
import { errorAnswer } from '@imgly/codesign-sdk/internal';
|
|
5
|
-
export function exportDescription(allowLocalPath, formats, fileDelivery, viewer) {
|
|
5
|
+
export function exportDescription(allowLocalPath, formats, fileDelivery, viewer, onePageDefault) {
|
|
6
6
|
const has = (f) => formats.includes(f);
|
|
7
7
|
const video = has('mp4');
|
|
8
8
|
const audio = has('wav') || has('m4a');
|
|
@@ -15,7 +15,7 @@ export function exportDescription(allowLocalPath, formats, fileDelivery, viewer)
|
|
|
15
15
|
(allowLocalPath ? ' (plus `path` when you pass `outPath`)' : '') +
|
|
16
16
|
'. `uri` is the durable handle — treat it as opaque and pass it back verbatim where a URI is wanted. `httpUrl` is a fetch link tied to this process — fetch it to download the bytes to disk, or hand it to the user.';
|
|
17
17
|
return [
|
|
18
|
-
`Export the design you are working on — \`format\` picks the deliverable: ${phrases}.
|
|
18
|
+
`Export the design you are working on — \`format\` picks the deliverable: ${phrases}. ${blockIdPhrase(formats, onePageDefault)}`,
|
|
19
19
|
'',
|
|
20
20
|
`Your edits are saved to the design as you make them${viewer ? ' (the viewer shows it)' : ''}, so there is nothing to save: every format is a copy for the person — a pdf to print, a png to post, \`imgly\` the editable design file with its images.`,
|
|
21
21
|
'',
|
|
@@ -43,16 +43,17 @@ export function exportDescription(allowLocalPath, formats, fileDelivery, viewer)
|
|
|
43
43
|
: []),
|
|
44
44
|
...(has('html')
|
|
45
45
|
? [
|
|
46
|
-
'`format=html` renders ONE page (`blockId
|
|
46
|
+
'`format=html` renders ONE page (`blockId`, as above) to responsive HTML5. Default is a single self-contained `.html` (assets inlined; animated designs get a CDN GSAP player injected so the file plays as-is); `html: { assets: "external" }` delivers html + separate image/font files as one `.zip`.'
|
|
47
47
|
]
|
|
48
48
|
: []),
|
|
49
49
|
...(video
|
|
50
50
|
? [
|
|
51
51
|
'',
|
|
52
|
-
'`format=mp4` renders the authored timeline of
|
|
52
|
+
'`format=mp4` renders the authored timeline of one page (`blockId`, as above) to an H.264 `mp4`; duration comes from the scene, resolution from the page or `width`/`height`, which scale the video and leave the design as it is; frame rate is `fps` (default 30). Requires the native engine (the default). Long encodes report MCP progress notifications when the client sends a progressToken. ' +
|
|
53
53
|
MP4_FACTS
|
|
54
54
|
]
|
|
55
55
|
: []),
|
|
56
|
+
...(has('webm') ? ['', WEBM_PARAGRAPH] : []),
|
|
56
57
|
...(audio ? ['', AUDIO_PARAGRAPH] : [])
|
|
57
58
|
].join('\n');
|
|
58
59
|
}
|
|
@@ -64,7 +65,7 @@ export const previewExportAdvice = (fileDelivery) => `\`export\` still produces
|
|
|
64
65
|
export function createLocalExportTool({ platform = process.platform, ...opts }) {
|
|
65
66
|
const tool = createExportTool({
|
|
66
67
|
...opts,
|
|
67
|
-
description: exportDescription(opts.allowLocalPath === true, opts.formats, opts.fileDelivery === true, opts.viewer !== false && opts.fileDelivery !== true),
|
|
68
|
+
description: exportDescription(opts.allowLocalPath === true, opts.formats, opts.fileDelivery === true, opts.viewer !== false && opts.fileDelivery !== true, 'pageIds' in opts.host && opts.host.pageIds !== undefined),
|
|
68
69
|
provides: ['drafts'],
|
|
69
70
|
conflictChoice
|
|
70
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-description.js","sourceRoot":"","sources":["../../../src/catalog/tools/export-description.ts"],"names":[],"mappings":"AAAA,uHAAuH;AAEvH,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,SAAS,EAIV,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,MAAM,UAAU,iBAAiB,CAC/B,cAAuB,EACvB,OAAgC,EAChC,YAAqB,EACrB,MAAe;IAEf,MAAM,GAAG,GAAG,CAAC,CAAe,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG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E;YAClB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YAC9B,IAAI,OAAO,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACvD,sFAAsF;YACtF,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;gBACrB,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,KAAK;gBAChB,SAAS,EAAE,UAAU;gBACrB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,OAAO,EAAE,CAAC;gBACV,KAAK,EAAE,EAAE;gBACT,IAAI;aACL,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,OAAO,CACpB,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,CAC3D,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// `export` on this server: the design is saved after every change, so every format, `imgly` included, delivers a copy.\n\nimport {\n AUDIO_PARAGRAPH,\n createExportTool,\n formatPhrases,\n isAbsolutePath,\n MP4_FACTS,\n type CreateExportToolOptions,\n type HostTool,\n type ExportFormat\n} from '@imgly/codesign-sdk/internal';\n\nimport { windowsNameRefusal } from './windows-outpath-names.js';\nimport { errorAnswer } from '@imgly/codesign-sdk/internal';\n\nexport function exportDescription(\n allowLocalPath: boolean,\n formats: readonly ExportFormat[],\n fileDelivery: boolean,\n viewer: boolean\n): string {\n const has = (f: ExportFormat) => formats.includes(f);\n const video = has('mp4');\n const audio = has('wav') || has('m4a');\n const phrases = formatPhrases(formats);\n const returns = fileDelivery\n ? 'Returns JSON `{ uri, fileUrl, bytes, format }`' +\n (allowLocalPath ? ' (plus `path` when you pass `outPath`)' : '') +\n '. `fileUrl` is a `file://` URI for the artifact on this machine — that IS the deliverable: give it to the user. Designs leave this server as files, and no URL for one exists: once the judge passes, export `imgly` (the editable design) and the format the brief calls for, report each `fileUrl`, and never offer a link.'\n : 'Returns JSON `{ uri, httpUrl, bytes, format }`' +\n (allowLocalPath ? ' (plus `path` when you pass `outPath`)' : '') +\n '. `uri` is the durable handle — treat it as opaque and pass it back verbatim where a URI is wanted. `httpUrl` is a fetch link tied to this process — fetch it to download the bytes to disk, or hand it to the user.';\n return [\n `Export the design you are working on — \\`format\\` picks the deliverable: ${phrases}. Renders \\`blockId\\` — or the whole document when \\`blockId\\` is omitted.`,\n '',\n `Your edits are saved to the design as you make them${viewer ? ' (the viewer shows it)' : ''}, so there is nothing to save: every format is a copy for the person — a pdf to print, a png to post, \\`imgly\\` the editable design file with its images.`,\n '',\n returns,\n ...(allowLocalPath\n ? [\n '',\n \"`outPath` (optional, absolute path including the filename): ALSO write the artifact to that local path — the workspace copy is still written, and the response then carries `path`. Use it when the file is wanted on disk, and always when your environment cannot fetch localhost URLs (sandboxed harnesses, e.g. Claude Cowork — target your session's outputs folder there).\"\n ]\n : []),\n '',\n ...(has('svg')\n ? [\n \"`format=svg` is the engine's vector export: text is outlined into paths (renders identically everywhere, but is not editable text in the SVG), and raster images are embedded in the file at source resolution — an SVG of a photo-heavy design can be much larger than its source images.\",\n ''\n ]\n : []),\n '`format=imgly` writes a portable, self-contained `.imgly` design file (scene + all asset bytes bundled) — the inverse of `import`, and the only format that stays editable: a copy to move, back up or send. Whole-design only: `blockId` is not accepted. Because the archive inlines every referenced asset it is the heaviest call this server makes, and it REFUSES rather than ship a design whose fonts or images could not be loaded — retry it, do not ignore it.',\n '',\n ...(has('pdfx')\n ? [\n '`format=pdfx` runs the print PDF through a PDF/X conversion: CMYK with an embedded ICC profile and PDF/X conformance markers, ready for a print shop. Tune it via the optional `pdfx` object — conformance standard (X-4 default / X-3 / X-1a), output profile (fogra39/gracol/srgb/custom), transparency flattening and its resolution, OutputIntent metadata. srgb is never PDF/X compliant. The result carries `warnings` when the file breaks its standard (each names the fix): relay them or re-export before calling the file print-ready. CMYK and spot colours, bleed and the print checklist: `skill://codesign/formats/print.md`.',\n ''\n ]\n : []),\n ...(has('html')\n ? [\n '`format=html` renders ONE page (`blockId` required — pass a page id) to responsive HTML5. Default is a single self-contained `.html` (assets inlined; animated designs get a CDN GSAP player injected so the file plays as-is); `html: { assets: \"external\" }` delivers html + separate image/font files as one `.zip`.'\n ]\n : []),\n ...(video\n ? [\n '',\n '`format=mp4` renders the authored timeline of a page (`blockId` required, a page id) to an H.264 `mp4`; duration comes from the scene, resolution from the page or `width`/`height`, which scale the video and leave the design as it is; frame rate is `fps` (default 30). Requires the native engine (the default). Long encodes report MCP progress notifications when the client sends a progressToken. ' +\n MP4_FACTS\n ]\n : []),\n ...(audio ? ['', AUDIO_PARAGRAPH] : [])\n ].join('\\n');\n}\n\n/** What to do when the design file changed under a change this session has not written yet. */\nexport const conflictChoice = (uri: string): string =>\n `\\`open({ uri: '${uri}' })\\` continues on their version; tell the user that your last change was not kept.`;\n\n/** `preview`'s pointer to `export`, for a block alone or at full resolution. */\nexport const previewExportAdvice = (fileDelivery: boolean): string =>\n `\\`export\\` still produces the block alone when you need it with an alpha channel. For native-resolution certainty, \\`export\\` the page and open ${fileDelivery ? 'the file it writes' : 'its `httpUrl`'}.`;\n\n/** `export` on this server: every format is a delivery. */\nexport function createLocalExportTool({\n platform = process.platform,\n ...opts\n}: Omit<\n CreateExportToolOptions,\n 'description' | 'provides' | 'conflictChoice' | 'sends'\n> & {\n /** Whose file names `outPath` must respect. Default: this process's. */\n platform?: NodeJS.Platform;\n}): HostTool {\n const tool = createExportTool({\n ...opts,\n description: exportDescription(\n opts.allowLocalPath === true,\n opts.formats,\n opts.fileDelivery === true,\n opts.viewer !== false && opts.fileDelivery !== true\n ),\n provides: ['drafts'],\n conflictChoice\n });\n const refusal = (\n args: unknown\n ): { text: string; errorDetail: string } | undefined => {\n const outPath = (args as { outPath?: unknown } | undefined)?.outPath;\n if (\n opts.allowLocalPath !== true ||\n typeof outPath !== 'string' ||\n !isAbsolutePath(outPath)\n )\n return undefined;\n const windows = windowsNameRefusal(outPath, platform);\n return windows === undefined\n ? undefined\n : { text: windows, errorDetail: 'outPath.windows_name' };\n };\n return {\n ...tool,\n call: (args, ctx) => {\n const refused = refusal(args);\n if (refused === undefined) return tool.call(args, ctx);\n // The inner tool reports its own calls, so a refusal before it must be recorded here.\n opts.telemetry?.record({\n tool: 'export',\n succeeded: false,\n errorCode: 'bad_args',\n errorDetail: refused.errorDetail,\n totalMs: 0,\n spans: [],\n args\n });\n return Promise.resolve(\n errorAnswer(refused.text, 'bad_args', refused.errorDetail)\n );\n }\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"export-description.js","sourceRoot":"","sources":["../../../src/catalog/tools/export-description.ts"],"names":[],"mappings":"AAAA,uHAAuH;AAEvH,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,EACd,SAAS,EACT,cAAc,EAIf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,MAAM,UAAU,iBAAiB,CAC/B,cAAuB,EACvB,OAAgC,EAChC,YAAqB,EACrB,MAAe,EACf,cAAuB;IAEvB,MAAM,GAAG,GAAG,CAAC,CAAe,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,YAAY;QAC1B,CAAC,CAAC,gDAAgD;YAChD,CAAC,cAAc,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChE,+TAA+T;QACjU,CAAC,CAAC,gDAAgD;YAChD,CAAC,cAAc,CAAC,CAAC,C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E,EAAE;YAClB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YAC9B,IAAI,OAAO,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACvD,sFAAsF;YACtF,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;gBACrB,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,KAAK;gBAChB,SAAS,EAAE,UAAU;gBACrB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,OAAO,EAAE,CAAC;gBACV,KAAK,EAAE,EAAE;gBACT,IAAI;aACL,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,OAAO,CACpB,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,CAC3D,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// `export` on this server: the design is saved after every change, so every format, `imgly` included, delivers a copy.\n\nimport {\n AUDIO_PARAGRAPH,\n createExportTool,\n formatPhrases,\n blockIdPhrase,\n isAbsolutePath,\n MP4_FACTS,\n WEBM_PARAGRAPH,\n type CreateExportToolOptions,\n type HostTool,\n type ExportFormat\n} from '@imgly/codesign-sdk/internal';\n\nimport { windowsNameRefusal } from './windows-outpath-names.js';\nimport { errorAnswer } from '@imgly/codesign-sdk/internal';\n\nexport function exportDescription(\n allowLocalPath: boolean,\n formats: readonly ExportFormat[],\n fileDelivery: boolean,\n viewer: boolean,\n onePageDefault: boolean\n): string {\n const has = (f: ExportFormat) => formats.includes(f);\n const video = has('mp4');\n const audio = has('wav') || has('m4a');\n const phrases = formatPhrases(formats);\n const returns = fileDelivery\n ? 'Returns JSON `{ uri, fileUrl, bytes, format }`' +\n (allowLocalPath ? ' (plus `path` when you pass `outPath`)' : '') +\n '. `fileUrl` is a `file://` URI for the artifact on this machine — that IS the deliverable: give it to the user. Designs leave this server as files, and no URL for one exists: once the judge passes, export `imgly` (the editable design) and the format the brief calls for, report each `fileUrl`, and never offer a link.'\n : 'Returns JSON `{ uri, httpUrl, bytes, format }`' +\n (allowLocalPath ? ' (plus `path` when you pass `outPath`)' : '') +\n '. `uri` is the durable handle — treat it as opaque and pass it back verbatim where a URI is wanted. `httpUrl` is a fetch link tied to this process — fetch it to download the bytes to disk, or hand it to the user.';\n return [\n `Export the design you are working on — \\`format\\` picks the deliverable: ${phrases}. ${blockIdPhrase(formats, onePageDefault)}`,\n '',\n `Your edits are saved to the design as you make them${viewer ? ' (the viewer shows it)' : ''}, so there is nothing to save: every format is a copy for the person — a pdf to print, a png to post, \\`imgly\\` the editable design file with its images.`,\n '',\n returns,\n ...(allowLocalPath\n ? [\n '',\n \"`outPath` (optional, absolute path including the filename): ALSO write the artifact to that local path — the workspace copy is still written, and the response then carries `path`. Use it when the file is wanted on disk, and always when your environment cannot fetch localhost URLs (sandboxed harnesses, e.g. Claude Cowork — target your session's outputs folder there).\"\n ]\n : []),\n '',\n ...(has('svg')\n ? [\n \"`format=svg` is the engine's vector export: text is outlined into paths (renders identically everywhere, but is not editable text in the SVG), and raster images are embedded in the file at source resolution — an SVG of a photo-heavy design can be much larger than its source images.\",\n ''\n ]\n : []),\n '`format=imgly` writes a portable, self-contained `.imgly` design file (scene + all asset bytes bundled) — the inverse of `import`, and the only format that stays editable: a copy to move, back up or send. Whole-design only: `blockId` is not accepted. Because the archive inlines every referenced asset it is the heaviest call this server makes, and it REFUSES rather than ship a design whose fonts or images could not be loaded — retry it, do not ignore it.',\n '',\n ...(has('pdfx')\n ? [\n '`format=pdfx` runs the print PDF through a PDF/X conversion: CMYK with an embedded ICC profile and PDF/X conformance markers, ready for a print shop. Tune it via the optional `pdfx` object — conformance standard (X-4 default / X-3 / X-1a), output profile (fogra39/gracol/srgb/custom), transparency flattening and its resolution, OutputIntent metadata. srgb is never PDF/X compliant. The result carries `warnings` when the file breaks its standard (each names the fix): relay them or re-export before calling the file print-ready. CMYK and spot colours, bleed and the print checklist: `skill://codesign/formats/print.md`.',\n ''\n ]\n : []),\n ...(has('html')\n ? [\n '`format=html` renders ONE page (`blockId`, as above) to responsive HTML5. Default is a single self-contained `.html` (assets inlined; animated designs get a CDN GSAP player injected so the file plays as-is); `html: { assets: \"external\" }` delivers html + separate image/font files as one `.zip`.'\n ]\n : []),\n ...(video\n ? [\n '',\n '`format=mp4` renders the authored timeline of one page (`blockId`, as above) to an H.264 `mp4`; duration comes from the scene, resolution from the page or `width`/`height`, which scale the video and leave the design as it is; frame rate is `fps` (default 30). Requires the native engine (the default). Long encodes report MCP progress notifications when the client sends a progressToken. ' +\n MP4_FACTS\n ]\n : []),\n ...(has('webm') ? ['', WEBM_PARAGRAPH] : []),\n ...(audio ? ['', AUDIO_PARAGRAPH] : [])\n ].join('\\n');\n}\n\n/** What to do when the design file changed under a change this session has not written yet. */\nexport const conflictChoice = (uri: string): string =>\n `\\`open({ uri: '${uri}' })\\` continues on their version; tell the user that your last change was not kept.`;\n\n/** `preview`'s pointer to `export`, for a block alone or at full resolution. */\nexport const previewExportAdvice = (fileDelivery: boolean): string =>\n `\\`export\\` still produces the block alone when you need it with an alpha channel. For native-resolution certainty, \\`export\\` the page and open ${fileDelivery ? 'the file it writes' : 'its `httpUrl`'}.`;\n\n/** `export` on this server: every format is a delivery. */\nexport function createLocalExportTool({\n platform = process.platform,\n ...opts\n}: Omit<\n CreateExportToolOptions,\n 'description' | 'provides' | 'conflictChoice' | 'sends'\n> & {\n /** Whose file names `outPath` must respect. Default: this process's. */\n platform?: NodeJS.Platform;\n}): HostTool {\n const tool = createExportTool({\n ...opts,\n description: exportDescription(\n opts.allowLocalPath === true,\n opts.formats,\n opts.fileDelivery === true,\n opts.viewer !== false && opts.fileDelivery !== true,\n 'pageIds' in opts.host && opts.host.pageIds !== undefined\n ),\n provides: ['drafts'],\n conflictChoice\n });\n const refusal = (\n args: unknown\n ): { text: string; errorDetail: string } | undefined => {\n const outPath = (args as { outPath?: unknown } | undefined)?.outPath;\n if (\n opts.allowLocalPath !== true ||\n typeof outPath !== 'string' ||\n !isAbsolutePath(outPath)\n )\n return undefined;\n const windows = windowsNameRefusal(outPath, platform);\n return windows === undefined\n ? undefined\n : { text: windows, errorDetail: 'outPath.windows_name' };\n };\n return {\n ...tool,\n call: (args, ctx) => {\n const refused = refusal(args);\n if (refused === undefined) return tool.call(args, ctx);\n // The inner tool reports its own calls, so a refusal before it must be recorded here.\n opts.telemetry?.record({\n tool: 'export',\n succeeded: false,\n errorCode: 'bad_args',\n errorDetail: refused.errorDetail,\n totalMs: 0,\n spans: [],\n args\n });\n return Promise.resolve(\n errorAnswer(refused.text, 'bad_args', refused.errorDetail)\n );\n }\n };\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type ExportFormat } from '@imgly/codesign-sdk/internal';
|
|
2
|
-
/** What this server's engine sessions export; `mp4`, `wav` and `m4a` only where the engine can encode video
|
|
3
|
-
export declare function exportFormatsFor(video: boolean): ExportFormat[];
|
|
2
|
+
/** What this server's engine sessions export; `mp4`, `wav` and `m4a` only where the engine can encode video, `webm` and `weba` only where the unit's media probe found WebM too. */
|
|
3
|
+
export declare function exportFormatsFor(video: boolean, webm?: boolean): ExportFormat[];
|
|
4
4
|
//# sourceMappingURL=modules.d.ts.map
|
package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../../src/catalog/tools/export-formats/modules.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../../src/catalog/tools/export-formats/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,8BAA8B,CAAC;AActC,oLAAoL;AACpL,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,UAAQ,GAAG,YAAY,EAAE,CAE7E"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { sessionFormats } from '@imgly/codesign-sdk/internal';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
const named = () => {
|
|
3
|
+
throw new Error('only named: the engine session holds the exporters');
|
|
4
|
+
};
|
|
5
|
+
/** By name only: every engine session of this server, in process or the executor image, runs `createNodeExporters`'. */
|
|
6
|
+
const NODE_EXPORTERS = {
|
|
7
|
+
html: named,
|
|
8
|
+
idml: named,
|
|
9
|
+
pdfx: named,
|
|
10
|
+
psd: named,
|
|
11
|
+
fig: named
|
|
12
|
+
};
|
|
13
|
+
/** What this server's engine sessions export; `mp4`, `wav` and `m4a` only where the engine can encode video, `webm` and `weba` only where the unit's media probe found WebM too. */
|
|
14
|
+
export function exportFormatsFor(video, webm = false) {
|
|
15
|
+
return sessionFormats({ video, webm, exporters: NODE_EXPORTERS }).exports;
|
|
6
16
|
}
|
|
7
17
|
//# sourceMappingURL=modules.js.map
|
package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../../../src/catalog/tools/export-formats/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,
|
|
1
|
+
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../../../src/catalog/tools/export-formats/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAEtC,MAAM,KAAK,GAAG,GAAU,EAAE;IACxB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;AACxE,CAAC,CAAC;AACF,wHAAwH;AACxH,MAAM,cAAc,GAAwB;IAC1C,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACX,CAAC;AAEF,oLAAoL;AACpL,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,IAAI,GAAG,KAAK;IAC3D,OAAO,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC;AAC5E,CAAC","sourcesContent":["import {\n sessionFormats,\n type Exporters,\n type ExportFormat\n} from '@imgly/codesign-sdk/internal';\n\nconst named = (): never => {\n throw new Error('only named: the engine session holds the exporters');\n};\n/** By name only: every engine session of this server, in process or the executor image, runs `createNodeExporters`'. */\nconst NODE_EXPORTERS: Required<Exporters> = {\n html: named,\n idml: named,\n pdfx: named,\n psd: named,\n fig: named\n};\n\n/** What this server's engine sessions export; `mp4`, `wav` and `m4a` only where the engine can encode video, `webm` and `weba` only where the unit's media probe found WebM too. */\nexport function exportFormatsFor(video: boolean, webm = false): ExportFormat[] {\n return sessionFormats({ video, webm, exporters: NODE_EXPORTERS }).exports;\n}\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type DesignHost, type HostTool, type SessionId, type SessionState } from '@imgly/codesign-sdk/internal';
|
|
2
|
+
import { type AssetUploadSigner } from './asset-add.js';
|
|
3
|
+
export declare const DESIGN_UPLOAD_EXTENSIONS: ReadonlySet<string>;
|
|
2
4
|
export interface CreateImportToolOptions {
|
|
3
5
|
/** The host that resolves the source and owns the engine. */
|
|
4
6
|
host: Pick<DesignHost, 'load'>;
|
|
@@ -8,6 +10,8 @@ export interface CreateImportToolOptions {
|
|
|
8
10
|
state?: SessionState;
|
|
9
11
|
/** Honour a `{ path }` source: the process shares the caller's disk. */
|
|
10
12
|
allowPath?: boolean;
|
|
13
|
+
/** Runs away from the caller's machine (CoDesign Cloud): `{ path }` is refused, whatever it names. */
|
|
14
|
+
remote?: boolean;
|
|
11
15
|
/** The demo designs, keyed by id; only the ids are read. Omitted or empty: no `demo` arm. */
|
|
12
16
|
demos?: Record<string, unknown>;
|
|
13
17
|
/** How this deployment brings in a non-design file, as one full sentence; omitted ⇒ no advice. */
|
|
@@ -20,6 +24,12 @@ export interface CreateImportToolOptions {
|
|
|
20
24
|
addressed?: boolean;
|
|
21
25
|
/** A `{ uri }` of an installed pack's template starts a new design from it. */
|
|
22
26
|
templates?: boolean;
|
|
27
|
+
/** The cloud's: the `upload` arm, a presigned PUT of a design file into the workspace, which `{ uri }` then imports. */
|
|
28
|
+
signUpload?: AssetUploadSigner;
|
|
23
29
|
}
|
|
30
|
+
/** A refused source (or path) as its refusal names it: one line of about 100 characters, as a `data:` uri may be megabytes. */
|
|
31
|
+
export declare function oneLine(source: string): string;
|
|
32
|
+
/** Why the cloud refuses a source its executor cannot fetch, and the upload that works instead where there is one. */
|
|
33
|
+
export declare const remoteSourceRefusal: (upload: boolean, url?: string) => string;
|
|
24
34
|
export declare function createImportTool(opts: CreateImportToolOptions): HostTool;
|
|
25
35
|
//# sourceMappingURL=import.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../src/catalog/tools/import.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../src/catalog/tools/import.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,UAAU,EACf,KAAK,QAAQ,EAGb,KAAK,SAAS,EACd,KAAK,YAAY,EAElB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAyBxB,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,CAExD,CAAC;AA4NF,MAAM,WAAW,uBAAuB;IACtC,6DAA6D;IAC7D,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAC/B,gEAAgE;IAChE,OAAO,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC,0FAA0F;IAC1F,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,w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