@ikijs/mcp 0.26.0 → 0.26.1
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 +1 -1
- package/dist/{chunk-K2CWU4AL.mjs → chunk-GPEGV2AT.mjs} +38 -6
- package/dist/{chunk-K2CWU4AL.mjs.map → chunk-GPEGV2AT.mjs.map} +1 -1
- package/dist/cli.js +37 -5
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.js +37 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -3813,6 +3813,7 @@ var IRIS_W = 50;
|
|
|
3813
3813
|
var EYEWHITE_SRC = "eyewhite.png";
|
|
3814
3814
|
var EYE_LASH_LUMA = 120;
|
|
3815
3815
|
var LASH_KEEP_FRACTION = 0.5;
|
|
3816
|
+
var EYE_LID_WARMTH = 30;
|
|
3816
3817
|
var NOSE_TIP_AT = 0.66;
|
|
3817
3818
|
var DEFAULT_LAYOUT = {
|
|
3818
3819
|
// Back hair and body sit behind the face. Both are OPTIONAL: a parts dir
|
|
@@ -4296,6 +4297,36 @@ async function prepEyeSplit(partsDir) {
|
|
|
4296
4297
|
}
|
|
4297
4298
|
const lashCutoffY = minY + LASH_KEEP_FRACTION * (maxY - minY + 1);
|
|
4298
4299
|
const detached = detachedAboveWhite(data, W, H);
|
|
4300
|
+
const isDark = (i) => data[i + 3] > 0 && luma(data, i) < EYE_LASH_LUMA;
|
|
4301
|
+
const isLight = (i) => data[i + 3] >= import_editor12.ALPHA_OPAQUE && luma(data, i) >= EYE_LASH_LUMA;
|
|
4302
|
+
const isWarm = (i) => data[i] - data[i + 2] >= EYE_LID_WARMTH;
|
|
4303
|
+
const whiteTop = new Int32Array(W).fill(-1);
|
|
4304
|
+
for (let x = 0; x < W; x++) {
|
|
4305
|
+
for (let y = 0; y < H; y++) {
|
|
4306
|
+
const i = (y * W + x) * 4;
|
|
4307
|
+
if (!detached[y * W + x] && isLight(i) && !isWarm(i)) {
|
|
4308
|
+
whiteTop[x] = y;
|
|
4309
|
+
break;
|
|
4310
|
+
}
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
let first = 0;
|
|
4314
|
+
while (first < W && whiteTop[first] === -1) first++;
|
|
4315
|
+
if (first < W) {
|
|
4316
|
+
let last = W - 1;
|
|
4317
|
+
while (whiteTop[last] === -1) last--;
|
|
4318
|
+
whiteTop.fill(whiteTop[first], 0, first);
|
|
4319
|
+
whiteTop.fill(whiteTop[last], last + 1);
|
|
4320
|
+
}
|
|
4321
|
+
const lidStop = new Int32Array(W).fill(-1);
|
|
4322
|
+
for (let x = 0; x < W; x++) {
|
|
4323
|
+
for (let y = whiteTop[x] - 1; y >= 0; y--) {
|
|
4324
|
+
if (isDark((y * W + x) * 4)) {
|
|
4325
|
+
lidStop[x] = y;
|
|
4326
|
+
break;
|
|
4327
|
+
}
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4299
4330
|
const sclera = Buffer.from(data);
|
|
4300
4331
|
const lash = Buffer.from(data);
|
|
4301
4332
|
const lashLower = Buffer.from(data);
|
|
@@ -4303,12 +4334,13 @@ async function prepEyeSplit(partsDir) {
|
|
|
4303
4334
|
for (let y = 0; y < H; y++) {
|
|
4304
4335
|
for (let x = 0; x < W; x++) {
|
|
4305
4336
|
const i = (y * W + x) * 4;
|
|
4306
|
-
const
|
|
4337
|
+
const dark = isDark(i);
|
|
4307
4338
|
const upper = y <= lashCutoffY;
|
|
4308
|
-
if (
|
|
4339
|
+
if (dark && upper) sclera[i] = sclera[i + 1] = sclera[i + 2] = 255;
|
|
4309
4340
|
if (detached[y * W + x]) sclera[i + 3] = 0;
|
|
4310
|
-
if (
|
|
4311
|
-
if (
|
|
4341
|
+
if (y < lidStop[x] && isLight(i) && isWarm(i)) sclera[i + 3] = 0;
|
|
4342
|
+
if (!(dark && upper)) lash[i + 3] = 0;
|
|
4343
|
+
if (dark && !upper) lowerInk = true;
|
|
4312
4344
|
else lashLower[i + 3] = 0;
|
|
4313
4345
|
}
|
|
4314
4346
|
}
|
|
@@ -4709,7 +4741,7 @@ function formatPatchReports(reports) {
|
|
|
4709
4741
|
});
|
|
4710
4742
|
}
|
|
4711
4743
|
function createIkiMcpServer() {
|
|
4712
|
-
const server = new import_mcp.McpServer({ name: "iki", version: "0.26.
|
|
4744
|
+
const server = new import_mcp.McpServer({ name: "iki", version: "0.26.1" });
|
|
4713
4745
|
server.registerTool(
|
|
4714
4746
|
"validate_iki",
|
|
4715
4747
|
{
|