@vitalyostanin/youtrack-mcp 0.13.2 → 0.13.3

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-ru.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # YouTrack MCP Server
2
2
 
3
3
  [![CI](https://github.com/VitalyOstanin/youtrack-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/VitalyOstanin/youtrack-mcp/actions/workflows/ci.yml)
4
+ [![codecov](https://codecov.io/gh/VitalyOstanin/youtrack-mcp/graph/badge.svg?branch=master)](https://codecov.io/gh/VitalyOstanin/youtrack-mcp)
4
5
  [![npm version](https://img.shields.io/npm/v/@vitalyostanin/youtrack-mcp.svg)](https://www.npmjs.com/package/@vitalyostanin/youtrack-mcp)
5
6
 
6
7
  MCP сервер для полноценной интеграции с YouTrack со следующими возможностями:
package/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  Also available in Russian: [README-ru.md](README-ru.md)
4
4
 
5
5
  [![CI](https://github.com/VitalyOstanin/youtrack-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/VitalyOstanin/youtrack-mcp/actions/workflows/ci.yml)
6
+ [![codecov](https://codecov.io/gh/VitalyOstanin/youtrack-mcp/graph/badge.svg?branch=master)](https://codecov.io/gh/VitalyOstanin/youtrack-mcp)
6
7
  [![npm version](https://img.shields.io/npm/v/@vitalyostanin/youtrack-mcp.svg)](https://www.npmjs.com/package/@vitalyostanin/youtrack-mcp)
7
8
 
8
9
  MCP server for comprehensive YouTrack integration with the following capabilities:
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitalyostanin/youtrack-mcp",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "scripts": {
5
5
  "build": "tsc -p tsconfig.build.json",
6
6
  "postbuild": "chmod +x dist/index.js && cp package.json dist/package.json",
@@ -7,7 +7,7 @@ import { createToolHandler } from "../utils/tool-handler.js";
7
7
  export const issuesSearchArgs = {
8
8
  query: yqlQuerySchema
9
9
  .optional()
10
- .describe("Search string for issues (e.g., 'login error'). If not provided or empty, all issues will be returned. You can also use YouTrack Query Language (e.g., 'State: Open', 'Type: Bug')"),
10
+ .describe("Search string for issues (e.g., 'login error'). If not provided or empty, all issues will be returned. You can use YouTrack Query Language, including {curly braces} to enclose multi-word attribute values (e.g., 'State: {In Progress}', 'tag: {Technical debt}', 'Type: Bug')."),
11
11
  limit: z.number().int().positive().max(200).default(50).describe("Max results per page"),
12
12
  skip: z.number().int().nonnegative().default(0).describe("Offset for pagination"),
13
13
  projects: z.array(yqlIdentifierSchema).optional().describe("Filter by project short names (e.g., ['PROJ', 'TEST'])"),
@@ -22,9 +22,12 @@ export declare const articleIdSchema: z.ZodString;
22
22
  */
23
23
  export declare const yqlIdentifierSchema: z.ZodString;
24
24
  /**
25
- * Free-text YQL fragment used as a search query. Forbids `{` and `}` so the
26
- * value cannot break out of the surrounding `({...})` wrapping or smuggle a
27
- * literal field-value clause.
25
+ * Free-text YQL fragment used as a search query. Allows `{` and `}` because
26
+ * they are valid YQL syntax for multi-word attribute values. Only ASCII
27
+ * control characters are rejected.
28
+ *
29
+ * Callers MUST NOT interpolate this value inside another `{...}` wrapper —
30
+ * use yqlIdentifierSchema for that.
28
31
  */
29
32
  export declare const yqlQuerySchema: z.ZodString;
30
33
  //# sourceMappingURL=validators.d.ts.map
@@ -44,12 +44,19 @@ export const articleIdSchema = z
44
44
  .min(1)
45
45
  .regex(internalIdRegex, "Article id must be alphanumeric with . _ -");
46
46
  /**
47
- * Reject `{`, `}` and ASCII control characters (NUL..US, DEL) in YQL inputs.
48
- * This is the single source of truth for YQL injection defense across query
49
- * fragments, field values and identifiers.
47
+ * Reject `{`, `}` and ASCII control characters in values that are interpolated
48
+ * inside a `{...}` wrapper. Used by yqlIdentifierSchema.
50
49
  */
51
50
  // eslint-disable-next-line no-control-regex
52
- const YQL_FORBIDDEN = /[{}\x00-\x1F\x7F]/;
51
+ const YQL_IDENTIFIER_FORBIDDEN = /[{}\x00-\x1F\x7F]/;
52
+ /**
53
+ * Reject only ASCII control characters in free-text YQL queries. `{` and `}`
54
+ * are part of the YouTrack Query Language — they enclose attribute values
55
+ * that contain spaces (e.g. `tag: {Technical debt}`, `State: {In Progress}`).
56
+ * See: https://www.jetbrains.com/help/youtrack/server/search-and-command-attributes.html
57
+ */
58
+ // eslint-disable-next-line no-control-regex
59
+ const YQL_QUERY_FORBIDDEN = /[\x00-\x1F\x7F]/;
53
60
  /**
54
61
  * YQL identifier value used inside `{...}` wrappers (state/type names,
55
62
  * project short names, login-like ids). Permits spaces, hyphens, dots and
@@ -59,17 +66,20 @@ const YQL_FORBIDDEN = /[{}\x00-\x1F\x7F]/;
59
66
  export const yqlIdentifierSchema = z
60
67
  .string()
61
68
  .min(1)
62
- .refine((value) => !YQL_FORBIDDEN.test(value), {
69
+ .refine((value) => !YQL_IDENTIFIER_FORBIDDEN.test(value), {
63
70
  message: "YQL identifier must not contain { } or control characters",
64
71
  });
65
72
  /**
66
- * Free-text YQL fragment used as a search query. Forbids `{` and `}` so the
67
- * value cannot break out of the surrounding `({...})` wrapping or smuggle a
68
- * literal field-value clause.
73
+ * Free-text YQL fragment used as a search query. Allows `{` and `}` because
74
+ * they are valid YQL syntax for multi-word attribute values. Only ASCII
75
+ * control characters are rejected.
76
+ *
77
+ * Callers MUST NOT interpolate this value inside another `{...}` wrapper —
78
+ * use yqlIdentifierSchema for that.
69
79
  */
70
80
  export const yqlQuerySchema = z
71
81
  .string()
72
- .refine((value) => !YQL_FORBIDDEN.test(value), {
73
- message: "Search query must not contain { } or control characters",
82
+ .refine((value) => !YQL_QUERY_FORBIDDEN.test(value), {
83
+ message: "Search query must not contain control characters",
74
84
  });
75
85
  //# sourceMappingURL=validators.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitalyostanin/youtrack-mcp",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "scripts": {
5
5
  "build": "tsc -p tsconfig.build.json",
6
6
  "postbuild": "chmod +x dist/index.js && cp package.json dist/package.json",