@ikijs/mcp 0.29.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/README.md +4 -3
- package/dist/{chunk-IG2FZKTW.mjs → chunk-5WHM63CL.mjs} +71 -15
- package/dist/chunk-5WHM63CL.mjs.map +1 -0
- package/dist/cli.js +65 -14
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +22 -6
- package/dist/index.d.ts +22 -6
- package/dist/index.js +69 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/package.json +2 -2
- package/dist/chunk-IG2FZKTW.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TurnTargets,
|
|
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
|
|
232
|
-
* @ikijs/editor's `
|
|
233
|
-
|
|
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,
|
|
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
|
|
232
|
-
* @ikijs/editor's `
|
|
233
|
-
|
|
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,
|
|
@@ -2780,6 +2782,22 @@ var STANDARD_PARAMETER_INFO = [
|
|
|
2780
2782
|
function listStandardParameters() {
|
|
2781
2783
|
return STANDARD_PARAMETER_INFO.map((p) => ({ ...p }));
|
|
2782
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
|
+
}
|
|
2783
2801
|
function expectInput(label, fn) {
|
|
2784
2802
|
try {
|
|
2785
2803
|
return fn();
|
|
@@ -2828,6 +2846,9 @@ async function autoRigFromLayers(input) {
|
|
|
2828
2846
|
`quantizeColors must be an integer in 2..256, got ${String(quantizeColors)}`
|
|
2829
2847
|
);
|
|
2830
2848
|
}
|
|
2849
|
+
if (input.style !== void 0) {
|
|
2850
|
+
throw new AutoRigInputError((0, import_editor3.styleRemovedMessage)("style"));
|
|
2851
|
+
}
|
|
2831
2852
|
const turnTargets = input.turnTargets;
|
|
2832
2853
|
if (turnTargets !== void 0) {
|
|
2833
2854
|
if (typeof turnTargets !== "object" || turnTargets === null || Array.isArray(turnTargets)) {
|
|
@@ -2903,6 +2924,7 @@ async function autoRigFromLayers(input) {
|
|
|
2903
2924
|
)?.denseCore;
|
|
2904
2925
|
let turn;
|
|
2905
2926
|
let patches;
|
|
2927
|
+
let rigPlan;
|
|
2906
2928
|
let model;
|
|
2907
2929
|
try {
|
|
2908
2930
|
model = (0, import_editor3.generateIkiFromLayerSet)(
|
|
@@ -2916,7 +2938,10 @@ async function autoRigFromLayers(input) {
|
|
|
2916
2938
|
onTurnSolved: (report) => {
|
|
2917
2939
|
turn = report;
|
|
2918
2940
|
},
|
|
2919
|
-
...input.
|
|
2941
|
+
...input.rigPlan === void 0 ? {} : { rigPlan: input.rigPlan },
|
|
2942
|
+
onRigPlanResolved: (report) => {
|
|
2943
|
+
rigPlan = report;
|
|
2944
|
+
},
|
|
2920
2945
|
...input.patches === void 0 ? {} : {
|
|
2921
2946
|
patches: input.patches,
|
|
2922
2947
|
onPatchesApplied: (reports) => {
|
|
@@ -2928,7 +2953,7 @@ async function autoRigFromLayers(input) {
|
|
|
2928
2953
|
}
|
|
2929
2954
|
);
|
|
2930
2955
|
} catch (e) {
|
|
2931
|
-
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)) {
|
|
2932
2957
|
throw e;
|
|
2933
2958
|
}
|
|
2934
2959
|
throw new AutoRigInputError(e.message);
|
|
@@ -2991,7 +3016,8 @@ async function autoRigFromLayers(input) {
|
|
|
2991
3016
|
...turn === void 0 ? {} : { turn },
|
|
2992
3017
|
folds,
|
|
2993
3018
|
physics,
|
|
2994
|
-
...patches === void 0 ? {} : { patches }
|
|
3019
|
+
...patches === void 0 ? {} : { patches },
|
|
3020
|
+
rigPlan
|
|
2995
3021
|
};
|
|
2996
3022
|
} catch (err) {
|
|
2997
3023
|
if (err instanceof AutoRigInputError)
|
|
@@ -5694,7 +5720,7 @@ function formatPatchReports(reports) {
|
|
|
5694
5720
|
});
|
|
5695
5721
|
}
|
|
5696
5722
|
function createIkiMcpServer() {
|
|
5697
|
-
const server = new import_mcp.McpServer({ name: "iki", version: "0.
|
|
5723
|
+
const server = new import_mcp.McpServer({ name: "iki", version: "0.30.0" });
|
|
5698
5724
|
server.registerTool(
|
|
5699
5725
|
"validate_iki",
|
|
5700
5726
|
{
|
|
@@ -5766,10 +5792,27 @@ function createIkiMcpServer() {
|
|
|
5766
5792
|
};
|
|
5767
5793
|
}
|
|
5768
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
|
+
);
|
|
5769
5812
|
server.registerTool(
|
|
5770
5813
|
"auto_rig_from_layers",
|
|
5771
5814
|
{
|
|
5772
|
-
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.",
|
|
5773
5816
|
inputSchema: {
|
|
5774
5817
|
layers: import_zod.z.array(
|
|
5775
5818
|
import_zod.z.object({
|
|
@@ -5794,15 +5837,24 @@ function createIkiMcpServer() {
|
|
|
5794
5837
|
}).passthrough().optional().describe(
|
|
5795
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."
|
|
5796
5839
|
),
|
|
5797
|
-
style: import_zod.z.
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
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()
|
|
5804
5856
|
}).passthrough().optional().describe(
|
|
5805
|
-
"Per-character tuning from the profile the rig defaults to: `turn`
|
|
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."
|
|
5806
5858
|
),
|
|
5807
5859
|
patches: import_zod.z.array(
|
|
5808
5860
|
import_zod.z.object({
|
|
@@ -5820,7 +5872,7 @@ function createIkiMcpServer() {
|
|
|
5820
5872
|
why: import_zod.z.string().optional()
|
|
5821
5873
|
}).passthrough()
|
|
5822
5874
|
).optional().describe(
|
|
5823
|
-
"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 `
|
|
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."
|
|
5824
5876
|
)
|
|
5825
5877
|
}
|
|
5826
5878
|
},
|
|
@@ -5834,6 +5886,7 @@ function createIkiMcpServer() {
|
|
|
5834
5886
|
});
|
|
5835
5887
|
const text = r.ok ? [
|
|
5836
5888
|
r.path,
|
|
5889
|
+
formatRigPlanReport(r.rigPlan),
|
|
5837
5890
|
...formatPatchReports(r.patches ?? []),
|
|
5838
5891
|
...formatFoldReport(r.folds, r.canvas),
|
|
5839
5892
|
...formatPhysicsReport(r.physics)
|
|
@@ -6018,9 +6071,11 @@ function createIkiMcpServer() {
|
|
|
6018
6071
|
createIkiMcpServer,
|
|
6019
6072
|
describeIki,
|
|
6020
6073
|
describeIkiAt,
|
|
6074
|
+
describeRigPlan,
|
|
6021
6075
|
formatFoldReport,
|
|
6022
6076
|
formatMeasureReport,
|
|
6023
6077
|
formatPhysicsReport,
|
|
6078
|
+
formatRigPlanReport,
|
|
6024
6079
|
formatTurnReport,
|
|
6025
6080
|
listStandardParameters,
|
|
6026
6081
|
measureLayers,
|