illustrator-mcp-server 1.5.0 → 1.5.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/dist/bundle.cjs +159 -47
- package/package.json +6 -6
package/dist/bundle.cjs
CHANGED
|
@@ -3107,6 +3107,9 @@ var require_utils = __commonJS({
|
|
|
3107
3107
|
"use strict";
|
|
3108
3108
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3109
3109
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3110
|
+
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
3111
|
+
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
3112
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
3110
3113
|
function stringArrayToHexStripped(input) {
|
|
3111
3114
|
let acc = "";
|
|
3112
3115
|
let code = 0;
|
|
@@ -3299,27 +3302,77 @@ var require_utils = __commonJS({
|
|
|
3299
3302
|
}
|
|
3300
3303
|
return output.join("");
|
|
3301
3304
|
}
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3305
|
+
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
3306
|
+
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
3307
|
+
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
3308
|
+
function reescapeHostDelimiters(host, isIP) {
|
|
3309
|
+
const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
|
|
3310
|
+
re.lastIndex = 0;
|
|
3311
|
+
return host.replace(re, (ch) => HOST_DELIMS[ch]);
|
|
3312
|
+
}
|
|
3313
|
+
function normalizePercentEncoding(input, decodeUnreserved = false) {
|
|
3314
|
+
if (input.indexOf("%") === -1) {
|
|
3315
|
+
return input;
|
|
3312
3316
|
}
|
|
3313
|
-
|
|
3314
|
-
|
|
3317
|
+
let output = "";
|
|
3318
|
+
for (let i = 0; i < input.length; i++) {
|
|
3319
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3320
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3321
|
+
if (isHexPair(hex3)) {
|
|
3322
|
+
const normalizedHex = hex3.toUpperCase();
|
|
3323
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3324
|
+
if (decodeUnreserved && isUnreserved(decoded)) {
|
|
3325
|
+
output += decoded;
|
|
3326
|
+
} else {
|
|
3327
|
+
output += "%" + normalizedHex;
|
|
3328
|
+
}
|
|
3329
|
+
i += 2;
|
|
3330
|
+
continue;
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
output += input[i];
|
|
3315
3334
|
}
|
|
3316
|
-
|
|
3317
|
-
|
|
3335
|
+
return output;
|
|
3336
|
+
}
|
|
3337
|
+
function normalizePathEncoding(input) {
|
|
3338
|
+
let output = "";
|
|
3339
|
+
for (let i = 0; i < input.length; i++) {
|
|
3340
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3341
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3342
|
+
if (isHexPair(hex3)) {
|
|
3343
|
+
const normalizedHex = hex3.toUpperCase();
|
|
3344
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3345
|
+
if (decoded !== "." && isUnreserved(decoded)) {
|
|
3346
|
+
output += decoded;
|
|
3347
|
+
} else {
|
|
3348
|
+
output += "%" + normalizedHex;
|
|
3349
|
+
}
|
|
3350
|
+
i += 2;
|
|
3351
|
+
continue;
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
if (isPathCharacter(input[i])) {
|
|
3355
|
+
output += input[i];
|
|
3356
|
+
} else {
|
|
3357
|
+
output += escape(input[i]);
|
|
3358
|
+
}
|
|
3318
3359
|
}
|
|
3319
|
-
|
|
3320
|
-
|
|
3360
|
+
return output;
|
|
3361
|
+
}
|
|
3362
|
+
function escapePreservingEscapes(input) {
|
|
3363
|
+
let output = "";
|
|
3364
|
+
for (let i = 0; i < input.length; i++) {
|
|
3365
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3366
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3367
|
+
if (isHexPair(hex3)) {
|
|
3368
|
+
output += "%" + hex3.toUpperCase();
|
|
3369
|
+
i += 2;
|
|
3370
|
+
continue;
|
|
3371
|
+
}
|
|
3372
|
+
}
|
|
3373
|
+
output += escape(input[i]);
|
|
3321
3374
|
}
|
|
3322
|
-
return
|
|
3375
|
+
return output;
|
|
3323
3376
|
}
|
|
3324
3377
|
function recomposeAuthority(component) {
|
|
3325
3378
|
const uriTokens = [];
|
|
@@ -3334,7 +3387,7 @@ var require_utils = __commonJS({
|
|
|
3334
3387
|
if (ipV6res.isIPV6 === true) {
|
|
3335
3388
|
host = `[${ipV6res.escapedHost}]`;
|
|
3336
3389
|
} else {
|
|
3337
|
-
host =
|
|
3390
|
+
host = reescapeHostDelimiters(host, false);
|
|
3338
3391
|
}
|
|
3339
3392
|
}
|
|
3340
3393
|
uriTokens.push(host);
|
|
@@ -3348,7 +3401,10 @@ var require_utils = __commonJS({
|
|
|
3348
3401
|
module2.exports = {
|
|
3349
3402
|
nonSimpleDomain,
|
|
3350
3403
|
recomposeAuthority,
|
|
3351
|
-
|
|
3404
|
+
reescapeHostDelimiters,
|
|
3405
|
+
normalizePercentEncoding,
|
|
3406
|
+
normalizePathEncoding,
|
|
3407
|
+
escapePreservingEscapes,
|
|
3352
3408
|
removeDotSegments,
|
|
3353
3409
|
isIPv4,
|
|
3354
3410
|
isUUID,
|
|
@@ -3572,12 +3628,12 @@ var require_schemes = __commonJS({
|
|
|
3572
3628
|
var require_fast_uri = __commonJS({
|
|
3573
3629
|
"node_modules/fast-uri/index.js"(exports2, module2) {
|
|
3574
3630
|
"use strict";
|
|
3575
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority,
|
|
3631
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3576
3632
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3577
3633
|
function normalize(uri, options) {
|
|
3578
3634
|
if (typeof uri === "string") {
|
|
3579
3635
|
uri = /** @type {T} */
|
|
3580
|
-
|
|
3636
|
+
normalizeString(uri, options);
|
|
3581
3637
|
} else if (typeof uri === "object") {
|
|
3582
3638
|
uri = /** @type {T} */
|
|
3583
3639
|
parse3(serialize(uri, options), options);
|
|
@@ -3644,19 +3700,9 @@ var require_fast_uri = __commonJS({
|
|
|
3644
3700
|
return target;
|
|
3645
3701
|
}
|
|
3646
3702
|
function equal(uriA, uriB, options) {
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
} else if (typeof uriA === "object") {
|
|
3651
|
-
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
3652
|
-
}
|
|
3653
|
-
if (typeof uriB === "string") {
|
|
3654
|
-
uriB = unescape(uriB);
|
|
3655
|
-
uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
|
|
3656
|
-
} else if (typeof uriB === "object") {
|
|
3657
|
-
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
3658
|
-
}
|
|
3659
|
-
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
3703
|
+
const normalizedA = normalizeComparableURI(uriA, options);
|
|
3704
|
+
const normalizedB = normalizeComparableURI(uriB, options);
|
|
3705
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
|
|
3660
3706
|
}
|
|
3661
3707
|
function serialize(cmpts, opts) {
|
|
3662
3708
|
const component = {
|
|
@@ -3681,12 +3727,12 @@ var require_fast_uri = __commonJS({
|
|
|
3681
3727
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
3682
3728
|
if (component.path !== void 0) {
|
|
3683
3729
|
if (!options.skipEscape) {
|
|
3684
|
-
component.path =
|
|
3730
|
+
component.path = escapePreservingEscapes(component.path);
|
|
3685
3731
|
if (component.scheme !== void 0) {
|
|
3686
3732
|
component.path = component.path.split("%3A").join(":");
|
|
3687
3733
|
}
|
|
3688
3734
|
} else {
|
|
3689
|
-
component.path =
|
|
3735
|
+
component.path = normalizePercentEncoding(component.path);
|
|
3690
3736
|
}
|
|
3691
3737
|
}
|
|
3692
3738
|
if (options.reference !== "suffix" && component.scheme) {
|
|
@@ -3721,7 +3767,16 @@ var require_fast_uri = __commonJS({
|
|
|
3721
3767
|
return uriTokens.join("");
|
|
3722
3768
|
}
|
|
3723
3769
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
3724
|
-
function
|
|
3770
|
+
function getParseError(parsed, matches) {
|
|
3771
|
+
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
3772
|
+
return 'URI path must start with "/" when authority is present.';
|
|
3773
|
+
}
|
|
3774
|
+
if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
|
|
3775
|
+
return "URI port is malformed.";
|
|
3776
|
+
}
|
|
3777
|
+
return void 0;
|
|
3778
|
+
}
|
|
3779
|
+
function parseWithStatus(uri, opts) {
|
|
3725
3780
|
const options = Object.assign({}, opts);
|
|
3726
3781
|
const parsed = {
|
|
3727
3782
|
scheme: void 0,
|
|
@@ -3732,6 +3787,7 @@ var require_fast_uri = __commonJS({
|
|
|
3732
3787
|
query: void 0,
|
|
3733
3788
|
fragment: void 0
|
|
3734
3789
|
};
|
|
3790
|
+
let malformedAuthorityOrPort = false;
|
|
3735
3791
|
let isIP = false;
|
|
3736
3792
|
if (options.reference === "suffix") {
|
|
3737
3793
|
if (options.scheme) {
|
|
@@ -3752,6 +3808,11 @@ var require_fast_uri = __commonJS({
|
|
|
3752
3808
|
if (isNaN(parsed.port)) {
|
|
3753
3809
|
parsed.port = matches[5];
|
|
3754
3810
|
}
|
|
3811
|
+
const parseError = getParseError(parsed, matches);
|
|
3812
|
+
if (parseError !== void 0) {
|
|
3813
|
+
parsed.error = parsed.error || parseError;
|
|
3814
|
+
malformedAuthorityOrPort = true;
|
|
3815
|
+
}
|
|
3755
3816
|
if (parsed.host) {
|
|
3756
3817
|
const ipv4result = isIPv4(parsed.host);
|
|
3757
3818
|
if (ipv4result === false) {
|
|
@@ -3790,14 +3851,18 @@ var require_fast_uri = __commonJS({
|
|
|
3790
3851
|
parsed.scheme = unescape(parsed.scheme);
|
|
3791
3852
|
}
|
|
3792
3853
|
if (parsed.host !== void 0) {
|
|
3793
|
-
parsed.host = unescape(parsed.host);
|
|
3854
|
+
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
3794
3855
|
}
|
|
3795
3856
|
}
|
|
3796
3857
|
if (parsed.path) {
|
|
3797
|
-
parsed.path =
|
|
3858
|
+
parsed.path = normalizePathEncoding(parsed.path);
|
|
3798
3859
|
}
|
|
3799
3860
|
if (parsed.fragment) {
|
|
3800
|
-
|
|
3861
|
+
try {
|
|
3862
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
3863
|
+
} catch {
|
|
3864
|
+
parsed.error = parsed.error || "URI malformed";
|
|
3865
|
+
}
|
|
3801
3866
|
}
|
|
3802
3867
|
}
|
|
3803
3868
|
if (schemeHandler && schemeHandler.parse) {
|
|
@@ -3806,7 +3871,29 @@ var require_fast_uri = __commonJS({
|
|
|
3806
3871
|
} else {
|
|
3807
3872
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
3808
3873
|
}
|
|
3809
|
-
return parsed;
|
|
3874
|
+
return { parsed, malformedAuthorityOrPort };
|
|
3875
|
+
}
|
|
3876
|
+
function parse3(uri, opts) {
|
|
3877
|
+
return parseWithStatus(uri, opts).parsed;
|
|
3878
|
+
}
|
|
3879
|
+
function normalizeString(uri, opts) {
|
|
3880
|
+
return normalizeStringWithStatus(uri, opts).normalized;
|
|
3881
|
+
}
|
|
3882
|
+
function normalizeStringWithStatus(uri, opts) {
|
|
3883
|
+
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
3884
|
+
return {
|
|
3885
|
+
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
3886
|
+
malformedAuthorityOrPort
|
|
3887
|
+
};
|
|
3888
|
+
}
|
|
3889
|
+
function normalizeComparableURI(uri, opts) {
|
|
3890
|
+
if (typeof uri === "string") {
|
|
3891
|
+
const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
|
|
3892
|
+
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
3893
|
+
}
|
|
3894
|
+
if (typeof uri === "object") {
|
|
3895
|
+
return serialize(uri, opts);
|
|
3896
|
+
}
|
|
3810
3897
|
}
|
|
3811
3898
|
var fastUri = {
|
|
3812
3899
|
SCHEMES,
|
|
@@ -20581,10 +20668,9 @@ var ProgressTokenSchema = union([string2(), number2().int()]);
|
|
|
20581
20668
|
var CursorSchema = string2();
|
|
20582
20669
|
var TaskCreationParamsSchema = looseObject({
|
|
20583
20670
|
/**
|
|
20584
|
-
*
|
|
20585
|
-
* If null, the task has unlimited lifetime until manually cleaned up.
|
|
20671
|
+
* Requested duration in milliseconds to retain task from creation.
|
|
20586
20672
|
*/
|
|
20587
|
-
ttl:
|
|
20673
|
+
ttl: number2().optional(),
|
|
20588
20674
|
/**
|
|
20589
20675
|
* Time in milliseconds to wait between task status requests.
|
|
20590
20676
|
*/
|
|
@@ -20884,7 +20970,11 @@ var ClientCapabilitiesSchema = object({
|
|
|
20884
20970
|
/**
|
|
20885
20971
|
* Present if the client supports task creation.
|
|
20886
20972
|
*/
|
|
20887
|
-
tasks: ClientTasksCapabilitySchema.optional()
|
|
20973
|
+
tasks: ClientTasksCapabilitySchema.optional(),
|
|
20974
|
+
/**
|
|
20975
|
+
* Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
|
20976
|
+
*/
|
|
20977
|
+
extensions: record(string2(), AssertObjectSchema).optional()
|
|
20888
20978
|
});
|
|
20889
20979
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
20890
20980
|
/**
|
|
@@ -20945,7 +21035,11 @@ var ServerCapabilitiesSchema = object({
|
|
|
20945
21035
|
/**
|
|
20946
21036
|
* Present if the server supports task creation.
|
|
20947
21037
|
*/
|
|
20948
|
-
tasks: ServerTasksCapabilitySchema.optional()
|
|
21038
|
+
tasks: ServerTasksCapabilitySchema.optional(),
|
|
21039
|
+
/**
|
|
21040
|
+
* Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
|
21041
|
+
*/
|
|
21042
|
+
extensions: record(string2(), AssertObjectSchema).optional()
|
|
20949
21043
|
});
|
|
20950
21044
|
var InitializeResultSchema = ResultSchema.extend({
|
|
20951
21045
|
/**
|
|
@@ -21137,6 +21231,12 @@ var ResourceSchema = object({
|
|
|
21137
21231
|
* The MIME type of this resource, if known.
|
|
21138
21232
|
*/
|
|
21139
21233
|
mimeType: optional(string2()),
|
|
21234
|
+
/**
|
|
21235
|
+
* The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
|
|
21236
|
+
*
|
|
21237
|
+
* This can be used by Hosts to display file sizes and estimate context window usage.
|
|
21238
|
+
*/
|
|
21239
|
+
size: optional(number2()),
|
|
21140
21240
|
/**
|
|
21141
21241
|
* Optional annotations for the client.
|
|
21142
21242
|
*/
|
|
@@ -27785,6 +27885,10 @@ var Protocol = class {
|
|
|
27785
27885
|
this._progressHandlers.clear();
|
|
27786
27886
|
this._taskProgressTokens.clear();
|
|
27787
27887
|
this._pendingDebouncedNotifications.clear();
|
|
27888
|
+
for (const info of this._timeoutInfo.values()) {
|
|
27889
|
+
clearTimeout(info.timeoutId);
|
|
27890
|
+
}
|
|
27891
|
+
this._timeoutInfo.clear();
|
|
27788
27892
|
for (const controller of this._requestHandlerAbortControllers.values()) {
|
|
27789
27893
|
controller.abort();
|
|
27790
27894
|
}
|
|
@@ -27915,7 +28019,9 @@ var Protocol = class {
|
|
|
27915
28019
|
await capturedTransport?.send(errorResponse);
|
|
27916
28020
|
}
|
|
27917
28021
|
}).catch((error48) => this._onerror(new Error(`Failed to send response: ${error48}`))).finally(() => {
|
|
27918
|
-
this._requestHandlerAbortControllers.
|
|
28022
|
+
if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
|
|
28023
|
+
this._requestHandlerAbortControllers.delete(request.id);
|
|
28024
|
+
}
|
|
27919
28025
|
});
|
|
27920
28026
|
}
|
|
27921
28027
|
_onprogress(notification) {
|
|
@@ -29928,6 +30034,9 @@ var McpServer = class {
|
|
|
29928
30034
|
annotations = rest.shift();
|
|
29929
30035
|
}
|
|
29930
30036
|
} else if (typeof firstArg === "object" && firstArg !== null) {
|
|
30037
|
+
if (Object.values(firstArg).some((v) => typeof v === "object" && v !== null)) {
|
|
30038
|
+
throw new Error(`Tool ${name} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);
|
|
30039
|
+
}
|
|
29931
30040
|
annotations = rest.shift();
|
|
29932
30041
|
}
|
|
29933
30042
|
}
|
|
@@ -30046,6 +30155,9 @@ function getZodSchemaObject(schema) {
|
|
|
30046
30155
|
if (isZodRawShapeCompat(schema)) {
|
|
30047
30156
|
return objectFromShape(schema);
|
|
30048
30157
|
}
|
|
30158
|
+
if (!isZodSchemaInstance(schema)) {
|
|
30159
|
+
throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");
|
|
30160
|
+
}
|
|
30049
30161
|
return schema;
|
|
30050
30162
|
}
|
|
30051
30163
|
function promptArgumentsFromSchema(schema) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "illustrator-mcp-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"mcpName": "io.github.ie3jp/illustrator-mcp-server",
|
|
5
5
|
"description": "MCP server for reading, manipulating, and exporting Adobe Illustrator design data",
|
|
6
6
|
"type": "module",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"node": ">=20.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
47
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
48
48
|
"p-limit": "^7.3.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@types/node": "^25.
|
|
52
|
-
"tsx": "^4.
|
|
53
|
-
"typescript": "^6.0.
|
|
54
|
-
"vitest": "^4.1.
|
|
51
|
+
"@types/node": "^25.9.1",
|
|
52
|
+
"tsx": "^4.22.3",
|
|
53
|
+
"typescript": "^6.0.3",
|
|
54
|
+
"vitest": "^4.1.7"
|
|
55
55
|
}
|
|
56
56
|
}
|