workday-studio-mcp-server 2.0.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.
Files changed (80) hide show
  1. package/.env.example +40 -0
  2. package/LICENSE +21 -0
  3. package/README.md +258 -0
  4. package/dist/config.d.ts +22 -0
  5. package/dist/config.d.ts.map +1 -0
  6. package/dist/config.js +67 -0
  7. package/dist/config.js.map +1 -0
  8. package/dist/index.d.ts +8 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +84 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/schemas/index.d.ts +473 -0
  13. package/dist/schemas/index.d.ts.map +1 -0
  14. package/dist/schemas/index.js +172 -0
  15. package/dist/schemas/index.js.map +1 -0
  16. package/dist/tools/copy-file.d.ts +7 -0
  17. package/dist/tools/copy-file.d.ts.map +1 -0
  18. package/dist/tools/copy-file.js +82 -0
  19. package/dist/tools/copy-file.js.map +1 -0
  20. package/dist/tools/delete-file.d.ts +7 -0
  21. package/dist/tools/delete-file.d.ts.map +1 -0
  22. package/dist/tools/delete-file.js +85 -0
  23. package/dist/tools/delete-file.js.map +1 -0
  24. package/dist/tools/list-assembly-steps.d.ts +7 -0
  25. package/dist/tools/list-assembly-steps.d.ts.map +1 -0
  26. package/dist/tools/list-assembly-steps.js +107 -0
  27. package/dist/tools/list-assembly-steps.js.map +1 -0
  28. package/dist/tools/list-files.d.ts +7 -0
  29. package/dist/tools/list-files.d.ts.map +1 -0
  30. package/dist/tools/list-files.js +66 -0
  31. package/dist/tools/list-files.js.map +1 -0
  32. package/dist/tools/list-integration-params.d.ts +7 -0
  33. package/dist/tools/list-integration-params.d.ts.map +1 -0
  34. package/dist/tools/list-integration-params.js +95 -0
  35. package/dist/tools/list-integration-params.js.map +1 -0
  36. package/dist/tools/list-projects.d.ts +7 -0
  37. package/dist/tools/list-projects.d.ts.map +1 -0
  38. package/dist/tools/list-projects.js +68 -0
  39. package/dist/tools/list-projects.js.map +1 -0
  40. package/dist/tools/read-file.d.ts +7 -0
  41. package/dist/tools/read-file.d.ts.map +1 -0
  42. package/dist/tools/read-file.js +63 -0
  43. package/dist/tools/read-file.js.map +1 -0
  44. package/dist/tools/rename-file.d.ts +7 -0
  45. package/dist/tools/rename-file.d.ts.map +1 -0
  46. package/dist/tools/rename-file.js +86 -0
  47. package/dist/tools/rename-file.js.map +1 -0
  48. package/dist/tools/search-files.d.ts +7 -0
  49. package/dist/tools/search-files.d.ts.map +1 -0
  50. package/dist/tools/search-files.js +110 -0
  51. package/dist/tools/search-files.js.map +1 -0
  52. package/dist/tools/validate-xml.d.ts +7 -0
  53. package/dist/tools/validate-xml.d.ts.map +1 -0
  54. package/dist/tools/validate-xml.js +69 -0
  55. package/dist/tools/validate-xml.js.map +1 -0
  56. package/dist/tools/workspace-tree.d.ts +7 -0
  57. package/dist/tools/workspace-tree.d.ts.map +1 -0
  58. package/dist/tools/workspace-tree.js +93 -0
  59. package/dist/tools/workspace-tree.js.map +1 -0
  60. package/dist/tools/write-file.d.ts +7 -0
  61. package/dist/tools/write-file.d.ts.map +1 -0
  62. package/dist/tools/write-file.js +87 -0
  63. package/dist/tools/write-file.js.map +1 -0
  64. package/dist/utils/errors.d.ts +42 -0
  65. package/dist/utils/errors.d.ts.map +1 -0
  66. package/dist/utils/errors.js +50 -0
  67. package/dist/utils/errors.js.map +1 -0
  68. package/dist/utils/fs.d.ts +17 -0
  69. package/dist/utils/fs.d.ts.map +1 -0
  70. package/dist/utils/fs.js +35 -0
  71. package/dist/utils/fs.js.map +1 -0
  72. package/dist/utils/logger.d.ts +24 -0
  73. package/dist/utils/logger.d.ts.map +1 -0
  74. package/dist/utils/logger.js +56 -0
  75. package/dist/utils/logger.js.map +1 -0
  76. package/dist/utils/xml.d.ts +14 -0
  77. package/dist/utils/xml.d.ts.map +1 -0
  78. package/dist/utils/xml.js +31 -0
  79. package/dist/utils/xml.js.map +1 -0
  80. package/package.json +66 -0
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Standardised MCP tool response helpers.
3
+ * All tool handlers return { content: [{ type: 'text', text: string }] }.
4
+ */
5
+ import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
6
+ export declare const ErrorCode: {
7
+ readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
8
+ readonly PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND";
9
+ readonly ASSEMBLY_NOT_FOUND: "ASSEMBLY_NOT_FOUND";
10
+ readonly READ_ERROR: "READ_ERROR";
11
+ readonly WRITE_FAILED: "WRITE_FAILED";
12
+ readonly RESOLVE_ERROR: "RESOLVE_ERROR";
13
+ readonly PATH_TRAVERSAL_DETECTED: "PATH_TRAVERSAL_DETECTED";
14
+ readonly INVALID_XML: "INVALID_XML";
15
+ readonly INVALID_FILE_NAME: "INVALID_FILE_NAME";
16
+ readonly DUPLICATE_ID: "DUPLICATE_ID";
17
+ readonly STEP_NOT_FOUND: "STEP_NOT_FOUND";
18
+ readonly PROJECT_EXISTS: "PROJECT_EXISTS";
19
+ readonly FILE_EXISTS: "FILE_EXISTS";
20
+ readonly PROTECTED_FILE: "PROTECTED_FILE";
21
+ readonly CREATE_FAILED: "CREATE_FAILED";
22
+ readonly SERVICE_NOT_FOUND: "SERVICE_NOT_FOUND";
23
+ };
24
+ export type ErrorCodeType = (typeof ErrorCode)[keyof typeof ErrorCode];
25
+ export interface ToolError {
26
+ error: true;
27
+ code: string;
28
+ message: string;
29
+ suggestion?: string | null;
30
+ [key: string]: unknown;
31
+ }
32
+ export interface ToolSuccess<T = unknown> {
33
+ error: false;
34
+ data: T;
35
+ }
36
+ /** Build an error tool response. */
37
+ export declare function errorResponse(code: string, message: string, suggestion?: string | null, extra?: Record<string, unknown>): CallToolResult;
38
+ /** Build a success tool response. */
39
+ export declare function successResponse<T>(data: T): CallToolResult;
40
+ /** Build a raw text tool response (for plain-text output like SOAP reference). */
41
+ export declare function textResponse(text: string): CallToolResult;
42
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAIzE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAsBZ,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAIvE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,IAAI,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;CACT;AAED,oCAAoC;AACpC,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,EAC1B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,cAAc,CAShB;AAED,qCAAqC;AACrC,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,cAAc,CAI1D;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAEzD"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Standardised MCP tool response helpers.
3
+ * All tool handlers return { content: [{ type: 'text', text: string }] }.
4
+ */
5
+ // ── Error code enum ───────────────────────────────────────────────────────────
6
+ export const ErrorCode = {
7
+ // File-system
8
+ FILE_NOT_FOUND: 'FILE_NOT_FOUND',
9
+ PROJECT_NOT_FOUND: 'PROJECT_NOT_FOUND',
10
+ ASSEMBLY_NOT_FOUND: 'ASSEMBLY_NOT_FOUND',
11
+ READ_ERROR: 'READ_ERROR',
12
+ WRITE_FAILED: 'WRITE_FAILED',
13
+ RESOLVE_ERROR: 'RESOLVE_ERROR',
14
+ PATH_TRAVERSAL_DETECTED: 'PATH_TRAVERSAL_DETECTED',
15
+ // Validation
16
+ INVALID_XML: 'INVALID_XML',
17
+ INVALID_FILE_NAME: 'INVALID_FILE_NAME',
18
+ DUPLICATE_ID: 'DUPLICATE_ID',
19
+ // Assembly
20
+ STEP_NOT_FOUND: 'STEP_NOT_FOUND',
21
+ // Project
22
+ PROJECT_EXISTS: 'PROJECT_EXISTS',
23
+ FILE_EXISTS: 'FILE_EXISTS',
24
+ PROTECTED_FILE: 'PROTECTED_FILE',
25
+ // Generic
26
+ CREATE_FAILED: 'CREATE_FAILED',
27
+ SERVICE_NOT_FOUND: 'SERVICE_NOT_FOUND',
28
+ };
29
+ /** Build an error tool response. */
30
+ export function errorResponse(code, message, suggestion, extra) {
31
+ const payload = {
32
+ error: true,
33
+ code,
34
+ message,
35
+ ...(suggestion != null ? { suggestion } : {}),
36
+ ...extra,
37
+ };
38
+ return { content: [{ type: 'text', text: JSON.stringify(payload, null, 2) }] };
39
+ }
40
+ /** Build a success tool response. */
41
+ export function successResponse(data) {
42
+ return {
43
+ content: [{ type: 'text', text: JSON.stringify({ error: false, data }, null, 2) }],
44
+ };
45
+ }
46
+ /** Build a raw text tool response (for plain-text output like SOAP reference). */
47
+ export function textResponse(text) {
48
+ return { content: [{ type: 'text', text }] };
49
+ }
50
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,iFAAiF;AAEjF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,cAAc;IACd,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAm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AE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Safe filesystem helpers — path traversal protection.
3
+ */
4
+ export interface ResolvedPath {
5
+ absolute: string;
6
+ relative: string;
7
+ }
8
+ /**
9
+ * Resolve a project-relative file path, rejecting any traversal outside the workspace.
10
+ * Throws with code PATH_TRAVERSAL_DETECTED when the resolved path escapes the workspace.
11
+ */
12
+ export declare function resolveSafe(projectName: string, filePath: string): ResolvedPath;
13
+ /**
14
+ * Resolve a path directly under the workspace root, rejecting traversal.
15
+ */
16
+ export declare function resolveWorkspacePath(...parts: string[]): string;
17
+ //# sourceMappingURL=fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,YAAY,CAe/E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAc/D"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Safe filesystem helpers — path traversal protection.
3
+ */
4
+ import { resolve, join } from 'path';
5
+ import { getConfig } from '../config.js';
6
+ /**
7
+ * Resolve a project-relative file path, rejecting any traversal outside the workspace.
8
+ * Throws with code PATH_TRAVERSAL_DETECTED when the resolved path escapes the workspace.
9
+ */
10
+ export function resolveSafe(projectName, filePath) {
11
+ const cfg = getConfig();
12
+ const workspacePath = cfg.workspacePath;
13
+ const absolute = resolve(join(workspacePath, projectName), filePath);
14
+ if (!absolute.startsWith(workspacePath)) {
15
+ const err = new Error(`Path traversal detected: '${filePath}' resolves outside the workspace.`);
16
+ err.code = 'PATH_TRAVERSAL_DETECTED';
17
+ throw err;
18
+ }
19
+ return { absolute, relative: filePath };
20
+ }
21
+ /**
22
+ * Resolve a path directly under the workspace root, rejecting traversal.
23
+ */
24
+ export function resolveWorkspacePath(...parts) {
25
+ const cfg = getConfig();
26
+ const workspacePath = cfg.workspacePath;
27
+ const absolute = resolve(workspacePath, ...parts);
28
+ if (!absolute.startsWith(workspacePath)) {
29
+ const err = new Error(`Path traversal detected: path resolves outside the workspace.`);
30
+ err.code = 'PATH_TRAVERSAL_DETECTED';
31
+ throw err;
32
+ }
33
+ return absolute;
34
+ }
35
+ //# sourceMappingURL=fs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzC;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB,EAAE,QAAgB;IAC/D,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,MAAM,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;IAExC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;IAErE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QACxC,MAAM,GAAG,GAAG,IAAI,KAAK,CACnB,6BAA6B,QAAQ,mCAAmC,CAChD,CAAC;QAC3B,GAAG,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACrC,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAG,KAAe;IACrD,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,MAAM,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;IACxC,MAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,EAAE,GAAG,KAAK,CAAC,CAAC;IAElD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QACxC,MAAM,GAAG,GAAG,IAAI,KAAK,CACnB,+DAA+D,CACvC,CAAC;QAC3B,GAAG,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACrC,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Enterprise structured logger using Winston.
3
+ *
4
+ * IMPORTANT: All log output goes to stderr or a file — NEVER to stdout.
5
+ * stdout is reserved exclusively for MCP JSON-RPC protocol messages.
6
+ */
7
+ export type LogLevel = 'error' | 'warn' | 'info' | 'debug';
8
+ export type LogContext = 'Server' | 'Config' | 'ToolExecution' | 'FileSystem' | 'XmlValidator' | 'AssemblyParser' | 'ErrorHandler';
9
+ /** Structured log entry shape written to stderr/file. */
10
+ interface LogMeta {
11
+ context?: LogContext;
12
+ tool?: string;
13
+ project?: string;
14
+ file?: string;
15
+ [key: string]: unknown;
16
+ }
17
+ export declare const logger: {
18
+ error(message: string, meta?: LogMeta): void;
19
+ warn(message: string, meta?: LogMeta): void;
20
+ info(message: string, meta?: LogMeta): void;
21
+ debug(message: string, meta?: LogMeta): void;
22
+ };
23
+ export default logger;
24
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAC3D,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,YAAY,GACZ,cAAc,GACd,gBAAgB,GAChB,cAAc,CAAC;AAEnB,yDAAyD;AACzD,UAAU,OAAO;IACf,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AA6DD,eAAO,MAAM,MAAM;mBACF,MAAM,SAAS,OAAO,GAAG,IAAI;kBAG9B,MAAM,SAAS,OAAO,GAAG,IAAI;kBAG7B,MAAM,SAAS,OAAO,GAAG,IAAI;mBAG5B,MAAM,SAAS,OAAO,GAAG,IAAI;CAG7C,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Enterprise structured logger using Winston.
3
+ *
4
+ * IMPORTANT: All log output goes to stderr or a file — NEVER to stdout.
5
+ * stdout is reserved exclusively for MCP JSON-RPC protocol messages.
6
+ */
7
+ import { createLogger, format, transports } from 'winston';
8
+ const { combine, timestamp, json, errors } = format;
9
+ // ── Determine transports from env ────────────────────────────────────────────
10
+ const logLevel = process.env['LOG_LEVEL'] ?? 'info';
11
+ const logOutput = process.env['LOG_OUTPUT'] ?? 'stderr';
12
+ const logFilePath = process.env['LOG_FILE_PATH'] ?? 'workday-studio-mcp.log';
13
+ const activeTransports = [];
14
+ if (logOutput === 'stderr' || logOutput === 'both') {
15
+ activeTransports.push(new transports.Stream({
16
+ stream: process.stderr,
17
+ format: combine(errors({ stack: true }), timestamp({ format: 'ISO' }), json()),
18
+ }));
19
+ }
20
+ if (logOutput === 'file' || logOutput === 'both') {
21
+ activeTransports.push(new transports.File({
22
+ filename: logFilePath,
23
+ format: combine(errors({ stack: true }), timestamp({ format: 'ISO' }), json()),
24
+ }));
25
+ }
26
+ // Fall back to stderr if nothing was configured
27
+ if (activeTransports.length === 0) {
28
+ activeTransports.push(new transports.Stream({
29
+ stream: process.stderr,
30
+ format: combine(errors({ stack: true }), timestamp({ format: 'ISO' }), json()),
31
+ }));
32
+ }
33
+ // ── Winston logger instance ───────────────────────────────────────────────────
34
+ const winstonLogger = createLogger({
35
+ level: logLevel,
36
+ defaultMeta: { service: 'workday-studio-mcp-server' },
37
+ transports: activeTransports,
38
+ exitOnError: false,
39
+ });
40
+ // ── Typed wrapper ─────────────────────────────────────────────────────────────
41
+ export const logger = {
42
+ error(message, meta) {
43
+ winstonLogger.error(message, { log_level: 'ERROR', ...meta });
44
+ },
45
+ warn(message, meta) {
46
+ winstonLogger.warn(message, { log_level: 'WARN', ...meta });
47
+ },
48
+ info(message, meta) {
49
+ winstonLogger.info(message, { log_level: 'INFO', ...meta });
50
+ },
51
+ debug(message, meta) {
52
+ winstonLogger.debug(message, { log_level: 'DEBUG', ...meta });
53
+ },
54
+ };
55
+ export default logger;
56
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAU,MAAM,SAAS,CAAC;AAEnE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;AAqBpD,gFAAgF;AAEhF,MAAM,QAAQ,GAAc,OAAO,CAAC,GAAG,CAAC,WAAW,CAAc,IAAI,MAAM,CAAC;AAC5E,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC;AACxD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,wBAAwB,CAAC;AAE7E,MAAM,gBAAgB,GAAyC,EAAE,CAAC;AAElE,IAAI,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,MAAM,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,MAAM,GAAG;IACpB,KAAK,CAAC,OAAe,EAAE,IAAc;QACnC,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,CAAC,OAAe,EAAE,IAAc;QAClC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,CAAC,OAAe,EAAE,IAAc;QAClC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,KAAK,CAAC,OAAe,EAAE,IAAc;QACnC,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * XML validation utilities using fast-xml-parser.
3
+ */
4
+ export interface XmlError {
5
+ line: number | null;
6
+ column: number | null;
7
+ message: string;
8
+ }
9
+ export interface XmlValidationResult {
10
+ valid: boolean;
11
+ errors: XmlError[];
12
+ }
13
+ export declare function validateXml(content: string): XmlValidationResult;
14
+ //# sourceMappingURL=xml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../src/utils/xml.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,QAAQ,EAAE,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAmBhE"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * XML validation utilities using fast-xml-parser.
3
+ */
4
+ import { XMLParser } from 'fast-xml-parser';
5
+ const parser = new XMLParser({
6
+ allowBooleanAttributes: true,
7
+ parseAttributeValue: false,
8
+ ignoreAttributes: false,
9
+ });
10
+ export function validateXml(content) {
11
+ try {
12
+ parser.parse(content, true);
13
+ return { valid: true, errors: [] };
14
+ }
15
+ catch (e) {
16
+ const message = e instanceof Error ? e.message : String(e);
17
+ const lineMatch = message.match(/Line (\d+)/i);
18
+ const colMatch = message.match(/Col (\d+)/i);
19
+ return {
20
+ valid: false,
21
+ errors: [
22
+ {
23
+ line: lineMatch ? parseInt(lineMatch[1], 10) : null,
24
+ column: colMatch ? parseInt(colMatch[1], 10) : null,
25
+ message,
26
+ },
27
+ ],
28
+ };
29
+ }
30
+ }
31
+ //# sourceMappingURL=xml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xml.js","sourceRoot":"","sources":["../../src/utils/xml.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,sBAAsB,EAAE,IAAI;IAC5B,mBAAmB,EAAE,KAAK;IAC1B,gBAAgB,EAAE,KAAK;CACxB,CAAC,CAAC;AAaH,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,IAAI,CAAC;QACH,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC5B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IACrC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,OAAO,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC7C,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;oBACpD,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;oBACpD,OAAO;iBACR;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "workday-studio-mcp-server",
3
+ "version": "2.0.0",
4
+ "description": "Enterprise-grade MCP server connecting AI assistants to local Workday Studio / Eclipse workspaces. Runs purely over stdio for local desktop client integration.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Workday Studio MCP Server Contributors",
8
+ "homepage": "https://github.com/yugn27/workday-studio-mcp-server#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/yugn27/workday-studio-mcp-server.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/yugn27/workday-studio-mcp-server/issues"
15
+ },
16
+ "keywords": [
17
+ "workday",
18
+ "studio",
19
+ "mcp",
20
+ "model-context-protocol",
21
+ "integration",
22
+ "assembly",
23
+ "xslt",
24
+ "eclipse",
25
+ "ai",
26
+ "llm",
27
+ "claude",
28
+ "flowise",
29
+ "xml",
30
+ "automation",
31
+ "developer-tools",
32
+ "typescript"
33
+ ],
34
+ "engines": {
35
+ "node": ">=18.0.0"
36
+ },
37
+ "main": "dist/index.js",
38
+ "files": [
39
+ "dist/",
40
+ "docs/",
41
+ ".env.example",
42
+ "README.md",
43
+ "LICENSE"
44
+ ],
45
+ "scripts": {
46
+ "build": "tsc --project tsconfig.json",
47
+ "start": "node dist/index.js",
48
+ "dev": "tsx watch src/index.ts",
49
+ "dev:once": "tsx src/index.ts",
50
+ "typecheck": "tsc --noEmit",
51
+ "lint": "tsc --noEmit && echo 'TypeScript check OK'",
52
+ "prepublishOnly": "npm run build"
53
+ },
54
+ "dependencies": {
55
+ "@modelcontextprotocol/sdk": "^1.10.2",
56
+ "dotenv": "^16.0.0",
57
+ "fast-xml-parser": "^4.3.0",
58
+ "winston": "^3.11.0",
59
+ "zod": "^3.22.0"
60
+ },
61
+ "devDependencies": {
62
+ "@types/node": "^20.0.0",
63
+ "tsx": "^4.7.0",
64
+ "typescript": "^5.3.0"
65
+ }
66
+ }