@ikijs/mcp 0.28.0 → 0.30.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-D2OLX5S7.mjs";
4
+ } from "./chunk-5WHM63CL.mjs";
5
5
 
6
6
  // src/cli.ts
7
7
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { TurnTargets, RigStyle, RigPatch, IrisStrand, TurnSolveReport, PatchReport } from '@ikijs/editor';
2
- export { TurnSolveReport } from '@ikijs/editor';
1
+ import { TurnTargets, RigPlan, RigPatch, IrisStrand, TurnSolveReport, PatchReport, RigPlanReport, RigPlanField } from '@ikijs/editor';
2
+ export { RigPlanReport, TurnSolveReport } from '@ikijs/editor';
3
3
  import { IkiModel } from '@ikijs/format';
4
4
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
5
 
@@ -211,6 +211,14 @@ declare function describeIki(model: unknown): DescribeResult;
211
211
  */
212
212
  declare function describeIkiAt(modelPath: string): DescribeResult;
213
213
  declare function listStandardParameters(): StandardParameterInfo[];
214
+ /** The rig plan's field catalog: the one source of the fields' defaults,
215
+ * ranges, recommended spans, steps and poses. */
216
+ declare function describeRigPlan(): {
217
+ fields: RigPlanField[];
218
+ };
219
+ /** The `RIGPLAN:` line: every field's effective value, with the requested one
220
+ * and the bound when the art's room cut it, or the cue that fitted it. */
221
+ declare function formatRigPlanReport(r: RigPlanReport): string;
214
222
  /** One role-named PNG layer; role is derived from `fileName ?? basename(path)`. */
215
223
  interface AutoRigLayerInput {
216
224
  fileName?: string;
@@ -228,9 +236,12 @@ interface AutoRigInput {
228
236
  /** Head-turn cues to fit the rig to, as `measure_turn_reference` reports
229
237
  * them. */
230
238
  turnTargets?: AutoRigTurnTargets;
231
- /** Per-character tuning from the profile's defaults (see
232
- * @ikijs/editor's `RigStyle`). */
233
- style?: RigStyle;
239
+ /** Per-character tuning from the profile's defaults, validated against
240
+ * `RIG_PLAN_FIELDS` (see @ikijs/editor's `RigPlan`; `describe_rig_plan`
241
+ * lists the fields). */
242
+ rigPlan?: RigPlan;
243
+ /** Removed in 0.30.0: any value is refused with the field map. */
244
+ style?: unknown;
234
245
  /** Displacements added to existing keyform stops of the freshly generated
235
246
  * rig, replayed on every rig of these inputs (see @ikijs/editor's
236
247
  * `RigPatch`). */
@@ -327,6 +338,11 @@ type AutoRigResult = {
327
338
  * whenever `patches` was passed, `[]` included, so a caller can tell
328
339
  * this server from one that drops the field. */
329
340
  patches?: PatchReport[];
341
+ /** What the rig built with next to what `input.rigPlan` asked, and the
342
+ * fields the art's room cut or a `turnTargets` cue fitted instead.
343
+ * Always present on a rigged model; absent only from a server before
344
+ * 0.30.0. */
345
+ rigPlan: RigPlanReport;
330
346
  } | {
331
347
  ok: false;
332
348
  error: string;
@@ -993,4 +1009,4 @@ declare function renderPoses(input: RenderPosesInput): Promise<RenderPosesResult
993
1009
 
994
1010
  declare function createIkiMcpServer(): McpServer;
995
1011
 
996
- export { type AutoRigInput, type AutoRigLayerInput, type AutoRigResult, type AutoRigTurnTargets, type ComposeInput, type ComposeResult, type DeformerSummary, type DescribeResult, type IkiSummary, type IrisBlob, type IrisColor, type LayoutOverride, type MeasureInput, type MeasureResult, type MeasureTurnInput, type MeasureTurnResult, type PartSummary, type RenderPosesInput, type RenderPosesResult, type RequestedPose, type StandardParameterInfo, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, checkModelFolds, composeLayersFromParts, createIkiMcpServer, describeIki, describeIkiAt, formatFoldReport, formatMeasureReport, formatPhysicsReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
1012
+ export { type AutoRigInput, type AutoRigLayerInput, type AutoRigResult, type AutoRigTurnTargets, type ComposeInput, type ComposeResult, type DeformerSummary, type DescribeResult, type IkiSummary, type IrisBlob, type IrisColor, type LayoutOverride, type MeasureInput, type MeasureResult, type MeasureTurnInput, type MeasureTurnResult, type PartSummary, type RenderPosesInput, type RenderPosesResult, type RequestedPose, type StandardParameterInfo, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, checkModelFolds, composeLayersFromParts, createIkiMcpServer, describeIki, describeIkiAt, describeRigPlan, formatFoldReport, formatMeasureReport, formatPhysicsReport, formatRigPlanReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { TurnTargets, RigStyle, RigPatch, IrisStrand, TurnSolveReport, PatchReport } from '@ikijs/editor';
2
- export { TurnSolveReport } from '@ikijs/editor';
1
+ import { TurnTargets, RigPlan, RigPatch, IrisStrand, TurnSolveReport, PatchReport, RigPlanReport, RigPlanField } from '@ikijs/editor';
2
+ export { RigPlanReport, TurnSolveReport } from '@ikijs/editor';
3
3
  import { IkiModel } from '@ikijs/format';
4
4
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
5
 
@@ -211,6 +211,14 @@ declare function describeIki(model: unknown): DescribeResult;
211
211
  */
212
212
  declare function describeIkiAt(modelPath: string): DescribeResult;
213
213
  declare function listStandardParameters(): StandardParameterInfo[];
214
+ /** The rig plan's field catalog: the one source of the fields' defaults,
215
+ * ranges, recommended spans, steps and poses. */
216
+ declare function describeRigPlan(): {
217
+ fields: RigPlanField[];
218
+ };
219
+ /** The `RIGPLAN:` line: every field's effective value, with the requested one
220
+ * and the bound when the art's room cut it, or the cue that fitted it. */
221
+ declare function formatRigPlanReport(r: RigPlanReport): string;
214
222
  /** One role-named PNG layer; role is derived from `fileName ?? basename(path)`. */
215
223
  interface AutoRigLayerInput {
216
224
  fileName?: string;
@@ -228,9 +236,12 @@ interface AutoRigInput {
228
236
  /** Head-turn cues to fit the rig to, as `measure_turn_reference` reports
229
237
  * them. */
230
238
  turnTargets?: AutoRigTurnTargets;
231
- /** Per-character tuning from the profile's defaults (see
232
- * @ikijs/editor's `RigStyle`). */
233
- style?: RigStyle;
239
+ /** Per-character tuning from the profile's defaults, validated against
240
+ * `RIG_PLAN_FIELDS` (see @ikijs/editor's `RigPlan`; `describe_rig_plan`
241
+ * lists the fields). */
242
+ rigPlan?: RigPlan;
243
+ /** Removed in 0.30.0: any value is refused with the field map. */
244
+ style?: unknown;
234
245
  /** Displacements added to existing keyform stops of the freshly generated
235
246
  * rig, replayed on every rig of these inputs (see @ikijs/editor's
236
247
  * `RigPatch`). */
@@ -327,6 +338,11 @@ type AutoRigResult = {
327
338
  * whenever `patches` was passed, `[]` included, so a caller can tell
328
339
  * this server from one that drops the field. */
329
340
  patches?: PatchReport[];
341
+ /** What the rig built with next to what `input.rigPlan` asked, and the
342
+ * fields the art's room cut or a `turnTargets` cue fitted instead.
343
+ * Always present on a rigged model; absent only from a server before
344
+ * 0.30.0. */
345
+ rigPlan: RigPlanReport;
330
346
  } | {
331
347
  ok: false;
332
348
  error: string;
@@ -993,4 +1009,4 @@ declare function renderPoses(input: RenderPosesInput): Promise<RenderPosesResult
993
1009
 
994
1010
  declare function createIkiMcpServer(): McpServer;
995
1011
 
996
- export { type AutoRigInput, type AutoRigLayerInput, type AutoRigResult, type AutoRigTurnTargets, type ComposeInput, type ComposeResult, type DeformerSummary, type DescribeResult, type IkiSummary, type IrisBlob, type IrisColor, type LayoutOverride, type MeasureInput, type MeasureResult, type MeasureTurnInput, type MeasureTurnResult, type PartSummary, type RenderPosesInput, type RenderPosesResult, type RequestedPose, type StandardParameterInfo, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, checkModelFolds, composeLayersFromParts, createIkiMcpServer, describeIki, describeIkiAt, formatFoldReport, formatMeasureReport, formatPhysicsReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
1012
+ export { type AutoRigInput, type AutoRigLayerInput, type AutoRigResult, type AutoRigTurnTargets, type ComposeInput, type ComposeResult, type DeformerSummary, type DescribeResult, type IkiSummary, type IrisBlob, type IrisColor, type LayoutOverride, type MeasureInput, type MeasureResult, type MeasureTurnInput, type MeasureTurnResult, type PartSummary, type RenderPosesInput, type RenderPosesResult, type RequestedPose, type StandardParameterInfo, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, checkModelFolds, composeLayersFromParts, createIkiMcpServer, describeIki, describeIkiAt, describeRigPlan, formatFoldReport, formatMeasureReport, formatPhysicsReport, formatRigPlanReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
package/dist/index.js CHANGED
@@ -36,9 +36,11 @@ __export(index_exports, {
36
36
  createIkiMcpServer: () => createIkiMcpServer,
37
37
  describeIki: () => describeIki,
38
38
  describeIkiAt: () => describeIkiAt,
39
+ describeRigPlan: () => describeRigPlan,
39
40
  formatFoldReport: () => formatFoldReport,
40
41
  formatMeasureReport: () => formatMeasureReport,
41
42
  formatPhysicsReport: () => formatPhysicsReport,
43
+ formatRigPlanReport: () => formatRigPlanReport,
42
44
  formatTurnReport: () => formatTurnReport,
43
45
  listStandardParameters: () => listStandardParameters,
44
46
  measureLayers: () => measureLayers,
@@ -487,6 +489,14 @@ var FixedStepClock = class {
487
489
  get isSeedFrame() {
488
490
  return this.prevNowMs === void 0;
489
491
  }
492
+ /**
493
+ * Time carried in the accumulator, in seconds: how far the frame's timestamp is
494
+ * past the last whole sub-step. Drivers extrapolate their state by it so what
495
+ * they emit is the state at the frame's time, not at the last sub-step.
496
+ */
497
+ get remainderS() {
498
+ return this.accumulatorS;
499
+ }
490
500
  /**
491
501
  * Fold `nowMs` into the accumulator and return how many {@link FIXED_DT_S}
492
502
  * sub-steps to run this frame. On the seed frame it only records the
@@ -822,7 +832,8 @@ var PhysicsMotion = class {
822
832
  const rig = this.rigs[index];
823
833
  const outParam = this.params.get(rig.output.parameter);
824
834
  const outDefault = outParam ? clamp(outParam.default, outParam.min, outParam.max) : 0;
825
- const value = outDefault + (st.x - st.lag) * rig.output.scale;
835
+ const x = st.x + st.v * this.clock.remainderS;
836
+ const value = outDefault + (x - st.lag) * rig.output.scale;
826
837
  const finite = Number.isFinite(value);
827
838
  if (!finite) this.resetCounts[index]++;
828
839
  this.sink(rig.output.parameter, finite ? value : outDefault);
@@ -2725,11 +2736,15 @@ var STANDARD_PARAMETER_INFO = [
2725
2736
  },
2726
2737
  {
2727
2738
  id: import_format9.StandardParameter.HairSwayX,
2728
- description: "Horizontal hair-sway driver. Physics OUTPUT \u2014 driven by the spring, hosts should not set it directly."
2739
+ description: "Front hair's horizontal sway driver. Physics OUTPUT \u2014 driven by the spring, hosts should not set it directly."
2729
2740
  },
2730
2741
  {
2731
2742
  id: import_format9.StandardParameter.HairSwayZ,
2732
- description: "Hair-sway driver behind a head tilt. Physics OUTPUT \u2014 driven by the spring, hosts should not set it directly."
2743
+ description: "Front hair's sway driver behind a head tilt. Physics OUTPUT \u2014 driven by the spring, hosts should not set it directly."
2744
+ },
2745
+ {
2746
+ id: import_format9.StandardParameter.HairBackSway,
2747
+ description: "Back hair's sway driver behind the head turn, tilt and ambient drift, one spring slower than the front hair's so the two swing out of phase. Physics OUTPUT \u2014 driven by the spring, hosts should not set it directly."
2733
2748
  },
2734
2749
  {
2735
2750
  id: import_format9.StandardParameter.ArmLeft,
@@ -2767,6 +2782,22 @@ var STANDARD_PARAMETER_INFO = [
2767
2782
  function listStandardParameters() {
2768
2783
  return STANDARD_PARAMETER_INFO.map((p) => ({ ...p }));
2769
2784
  }
2785
+ function describeRigPlan() {
2786
+ return { fields: [...import_editor3.RIG_PLAN_FIELDS] };
2787
+ }
2788
+ function formatRigPlanReport(r) {
2789
+ const fields = import_editor3.RIG_PLAN_FIELDS.map((f) => {
2790
+ const value = `${f.path}=${r.effective[f.path]}`;
2791
+ const clamp2 = r.clamped.find((c) => c.field === f.path);
2792
+ if (clamp2 !== void 0) {
2793
+ const asked = r.requested[f.group]?.[f.key] ?? f.default;
2794
+ return `${value} (requested ${asked}, clamped at ${clamp2.bound})`;
2795
+ }
2796
+ const cue = r.overriddenBy[f.path];
2797
+ return cue === void 0 ? value : `${value} (fitted by ${cue})`;
2798
+ });
2799
+ return `RIGPLAN: ${fields.join(" ")}`;
2800
+ }
2770
2801
  function expectInput(label, fn) {
2771
2802
  try {
2772
2803
  return fn();
@@ -2815,6 +2846,9 @@ async function autoRigFromLayers(input) {
2815
2846
  `quantizeColors must be an integer in 2..256, got ${String(quantizeColors)}`
2816
2847
  );
2817
2848
  }
2849
+ if (input.style !== void 0) {
2850
+ throw new AutoRigInputError((0, import_editor3.styleRemovedMessage)("style"));
2851
+ }
2818
2852
  const turnTargets = input.turnTargets;
2819
2853
  if (turnTargets !== void 0) {
2820
2854
  if (typeof turnTargets !== "object" || turnTargets === null || Array.isArray(turnTargets)) {
@@ -2890,6 +2924,7 @@ async function autoRigFromLayers(input) {
2890
2924
  )?.denseCore;
2891
2925
  let turn;
2892
2926
  let patches;
2927
+ let rigPlan;
2893
2928
  let model;
2894
2929
  try {
2895
2930
  model = (0, import_editor3.generateIkiFromLayerSet)(
@@ -2903,7 +2938,10 @@ async function autoRigFromLayers(input) {
2903
2938
  onTurnSolved: (report) => {
2904
2939
  turn = report;
2905
2940
  },
2906
- ...input.style === void 0 ? {} : { style: input.style },
2941
+ ...input.rigPlan === void 0 ? {} : { rigPlan: input.rigPlan },
2942
+ onRigPlanResolved: (report) => {
2943
+ rigPlan = report;
2944
+ },
2907
2945
  ...input.patches === void 0 ? {} : {
2908
2946
  patches: input.patches,
2909
2947
  onPatchesApplied: (reports) => {
@@ -2915,7 +2953,7 @@ async function autoRigFromLayers(input) {
2915
2953
  }
2916
2954
  );
2917
2955
  } catch (e) {
2918
- if (!(e instanceof import_editor3.TurnTargetError || e instanceof import_editor3.LayerGeometryError || e instanceof import_editor3.PatchError)) {
2956
+ if (!(e instanceof import_editor3.TurnTargetError || e instanceof import_editor3.LayerGeometryError || e instanceof import_editor3.PatchError || e instanceof import_editor3.RigPlanError)) {
2919
2957
  throw e;
2920
2958
  }
2921
2959
  throw new AutoRigInputError(e.message);
@@ -2978,7 +3016,8 @@ async function autoRigFromLayers(input) {
2978
3016
  ...turn === void 0 ? {} : { turn },
2979
3017
  folds,
2980
3018
  physics,
2981
- ...patches === void 0 ? {} : { patches }
3019
+ ...patches === void 0 ? {} : { patches },
3020
+ rigPlan
2982
3021
  };
2983
3022
  } catch (err) {
2984
3023
  if (err instanceof AutoRigInputError)
@@ -5681,7 +5720,7 @@ function formatPatchReports(reports) {
5681
5720
  });
5682
5721
  }
5683
5722
  function createIkiMcpServer() {
5684
- const server = new import_mcp.McpServer({ name: "iki", version: "0.28.0" });
5723
+ const server = new import_mcp.McpServer({ name: "iki", version: "0.30.0" });
5685
5724
  server.registerTool(
5686
5725
  "validate_iki",
5687
5726
  {
@@ -5753,10 +5792,27 @@ function createIkiMcpServer() {
5753
5792
  };
5754
5793
  }
5755
5794
  );
5795
+ server.registerTool(
5796
+ "describe_rig_plan",
5797
+ {
5798
+ description: "Lists the fields of the `rigPlan` input of auto_rig_from_layers: each one's path, default, range, recommended span, step, unit, the poses it shows at, the report reading that shows it and the `turnTargets` cue that fits it when given. The one source of those numbers.",
5799
+ inputSchema: {}
5800
+ },
5801
+ async () => {
5802
+ const { fields } = describeRigPlan();
5803
+ const text = fields.map(
5804
+ (f) => `${f.path} default ${f.default} range ${f.range[0]}..${f.range[1]} recommended ${f.recommended[0]}..${f.recommended[1]} step ${f.step} ${f.unit} \u2014 ${f.what}; shows at ${f.poses.map((p) => JSON.stringify(p)).join(" ")}; cue ${f.cue ?? "none"}; fitted by ${f.fitBy ?? "none"}${f.provisional ? "; provisional" : ""}`
5805
+ ).join("\n");
5806
+ return {
5807
+ content: [{ type: "text", text }],
5808
+ structuredContent: { fields }
5809
+ };
5810
+ }
5811
+ );
5756
5812
  server.registerTool(
5757
5813
  "auto_rig_from_layers",
5758
5814
  {
5759
- description: "Auto-rigs role-named PNG layers (face, eye_L/eye_R and either mouth or the lip set (mouth_inner + lip_lower + lip_upper, a mouth that folds open instead of crossfading) required; iris_L/R, brow_L/R, hair_front, body, arm_L/arm_R, forearm_pose_L/forearm_pose_R, mouth_tongue/mouth_teeth (only with the lip set: drawn under its lips and clipped to mouth_inner), etc. optional; an arm needs the body, a pose forearm needs its arm, and a partial lip set, one mixed with mouth/mouth_open, or mouth_tongue/mouth_teeth without it is refused) into a renderable .iki written to disk. Pass full-canvas PNG file paths; returns the output path + summary (the model is NOT inlined). Filenames map to roles unless `fileName` is given. The result's `folds` is the written rig's fold report, printed after the path the way render_poses prints it, and report-only: a fold never refuses the rig. The `PHYSICS` lines follow the fold report (the result's `physics`), one per physics rig output \u2014 a spring's, or each chain segment's \u2014 reading ok, frozen or unstable with the step and idle amplitudes, or `PHYSICS: no rigs`; report-only too. `patches` (see its field) adds displacements to existing keyform stops of the freshly generated rig; each op then prints one line between the path and the fold report \u2014 `PATCH <i> <target> at <Param=v \u2026>: <moved> of <of> points (cols a-b, rows c-d), largest move <maxPx> model px`, with `(vertices)` in place of the columns and rows for a mesh part \u2014 and the result's `patches` carries the same reports (`index`, `target`, `at`, `moved`, `of`, `cols`/`rows` for a grid, `maxPx`), present whenever `patches` was passed, `[]` included. An op the input schema accepts but the rig refuses comes back as `INVALID: patches[i]\u2026` and nothing is written; an op with a missing field or a field of the wrong type is the SDK's input validation error.",
5815
+ description: "Auto-rigs role-named PNG layers (face, eye_L/eye_R and either mouth or the lip set (mouth_inner + lip_lower + lip_upper, a mouth that folds open instead of crossfading) required; iris_L/R, brow_L/R, hair_front, body, arm_L/arm_R, forearm_pose_L/forearm_pose_R, mouth_tongue/mouth_teeth (only with the lip set: drawn under its lips and clipped to mouth_inner), etc. optional; an arm needs the body, a pose forearm needs its arm, and a partial lip set, one mixed with mouth/mouth_open, or mouth_tongue/mouth_teeth without it is refused) into a renderable .iki written to disk. Pass full-canvas PNG file paths; returns the output path + summary (the model is NOT inlined). Filenames map to roles unless `fileName` is given. The result's `folds` is the written rig's fold report, printed after the path the way render_poses prints it, and report-only: a fold never refuses the rig. The `RIGPLAN:` line (the result's `rigPlan`: `effective`, `clamped`, `overriddenBy`) follows the path and precedes the `PATCH` lines. The `PHYSICS` lines follow the fold report (the result's `physics`), one per physics rig output \u2014 a spring's, or each chain segment's \u2014 reading ok, frozen or unstable with the step and idle amplitudes, or `PHYSICS: no rigs`; report-only too. `patches` (see its field) adds displacements to existing keyform stops of the freshly generated rig; each op then prints one line between the path and the fold report \u2014 `PATCH <i> <target> at <Param=v \u2026>: <moved> of <of> points (cols a-b, rows c-d), largest move <maxPx> model px`, with `(vertices)` in place of the columns and rows for a mesh part \u2014 and the result's `patches` carries the same reports (`index`, `target`, `at`, `moved`, `of`, `cols`/`rows` for a grid, `maxPx`), present whenever `patches` was passed, `[]` included. An op the input schema accepts but the rig refuses comes back as `INVALID: patches[i]\u2026` and nothing is written; an op with a missing field or a field of the wrong type is the SDK's input validation error.",
5760
5816
  inputSchema: {
5761
5817
  layers: import_zod.z.array(
5762
5818
  import_zod.z.object({
@@ -5781,15 +5837,24 @@ function createIkiMcpServer() {
5781
5837
  }).passthrough().optional().describe(
5782
5838
  "What the head turn is fitted to, as `measure_turn_reference` reports it off a front/turned reference pair. `eyeShift` (and the optional `noseShift`/`mouthShift`) is how far that feature slides across the head at full turn, as a fraction of the head's half-width \u2014 a MAGNITUDE: the rig turns both ways, so the sign is ignored. `farEyeRatio` is the far/near eye width at full turn over that same ratio at rest, `silhouetteRatio` the head's half-width turned over at rest. The half-width the shifts are fractions of is measured off the layers themselves, so it is not an input. An omitted field leaves that part of the turn at the profile the rig defaults to. A passed `eyeShift` is fitted by the turn's amount and clamped to the room the art leaves the far eye \u2014 the face plate's edge, or the bangs' side strand over the far iris (the result's `turn.clamped` lists every clamped field, `turn.achieved` what the rig reaches, and `turn.strandOverlap` how much of a far iris the bangs still cover). A passed `silhouetteRatio` is clamped too, only on a face drawn without hair and with ear islands, where narrowing the head that far would no longer cover the far ear's slide. Any other passed target this layer set cannot reach comes back as `INVALID: \u2026` naming the field and the attainable range, since it is a measurement rather than a preference. A field not named here is refused the same way."
5783
5839
  ),
5784
- style: import_zod.z.object({
5785
- turn: import_zod.z.number().optional(),
5786
- featureLead: import_zod.z.number().optional(),
5787
- hairFollow: import_zod.z.number().optional(),
5788
- outlineFollow: import_zod.z.number().optional(),
5789
- blink: import_zod.z.number().optional(),
5790
- sway: import_zod.z.number().optional()
5840
+ style: import_zod.z.unknown().optional().describe(
5841
+ "Removed in @ikijs/mcp 0.30.0: pass `rigPlan`. Any value here is refused with the field map."
5842
+ ),
5843
+ rigPlan: import_zod.z.object({
5844
+ turn: import_zod.z.object({
5845
+ amount: import_zod.z.number().optional(),
5846
+ featureLead: import_zod.z.number().optional(),
5847
+ eyeForeshorten: import_zod.z.number().optional(),
5848
+ noseLead: import_zod.z.number().optional()
5849
+ }).passthrough().optional(),
5850
+ hair: import_zod.z.object({
5851
+ follow: import_zod.z.number().optional(),
5852
+ outlineFollow: import_zod.z.number().optional(),
5853
+ sway: import_zod.z.number().optional()
5854
+ }).passthrough().optional(),
5855
+ eyes: import_zod.z.object({ blink: import_zod.z.number().optional() }).passthrough().optional()
5791
5856
  }).passthrough().optional().describe(
5792
- "Per-character tuning from the profile the rig defaults to: `turn` scales the whole head turn (plate, features, hair and the eyes' foreshortening; 0..3, 1 = the profile; ignored when `turnTargets.eyeShift` is given), `featureLead` how far the features lead the face plate (0..3, 1 = the profile), `hairFollow` the front hair's share of the face's turn (0..2, profile 1), `outlineFollow` its outer edge's share where the front hair draws the head's outline (0..2, profile 0: the outline holds), `blink` how far the upper lid comes down over the eye's height (0.1..1, profile 0.6), `sway` the hair sway amplitude (0..5, 1 = the profile). A value out of range, or a knob not named here, comes back as `INVALID: \u2026`."
5857
+ "Per-character tuning from the profile the rig defaults to, in three groups: `turn` (`amount`, `featureLead`, `eyeForeshorten`, `noseLead`: the last two turn only, the nod untouched, and fitted by `turnTargets.farEyeRatio` / `turnTargets.noseShift` when those are given, which the `RIGPLAN:` line then reports as overridden), `hair` (`follow`, `outlineFollow`, `sway`) and `eyes` (`blink`). `describe_rig_plan` lists every field's default, range, recommended span, step and poses. A value out of range, or a group or key not named there, comes back as `INVALID: rigPlan.<path> \u2026`; an object left out or `{}` is the profile. The result reports what the rig built with as `rigPlan` and a `RIGPLAN:` line."
5793
5858
  ),
5794
5859
  patches: import_zod.z.array(
5795
5860
  import_zod.z.object({
@@ -5807,7 +5872,7 @@ function createIkiMcpServer() {
5807
5872
  why: import_zod.z.string().optional()
5808
5873
  }).passthrough()
5809
5874
  ).optional().describe(
5810
- "Displacements ADDED to EXISTING keyform stops of the freshly generated rig, each op `{ target, at, region, by, falloff?, why? }`. They are replayed on every rig of these inputs, over whatever the rig now bakes, so they hold through a layout or `style` retune; ops on one stop add up, whatever their order. `target` is a feature grid \u2014 `eyeWarp_L`, `eyeWarp_R`, `browWarp_L`, `browWarp_R`, `noseWarp`, `mouthWarp`, whose `at` names both `ParamAngleX` and `ParamAngleY`, each -30, 0 or 30, never both 0 \u2014 or a mesh part with warps (`face`, `hair_front`, \u2026), whose `at` names exactly one parameter at one of that part's warp keyform values, never the parameter's default nor the stop where the rig shuts the part on purpose (`eye_*` and `lash_lower_*` at their `ParamEye*Open` 0, the lip set and its tongue and teeth at `ParamMouthOpenY` 0), which the fold check exempts, nor a `ParamAngleZ` or `ParamBodyAngleZ` stop (they roll the deformers the part hangs under, so a displacement there is turned off the screen axes). The rest pose is the drawn art and no patch changes it. `bodyWarp` and the matrix deformers are not targets, and a patch adds no stop and changes no parameter range. `region` `{ role, x: [from, to], y: [from, to] }` is a rectangle in fractions of the REST layer box (the opaque crop) of `role`, origin top-left, x right, y DOWN, and may reach past the box: the target's points whose REST position lies inside take the whole of `by`, those within `falloff` of it a smooth share, the rest nothing. `by` `{ dx, dy }` and `falloff` are in face widths (the `face` layer's crop width), on screen axes: +dx toward the viewer's right (a character's `_L` side), +dy DOWN. Between stops the engine blends linearly, so a fix at ParamAngleX -30 shows at half strength at -15 and none at rest. `why` is a note the rig ignores. An op this schema accepts but the rig refuses \u2014 an unknown key, target, role or stop, the rest stop or a shut stop, a region running backwards or catching none of the target's points \u2014 comes back as `INVALID: patches[i]\u2026`, listing the keys, targets, stops or roles there are, or where the target's points lie in the role's box, and nothing is written; a missing field or one of the wrong type is refused by the schema itself, as the SDK's input validation error."
5875
+ "Displacements ADDED to EXISTING keyform stops of the freshly generated rig, each op `{ target, at, region, by, falloff?, why? }`. They are replayed on every rig of these inputs, over whatever the rig now bakes, so they hold through a layout or `rigPlan` retune; ops on one stop add up, whatever their order. `target` is a feature grid \u2014 `eyeWarp_L`, `eyeWarp_R`, `browWarp_L`, `browWarp_R`, `noseWarp`, `mouthWarp`, whose `at` names both `ParamAngleX` and `ParamAngleY`, each -30, 0 or 30, never both 0 \u2014 or a mesh part with warps (`face`, `hair_front`, \u2026), whose `at` names exactly one parameter at one of that part's warp keyform values, never the parameter's default nor the stop where the rig shuts the part on purpose (`eye_*` and `lash_lower_*` at their `ParamEye*Open` 0, the lip set and its tongue and teeth at `ParamMouthOpenY` 0), which the fold check exempts, nor a `ParamAngleZ` or `ParamBodyAngleZ` stop (they roll the deformers the part hangs under, so a displacement there is turned off the screen axes). The rest pose is the drawn art and no patch changes it. `bodyWarp` and the matrix deformers are not targets, and a patch adds no stop and changes no parameter range. `region` `{ role, x: [from, to], y: [from, to] }` is a rectangle in fractions of the REST layer box (the opaque crop) of `role`, origin top-left, x right, y DOWN, and may reach past the box: the target's points whose REST position lies inside take the whole of `by`, those within `falloff` of it a smooth share, the rest nothing. `by` `{ dx, dy }` and `falloff` are in face widths (the `face` layer's crop width), on screen axes: +dx toward the viewer's right (a character's `_L` side), +dy DOWN. Between stops the engine blends linearly, so a fix at ParamAngleX -30 shows at half strength at -15 and none at rest. `why` is a note the rig ignores. An op this schema accepts but the rig refuses \u2014 an unknown key, target, role or stop, the rest stop or a shut stop, a region running backwards or catching none of the target's points \u2014 comes back as `INVALID: patches[i]\u2026`, listing the keys, targets, stops or roles there are, or where the target's points lie in the role's box, and nothing is written; a missing field or one of the wrong type is refused by the schema itself, as the SDK's input validation error."
5811
5876
  )
5812
5877
  }
5813
5878
  },
@@ -5821,6 +5886,7 @@ function createIkiMcpServer() {
5821
5886
  });
5822
5887
  const text = r.ok ? [
5823
5888
  r.path,
5889
+ formatRigPlanReport(r.rigPlan),
5824
5890
  ...formatPatchReports(r.patches ?? []),
5825
5891
  ...formatFoldReport(r.folds, r.canvas),
5826
5892
  ...formatPhysicsReport(r.physics)
@@ -6005,9 +6071,11 @@ function createIkiMcpServer() {
6005
6071
  createIkiMcpServer,
6006
6072
  describeIki,
6007
6073
  describeIkiAt,
6074
+ describeRigPlan,
6008
6075
  formatFoldReport,
6009
6076
  formatMeasureReport,
6010
6077
  formatPhysicsReport,
6078
+ formatRigPlanReport,
6011
6079
  formatTurnReport,
6012
6080
  listStandardParameters,
6013
6081
  measureLayers,