motionmcp 2.6.0 → 2.8.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 +4 -4
- package/dist/handlers/CustomFieldHandler.d.ts.map +1 -1
- package/dist/handlers/CustomFieldHandler.js +18 -2
- package/dist/handlers/CustomFieldHandler.js.map +1 -1
- package/dist/handlers/HandlerFactory.d.ts +0 -5
- package/dist/handlers/HandlerFactory.d.ts.map +1 -1
- package/dist/handlers/HandlerFactory.js +0 -15
- package/dist/handlers/HandlerFactory.js.map +1 -1
- package/dist/handlers/RecurringTaskHandler.d.ts.map +1 -1
- package/dist/handlers/RecurringTaskHandler.js +7 -2
- package/dist/handlers/RecurringTaskHandler.js.map +1 -1
- package/dist/handlers/TaskHandler.d.ts.map +1 -1
- package/dist/handlers/TaskHandler.js +7 -0
- package/dist/handlers/TaskHandler.js.map +1 -1
- package/dist/mcp-server.js +3 -3
- package/dist/mcp-server.js.map +1 -1
- package/dist/services/api/ApiClient.d.ts +22 -0
- package/dist/services/api/ApiClient.d.ts.map +1 -0
- package/dist/services/api/ApiClient.js +198 -0
- package/dist/services/api/ApiClient.js.map +1 -0
- package/dist/services/api/CacheManager.d.ts +21 -0
- package/dist/services/api/CacheManager.d.ts.map +1 -0
- package/dist/services/api/CacheManager.js +25 -0
- package/dist/services/api/CacheManager.js.map +1 -0
- package/dist/services/api/comments.d.ts +8 -0
- package/dist/services/api/comments.d.ts.map +1 -0
- package/dist/services/api/comments.js +86 -0
- package/dist/services/api/comments.js.map +1 -0
- package/dist/services/api/customFields.d.ts +21 -0
- package/dist/services/api/customFields.d.ts.map +1 -0
- package/dist/services/api/customFields.js +277 -0
- package/dist/services/api/customFields.js.map +1 -0
- package/dist/services/api/index.d.ts +22 -0
- package/dist/services/api/index.d.ts.map +1 -0
- package/dist/services/api/index.js +64 -0
- package/dist/services/api/index.js.map +1 -0
- package/dist/services/api/projects.d.ts +18 -0
- package/dist/services/api/projects.d.ts.map +1 -0
- package/dist/services/api/projects.js +346 -0
- package/dist/services/api/projects.js.map +1 -0
- package/dist/services/api/recurringTasks.d.ts +15 -0
- package/dist/services/api/recurringTasks.d.ts.map +1 -0
- package/dist/services/api/recurringTasks.js +143 -0
- package/dist/services/api/recurringTasks.js.map +1 -0
- package/dist/services/api/schedules.d.ts +8 -0
- package/dist/services/api/schedules.d.ts.map +1 -0
- package/dist/services/api/schedules.js +70 -0
- package/dist/services/api/schedules.js.map +1 -0
- package/dist/services/api/search.d.ts +29 -0
- package/dist/services/api/search.d.ts.map +1 -0
- package/dist/services/api/search.js +415 -0
- package/dist/services/api/search.js.map +1 -0
- package/dist/services/api/statuses.d.ts +7 -0
- package/dist/services/api/statuses.d.ts.map +1 -0
- package/dist/services/api/statuses.js +67 -0
- package/dist/services/api/statuses.js.map +1 -0
- package/dist/services/api/tasks.d.ts +34 -0
- package/dist/services/api/tasks.d.ts.map +1 -0
- package/dist/services/api/tasks.js +474 -0
- package/dist/services/api/tasks.js.map +1 -0
- package/dist/services/api/types.d.ts +54 -0
- package/dist/services/api/types.d.ts.map +1 -0
- package/dist/services/api/types.js +9 -0
- package/dist/services/api/types.js.map +1 -0
- package/dist/services/api/users.d.ts +8 -0
- package/dist/services/api/users.d.ts.map +1 -0
- package/dist/services/api/users.js +93 -0
- package/dist/services/api/users.js.map +1 -0
- package/dist/services/api/workspaces.d.ts +7 -0
- package/dist/services/api/workspaces.d.ts.map +1 -0
- package/dist/services/api/workspaces.js +59 -0
- package/dist/services/api/workspaces.js.map +1 -0
- package/dist/services/motionApi.d.ts +34 -180
- package/dist/services/motionApi.d.ts.map +1 -1
- package/dist/services/motionApi.js +84 -2163
- package/dist/services/motionApi.js.map +1 -1
- package/dist/tools/ToolConfigurator.d.ts +1 -7
- package/dist/tools/ToolConfigurator.d.ts.map +1 -1
- package/dist/tools/ToolConfigurator.js +0 -31
- package/dist/tools/ToolConfigurator.js.map +1 -1
- package/dist/tools/ToolDefinitions.js +1 -1
- package/dist/tools/ToolDefinitions.js.map +1 -1
- package/dist/tools/ToolRegistry.d.ts +1 -22
- package/dist/tools/ToolRegistry.d.ts.map +1 -1
- package/dist/tools/ToolRegistry.js +0 -31
- package/dist/tools/ToolRegistry.js.map +1 -1
- package/dist/types/motion.d.ts +0 -7
- package/dist/types/motion.d.ts.map +1 -1
- package/dist/utils/cache.d.ts +0 -5
- package/dist/utils/cache.d.ts.map +1 -1
- package/dist/utils/cache.js +0 -8
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +7 -1
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/errorHandling.d.ts +0 -12
- package/dist/utils/errorHandling.d.ts.map +1 -1
- package/dist/utils/errorHandling.js +2 -23
- package/dist/utils/errorHandling.js.map +1 -1
- package/dist/utils/errors.d.ts +89 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +276 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -5
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/parameterUtils.d.ts +10 -0
- package/dist/utils/parameterUtils.d.ts.map +1 -1
- package/dist/utils/parameterUtils.js +61 -5
- package/dist/utils/parameterUtils.js.map +1 -1
- package/dist/utils/responseFormatters.js +16 -16
- package/dist/utils/responseFormatters.js.map +1 -1
- package/dist/utils/serverInstructions.d.ts +2 -0
- package/dist/utils/serverInstructions.d.ts.map +1 -0
- package/dist/utils/serverInstructions.js +21 -0
- package/dist/utils/serverInstructions.js.map +1 -0
- package/dist/utils/userFacingErrors.d.ts +0 -8
- package/dist/utils/userFacingErrors.d.ts.map +1 -1
- package/dist/utils/userFacingErrors.js +0 -19
- package/dist/utils/userFacingErrors.js.map +1 -1
- package/dist/utils/workspaceResolver.js +12 -12
- package/dist/utils/workspaceResolver.js.map +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":";AAAA;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA+GH,oDAsBC;AAOD,0CAEC;AAGD,0CA8BC;AA7KD,8CAA8C;AACjC,QAAA,WAAW,GAAG;IACzB,2BAA2B;IAC3B,mBAAmB,EAAE,qBAAqB;IAC1C,uBAAuB,EAAE,yBAAyB;IAClD,oBAAoB,EAAE,sBAAsB;IAE5C,qBAAqB;IACrB,WAAW,EAAE,aAAa,EAAU,uCAAuC;IAC3E,aAAa,EAAE,eAAe,EAAK,oDAAoD;IAEvF,oBAAoB;IACpB,kBAAkB,EAAE,oBAAoB;IACxC,sBAAsB,EAAE,wBAAwB;IAChD,gBAAgB,EAAE,kBAAkB;IACpC,mBAAmB,EAAE,qBAAqB;IAE1C,kBAAkB;IAClB,kBAAkB,EAAE,oBAAoB;IAExC,qBAAqB;IACrB,gBAAgB,EAAE,kBAAkB;IACpC,aAAa,EAAE,eAAe;IAC9B,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,iBAAiB;IAElC,iBAAiB;IACjB,cAAc,EAAE,gBAAgB;CACxB,CAAC;AAIX,kBAAkB;AACL,QAAA,eAAe,GAAG;IAC7B,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;CACV,CAAC;AAEX,qBAAqB;AACR,QAAA,kBAAkB,GAAG;IAChC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,uCAAuC;AAC1B,QAAA,QAAQ,GAAG;IACtB,6BAA6B,EAAE,IAAI;IACnC,yBAAyB,EAAE,KAAK;CACxB,CAAC;AAEX,sBAAsB;AACT,QAAA,YAAY,GAAG;IAC1B,WAAW,EAAE,CA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YACb,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;YACjC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;YACtC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;QAC/C,KAAK,WAAW;YACd,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;YAClC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;IAClD,CAAC;IAED,6BAA6B;IAC7B,MAAM,WAAW,GAAG,qBAAqB,CAAC;IAC1C,IAAI,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YACjC,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -9,14 +9,6 @@ import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
|
9
9
|
interface ErrorContext {
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Base error class for Motion API related errors
|
|
14
|
-
*/
|
|
15
|
-
export declare class MotionApiError extends Error {
|
|
16
|
-
readonly code: ErrorCode;
|
|
17
|
-
readonly context: ErrorContext;
|
|
18
|
-
constructor(message: string, code?: ErrorCode, context?: ErrorContext);
|
|
19
|
-
}
|
|
20
12
|
/**
|
|
21
13
|
* Error class for parameter validation failures
|
|
22
14
|
*/
|
|
@@ -57,9 +49,5 @@ export declare function formatMcpError(error: Error | unknown, additionalContext
|
|
|
57
49
|
* Format a success response for MCP protocol
|
|
58
50
|
*/
|
|
59
51
|
export declare function formatMcpSuccess(text: string): CallToolResult;
|
|
60
|
-
/**
|
|
61
|
-
* Create a standardized error response with context
|
|
62
|
-
*/
|
|
63
|
-
export declare function createErrorResponse(message: string, code?: ErrorCode, context?: ErrorContext): CallToolResult;
|
|
64
52
|
export {};
|
|
65
53
|
//# sourceMappingURL=errorHandling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandling.d.ts","sourceRoot":"","sources":["../../src/utils/errorHandling.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmC,SAAS,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,
|
|
1
|
+
{"version":3,"file":"errorHandling.d.ts","sourceRoot":"","sources":["../../src/utils/errorHandling.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmC,SAAS,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,SAAgB,IAAI,EAAE,SAAS,CAAC;IAChC,SAAgB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,SAAgB,OAAO,EAAE,YAAY,CAAC;gBAE1B,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,MAAM,GAAG,IAAW,EAAE,OAAO,GAAE,YAAiB;CAOzF;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,SAAgB,IAAI,EAAE,SAAS,CAAC;IAChC,SAAgB,OAAO,EAAE,YAAY,CAAC;gBAE1B,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,SAA2C,EAAE,OAAO,GAAE,YAAiB;CAM3G;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAKhG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAoB5G;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,EAAE,iBAAiB,GAAE,YAAiB,GAAG,cAAc,CAsB3G;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAS7D"}
|
|
@@ -6,25 +6,12 @@
|
|
|
6
6
|
* formatting to ensure consistent error handling across all handlers.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.WorkspaceError = exports.ValidationError =
|
|
9
|
+
exports.WorkspaceError = exports.ValidationError = void 0;
|
|
10
10
|
exports.isCodedError = isCodedError;
|
|
11
11
|
exports.extractErrorInfo = extractErrorInfo;
|
|
12
12
|
exports.formatMcpError = formatMcpError;
|
|
13
13
|
exports.formatMcpSuccess = formatMcpSuccess;
|
|
14
|
-
exports.createErrorResponse = createErrorResponse;
|
|
15
14
|
const constants_1 = require("./constants");
|
|
16
|
-
/**
|
|
17
|
-
* Base error class for Motion API related errors
|
|
18
|
-
*/
|
|
19
|
-
class MotionApiError extends Error {
|
|
20
|
-
constructor(message, code = constants_1.ERROR_CODES.MOTION_API_ERROR, context = {}) {
|
|
21
|
-
super(message);
|
|
22
|
-
this.name = 'MotionApiError';
|
|
23
|
-
this.code = code;
|
|
24
|
-
this.context = context;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.MotionApiError = MotionApiError;
|
|
28
15
|
/**
|
|
29
16
|
* Error class for parameter validation failures
|
|
30
17
|
*/
|
|
@@ -54,8 +41,7 @@ exports.WorkspaceError = WorkspaceError;
|
|
|
54
41
|
* Type guard to check if an error has an error code
|
|
55
42
|
*/
|
|
56
43
|
function isCodedError(error) {
|
|
57
|
-
return (error instanceof
|
|
58
|
-
error instanceof ValidationError ||
|
|
44
|
+
return (error instanceof ValidationError ||
|
|
59
45
|
error instanceof WorkspaceError);
|
|
60
46
|
}
|
|
61
47
|
/**
|
|
@@ -118,11 +104,4 @@ function formatMcpSuccess(text) {
|
|
|
118
104
|
]
|
|
119
105
|
};
|
|
120
106
|
}
|
|
121
|
-
/**
|
|
122
|
-
* Create a standardized error response with context
|
|
123
|
-
*/
|
|
124
|
-
function createErrorResponse(message, code = constants_1.ERROR_CODES.INTERNAL_ERROR, context = {}) {
|
|
125
|
-
const error = new MotionApiError(message, code, context);
|
|
126
|
-
return formatMcpError(error, context);
|
|
127
|
-
}
|
|
128
107
|
//# sourceMappingURL=errorHandling.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandling.js","sourceRoot":"","sources":["../../src/utils/errorHandling.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"errorHandling.js","sourceRoot":"","sources":["../../src/utils/errorHandling.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA4CH,oCAKC;AAKD,4CAoBC;AAKD,wCAsBC;AAKD,4CASC;AAjHD,2CAAyE;AAOzE;;GAEG;AACH,MAAa,eAAgB,SAAQ,KAAK;IAKxC,YAAY,OAAe,EAAE,YAA2B,IAAI,EAAE,UAAwB,EAAE;QACtF,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,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KAAsB,EAAE,oBAAkC,EAAE;IACzF,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC3D,MAAM,YAAY,GAAG,OAAO,IAAI,2BAA2B,CAAC;IAC5D,MAAM,YAAY,GAAiB,EAAE,GAAG,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAExE,2CAA2C;IAC3C,IAAI,KAAK,YAAY,eAAe,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACxD,YAAY,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAC3C,CAAC;IAED,sBAAsB;IACtB,MAAM,SAAS,GAAG,UAAU,IAAI,MAAM,YAAY,EAAE,CAAC;IAErD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,8BAAkB,CAAC,IAAI;gBAC7B,IAAI,EAAE,SAAS;aAChB;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,8BAAkB,CAAC,IAAI;gBAC7B,IAAI;aACL;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Utilities - Custom error classes, type guards, and MCP response formatters
|
|
3
|
+
*
|
|
4
|
+
* Consolidates the full error pipeline: error classes (ValidationError, WorkspaceError,
|
|
5
|
+
* UserFacingError), type guards, MCP response formatting, and user-facing error factories.
|
|
6
|
+
*/
|
|
7
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
8
|
+
import { ErrorCode, LogLevel } from './constants';
|
|
9
|
+
interface ErrorContext {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Error class for parameter validation failures
|
|
14
|
+
*/
|
|
15
|
+
export declare class ValidationError extends Error {
|
|
16
|
+
readonly code: ErrorCode;
|
|
17
|
+
readonly parameter: string | null;
|
|
18
|
+
readonly context: ErrorContext;
|
|
19
|
+
constructor(message: string, parameter?: string | null, context?: ErrorContext);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Error class for workspace-specific issues
|
|
23
|
+
*/
|
|
24
|
+
export declare class WorkspaceError extends Error {
|
|
25
|
+
readonly code: ErrorCode;
|
|
26
|
+
readonly context: ErrorContext;
|
|
27
|
+
constructor(message: string, code?: ErrorCode, context?: ErrorContext);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Error context for categorizing API errors
|
|
31
|
+
*/
|
|
32
|
+
interface ApiErrorContext {
|
|
33
|
+
action: string;
|
|
34
|
+
resourceType?: 'task' | 'project' | 'workspace' | 'user' | 'comment' | 'custom field' | 'recurring task' | 'schedule' | 'status';
|
|
35
|
+
resourceId?: string;
|
|
36
|
+
resourceName?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Error class that contains both user-friendly and technical messages
|
|
40
|
+
*/
|
|
41
|
+
export declare class UserFacingError extends Error {
|
|
42
|
+
readonly code: ErrorCode;
|
|
43
|
+
readonly userMessage: string;
|
|
44
|
+
readonly technicalMessage: string;
|
|
45
|
+
readonly originalError?: Error;
|
|
46
|
+
readonly statusCode?: number;
|
|
47
|
+
readonly context: Record<string, unknown>;
|
|
48
|
+
constructor(userMessage: string, technicalMessage: string, originalError?: Error, context?: Record<string, unknown>,
|
|
49
|
+
/**
|
|
50
|
+
* Optional HTTP status code. When provided, overrides any status code that
|
|
51
|
+
* would otherwise be extracted from originalError. Use only when the caller
|
|
52
|
+
* has already extracted and validated the status (e.g. createUserFacingError).
|
|
53
|
+
*/
|
|
54
|
+
statusCode?: number);
|
|
55
|
+
/**
|
|
56
|
+
* Log this error with full details
|
|
57
|
+
*/
|
|
58
|
+
log(level?: LogLevel): void;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Type guard to check if an error has an error code
|
|
62
|
+
*/
|
|
63
|
+
export declare function isCodedError(error: unknown): error is ValidationError | WorkspaceError | UserFacingError;
|
|
64
|
+
/**
|
|
65
|
+
* Extract error information from any error type
|
|
66
|
+
*/
|
|
67
|
+
export declare function extractErrorInfo(error: unknown): {
|
|
68
|
+
message: string;
|
|
69
|
+
code: ErrorCode;
|
|
70
|
+
context: ErrorContext;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Format an error for MCP protocol response
|
|
74
|
+
*/
|
|
75
|
+
export declare function formatMcpError(error: Error | unknown): CallToolResult;
|
|
76
|
+
/**
|
|
77
|
+
* Format a success response for MCP protocol
|
|
78
|
+
*/
|
|
79
|
+
export declare function formatMcpSuccess(text: string): CallToolResult;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a user-facing error with both user-friendly and technical messages
|
|
82
|
+
*/
|
|
83
|
+
export declare function createUserFacingError(error: unknown, context: ApiErrorContext): UserFacingError;
|
|
84
|
+
/**
|
|
85
|
+
* Helper to create error context
|
|
86
|
+
*/
|
|
87
|
+
export declare function createErrorContext(action: string, resourceType?: ApiErrorContext['resourceType'], resourceId?: string, resourceName?: string): ApiErrorContext;
|
|
88
|
+
export {};
|
|
89
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAmC,SAAS,EAAc,QAAQ,EAAE,MAAM,aAAa,CAAC;AAO/F,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAID;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,SAAgB,IAAI,EAAE,SAAS,CAAC;IAChC,SAAgB,SAAS,EAAE,MAAM,G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AC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,GAAG,cAAc,GAAG,eAAe,CAMxG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAoB5G;AAID;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,cAAc,CAerE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAS7D;AAgFD;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,eAAe,GACvB,eAAe,CAkCjB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,eAAe,CAAC,cAAc,CAAC,EAC9C,UAAU,CAAC,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,GACpB,eAAe,CAOjB"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Error Utilities - Custom error classes, type guards, and MCP response formatters
|
|
4
|
+
*
|
|
5
|
+
* Consolidates the full error pipeline: error classes (ValidationError, WorkspaceError,
|
|
6
|
+
* UserFacingError), type guards, MCP response formatting, and user-facing error factories.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.UserFacingError = exports.WorkspaceError = exports.ValidationError = void 0;
|
|
10
|
+
exports.isCodedError = isCodedError;
|
|
11
|
+
exports.extractErrorInfo = extractErrorInfo;
|
|
12
|
+
exports.formatMcpError = formatMcpError;
|
|
13
|
+
exports.formatMcpSuccess = formatMcpSuccess;
|
|
14
|
+
exports.createUserFacingError = createUserFacingError;
|
|
15
|
+
exports.createErrorContext = createErrorContext;
|
|
16
|
+
const axios_1 = require("axios");
|
|
17
|
+
const constants_1 = require("./constants");
|
|
18
|
+
const logger_1 = require("./logger");
|
|
19
|
+
// ─── Error Classes ──────────────────────────────────────────────────────────
|
|
20
|
+
/**
|
|
21
|
+
* Error class for parameter validation failures
|
|
22
|
+
*/
|
|
23
|
+
class ValidationError extends Error {
|
|
24
|
+
constructor(message, parameter = null, context = {}) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.name = 'ValidationError';
|
|
27
|
+
this.code = constants_1.ERROR_CODES.INVALID_PARAMETERS;
|
|
28
|
+
this.parameter = parameter;
|
|
29
|
+
this.context = context;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.ValidationError = ValidationError;
|
|
33
|
+
/**
|
|
34
|
+
* Error class for workspace-specific issues
|
|
35
|
+
*/
|
|
36
|
+
class WorkspaceError extends Error {
|
|
37
|
+
constructor(message, code = constants_1.ERROR_CODES.WORKSPACE_NOT_FOUND, context = {}) {
|
|
38
|
+
super(message);
|
|
39
|
+
this.name = 'WorkspaceError';
|
|
40
|
+
this.code = code;
|
|
41
|
+
this.context = context;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.WorkspaceError = WorkspaceError;
|
|
45
|
+
/**
|
|
46
|
+
* Maps HTTP status codes to ErrorCode values
|
|
47
|
+
*/
|
|
48
|
+
function httpStatusToErrorCode(statusCode) {
|
|
49
|
+
if (!statusCode)
|
|
50
|
+
return constants_1.ERROR_CODES.INTERNAL_ERROR;
|
|
51
|
+
if (statusCode === 401)
|
|
52
|
+
return constants_1.ERROR_CODES.AUTH_FAILED;
|
|
53
|
+
if (statusCode === 403)
|
|
54
|
+
return constants_1.ERROR_CODES.ACCESS_DENIED;
|
|
55
|
+
if (statusCode === 404)
|
|
56
|
+
return constants_1.ERROR_CODES.RESOURCE_NOT_FOUND;
|
|
57
|
+
if (statusCode === 400 || statusCode === 422)
|
|
58
|
+
return constants_1.ERROR_CODES.INVALID_PARAMETERS;
|
|
59
|
+
if (statusCode === 429)
|
|
60
|
+
return constants_1.ERROR_CODES.RATE_LIMIT_EXCEEDED;
|
|
61
|
+
if (statusCode >= 500)
|
|
62
|
+
return constants_1.ERROR_CODES.MOTION_API_ERROR;
|
|
63
|
+
return constants_1.ERROR_CODES.INTERNAL_ERROR;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Error class that contains both user-friendly and technical messages
|
|
67
|
+
*/
|
|
68
|
+
class UserFacingError extends Error {
|
|
69
|
+
constructor(userMessage, technicalMessage, originalError, context,
|
|
70
|
+
/**
|
|
71
|
+
* Optional HTTP status code. When provided, overrides any status code that
|
|
72
|
+
* would otherwise be extracted from originalError. Use only when the caller
|
|
73
|
+
* has already extracted and validated the status (e.g. createUserFacingError).
|
|
74
|
+
*/
|
|
75
|
+
statusCode) {
|
|
76
|
+
super(userMessage);
|
|
77
|
+
this.name = 'UserFacingError';
|
|
78
|
+
this.userMessage = userMessage;
|
|
79
|
+
this.technicalMessage = technicalMessage;
|
|
80
|
+
this.originalError = originalError;
|
|
81
|
+
this.context = context ?? {};
|
|
82
|
+
// Use explicit statusCode if provided, otherwise extract from axios errors
|
|
83
|
+
if (statusCode !== undefined) {
|
|
84
|
+
this.statusCode = statusCode;
|
|
85
|
+
}
|
|
86
|
+
else if (originalError && (0, axios_1.isAxiosError)(originalError)) {
|
|
87
|
+
this.statusCode = originalError.response?.status;
|
|
88
|
+
}
|
|
89
|
+
this.code = httpStatusToErrorCode(this.statusCode);
|
|
90
|
+
// Maintain proper stack trace
|
|
91
|
+
if (Error.captureStackTrace) {
|
|
92
|
+
Error.captureStackTrace(this, UserFacingError);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Log this error with full details
|
|
97
|
+
*/
|
|
98
|
+
log(level = constants_1.LOG_LEVELS.ERROR) {
|
|
99
|
+
(0, logger_1.mcpLog)(level, this.userMessage, {
|
|
100
|
+
technicalMessage: this.technicalMessage,
|
|
101
|
+
statusCode: this.statusCode,
|
|
102
|
+
originalError: this.originalError?.message,
|
|
103
|
+
context: this.context
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.UserFacingError = UserFacingError;
|
|
108
|
+
// ─── Type Guards and Extractors ─────────────────────────────────────────────
|
|
109
|
+
/**
|
|
110
|
+
* Type guard to check if an error has an error code
|
|
111
|
+
*/
|
|
112
|
+
function isCodedError(error) {
|
|
113
|
+
return (error instanceof ValidationError ||
|
|
114
|
+
error instanceof WorkspaceError ||
|
|
115
|
+
error instanceof UserFacingError);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Extract error information from any error type
|
|
119
|
+
*/
|
|
120
|
+
function extractErrorInfo(error) {
|
|
121
|
+
if (error instanceof Error) {
|
|
122
|
+
if (isCodedError(error)) {
|
|
123
|
+
return {
|
|
124
|
+
message: error.message,
|
|
125
|
+
code: error.code,
|
|
126
|
+
context: error.context
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
message: error.message,
|
|
131
|
+
code: constants_1.ERROR_CODES.INTERNAL_ERROR,
|
|
132
|
+
context: {}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
message: String(error),
|
|
137
|
+
code: constants_1.ERROR_CODES.INTERNAL_ERROR,
|
|
138
|
+
context: {}
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
// ─── MCP Response Formatters ────────────────────────────────────────────────
|
|
142
|
+
/**
|
|
143
|
+
* Format an error for MCP protocol response
|
|
144
|
+
*/
|
|
145
|
+
function formatMcpError(error) {
|
|
146
|
+
// For UserFacingError, message is the user-friendly text (not technicalMessage)
|
|
147
|
+
const { message, code } = extractErrorInfo(error);
|
|
148
|
+
const errorMessage = message || 'An unknown error occurred';
|
|
149
|
+
const errorText = `Error [${code}]: ${errorMessage}`;
|
|
150
|
+
return {
|
|
151
|
+
content: [
|
|
152
|
+
{
|
|
153
|
+
type: constants_1.MCP_RESPONSE_TYPES.TEXT,
|
|
154
|
+
text: errorText
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
isError: true
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Format a success response for MCP protocol
|
|
162
|
+
*/
|
|
163
|
+
function formatMcpSuccess(text) {
|
|
164
|
+
return {
|
|
165
|
+
content: [
|
|
166
|
+
{
|
|
167
|
+
type: constants_1.MCP_RESPONSE_TYPES.TEXT,
|
|
168
|
+
text
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
// ─── User-Facing Error Factories ────────────────────────────────────────────
|
|
174
|
+
/**
|
|
175
|
+
* Maps HTTP status codes to user-friendly messages
|
|
176
|
+
*/
|
|
177
|
+
const STATUS_CODE_MESSAGES = {
|
|
178
|
+
400: 'The request was invalid. Please check your input and try again.',
|
|
179
|
+
401: 'Authentication failed. Please check your API key configuration.',
|
|
180
|
+
403: 'You don\'t have permission to perform this action.',
|
|
181
|
+
404: 'The requested resource was not found.',
|
|
182
|
+
409: 'This action conflicts with the current state. The resource may have been modified.',
|
|
183
|
+
422: 'The data provided cannot be processed. Please check the format and try again.',
|
|
184
|
+
429: 'Too many requests. Please wait a moment and try again.',
|
|
185
|
+
500: 'Motion server encountered an error. Please try again later.',
|
|
186
|
+
502: 'Unable to connect to Motion servers. Please check your internet connection.',
|
|
187
|
+
503: 'Motion service is temporarily unavailable. Please try again in a few moments.',
|
|
188
|
+
504: 'Request timed out. Please try again.'
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Maps action types to user-friendly action descriptions
|
|
192
|
+
*/
|
|
193
|
+
const ACTION_DESCRIPTIONS = {
|
|
194
|
+
'fetch': 'load',
|
|
195
|
+
'create': 'create',
|
|
196
|
+
'update': 'update',
|
|
197
|
+
'delete': 'delete',
|
|
198
|
+
'move': 'move',
|
|
199
|
+
'unassign': 'unassign',
|
|
200
|
+
'search': 'search for',
|
|
201
|
+
'resolve': 'find',
|
|
202
|
+
'list': 'retrieve'
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Builds a user-friendly message based on context and status
|
|
206
|
+
*/
|
|
207
|
+
function buildUserMessage(context, statusCode, apiMessage) {
|
|
208
|
+
const action = ACTION_DESCRIPTIONS[context.action] || context.action;
|
|
209
|
+
const resource = context.resourceType || 'resource';
|
|
210
|
+
const resourceInfo = context.resourceName
|
|
211
|
+
? ` "${context.resourceName}"`
|
|
212
|
+
: context.resourceId
|
|
213
|
+
? ` (ID: ${context.resourceId})`
|
|
214
|
+
: '';
|
|
215
|
+
// Check for specific status code messages
|
|
216
|
+
if (statusCode && STATUS_CODE_MESSAGES[statusCode]) {
|
|
217
|
+
// For auth errors, lead with permission context
|
|
218
|
+
if (statusCode === 401 || statusCode === 403) {
|
|
219
|
+
return `${STATUS_CODE_MESSAGES[statusCode]} Unable to ${action} ${resource}${resourceInfo}.`;
|
|
220
|
+
}
|
|
221
|
+
return `Unable to ${action} ${resource}${resourceInfo}. ${STATUS_CODE_MESSAGES[statusCode]}`;
|
|
222
|
+
}
|
|
223
|
+
// Check for common error patterns in API messages
|
|
224
|
+
if (apiMessage) {
|
|
225
|
+
// Network/connection errors
|
|
226
|
+
if (apiMessage.toLowerCase().includes('network') ||
|
|
227
|
+
apiMessage.toLowerCase().includes('connection')) {
|
|
228
|
+
return `Unable to ${action} ${resource}${resourceInfo}. Please check your internet connection and try again.`;
|
|
229
|
+
}
|
|
230
|
+
// Validation errors
|
|
231
|
+
if (apiMessage.toLowerCase().includes('validation') ||
|
|
232
|
+
apiMessage.toLowerCase().includes('invalid')) {
|
|
233
|
+
return `Unable to ${action} ${resource}${resourceInfo}. ${apiMessage}`;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
// Generic message
|
|
237
|
+
return `Unable to ${action} ${resource}${resourceInfo}. Please try again or contact support if the problem persists.`;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Creates a user-facing error with both user-friendly and technical messages
|
|
241
|
+
*/
|
|
242
|
+
function createUserFacingError(error, context) {
|
|
243
|
+
// Get technical message
|
|
244
|
+
const technicalMessage = error instanceof Error ? error.message : String(error);
|
|
245
|
+
// Extract status code
|
|
246
|
+
let statusCode;
|
|
247
|
+
let apiMessage;
|
|
248
|
+
if ((0, axios_1.isAxiosError)(error)) {
|
|
249
|
+
statusCode = error.response?.status;
|
|
250
|
+
apiMessage = error.response?.data?.message;
|
|
251
|
+
}
|
|
252
|
+
// Build user-friendly message
|
|
253
|
+
const userMessage = buildUserMessage(context, statusCode, apiMessage);
|
|
254
|
+
// Create the error
|
|
255
|
+
const userError = new UserFacingError(userMessage, technicalMessage, error instanceof Error ? error : undefined, {
|
|
256
|
+
action: context.action,
|
|
257
|
+
resourceType: context.resourceType,
|
|
258
|
+
resourceId: context.resourceId,
|
|
259
|
+
resourceName: context.resourceName
|
|
260
|
+
}, statusCode);
|
|
261
|
+
// Log the error
|
|
262
|
+
userError.log();
|
|
263
|
+
return userError;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Helper to create error context
|
|
267
|
+
*/
|
|
268
|
+
function createErrorContext(action, resourceType, resourceId, resourceName) {
|
|
269
|
+
return {
|
|
270
|
+
action,
|
|
271
|
+
resourceType,
|
|
272
|
+
resourceId,
|
|
273
|
+
resourceName
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAuIH,oCAMC;AAKD,4CAoBC;AAOD,wCAeC;AAKD,4CASC;AAmFD,sDAqCC;AAKD,gDAYC;AAjVD,iCAAqC;AAErC,2CAA+F;AAC/F,qCAAkC;AAUlC,+EAA+E;AAE/E;;GAEG;AACH,MAAa,eAAgB,S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AAQ,EAAE,MAAM,CAAC;QACpC,UAAU,GAAG,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC;IAC7C,CAAC;IAED,8BAA8B;IAC9B,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEtE,mBAAmB;IACnB,MAAM,SAAS,GAAG,IAAI,eAAe,CACnC,WAAW,EACX,gBAAgB,EAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAC1C;QACE,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,YAAY,EAAE,OAAO,CAAC,YAAY;KACnC,EACD,UAAU,CACX,CAAC;IAEF,gBAAgB;IAChB,SAAS,CAAC,GAAG,EAAE,CAAC;IAEhB,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAChC,MAAc,EACd,YAA8C,EAC9C,UAAmB,EACnB,YAAqB;IAErB,OAAO;QACL,MAAM;QACN,YAAY;QACZ,UAAU;QACV,YAAY;KACb,CAAC;AACJ,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* classes, and constants used throughout the Motion MCP Server.
|
|
6
6
|
*/
|
|
7
7
|
export * from './constants';
|
|
8
|
-
export
|
|
9
|
-
export * from './
|
|
8
|
+
export { SERVER_INSTRUCTIONS } from './serverInstructions';
|
|
9
|
+
export * from './errors';
|
|
10
10
|
export * from './responseFormatters';
|
|
11
11
|
export * from './parameterUtils';
|
|
12
12
|
export { WorkspaceResolver } from './workspaceResolver';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,aAAa,CAAC;AAG5B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,cAAc,UAAU,CAAC;AAGzB,cAAc,sBAAsB,CAAC;AAGrC,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -20,13 +20,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.mcpLog = exports.WorkspaceResolver = void 0;
|
|
23
|
+
exports.mcpLog = exports.WorkspaceResolver = exports.SERVER_INSTRUCTIONS = void 0;
|
|
24
24
|
// Export all constants
|
|
25
25
|
__exportStar(require("./constants"), exports);
|
|
26
|
-
// Export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
// Export server instructions (kept separate to avoid loading in utility-only code paths)
|
|
27
|
+
var serverInstructions_1 = require("./serverInstructions");
|
|
28
|
+
Object.defineProperty(exports, "SERVER_INSTRUCTIONS", { enumerable: true, get: function () { return serverInstructions_1.SERVER_INSTRUCTIONS; } });
|
|
29
|
+
// Export error utilities
|
|
30
|
+
__exportStar(require("./errors"), exports);
|
|
30
31
|
// Export response formatters
|
|
31
32
|
__exportStar(require("./responseFormatters"), exports);
|
|
32
33
|
// Export parameter utilities
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;AAEH,uBAAuB;AACvB,8CAA4B;AAE5B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;AAEH,uBAAuB;AACvB,8CAA4B;AAE5B,yFAAyF;AACzF,2DAA2D;AAAlD,yHAAA,mBAAmB,OAAA;AAE5B,yBAAyB;AACzB,2CAAyB;AAEzB,6BAA6B;AAC7B,uDAAqC;AAErC,6BAA6B;AAC7B,mDAAiC;AAEjC,2BAA2B;AAC3B,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAE1B,gBAAgB;AAChB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
|
|
@@ -79,6 +79,16 @@ export declare function validateParameterTypes(args?: Record<string, unknown>, t
|
|
|
79
79
|
* Empty strings become undefined (deleted)
|
|
80
80
|
*/
|
|
81
81
|
export declare function sanitizeStringParams<T extends Record<string, any>>(args?: T, stringParams?: (keyof T)[]): T;
|
|
82
|
+
/**
|
|
83
|
+
* Defensively parse a value that should be an object but may have been
|
|
84
|
+
* JSON-stringified by an LLM transport layer.
|
|
85
|
+
*/
|
|
86
|
+
export declare function parseObjectParam(value: unknown): Record<string, unknown> | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Defensively parse a value that should be an array but may have been
|
|
89
|
+
* JSON-stringified by an LLM transport layer.
|
|
90
|
+
*/
|
|
91
|
+
export declare function parseArrayParam(value: unknown): unknown[] | undefined;
|
|
82
92
|
interface ValidationOptions {
|
|
83
93
|
requireWorkspace?: boolean;
|
|
84
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameterUtils.d.ts","sourceRoot":"","sources":["../../src/utils/parameterUtils.ts"],"names":[],"mappings":"AAAA;;;;;;GAM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