@ikijs/mcp 0.17.2 → 0.19.0

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/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createIkiMcpServer
4
- } from "./chunk-CUINYKRG.mjs";
4
+ } from "./chunk-E6DLZPCX.mjs";
5
5
 
6
6
  // src/cli.ts
7
7
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/dist/index.d.mts CHANGED
@@ -266,8 +266,9 @@ declare function formatMeasureReport(result: MeasureReport & {
266
266
  * Compose AI-generated part PNGs into canvas-aligned, role-named layers for the
267
267
  * Iki auto-rig (`auto_rig_from_layers` / `@ikijs/editor` generateIkiFromLayerSet).
268
268
  * Each part is alpha-trimmed, resized to a target width, optionally mirrored,
269
- * and pasted at a chosen center on a shared transparent CANVAS x CANVAS canvas
270
- * — the nose by its dense core, the drawing inside a soft nose's feather.
269
+ * and pasted at a chosen center on a shared transparent canvas, CANVAS wide and
270
+ * `canvasHeight` tall (CANVAS unless a full body sets it) — the nose by its
271
+ * dense core, the drawing inside a soft nose's feather.
271
272
  *
272
273
  * Ports the composer that shipped as a script in the Claude Code plugin, so a
273
274
  * plugin user gets it from the MCP server instead of an ad-hoc `sharp` install.
@@ -293,6 +294,16 @@ declare const DEFAULT_LAYOUT: {
293
294
  w: number;
294
295
  optional: true;
295
296
  };
297
+ arm_L: {
298
+ src: string;
299
+ optional: true;
300
+ mirror: true;
301
+ };
302
+ arm_R: {
303
+ src: string;
304
+ optional: true;
305
+ mirror: false;
306
+ };
296
307
  face: {
297
308
  src: string;
298
309
  cx: number;
@@ -422,8 +433,9 @@ interface ComposeInput {
422
433
  /**
423
434
  * Existing directory under cwd to write the role layers into. Callers reuse
424
435
  * one across runs (it must pre-exist), so the compose leaves it holding
425
- * exactly the roles it reports: a skipped role's layer from an earlier run is
426
- * removed rather than left for the next tool to pick up.
436
+ * exactly the roles it reports: the layer an earlier run wrote for any role
437
+ * this run does not write — a skipped role, or an arm once arm.png is gone
438
+ * — is removed rather than left for the next tool to pick up.
427
439
  */
428
440
  outDir: string;
429
441
  layout?: LayoutOverride;
@@ -434,11 +446,22 @@ interface ComposeInput {
434
446
  * frame, which a per-role flag would leave to the caller to keep in sync.
435
447
  */
436
448
  mirrorParts?: string[];
449
+ /**
450
+ * The canvas's height in px: an even integer in CANVAS..MAX_CANVAS_DIM,
451
+ * CANVAS (a square bust canvas) when omitted, and every output at CANVAS is
452
+ * byte-identical to an omitted one. The width stays CANVAS. The canvas grows
453
+ * downward: every default and every override keeps its canvas px from the
454
+ * top-left, so the head lands where it does on a bust and a full body gets
455
+ * room below. Model space is centred on the canvas, so an odd height, which
456
+ * would put the head on a half pixel, is refused.
457
+ */
458
+ canvasHeight?: number;
437
459
  }
438
460
  interface ComposedLayer {
439
461
  role: LayerRole;
440
462
  path: string;
441
- /** Size of the placed part itself (the file is always CANVAS x CANVAS). */
463
+ /** Size of the placed part itself (the file is always CANVAS x the canvas
464
+ * height). */
442
465
  width: number;
443
466
  height: number;
444
467
  left: number;
@@ -450,7 +473,9 @@ type ComposeResult = {
450
473
  layers: ComposedLayer[];
451
474
  /**
452
475
  * Roles whose optional part was absent from the parts dir, and the lower
453
- * lashes when the eyewhite draws no dark lower lid.
476
+ * lashes when the eyewhite draws no dark lower lid. The arms are opt-in
477
+ * and never listed: a parts dir without arm.png composes as a bust does,
478
+ * though an earlier compose's arm layers are still removed.
454
479
  */
455
480
  skipped: LayerRole[];
456
481
  preview: string;
package/dist/index.d.ts CHANGED
@@ -266,8 +266,9 @@ declare function formatMeasureReport(result: MeasureReport & {
266
266
  * Compose AI-generated part PNGs into canvas-aligned, role-named layers for the
267
267
  * Iki auto-rig (`auto_rig_from_layers` / `@ikijs/editor` generateIkiFromLayerSet).
268
268
  * Each part is alpha-trimmed, resized to a target width, optionally mirrored,
269
- * and pasted at a chosen center on a shared transparent CANVAS x CANVAS canvas
270
- * — the nose by its dense core, the drawing inside a soft nose's feather.
269
+ * and pasted at a chosen center on a shared transparent canvas, CANVAS wide and
270
+ * `canvasHeight` tall (CANVAS unless a full body sets it) — the nose by its
271
+ * dense core, the drawing inside a soft nose's feather.
271
272
  *
272
273
  * Ports the composer that shipped as a script in the Claude Code plugin, so a
273
274
  * plugin user gets it from the MCP server instead of an ad-hoc `sharp` install.
@@ -293,6 +294,16 @@ declare const DEFAULT_LAYOUT: {
293
294
  w: number;
294
295
  optional: true;
295
296
  };
297
+ arm_L: {
298
+ src: string;
299
+ optional: true;
300
+ mirror: true;
301
+ };
302
+ arm_R: {
303
+ src: string;
304
+ optional: true;
305
+ mirror: false;
306
+ };
296
307
  face: {
297
308
  src: string;
298
309
  cx: number;
@@ -422,8 +433,9 @@ interface ComposeInput {
422
433
  /**
423
434
  * Existing directory under cwd to write the role layers into. Callers reuse
424
435
  * one across runs (it must pre-exist), so the compose leaves it holding
425
- * exactly the roles it reports: a skipped role's layer from an earlier run is
426
- * removed rather than left for the next tool to pick up.
436
+ * exactly the roles it reports: the layer an earlier run wrote for any role
437
+ * this run does not write — a skipped role, or an arm once arm.png is gone
438
+ * — is removed rather than left for the next tool to pick up.
427
439
  */
428
440
  outDir: string;
429
441
  layout?: LayoutOverride;
@@ -434,11 +446,22 @@ interface ComposeInput {
434
446
  * frame, which a per-role flag would leave to the caller to keep in sync.
435
447
  */
436
448
  mirrorParts?: string[];
449
+ /**
450
+ * The canvas's height in px: an even integer in CANVAS..MAX_CANVAS_DIM,
451
+ * CANVAS (a square bust canvas) when omitted, and every output at CANVAS is
452
+ * byte-identical to an omitted one. The width stays CANVAS. The canvas grows
453
+ * downward: every default and every override keeps its canvas px from the
454
+ * top-left, so the head lands where it does on a bust and a full body gets
455
+ * room below. Model space is centred on the canvas, so an odd height, which
456
+ * would put the head on a half pixel, is refused.
457
+ */
458
+ canvasHeight?: number;
437
459
  }
438
460
  interface ComposedLayer {
439
461
  role: LayerRole;
440
462
  path: string;
441
- /** Size of the placed part itself (the file is always CANVAS x CANVAS). */
463
+ /** Size of the placed part itself (the file is always CANVAS x the canvas
464
+ * height). */
442
465
  width: number;
443
466
  height: number;
444
467
  left: number;
@@ -450,7 +473,9 @@ type ComposeResult = {
450
473
  layers: ComposedLayer[];
451
474
  /**
452
475
  * Roles whose optional part was absent from the parts dir, and the lower
453
- * lashes when the eyewhite draws no dark lower lid.
476
+ * lashes when the eyewhite draws no dark lower lid. The arms are opt-in
477
+ * and never listed: a parts dir without arm.png composes as a bust does,
478
+ * though an earlier compose's arm layers are still removed.
454
479
  */
455
480
  skipped: LayerRole[];
456
481
  preview: string;