@canvatopsd/magiclayers 2.6.1 → 2.6.7

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 CHANGED
@@ -11,17 +11,20 @@ magiclayers skill install agents
11
11
  Node.js 22 or newer. Native executables are included for macOS Apple Silicon and Linux x64 (glibc 2.31+); no Rust, Photoshop, account registration or API key is required. Other platforms are not included in this npm release.
12
12
 
13
13
  ```sh
14
- magiclayers convert image.png --email buyer@example.com
14
+ magiclayers convert image.png
15
15
  magiclayers checkout TASK_ID
16
- # After payment is verified:
16
+ # After the buyer completes checkout:
17
+ magiclayers verify-payment TASK_ID
17
18
  magiclayers status TASK_ID
18
19
  magiclayers download TASK_ID --output delivery.zip
19
20
  ```
20
21
 
21
- Add `--print` to `convert` for automatic spot-color separations. Business output is JSON. Use full option names, keep the same task ID when resuming, and back up the private access file. The CLI never automatically polls, retries, creates a replacement payment or overwrites a downloaded file.
22
+ Use `--email` for optional delivery notifications. Add `--print` to `convert` for automatic spot-color separations. Business output is JSON. Use full option names, keep the same task ID when resuming, and back up the private access file. The CLI never automatically polls, retries, creates a replacement payment or overwrites a downloaded file.
23
+
24
+ For remote AI clients, use the [MagicLayers MCP endpoint](https://magiclayers.app/mcp) with Streamable HTTP. The same Agent Skill covers both access methods.
22
25
 
23
26
  Install the bundled Skill for `codex`, `claude-code`, `cursor`, `copilot` or generic `agents`. Use `--dir` for a custom parent directory and start a new Agent session after installation.
24
27
 
25
28
  [Usage and recovery](doc/usage.md) · [Agent Skill](skills/magiclayers/SKILL.md) · [Release guide](doc/npm-release.md) · [Website](https://magiclayers.app/ai-agent/)
26
29
 
27
- The hosted service defaults to `https://magiclayers.app`. Local development selects `--base-url http://127.0.0.1:3000` explicitly. Buyers complete hosted checkout before processing starts. PayPal confirmation is explicit after buyer approval. Delivery size and SHA-256 are verified.
30
+ The hosted service defaults to `https://magiclayers.app`. Local development selects `--base-url http://127.0.0.1:3000` explicitly. Buyers complete hosted checkout before processing starts. Use `magiclayers verify-payment TASK_ID` after the buyer completes Stripe checkout. Delivery size and SHA-256 are verified.
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "authentication": "task-scoped access key; no account",
4
+ "remoteMcp": {
5
+ "url": "https://magiclayers.app/mcp",
6
+ "transport": "streamable-http"
7
+ },
4
8
  "commands": [
5
9
  {
6
10
  "method": "POST",
@@ -28,21 +32,15 @@
28
32
  },
29
33
  {
30
34
  "method": "POST",
31
- "path": "/api/v2/task/checkout/open",
35
+ "path": "/api/v2/task/stripe/prepare",
32
36
  "contentType": "application/json",
33
- "description": "Return the one-time Creem checkout link"
37
+ "description": "Open hosted Stripe checkout with Adaptive Pricing"
34
38
  },
35
39
  {
36
40
  "method": "POST",
37
- "path": "/api/v2/task/paypal/prepare",
41
+ "path": "/api/v2/task/stripe/confirm",
38
42
  "contentType": "application/json",
39
- "description": "Prepare the task's hosted PayPal checkout"
40
- },
41
- {
42
- "method": "POST",
43
- "path": "/api/v2/task/paypal/confirm",
44
- "contentType": "application/json",
45
- "description": "Confirm a PayPal order and capture only after buyer approval"
43
+ "description": "Verify the saved Stripe checkout and start paid work"
46
44
  },
47
45
  {
48
46
  "method": "POST",
@@ -50,12 +48,6 @@
50
48
  "contentType": "application/json",
51
49
  "description": "Read the last verified payment state"
52
50
  },
53
- {
54
- "method": "POST",
55
- "path": "/api/v2/task/payment/verify",
56
- "contentType": "application/json",
57
- "description": "Verify an existing provider checkout; queue only verified paid work"
58
- },
59
51
  {
60
52
  "method": "POST",
61
53
  "path": "/api/v2/task/delivery/read",
package/doc/usage.md CHANGED
@@ -17,31 +17,26 @@ The Skill also supports `codex`, `claude-code`, `cursor` and `copilot`; `--dir`
17
17
 
18
18
  The default service is `https://magiclayers.app` (prod). Select local explicitly with `--base-url http://127.0.0.1:3000` or `MAGICLAYERS_BASE_URL`. Doctor reads configuration; it does not prove payment or delivery. The npm package is `@canvatopsd/magiclayers`; its command and Skill name are both `magiclayers`. The selected Web release is published at `/agent/release.json`.
19
19
 
20
+ For AI apps that support remote MCP, connect to `https://magiclayers.app/mcp` via Streamable HTTP. See the [AI agent integration page](https://magiclayers.app/ai-agent/).
21
+
20
22
  ## Convert, pay, inspect, download
21
23
 
22
24
  ```sh
23
- magiclayers convert ./image.png --email buyer@example.com --dry-run
24
- magiclayers convert ./image.png --email buyer@example.com
25
+ magiclayers convert ./image.png --dry-run
26
+ magiclayers convert ./image.png
25
27
  # Use the task ID returned by convert:
26
28
  magiclayers checkout TASK_ID
27
29
  # After the buyer completes checkout:
30
+ magiclayers verify-payment TASK_ID
28
31
  magiclayers status TASK_ID
29
32
  magiclayers download TASK_ID --output ./delivery.zip
30
33
  ```
31
34
 
32
- Input is PNG/JPEG/WebP, up to 30 MiB. Add `--print` to both conversion commands for automatic spot separations; otherwise the result is editable design layers. `--locale` defaults to `en-US`. Downloads default to the delivery package; use `--kind psd` or `--kind preview` for a single file. Business options always use full names such as `--email` and `--output`.
33
-
34
- Create freezes the server quote and saves private access before sending. It does not charge. Checkout defaults to Creem and returns a hosted link for the buyer. Read verified financial facts with `magiclayers payment TASK_ID`. A redirect or browser success message alone is not proof of payment.
35
-
36
- For PayPal:
35
+ Input is PNG/JPEG/WebP, up to 30 MiB. Pass `--email` to receive optional delivery notifications. Add `--print` to both conversion commands for automatic spot separations; otherwise the result is editable design layers. `--locale` defaults to `en-US`. Downloads default to the delivery package; use `--kind psd` or `--kind preview` for a single file. Business options always use full names such as `--email` and `--output`.
37
36
 
38
- ```sh
39
- magiclayers checkout TASK_ID --provider paypal
40
- # Only after buyer approval:
41
- magiclayers verify-payment TASK_ID --provider paypal
42
- ```
37
+ Create freezes the server quote and saves private access before sending. It does not charge. Checkout returns a hosted Stripe link. Adaptive Pricing offers the buyer local currency where supported. Read verified financial facts with `magiclayers payment TASK_ID`. A redirect or browser success message alone is not proof of payment.
43
38
 
44
- PayPal confirmation can capture the saved order after approval. Creem verification uses `magiclayers verify-payment TASK_ID --checkout-id CHECKOUT_ID` and queues verification (HTTP 202). `--checkout-id` belongs only to Creem. Neither channel provides a refund command. Keep the original provider once checkout exists.
39
+ After the buyer completes the Stripe checkout, run `magiclayers verify-payment TASK_ID`.
45
40
 
46
41
  ## Resume and protect access
47
42
 
@@ -49,6 +44,8 @@ Keep the returned UUIDv7 (compact or original form). After an uncertain submissi
49
44
 
50
45
  Access files live under the OS local application-data directory in `magiclayers/tasks/<uuid>.json`, overridable by `MAGICLAYERS_ACCESS_DIRECTORY`. On macOS: `~/Library/Application Support/magiclayers/tasks/`. Unix directories/files use 0700/0600. Back them up privately; restore the original file on another machine and use the same service origin. Missing access is an explicit error. Do not share access keys, private task links or signed download URLs.
51
46
 
47
+ A tool runner can resume an MCP task by setting `MAGICLAYERS_TASK_REFERENCE` for that command to the private `task_ref` returned by MagicLayers and passing its matching task ID. Use the service origin that issued the reference. This works for checkout, payment, verification, status and downloads. Supply it through the runner's secret environment and keep it out of shell history and chat messages.
48
+
52
49
  ## Print output
53
50
 
54
51
  New `--print` tasks automatically extract up to twelve inks at 300 DPI on white, preserving source pixel dimensions. Transparent input is composited onto white. The ZIP contains continuous-tone TIFF/PNG plates, an RGB layered PSD and proof. Halftoning, trapping, underbase and native Photoshop spot channels remain downstream. No manual palette is needed. Only retries of existing explicitly configured tasks need their saved `--print-settings` file together with `--print`.
@@ -57,7 +54,7 @@ New `--print` tasks automatically extract up to twelve inks at 300 DPI on white,
57
54
 
58
55
  Business commands return `{"ok":true,"data":...}` or `{"ok":false,"error":{"code":"...","message":"..."}}`. Argument errors exit 2; command failures exit 1. API failures retain HTTP status and code. Help/version are plain text. JSON is always used for business output; no `--json` flag is required or accepted.
59
56
 
60
- `magiclayers discover` returns the offline API-owned [command inventory](../contracts/guest-agent-commands.json). Use the specific CLI commands for business actions; generic `request`, `read` aliases and the earlier `task` command layer are not exposed.
57
+ `magiclayers discover` returns the offline API-owned [command inventory](https://magiclayers.app/agent/commands.json). Use the specific CLI commands for business actions; generic `request`, `read` aliases and the earlier `task` command layer are not exposed.
61
58
 
62
59
  Downloads verify byte count and SHA-256 and never overwrite an existing output. The service checks current payment when download links are used; refunds/disputes revoke access. Transport errors do not print signed download URLs. Local payment uses test credentials; prod uses live payment. Local checks do not imply real payment acceptance.
63
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canvatopsd/magiclayers",
3
- "version": "2.6.1",
3
+ "version": "2.6.7",
4
4
  "description": "MagicLayers native CLI and Agent Skill for image-to-PSD layers, automatic spot-color separations, hosted checkout and verified downloads.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -46,5 +46,5 @@
46
46
  "linux-x64"
47
47
  ]
48
48
  },
49
- "gitHead": "2ca4334728d520f5a0cca03c5b82ef9400118739"
49
+ "gitHead": "532ecc6a6e24409f8afe9c59160a31176cfaf72d"
50
50
  }
package/release.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "2.6.1",
3
- "revision": "2ca4334728d520f5a0cca03c5b82ef9400118739",
2
+ "version": "2.6.7",
3
+ "revision": "532ecc6a6e24409f8afe9c59160a31176cfaf72d",
4
4
  "environment": "prod",
5
5
  "targets": [
6
6
  "darwin-arm64",
@@ -8,10 +8,10 @@
8
8
  ],
9
9
  "binaries": {
10
10
  "darwin-arm64": {
11
- "sha256": "13a6923a31c5110f8cb74eb57247d82ba45c9b5af4e31046daebea2bc6cdc5a0"
11
+ "sha256": "300812d1550ae01d3b18bbb5ea1497205206a77ffa9001857b1b0cd074047336"
12
12
  },
13
13
  "linux-x64": {
14
- "sha256": "2207ef019e8affbe80c4cfb1f20f18832142cdadb8fd76e1692d34be83615241"
14
+ "sha256": "3773bcf58bf4c8390ce32f13340c5e2e668e0c85b31969f967a0d0944aac463b"
15
15
  }
16
16
  }
17
17
  }
Binary file
Binary file
@@ -1,35 +1,46 @@
1
1
  ---
2
2
  name: magiclayers
3
- description: Convert images into editable PSD layers or automatic spot-color print separations with the MagicLayers CLI; submit tasks, share hosted checkout, inspect progress and download verified delivery.
3
+ description: Convert PNG, JPEG or WebP images into editable PSDs or automatic spot-color print separations through the MagicLayers remote MCP or CLI. Submit an image, share hosted checkout, verify payment, check progress and download the finished files.
4
4
  ---
5
5
 
6
- ## Setup
6
+ ## Choose an access method
7
7
 
8
- Use the installed `magiclayers` command. Check `--version`, `discover` and `doctor`. If missing, install Node.js 22 or newer and run `npm install -g @canvatopsd/magiclayers`. The package includes native executables for macOS Apple Silicon and Linux x64 (glibc 2.31 or newer); Rust is not required. Other platforms are not supported by this npm release. Install this bundled Skill with `magiclayers skill install agents` or a supported agent name; `--dir` selects a parent skills directory. Do not overwrite different local Skill instructions. Start a new agent session after installation.
8
+ If the current AI client supports remote MCP, connect to `https://magiclayers.app/mcp` using Streamable HTTP. Discover tools through the MCP client. If the agent can run terminal commands, use the `magiclayers` CLI. Each method supports the complete task workflow. The user pays on the hosted Stripe page. MagicLayers requires no account or API key.
9
9
 
10
- The default service is prod, `https://magiclayers.app`. Select local explicitly with `--base-url http://127.0.0.1:3000`. No account login or API key is required. Business output is always JSON (`ok/data` or `ok/error`); errors exit nonzero. Use full option names. There is no `--json`, generic `request`, `read` alias or `task` command prefix.
10
+ Get the original PNG, JPEG or WebP, up to 30 MiB, and ask whether the user wants editable design layers or automatic spot-color print separations. Offer an email address only for optional delivery notifications. Use the same task for submission, checkout, status and delivery.
11
11
 
12
- ## Image workflow
12
+ ## Remote MCP workflow
13
13
 
14
- Get the user's source image, delivery email and choice of editable design layers or print separations. Email is an auxiliary delivery/recovery contact; payment, task status and downloads are available directly through CLI commands without an email confirmation step.
14
+ 1. If requested, preflight the original image with `convert` and `dry_run: true`. Use the client's file input. API integrations may supply the image bytes as `image_base64` from client code.
15
+ 2. Call `prepare_conversion`, keep the returned `task_id` and private `task_ref`, and pass `task_ref` to `convert` with the same image. Set `print: true` for spot-color separations. Submission freezes the quote without charging.
16
+ 3. Call `checkout` with the task ID and reference. Show the quote and hosted Stripe link so the user can pay. Once they finish, call `verify_payment` and `status`. Use `payment` to read the latest verified financial state.
17
+ 4. Once the task is ready, call `download`. The default kind is `package`. Choose `psd` or `preview` for a single file. The receipt includes a short-lived link, byte count and SHA-256.
18
+
19
+ After an uncertain submission, check `status` for the original task before retrying with the same image and options. Keep task references and signed download links private.
20
+
21
+ ## CLI workflow
22
+
23
+ Use the installed `magiclayers` command. Check `--version`, `discover` and `doctor`. For the commands below, use CLI 2.6.7 or later. Install Node.js 22 or newer and run `npm install -g @canvatopsd/magiclayers` if needed. The package includes native executables for macOS Apple Silicon and Linux x64/glibc 2.31+.
15
24
 
16
25
  ```sh
17
- magiclayers convert ./image.png --email buyer@example.com --dry-run
18
- magiclayers convert ./image.png --email buyer@example.com
26
+ magiclayers convert ./image.png --dry-run
27
+ magiclayers convert ./image.png
19
28
  magiclayers checkout TASK_ID
20
- # After buyer payment:
29
+ # After the buyer completes Stripe checkout:
30
+ magiclayers verify-payment TASK_ID
21
31
  magiclayers status TASK_ID
32
+ # After delivery is ready:
22
33
  magiclayers download TASK_ID --output ./delivery.zip
23
34
  ```
24
35
 
25
- Dry-run validates local arguments only and does not submit. Conversion freezes a quote and saves private access before sending; it does not charge. Share the hosted checkout link with the buyer. `payment TASK_ID` reads verified financial facts. For Creem, `verify-payment TASK_ID --checkout-id CHECKOUT_ID` queues provider verification. For PayPal, use `checkout TASK_ID --provider paypal`; only after buyer approval, run `verify-payment TASK_ID --provider paypal`, which can capture the saved order. Do not treat a redirect or HTTP 200 alone as proof of paid delivery. No refund command exists.
36
+ Use `--email` for delivery notifications and `--print` for spot separations. CLI dry-run validates local arguments. The CLI saves private access before submitting, returns JSON for business commands and exits nonzero on error. Use full option names. `--kind psd` and `--kind preview` select individual files. The download command verifies size and SHA-256 and preserves existing output files.
26
37
 
27
- Add `--print` to both convert commands for print separations. New tasks automatically extract up to twelve inks at 300 DPI on white, retaining pixel dimensions. They need no palette/settings file. The ZIP includes continuous-tone TIFF/PNG plates, RGB layered PSD and proof; halftoning, trapping, underbase and native spot channels remain downstream. Use `--print-settings` only with an existing task's original explicit setup. Do not route print work through Canva.
38
+ Prod defaults to `https://magiclayers.app`. Use `--base-url http://127.0.0.1:3000` for local. The bundled Skill can be installed with `magiclayers skill install agents` or a supported agent name. `--dir` selects a parent skills directory. Start a new agent session after installation.
28
39
 
29
- ## Resume and download
40
+ ## Resume and print output
30
41
 
31
- Preserve the returned task ID. On uncertain submission, inspect that same ID, then retry only if needed with `convert --task-id TASK_ID` and identical image/email/locale/workflow. Never create duplicate tasks or payments for recovery. Status checks are explicit; do not start automatic polling.
42
+ Keep the original task ID. For an uncertain CLI submission, inspect that task before retrying `convert --task-id TASK_ID` with identical image, email, locale and workflow. Restore the original private access file from `magiclayers/tasks/` in the OS application-data directory if needed. A terminal-capable agent may resume an MCP task with the same task ID and service origin by supplying `MAGICLAYERS_TASK_REFERENCE` through its private process environment. Keep credentials out of chat messages and logs. Check status explicitly when needed.
32
43
 
33
- Private access is saved in the OS local application-data directory under `magiclayers/tasks/`, overridable with `MAGICLAYERS_ACCESS_DIRECTORY`. Missing access requires restoring the original private file, not a new payment. Do not print access keys or share private task/signed download links. Downloads verify size/SHA-256 and never overwrite output. Use `--kind psd` or `--kind preview` when needed.
44
+ New print tasks automatically extract up to twelve inks at 300 DPI on white, retaining pixel dimensions. The ZIP contains continuous-tone TIFF/PNG plates, an RGB layered PSD and a proof. Use `--print-settings` or `print_settings` only when retrying a task with an existing explicit setup.
34
45
 
35
- Detailed installation, payment and recovery reference: https://magiclayers.app/agent/doc/usage.md.
46
+ [Integration and installation](https://magiclayers.app/ai-agent/) · [CLI usage and recovery](https://magiclayers.app/agent/doc/usage.md)