@codesherlock/codesherlock-alpha-mcp-server 0.0.10 → 0.0.11
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.
|
@@ -13,13 +13,23 @@ export declare const AnalyzeCommitInputSchema: {
|
|
|
13
13
|
* - Usage limit errors
|
|
14
14
|
* - Git errors
|
|
15
15
|
* - Internal server errors
|
|
16
|
+
*
|
|
17
|
+
* IMPORTANT:
|
|
18
|
+
* We intentionally keep `errorType` as a free-form string instead of a strict enum.
|
|
19
|
+
* The backend may introduce new error type strings (for example, "no_analysis_error")
|
|
20
|
+
* and we **do not** want the MCP server to fail schema validation with an error like:
|
|
21
|
+
* "Structured content does not match the tool's output schema: data.errorType should be equal to one of the allowed values".
|
|
22
|
+
*
|
|
23
|
+
* By allowing any string here, we always pass through whatever the backend sends and let
|
|
24
|
+
* the client / UI decide how to display or group unknown error types, instead of hiding
|
|
25
|
+
* the real backend error behind a schema error.
|
|
16
26
|
*/
|
|
17
27
|
export declare const AnalyzeCommitOutputSchema: {
|
|
18
28
|
success: z.ZodBoolean;
|
|
19
29
|
analysisId: z.ZodOptional<z.ZodString>;
|
|
20
30
|
status: z.ZodOptional<z.ZodString>;
|
|
21
31
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
errorType: z.ZodOptional<z.
|
|
32
|
+
errorType: z.ZodOptional<z.ZodString>;
|
|
23
33
|
results: z.ZodOptional<z.ZodAny>;
|
|
24
34
|
message: z.ZodOptional<z.ZodString>;
|
|
25
35
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolSchemas.d.ts","sourceRoot":"","sources":["../../src/schemas/toolSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,wBAAwB;;;;CAIpC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"toolSchemas.d.ts","sourceRoot":"","sources":["../../src/schemas/toolSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,wBAAwB;;;;CAIpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;CAsBrC,CAAC"}
|
|
@@ -13,23 +13,29 @@ export const AnalyzeCommitInputSchema = {
|
|
|
13
13
|
* - Usage limit errors
|
|
14
14
|
* - Git errors
|
|
15
15
|
* - Internal server errors
|
|
16
|
+
*
|
|
17
|
+
* IMPORTANT:
|
|
18
|
+
* We intentionally keep `errorType` as a free-form string instead of a strict enum.
|
|
19
|
+
* The backend may introduce new error type strings (for example, "no_analysis_error")
|
|
20
|
+
* and we **do not** want the MCP server to fail schema validation with an error like:
|
|
21
|
+
* "Structured content does not match the tool's output schema: data.errorType should be equal to one of the allowed values".
|
|
22
|
+
*
|
|
23
|
+
* By allowing any string here, we always pass through whatever the backend sends and let
|
|
24
|
+
* the client / UI decide how to display or group unknown error types, instead of hiding
|
|
25
|
+
* the real backend error behind a schema error.
|
|
16
26
|
*/
|
|
17
27
|
export const AnalyzeCommitOutputSchema = {
|
|
18
28
|
success: z.boolean().describe("Whether the commit analysis was successful"),
|
|
19
29
|
analysisId: z.string().optional().describe("Analysis ID returned from the backend (if successful)"),
|
|
20
30
|
status: z.string().optional().describe("Status string (e.g., 'complete', 'pending', 'failed')"),
|
|
21
31
|
statusCode: z.number().optional().describe("HTTP status code for error scenarios. Common values: 401 (authentication), 404 (not found), 422 (validation), 500 (internal error)"),
|
|
22
|
-
errorType: z
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"websocket_error"
|
|
28
|
-
"
|
|
29
|
-
"internal_error",
|
|
30
|
-
"usage_limit_error",
|
|
31
|
-
"repository_error"
|
|
32
|
-
]).optional().describe("Categorized error type for better error handling and user experience"),
|
|
32
|
+
errorType: z
|
|
33
|
+
.string()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("Categorized error type for better error handling and user experience. " +
|
|
36
|
+
"Common values include: authentication_error, validation_error, not_found_error, " +
|
|
37
|
+
"no_analysis_error, websocket_error, api_error, internal_error, usage_limit_error, repository_error. " +
|
|
38
|
+
"Additional values may be introduced by the backend over time."),
|
|
33
39
|
results: z.any().optional().describe("Analysis results array (present when success is true)"),
|
|
34
40
|
message: z.string().optional().describe("Success or informational message"),
|
|
35
41
|
error: z.string().optional().describe("Error message (present when success is false)"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolSchemas.js","sourceRoot":"","sources":["../../src/schemas/toolSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uEAAuE,CAAC;IAC1G,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACjE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,gDAAgD,CAAC;CAChH,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"toolSchemas.js","sourceRoot":"","sources":["../../src/schemas/toolSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uEAAuE,CAAC;IAC1G,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACjE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,OAAO,EAAE,KAA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