@ikijs/mcp 0.23.2 → 0.24.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 +20 -10
- package/dist/{chunk-SXLILLB6.mjs → chunk-GEXOSC5O.mjs} +528 -6
- package/dist/chunk-GEXOSC5O.mjs.map +1 -0
- package/dist/cli.js +529 -5
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +4 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +70 -1
- package/dist/index.d.ts +70 -1
- package/dist/index.js +528 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/render-page.global.js +1250 -0
- package/package.json +3 -2
- package/dist/chunk-SXLILLB6.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createIkiMcpServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GEXOSC5O.mjs";
|
|
5
5
|
|
|
6
6
|
// src/cli.ts
|
|
7
7
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -9,6 +9,9 @@ async function main() {
|
|
|
9
9
|
const server = createIkiMcpServer();
|
|
10
10
|
await server.connect(new StdioServerTransport());
|
|
11
11
|
}
|
|
12
|
+
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
13
|
+
process.on(signal, () => process.exit(0));
|
|
14
|
+
}
|
|
12
15
|
main().catch((err) => {
|
|
13
16
|
console.error(err);
|
|
14
17
|
process.exit(1);
|
package/dist/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { createIkiMcpServer } from \"./server\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\n\nasync function main() {\n const server = createIkiMcpServer();\n await server.connect(new StdioServerTransport());\n}\n\nmain().catch((err) => {\n console.error(err);\n process.exit(1);\n});\n"],"mappings":";;;;;;AAEA,SAAS,4BAA4B;AAErC,eAAe,OAAO;AACpB,QAAM,SAAS,mBAAmB;AAClC,QAAM,OAAO,QAAQ,IAAI,qBAAqB,CAAC;AACjD;AAEA,KAAK,EAAE,MAAM,CAAC,QAAQ;AACpB,UAAQ,MAAM,GAAG;AACjB,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { createIkiMcpServer } from \"./server\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\n\nasync function main() {\n const server = createIkiMcpServer();\n await server.connect(new StdioServerTransport());\n}\n\n// Turn signals into a normal exit so 'exit' handlers (a render's browser\n// cleanup) run; the default action would skip them.\nfor (const signal of [\"SIGINT\", \"SIGTERM\", \"SIGHUP\"] as const) {\n process.on(signal, () => process.exit(0));\n}\n\nmain().catch((err) => {\n console.error(err);\n process.exit(1);\n});\n"],"mappings":";;;;;;AAEA,SAAS,4BAA4B;AAErC,eAAe,OAAO;AACpB,QAAM,SAAS,mBAAmB;AAClC,QAAM,OAAO,QAAQ,IAAI,qBAAqB,CAAC;AACjD;AAIA,WAAW,UAAU,CAAC,UAAU,WAAW,QAAQ,GAAY;AAC7D,UAAQ,GAAG,QAAQ,MAAM,QAAQ,KAAK,CAAC,CAAC;AAC1C;AAEA,KAAK,EAAE,MAAM,CAAC,QAAQ;AACpB,UAAQ,MAAM,GAAG;AACjB,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -689,6 +689,75 @@ declare function measureTurnReference(input: MeasureTurnInput): Promise<MeasureT
|
|
|
689
689
|
* behind each, then one block per image. */
|
|
690
690
|
declare function formatTurnReport(result: TurnMeasurement): string;
|
|
691
691
|
|
|
692
|
+
/**
|
|
693
|
+
* The pose plan `render_poses` captures: the canvas framing, the crops and the
|
|
694
|
+
* pose list, all decided from the model. It is the iki-character-loop's
|
|
695
|
+
* render recipe, minus the page that ran it.
|
|
696
|
+
*/
|
|
697
|
+
|
|
698
|
+
interface RenderCrop {
|
|
699
|
+
sx: number;
|
|
700
|
+
sy: number;
|
|
701
|
+
sw: number;
|
|
702
|
+
sh: number;
|
|
703
|
+
dw: number;
|
|
704
|
+
dh: number;
|
|
705
|
+
}
|
|
706
|
+
interface RenderPose {
|
|
707
|
+
name: string;
|
|
708
|
+
values: Record<string, number>;
|
|
709
|
+
/** Canvas px source and output size; absent = the whole canvas. */
|
|
710
|
+
crop?: RenderCrop;
|
|
711
|
+
}
|
|
712
|
+
interface RenderPlan {
|
|
713
|
+
canvas: {
|
|
714
|
+
width: number;
|
|
715
|
+
height: number;
|
|
716
|
+
};
|
|
717
|
+
/** The player's view; absent = the model's own canvas. */
|
|
718
|
+
view?: {
|
|
719
|
+
x: number;
|
|
720
|
+
y: number;
|
|
721
|
+
width: number;
|
|
722
|
+
height: number;
|
|
723
|
+
};
|
|
724
|
+
fullBody: boolean;
|
|
725
|
+
/** The mouth's centre in model px from the top-left. */
|
|
726
|
+
mouth?: {
|
|
727
|
+
cx: number;
|
|
728
|
+
cy: number;
|
|
729
|
+
};
|
|
730
|
+
poses: RenderPose[];
|
|
731
|
+
}
|
|
732
|
+
interface RenderPosesInput {
|
|
733
|
+
/** The rigged `.iki` to render (resolved against cwd). */
|
|
734
|
+
modelPath: string;
|
|
735
|
+
/** Existing directory under cwd the pose PNGs are written into. */
|
|
736
|
+
outDir: string;
|
|
737
|
+
}
|
|
738
|
+
type RenderPosesResult = {
|
|
739
|
+
ok: true;
|
|
740
|
+
outDir: string;
|
|
741
|
+
canvas: RenderPlan["canvas"];
|
|
742
|
+
fullBody: boolean;
|
|
743
|
+
mouth?: RenderPlan["mouth"];
|
|
744
|
+
/** Texture indices the engine could not load; the renders lack them. */
|
|
745
|
+
failedTextures: number[];
|
|
746
|
+
poses: {
|
|
747
|
+
name: string;
|
|
748
|
+
path: string;
|
|
749
|
+
}[];
|
|
750
|
+
} | {
|
|
751
|
+
ok: false;
|
|
752
|
+
error: string;
|
|
753
|
+
};
|
|
754
|
+
/**
|
|
755
|
+
* Render the model's pose set into `outDir`. Only caller-input failures
|
|
756
|
+
* (`AutoRigInputError`, `IkiFormatError`, and no installed browser) come back as
|
|
757
|
+
* `{ ok: false, error }`; a browser or page failure throws.
|
|
758
|
+
*/
|
|
759
|
+
declare function renderPoses(input: RenderPosesInput): Promise<RenderPosesResult>;
|
|
760
|
+
|
|
692
761
|
declare function createIkiMcpServer(): McpServer;
|
|
693
762
|
|
|
694
|
-
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 StandardParameterInfo, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, composeLayersFromParts, createIkiMcpServer, describeIki, formatMeasureReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, validateIki };
|
|
763
|
+
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 RenderPosesInput, type RenderPosesResult, type StandardParameterInfo, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, composeLayersFromParts, createIkiMcpServer, describeIki, formatMeasureReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
|
package/dist/index.d.ts
CHANGED
|
@@ -689,6 +689,75 @@ declare function measureTurnReference(input: MeasureTurnInput): Promise<MeasureT
|
|
|
689
689
|
* behind each, then one block per image. */
|
|
690
690
|
declare function formatTurnReport(result: TurnMeasurement): string;
|
|
691
691
|
|
|
692
|
+
/**
|
|
693
|
+
* The pose plan `render_poses` captures: the canvas framing, the crops and the
|
|
694
|
+
* pose list, all decided from the model. It is the iki-character-loop's
|
|
695
|
+
* render recipe, minus the page that ran it.
|
|
696
|
+
*/
|
|
697
|
+
|
|
698
|
+
interface RenderCrop {
|
|
699
|
+
sx: number;
|
|
700
|
+
sy: number;
|
|
701
|
+
sw: number;
|
|
702
|
+
sh: number;
|
|
703
|
+
dw: number;
|
|
704
|
+
dh: number;
|
|
705
|
+
}
|
|
706
|
+
interface RenderPose {
|
|
707
|
+
name: string;
|
|
708
|
+
values: Record<string, number>;
|
|
709
|
+
/** Canvas px source and output size; absent = the whole canvas. */
|
|
710
|
+
crop?: RenderCrop;
|
|
711
|
+
}
|
|
712
|
+
interface RenderPlan {
|
|
713
|
+
canvas: {
|
|
714
|
+
width: number;
|
|
715
|
+
height: number;
|
|
716
|
+
};
|
|
717
|
+
/** The player's view; absent = the model's own canvas. */
|
|
718
|
+
view?: {
|
|
719
|
+
x: number;
|
|
720
|
+
y: number;
|
|
721
|
+
width: number;
|
|
722
|
+
height: number;
|
|
723
|
+
};
|
|
724
|
+
fullBody: boolean;
|
|
725
|
+
/** The mouth's centre in model px from the top-left. */
|
|
726
|
+
mouth?: {
|
|
727
|
+
cx: number;
|
|
728
|
+
cy: number;
|
|
729
|
+
};
|
|
730
|
+
poses: RenderPose[];
|
|
731
|
+
}
|
|
732
|
+
interface RenderPosesInput {
|
|
733
|
+
/** The rigged `.iki` to render (resolved against cwd). */
|
|
734
|
+
modelPath: string;
|
|
735
|
+
/** Existing directory under cwd the pose PNGs are written into. */
|
|
736
|
+
outDir: string;
|
|
737
|
+
}
|
|
738
|
+
type RenderPosesResult = {
|
|
739
|
+
ok: true;
|
|
740
|
+
outDir: string;
|
|
741
|
+
canvas: RenderPlan["canvas"];
|
|
742
|
+
fullBody: boolean;
|
|
743
|
+
mouth?: RenderPlan["mouth"];
|
|
744
|
+
/** Texture indices the engine could not load; the renders lack them. */
|
|
745
|
+
failedTextures: number[];
|
|
746
|
+
poses: {
|
|
747
|
+
name: string;
|
|
748
|
+
path: string;
|
|
749
|
+
}[];
|
|
750
|
+
} | {
|
|
751
|
+
ok: false;
|
|
752
|
+
error: string;
|
|
753
|
+
};
|
|
754
|
+
/**
|
|
755
|
+
* Render the model's pose set into `outDir`. Only caller-input failures
|
|
756
|
+
* (`AutoRigInputError`, `IkiFormatError`, and no installed browser) come back as
|
|
757
|
+
* `{ ok: false, error }`; a browser or page failure throws.
|
|
758
|
+
*/
|
|
759
|
+
declare function renderPoses(input: RenderPosesInput): Promise<RenderPosesResult>;
|
|
760
|
+
|
|
692
761
|
declare function createIkiMcpServer(): McpServer;
|
|
693
762
|
|
|
694
|
-
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 StandardParameterInfo, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, composeLayersFromParts, createIkiMcpServer, describeIki, formatMeasureReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, validateIki };
|
|
763
|
+
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 RenderPosesInput, type RenderPosesResult, type StandardParameterInfo, type TurnImageMeasure, type TurnMeasurement, type ValidateResult, autoRigFromLayers, composeLayersFromParts, createIkiMcpServer, describeIki, formatMeasureReport, formatTurnReport, listStandardParameters, measureLayers, measureTurnReference, renderPoses, validateIki };
|