snow-flow 8.41.23 → 8.42.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 (152) hide show
  1. package/CLAUDE.md +9 -6
  2. package/dist/api/health-api.d.ts +1 -1
  3. package/dist/api/health-api.d.ts.map +1 -1
  4. package/dist/api/simple-health-api.d.ts +1 -1
  5. package/dist/api/simple-health-api.d.ts.map +1 -1
  6. package/dist/mcp/servicenow-automation-mcp.js +8 -8
  7. package/dist/mcp/servicenow-automation-mcp.js.map +1 -1
  8. package/dist/mcp/servicenow-mcp-server.js +4 -4
  9. package/dist/mcp/servicenow-mcp-server.js.map +1 -1
  10. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.d.ts +1 -2
  11. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.d.ts.map +1 -1
  12. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.js +6 -8
  13. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.js.map +1 -1
  14. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.d.ts +1 -1
  15. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.js +2 -2
  16. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.js.map +1 -1
  17. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_schedule_script_job.d.ts +26 -0
  18. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_schedule_script_job.d.ts.map +1 -0
  19. package/dist/mcp/servicenow-mcp-unified/tools/automation/{snow_execute_script.js → snow_schedule_script_job.js} +19 -13
  20. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_schedule_script_job.js.map +1 -0
  21. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_trace_execution.d.ts +12 -4
  22. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_trace_execution.d.ts.map +1 -1
  23. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_trace_execution.js +69 -67
  24. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_trace_execution.js.map +1 -1
  25. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_analyze_artifact.d.ts.map +1 -1
  26. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_analyze_artifact.js +2 -1
  27. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_analyze_artifact.js.map +1 -1
  28. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_analyze_requirements.d.ts.map +1 -1
  29. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_analyze_requirements.js +2 -1
  30. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_analyze_requirements.js.map +1 -1
  31. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_edit_artifact.d.ts.map +1 -1
  32. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_edit_artifact.js +2 -1
  33. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_edit_artifact.js.map +1 -1
  34. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_edit_by_sysid.d.ts.map +1 -1
  35. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_edit_by_sysid.js +5 -2
  36. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_edit_by_sysid.js.map +1 -1
  37. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_find_artifact.d.ts.map +1 -1
  38. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_find_artifact.js +2 -1
  39. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_find_artifact.js.map +1 -1
  40. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_get_by_sysid.d.ts.map +1 -1
  41. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_get_by_sysid.js +2 -1
  42. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_get_by_sysid.js.map +1 -1
  43. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_memory_search.d.ts.map +1 -1
  44. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_memory_search.js +2 -1
  45. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_memory_search.js.map +1 -1
  46. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_orchestrate_development.d.ts.map +1 -1
  47. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_orchestrate_development.js +2 -1
  48. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_orchestrate_development.js.map +1 -1
  49. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_sync_data_consistency.d.ts.map +1 -1
  50. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_sync_data_consistency.js +2 -1
  51. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_sync_data_consistency.js.map +1 -1
  52. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_validate_live_connection.d.ts.map +1 -1
  53. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_validate_live_connection.js +2 -1
  54. package/dist/mcp/servicenow-mcp-unified/tools/development/snow_validate_live_connection.js.map +1 -1
  55. package/dist/mcp/servicenow-mcp-unified/tools/integration/index.d.ts +1 -0
  56. package/dist/mcp/servicenow-mcp-unified/tools/integration/index.d.ts.map +1 -1
  57. package/dist/mcp/servicenow-mcp-unified/tools/integration/index.js +4 -1
  58. package/dist/mcp/servicenow-mcp-unified/tools/integration/index.js.map +1 -1
  59. package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_rest_message_manage.d.ts +26 -0
  60. package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_rest_message_manage.d.ts.map +1 -0
  61. package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_rest_message_manage.js +1280 -0
  62. package/dist/mcp/servicenow-mcp-unified/tools/integration/snow_rest_message_manage.js.map +1 -0
  63. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/index.d.ts +1 -1
  64. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/index.js +4 -4
  65. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/snow_trigger_scheduled_job.d.ts +19 -0
  66. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/snow_trigger_scheduled_job.d.ts.map +1 -0
  67. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/snow_trigger_scheduled_job.js +142 -0
  68. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/snow_trigger_scheduled_job.js.map +1 -0
  69. package/dist/mcp/servicenow-mcp-unified/tools/workflow/index.d.ts +1 -1
  70. package/dist/mcp/servicenow-mcp-unified/tools/workflow/index.d.ts.map +1 -1
  71. package/dist/mcp/servicenow-mcp-unified/tools/workflow/index.js +4 -4
  72. package/dist/mcp/servicenow-mcp-unified/tools/workflow/index.js.map +1 -1
  73. package/dist/mcp/servicenow-mcp-unified/tools/workflow/snow_start_workflow.d.ts +15 -0
  74. package/dist/mcp/servicenow-mcp-unified/tools/workflow/snow_start_workflow.d.ts.map +1 -0
  75. package/dist/mcp/servicenow-mcp-unified/tools/workflow/snow_start_workflow.js +136 -0
  76. package/dist/mcp/servicenow-mcp-unified/tools/workflow/snow_start_workflow.js.map +1 -0
  77. package/dist/templates/agents-md-template.d.ts +1 -1
  78. package/dist/templates/agents-md-template.d.ts.map +1 -1
  79. package/dist/templates/agents-md-template.js +5 -5
  80. package/dist/templates/claude-md-template.d.ts +1 -1
  81. package/dist/templates/claude-md-template.d.ts.map +1 -1
  82. package/dist/templates/claude-md-template.js +11 -9
  83. package/dist/templates/claude-md-template.js.map +1 -1
  84. package/dist/utils/auto-update-snow-code.d.ts +7 -0
  85. package/dist/utils/auto-update-snow-code.d.ts.map +1 -1
  86. package/dist/utils/auto-update-snow-code.js +62 -13
  87. package/dist/utils/auto-update-snow-code.js.map +1 -1
  88. package/package.json +1 -1
  89. package/.snow-code/opencode.json +0 -49
  90. package/dist/cli/enterprise-docs-generator.d.ts +0 -14
  91. package/dist/cli/enterprise-docs-generator.d.ts.map +0 -1
  92. package/dist/cli/enterprise-docs-generator.js +0 -875
  93. package/dist/cli/enterprise-docs-generator.js.map +0 -1
  94. package/dist/config/snowcode-config.d.ts +0 -76
  95. package/dist/config/snowcode-config.d.ts.map +0 -1
  96. package/dist/config/snowcode-config.js +0 -225
  97. package/dist/config/snowcode-config.js.map +0 -1
  98. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.d.ts +0 -20
  99. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.d.ts.map +0 -1
  100. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.js.map +0 -1
  101. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_test_rest_connection.d.ts +0 -11
  102. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_test_rest_connection.d.ts.map +0 -1
  103. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_test_rest_connection.js +0 -142
  104. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_test_rest_connection.js.map +0 -1
  105. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/index.d.ts +0 -8
  106. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/index.d.ts.map +0 -1
  107. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/index.js +0 -24
  108. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/index.js.map +0 -1
  109. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.d.ts +0 -8
  110. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.d.ts.map +0 -1
  111. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.js +0 -44
  112. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.js.map +0 -1
  113. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.d.ts +0 -8
  114. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.d.ts.map +0 -1
  115. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.js +0 -67
  116. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.js.map +0 -1
  117. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.d.ts +0 -15
  118. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.d.ts.map +0 -1
  119. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.js +0 -273
  120. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.js.map +0 -1
  121. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_query.d.ts +0 -14
  122. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_query.d.ts.map +0 -1
  123. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_query.js +0 -205
  124. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_query.js.map +0 -1
  125. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_import_flow_from_xml.d.ts +0 -8
  126. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_import_flow_from_xml.d.ts.map +0 -1
  127. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_import_flow_from_xml.js +0 -68
  128. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_import_flow_from_xml.js.map +0 -1
  129. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.d.ts +0 -143
  130. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.d.ts.map +0 -1
  131. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.js +0 -2293
  132. package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.js.map +0 -1
  133. package/dist/mcp/servicenow-mcp-unified/tools/rest-api/snow_create_rest_method.d.ts +0 -9
  134. package/dist/mcp/servicenow-mcp-unified/tools/rest-api/snow_create_rest_method.d.ts.map +0 -1
  135. package/dist/mcp/servicenow-mcp-unified/tools/rest-api/snow_create_rest_method.js +0 -57
  136. package/dist/mcp/servicenow-mcp-unified/tools/rest-api/snow_create_rest_method.js.map +0 -1
  137. package/dist/mcp/servicenow-mcp-unified/tools/rest-api/snow_test_rest_message.d.ts +0 -9
  138. package/dist/mcp/servicenow-mcp-unified/tools/rest-api/snow_test_rest_message.d.ts.map +0 -1
  139. package/dist/mcp/servicenow-mcp-unified/tools/rest-api/snow_test_rest_message.js +0 -58
  140. package/dist/mcp/servicenow-mcp-unified/tools/rest-api/snow_test_rest_message.js.map +0 -1
  141. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/snow_execute_scheduled_job.d.ts +0 -9
  142. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/snow_execute_scheduled_job.d.ts.map +0 -1
  143. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/snow_execute_scheduled_job.js +0 -59
  144. package/dist/mcp/servicenow-mcp-unified/tools/scheduled-jobs/snow_execute_scheduled_job.js.map +0 -1
  145. package/dist/mcp/servicenow-mcp-unified/tools/workflow/snow_execute_workflow.d.ts +0 -9
  146. package/dist/mcp/servicenow-mcp-unified/tools/workflow/snow_execute_workflow.d.ts.map +0 -1
  147. package/dist/mcp/servicenow-mcp-unified/tools/workflow/snow_execute_workflow.js +0 -55
  148. package/dist/mcp/servicenow-mcp-unified/tools/workflow/snow_execute_workflow.js.map +0 -1
  149. package/dist/sdk/claude-agent-sdk-integration.d.ts +0 -103
  150. package/dist/sdk/claude-agent-sdk-integration.d.ts.map +0 -1
  151. package/dist/sdk/claude-agent-sdk-integration.js +0 -414
  152. package/dist/sdk/claude-agent-sdk-integration.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"enterprise-docs-generator.js","sourceRoot":"","sources":["../../src/cli/enterprise-docs-generator.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAMH,wEA8BC;AAlCD;;;GAGG;AACH,SAAgB,8BAA8B,CAAC,eAAyB;IACtE,MAAM,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2hBR,CAAC;AACF,CAAC;AAED,SAAS,+BAA+B;IACtC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFR,CAAC;AACF,CAAC;AAED,SAAS,8BAA8B;IACrC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIR,CAAC;AACF,CAAC;AAED,SAAS,6BAA6B,CAAC,OAAgB,EAAE,OAAgB,EAAE,aAAsB;IAC/F,IAAI,QAAQ,GAAG;;CAEhB,CAAC;IAEA,IAAI,OAAO,IAAI,aAAa,EAAE,CAAC;QAC7B,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCf,CAAC;IACA,CAAC;IAED,IAAI,OAAO,IAAI,aAAa,EAAE,CAAC;QAC7B,QAAQ,IAAI;;;;;;;;CAQf,CAAC;IACA,CAAC;IAED,QAAQ,IAAI;;;;;;;;;;;;;;CAcb,CAAC;IAEA,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,76 +0,0 @@
1
- /**
2
- * SnowCode Configuration Management
3
- * Manages ~/.snowcode/config.json for MCP server configuration
4
- */
5
- /**
6
- * SnowCode MCP Server Configuration
7
- * Format matches OpenCode/SnowCode MCP server configuration
8
- */
9
- export interface SnowCodeMcpServer {
10
- command: string;
11
- args: string[];
12
- env?: Record<string, string>;
13
- }
14
- export interface SnowCodeConfig {
15
- mcpServers?: Record<string, SnowCodeMcpServer>;
16
- servers?: Record<string, SnowCodeMcpServer>;
17
- }
18
- /**
19
- * Enterprise MCP server configuration options
20
- */
21
- export interface EnterpriseMcpConfig {
22
- licenseKey: string;
23
- serverUrl?: string;
24
- credentials?: {
25
- jira?: {
26
- host: string;
27
- email: string;
28
- apiToken: string;
29
- };
30
- azure?: {
31
- organization: string;
32
- pat: string;
33
- };
34
- confluence?: {
35
- host: string;
36
- email: string;
37
- apiToken: string;
38
- };
39
- };
40
- }
41
- /**
42
- * Get the SnowCode config file path
43
- */
44
- export declare function getSnowCodeConfigPath(): string;
45
- /**
46
- * Check if SnowCode config file exists
47
- */
48
- export declare function snowCodeConfigExists(): boolean;
49
- /**
50
- * Read SnowCode configuration file
51
- * @returns SnowCode configuration or empty object if file doesn't exist
52
- */
53
- export declare function readSnowCodeConfig(): Promise<SnowCodeConfig>;
54
- /**
55
- * Write SnowCode configuration file
56
- * @param config - Configuration to write
57
- */
58
- export declare function writeSnowCodeConfig(config: SnowCodeConfig): Promise<void>;
59
- /**
60
- * Add or update enterprise MCP server in SnowCode config
61
- * @param config - Enterprise MCP server configuration
62
- */
63
- export declare function addEnterpriseMcpServer(config: EnterpriseMcpConfig): Promise<void>;
64
- /**
65
- * Remove enterprise MCP server from SnowCode config
66
- */
67
- export declare function removeEnterpriseMcpServer(): Promise<void>;
68
- /**
69
- * Check if enterprise MCP server is configured in SnowCode config
70
- */
71
- export declare function isEnterpriseMcpConfigured(): Promise<boolean>;
72
- /**
73
- * Get enterprise MCP server configuration from SnowCode config
74
- */
75
- export declare function getEnterpriseMcpConfig(): Promise<SnowCodeMcpServer | null>;
76
- //# sourceMappingURL=snowcode-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snowcode-config.d.ts","sourceRoot":"","sources":["../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,IAAI,CAAC,CA4DvF;AAED;;GAEG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CA2B/D;AAED;;GAEG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,CAWlE;AA8DD;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAoBhF"}
@@ -1,225 +0,0 @@
1
- "use strict";
2
- /**
3
- * SnowCode Configuration Management
4
- * Manages ~/.snowcode/config.json for MCP server configuration
5
- */
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.getSnowCodeConfigPath = getSnowCodeConfigPath;
11
- exports.snowCodeConfigExists = snowCodeConfigExists;
12
- exports.readSnowCodeConfig = readSnowCodeConfig;
13
- exports.writeSnowCodeConfig = writeSnowCodeConfig;
14
- exports.addEnterpriseMcpServer = addEnterpriseMcpServer;
15
- exports.removeEnterpriseMcpServer = removeEnterpriseMcpServer;
16
- exports.isEnterpriseMcpConfigured = isEnterpriseMcpConfigured;
17
- exports.getEnterpriseMcpConfig = getEnterpriseMcpConfig;
18
- const path_1 = __importDefault(require("path"));
19
- const os_1 = __importDefault(require("os"));
20
- const promises_1 = __importDefault(require("fs/promises"));
21
- const fs_1 = require("fs");
22
- const logger_js_1 = require("../utils/logger.js");
23
- const logger = new logger_js_1.Logger('snowcode-config');
24
- /**
25
- * Get the SnowCode config file path
26
- */
27
- function getSnowCodeConfigPath() {
28
- return path_1.default.join(os_1.default.homedir(), '.snowcode', 'config.json');
29
- }
30
- /**
31
- * Check if SnowCode config file exists
32
- */
33
- function snowCodeConfigExists() {
34
- return (0, fs_1.existsSync)(getSnowCodeConfigPath());
35
- }
36
- /**
37
- * Read SnowCode configuration file
38
- * @returns SnowCode configuration or empty object if file doesn't exist
39
- */
40
- async function readSnowCodeConfig() {
41
- const configPath = getSnowCodeConfigPath();
42
- try {
43
- if (!(0, fs_1.existsSync)(configPath)) {
44
- logger.debug('SnowCode config file does not exist yet');
45
- return {};
46
- }
47
- const content = await promises_1.default.readFile(configPath, 'utf-8');
48
- const config = JSON.parse(content);
49
- logger.debug('Successfully read SnowCode config');
50
- return config;
51
- }
52
- catch (error) {
53
- logger.error(`Failed to read SnowCode config: ${error.message}`);
54
- return {};
55
- }
56
- }
57
- /**
58
- * Write SnowCode configuration file
59
- * @param config - Configuration to write
60
- */
61
- async function writeSnowCodeConfig(config) {
62
- const configPath = getSnowCodeConfigPath();
63
- const configDir = path_1.default.dirname(configPath);
64
- try {
65
- // Ensure .snowcode directory exists
66
- if (!(0, fs_1.existsSync)(configDir)) {
67
- await promises_1.default.mkdir(configDir, { recursive: true });
68
- logger.debug('Created .snowcode directory');
69
- }
70
- // Write configuration file
71
- await promises_1.default.writeFile(configPath, JSON.stringify(config, null, 2), 'utf-8');
72
- logger.info('Successfully wrote SnowCode config');
73
- }
74
- catch (error) {
75
- logger.error(`Failed to write SnowCode config: ${error.message}`);
76
- throw error;
77
- }
78
- }
79
- /**
80
- * Add or update enterprise MCP server in SnowCode config
81
- * @param config - Enterprise MCP server configuration
82
- */
83
- async function addEnterpriseMcpServer(config) {
84
- try {
85
- const snowCodeConfig = await readSnowCodeConfig();
86
- // Determine which key to use (mcpServers is preferred, fallback to servers)
87
- const serversKey = snowCodeConfig.mcpServers !== undefined ? 'mcpServers' : 'servers';
88
- if (!snowCodeConfig[serversKey]) {
89
- snowCodeConfig[serversKey] = {};
90
- }
91
- // Get the path to the enterprise proxy entry point
92
- // This needs to be the compiled dist file
93
- const enterpriseProxyPath = getEnterpriseProxyPath();
94
- // Build environment variables
95
- const env = {
96
- SNOW_LICENSE_KEY: config.licenseKey,
97
- };
98
- // Add server URL if provided
99
- if (config.serverUrl) {
100
- env.SNOW_ENTERPRISE_URL = config.serverUrl;
101
- }
102
- // Add credentials if provided (local mode)
103
- if (config.credentials) {
104
- if (config.credentials.jira) {
105
- env.JIRA_HOST = config.credentials.jira.host;
106
- env.JIRA_EMAIL = config.credentials.jira.email;
107
- env.JIRA_API_TOKEN = config.credentials.jira.apiToken;
108
- }
109
- if (config.credentials.azure) {
110
- env.AZURE_DEVOPS_ORG = config.credentials.azure.organization;
111
- env.AZURE_DEVOPS_PAT = config.credentials.azure.pat;
112
- }
113
- if (config.credentials.confluence) {
114
- env.CONFLUENCE_HOST = config.credentials.confluence.host;
115
- env.CONFLUENCE_EMAIL = config.credentials.confluence.email;
116
- env.CONFLUENCE_API_TOKEN = config.credentials.confluence.apiToken;
117
- }
118
- }
119
- // Add or update enterprise MCP server
120
- snowCodeConfig[serversKey]['snow-flow-enterprise'] = {
121
- command: 'node',
122
- args: [enterpriseProxyPath],
123
- env,
124
- };
125
- // Write updated configuration
126
- await writeSnowCodeConfig(snowCodeConfig);
127
- logger.info('Successfully added enterprise MCP server to SnowCode config');
128
- }
129
- catch (error) {
130
- logger.error(`Failed to add enterprise MCP server: ${error.message}`);
131
- throw error;
132
- }
133
- }
134
- /**
135
- * Remove enterprise MCP server from SnowCode config
136
- */
137
- async function removeEnterpriseMcpServer() {
138
- try {
139
- const snowCodeConfig = await readSnowCodeConfig();
140
- // Check both possible keys
141
- let removed = false;
142
- if (snowCodeConfig.mcpServers?.['snow-flow-enterprise']) {
143
- delete snowCodeConfig.mcpServers['snow-flow-enterprise'];
144
- removed = true;
145
- }
146
- if (snowCodeConfig.servers?.['snow-flow-enterprise']) {
147
- delete snowCodeConfig.servers['snow-flow-enterprise'];
148
- removed = true;
149
- }
150
- if (removed) {
151
- await writeSnowCodeConfig(snowCodeConfig);
152
- logger.info('Successfully removed enterprise MCP server from SnowCode config');
153
- }
154
- else {
155
- logger.debug('Enterprise MCP server not found in config');
156
- }
157
- }
158
- catch (error) {
159
- logger.error(`Failed to remove enterprise MCP server: ${error.message}`);
160
- throw error;
161
- }
162
- }
163
- /**
164
- * Check if enterprise MCP server is configured in SnowCode config
165
- */
166
- async function isEnterpriseMcpConfigured() {
167
- try {
168
- const snowCodeConfig = await readSnowCodeConfig();
169
- return !!(snowCodeConfig.mcpServers?.['snow-flow-enterprise'] ||
170
- snowCodeConfig.servers?.['snow-flow-enterprise']);
171
- }
172
- catch (error) {
173
- return false;
174
- }
175
- }
176
- /**
177
- * Get the path to the enterprise proxy entry point
178
- * Tries to find the compiled dist file, falls back to source if in development
179
- */
180
- function getEnterpriseProxyPath() {
181
- // First try to find in node_modules (installed package)
182
- const nodeModulesPath = path_1.default.join(process.cwd(), 'node_modules', 'snow-flow', 'dist', 'mcp', 'enterprise-proxy', 'index.js');
183
- if ((0, fs_1.existsSync)(nodeModulesPath)) {
184
- logger.debug('Using enterprise proxy from node_modules');
185
- return nodeModulesPath;
186
- }
187
- // Try global installation
188
- const globalNodeModulesPath = path_1.default.join(os_1.default.homedir(), '.npm', 'lib', 'node_modules', 'snow-flow', 'dist', 'mcp', 'enterprise-proxy', 'index.js');
189
- if ((0, fs_1.existsSync)(globalNodeModulesPath)) {
190
- logger.debug('Using enterprise proxy from global installation');
191
- return globalNodeModulesPath;
192
- }
193
- // Fallback to development path (when running from source)
194
- const devPath = path_1.default.join(__dirname, '..', '..', 'dist', 'mcp', 'enterprise-proxy', 'index.js');
195
- if ((0, fs_1.existsSync)(devPath)) {
196
- logger.debug('Using enterprise proxy from development build');
197
- return devPath;
198
- }
199
- // Last resort - relative to current file location
200
- logger.warn('Enterprise proxy not found in standard locations, using relative path');
201
- return path_1.default.join(__dirname, '..', '..', 'dist', 'mcp', 'enterprise-proxy', 'index.js');
202
- }
203
- /**
204
- * Get enterprise MCP server configuration from SnowCode config
205
- */
206
- async function getEnterpriseMcpConfig() {
207
- try {
208
- const snowCodeConfig = await readSnowCodeConfig();
209
- const server = snowCodeConfig.mcpServers?.['snow-flow-enterprise'] ||
210
- snowCodeConfig.servers?.['snow-flow-enterprise'] ||
211
- null;
212
- if (server) {
213
- logger.debug('Found enterprise MCP server configuration');
214
- }
215
- else {
216
- logger.debug('Enterprise MCP server not configured');
217
- }
218
- return server;
219
- }
220
- catch (error) {
221
- logger.error(`Failed to get enterprise MCP config: ${error.message}`);
222
- return null;
223
- }
224
- }
225
- //# sourceMappingURL=snowcode-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snowcode-config.js","sourceRoot":"","sources":["../../src/config/snowcode-config.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AAqDH,sDAEC;AAKD,oDAEC;AAMD,gDAkBC;AAMD,kDAkBC;AAMD,wDA4DC;AAKD,8DA2BC;AAKD,8DAWC;AAiED,wDAoBC;AAnTD,gDAAwB;AACxB,4CAAoB;AACpB,2DAA6B;AAC7B,2BAAgC;AAChC,kDAA4C;AAE5C,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,iBAAiB,CAAC,CAAC;AA0C7C;;GAEG;AACH,SAAgB,qBAAqB;IACnC,OAAO,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO,IAAA,eAAU,EAAC,qBAAqB,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,kBAAkB;IACtC,MAAM,UAAU,GAAG,qBAAqB,EAAE,CAAC;IAE3C,IAAI,CAAC;QACH,IAAI,CAAC,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;YACxD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEnC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;QAClD,OAAO,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AM,EACN,KAAK,EACL,kBAAkB,EAClB,UAAU,CACX,CAAC;IAEF,IAAI,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;QACxB,MAAM,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;QAC9D,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,kDAAkD;IAClD,MAAM,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAC;IACrF,OAAO,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;AACzF,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,sBAAsB;IAC1C,IAAI,CAAC;QACH,MAAM,cAAc,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAElD,MAAM,MAAM,GACV,cAAc,CAAC,UAAU,EAAE,CAAC,sBAAsB,CAAC;YACnD,cAAc,CAAC,OAAO,EAAE,CAAC,sBAAsB,CAAC;YAChD,IAAI,CAAC;QAEP,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,CAAC,KAAK,CAAC,wCAAwC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * snow_execute_script - Unified script execution tool
3
- *
4
- * Executes server-side JavaScript in ServiceNow with comprehensive output capture.
5
- * Combines functionality of:
6
- * - snow_execute_script_sync (deprecated)
7
- * - snow_execute_script_with_output (deprecated)
8
- * - snow_execute_background_script (deprecated)
9
- *
10
- * Uses sysauto_script + sys_trigger approach for reliable execution.
11
- *
12
- * ⚠️ CRITICAL: ALL SCRIPTS MUST BE ES5 ONLY!
13
- * ServiceNow runs on Rhino engine - no const/let/arrow functions/template literals.
14
- */
15
- import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
16
- export declare const toolDefinition: MCPToolDefinition;
17
- export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
18
- export declare const version = "2.0.0";
19
- export declare const author = "Snow-Flow SDK";
20
- //# sourceMappingURL=snow_execute_script.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snow_execute_script.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBA8D5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAsExF;AAqYD,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"snow_execute_script.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAsEH,0BAsEC;AAzID,kDAA8D;AAC9D,oEAAiH;AAEpG,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,sLAAsL;IACnM,gDAAgD;IAChD,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,kBAAkB;IAC/B,SAAS,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,CAAC;IAC9E,UAAU,EAAE,UAAU;I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CAAC,CAAC,EAAE;;;;EAI3D,MAAM;;;;;;;;;;;;;CAaP,CAAC,IAAI,EAAE,CAAC;AACT,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,eAAe,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * snow_test_rest_connection - Test REST message connections
3
- *
4
- * Tests a REST message connection with full response details and diagnostics.
5
- */
6
- import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
7
- export declare const toolDefinition: MCPToolDefinition;
8
- export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
9
- export declare const version = "1.0.0";
10
- export declare const author = "Snow-Flow SDK Migration";
11
- //# sourceMappingURL=snow_test_rest_connection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snow_test_rest_connection.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_test_rest_connection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBA0C5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CA8GxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,4BAA4B,CAAC"}
@@ -1,142 +0,0 @@
1
- "use strict";
2
- /**
3
- * snow_test_rest_connection - Test REST message connections
4
- *
5
- * Tests a REST message connection with full response details and diagnostics.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.author = exports.version = exports.toolDefinition = void 0;
9
- exports.execute = execute;
10
- const auth_js_1 = require("../../shared/auth.js");
11
- const error_handler_js_1 = require("../../shared/error-handler.js");
12
- exports.toolDefinition = {
13
- name: 'snow_test_rest_connection',
14
- description: 'Test REST message connection with full response details and diagnostics',
15
- // Metadata for tool discovery (not sent to LLM)
16
- category: 'automation',
17
- subcategory: 'testing',
18
- use_cases: ['automation', 'rest', 'connection'],
19
- complexity: 'intermediate',
20
- frequency: 'medium',
21
- // Permission enforcement
22
- // Classification: READ - Read-only operation based on name pattern
23
- permission: 'read',
24
- allowedRoles: ['developer', 'stakeholder', 'admin'],
25
- inputSchema: {
26
- type: 'object',
27
- properties: {
28
- rest_message: {
29
- type: 'string',
30
- description: 'REST Message name'
31
- },
32
- method: {
33
- type: 'string',
34
- description: 'HTTP Method name'
35
- },
36
- test_params: {
37
- type: 'object',
38
- description: 'Test parameters for the request'
39
- },
40
- return_full_response: {
41
- type: 'boolean',
42
- description: 'Return complete response details',
43
- default: true
44
- },
45
- validate_auth: {
46
- type: 'boolean',
47
- description: 'Validate authentication',
48
- default: true
49
- }
50
- },
51
- required: ['rest_message']
52
- }
53
- };
54
- async function execute(args, context) {
55
- const { rest_message, method, test_params = {}, return_full_response = true, validate_auth = true } = args;
56
- try {
57
- const client = await (0, auth_js_1.getAuthenticatedClient)(context);
58
- // Find REST message
59
- const restMessageResponse = await client.get(`/api/now/table/sys_rest_message?sysparm_query=name=${rest_message}&sysparm_limit=1`);
60
- if (!restMessageResponse.data.result || restMessageResponse.data.result.length === 0) {
61
- throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.NOT_FOUND, `REST message not found: ${rest_message}`, { retryable: false });
62
- }
63
- const restMessage = restMessageResponse.data.result[0];
64
- // Find method if specified
65
- let methodRecord = null;
66
- if (method) {
67
- const methodResponse = await client.get(`/api/now/table/sys_rest_message_fn?sysparm_query=rest_message=${restMessage.sys_id}^name=${method}&sysparm_limit=1`);
68
- if (methodResponse.data.result && methodResponse.data.result.length > 0) {
69
- methodRecord = methodResponse.data.result[0];
70
- }
71
- }
72
- // Build test script
73
- const testScript = `
74
- var restMessage = new sn_ws.RESTMessageV2('${rest_message}', ${method ? `'${method}'` : 'null'});
75
-
76
- // Set test parameters
77
- var testParams = ${JSON.stringify(test_params)};
78
- for (var key in testParams) {
79
- restMessage.setStringParameterNoEscape(key, testParams[key]);
80
- }
81
-
82
- try {
83
- var response = restMessage.execute();
84
- var responseBody = response.getBody();
85
- var httpStatus = response.getStatusCode();
86
- var headers = response.getHeaders();
87
-
88
- var result = {
89
- success: httpStatus >= 200 && httpStatus < 300,
90
- status_code: httpStatus,
91
- response_body: responseBody,
92
- headers: headers,
93
- error_message: response.getErrorMessage() || null
94
- };
95
-
96
- JSON.stringify(result);
97
- } catch(e) {
98
- JSON.stringify({
99
- success: false,
100
- error_message: e.toString()
101
- });
102
- }
103
- `;
104
- // Execute test script
105
- const scriptResponse = await client.post('/api/now/table/sys_script_execution', {
106
- script: testScript
107
- });
108
- let testResult;
109
- try {
110
- const resultData = scriptResponse.data.result || scriptResponse.data;
111
- testResult = JSON.parse(typeof resultData === 'string' ? resultData : JSON.stringify(resultData));
112
- }
113
- catch (parseError) {
114
- testResult = {
115
- success: false,
116
- error_message: 'Failed to parse test results'
117
- };
118
- }
119
- return (0, error_handler_js_1.createSuccessResult)({
120
- rest_message: rest_message,
121
- method: method || 'default',
122
- test_successful: testResult.success,
123
- status_code: testResult.status_code,
124
- response_body: return_full_response ? testResult.response_body : '[Response body hidden]',
125
- headers: testResult.headers || {},
126
- error_message: testResult.error_message,
127
- endpoint: restMessage.endpoint,
128
- authentication_type: restMessage.authentication_type
129
- }, {
130
- operation: 'test_rest_connection',
131
- rest_message_name: rest_message
132
- });
133
- }
134
- catch (error) {
135
- return (0, error_handler_js_1.createErrorResult)(error instanceof error_handler_js_1.SnowFlowError
136
- ? error
137
- : new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.UNKNOWN_ERROR, error.message, { originalError: error }));
138
- }
139
- }
140
- exports.version = '1.0.0';
141
- exports.author = 'Snow-Flow SDK Migration';
142
- //# sourceMappingURL=snow_test_rest_connection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snow_test_rest_connection.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_test_rest_connection.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAkDH,0BA8GC;AA7JD,kDAA8D;AAC9D,oEAAiH;AAEpG,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,yEAAyE;IACtF,gDAAgD;IAChD,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,CAAC;IAC/C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,QAAQ;IAEnB,yBAAyB;IACzB,mEAAmE;IACnE,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC;IACnD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mBAAmB;aACjC;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kBAAkB;aAChC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;aAC/C;YACD,oBAAoB,EAAE;gBACpB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,kCAAkC;gBAC/C,OAAO,EAAE,IAAI;aACd;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,yBAAyB;gBACtC,OAAO,EAAE,IAAI;aACd;SACF;QACD,QAAQ,EAAE,CAAC,cAAc,CAAC;KAC3B;CACF,CAAC;AAEK,KAAK,UAAU,OAAO,CAAC,IAAS,EAAE,OAA0B;IACjE,MAAM,EACJ,YAAY,EACZ,MAAM,EACN,WAAW,GAAG,EAAE,EAChB,oBAAoB,GAAG,IAAI,EAC3B,aAAa,GAAG,IAAI,EAC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xF,CAAC;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,yBAAyB,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Flow Designer Tools
3
- *
4
- * Tools for managing ServiceNow Flow Designer flows.
5
- * EXPERIMENTAL: Uses direct table API manipulation.
6
- */
7
- export * from './snow_manage_flow.js';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,uBAAuB,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- /**
3
- * Flow Designer Tools
4
- *
5
- * Tools for managing ServiceNow Flow Designer flows.
6
- * EXPERIMENTAL: Uses direct table API manipulation.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- __exportStar(require("./snow_manage_flow.js"), exports);
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,wDAAsC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * snow_execute_flow - Execute Flow Designer flow
3
- */
4
- import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
5
- export declare const toolDefinition: MCPToolDefinition;
6
- export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
7
- export declare const version = "1.0.0";
8
- //# sourceMappingURL=snow_execute_flow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snow_execute_flow.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAsB5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CASxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC"}
@@ -1,44 +0,0 @@
1
- "use strict";
2
- /**
3
- * snow_execute_flow - Execute Flow Designer flow
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.version = exports.toolDefinition = void 0;
7
- exports.execute = execute;
8
- const auth_js_1 = require("../../shared/auth.js");
9
- const error_handler_js_1 = require("../../shared/error-handler.js");
10
- exports.toolDefinition = {
11
- name: 'snow_execute_flow',
12
- description: 'Execute Flow Designer flow',
13
- // Metadata for tool discovery (not sent to LLM)
14
- category: 'automation',
15
- subcategory: 'flow-designer',
16
- use_cases: ['flow-execution', 'automation', 'orchestration'],
17
- complexity: 'beginner',
18
- frequency: 'high',
19
- // Permission enforcement
20
- // Classification: WRITE - Execution operation - can have side effects
21
- permission: 'write',
22
- allowedRoles: ['developer', 'admin'],
23
- inputSchema: {
24
- type: 'object',
25
- properties: {
26
- flow_sys_id: { type: 'string' },
27
- inputs: { type: 'object', description: 'Flow input variables' }
28
- },
29
- required: ['flow_sys_id']
30
- }
31
- };
32
- async function execute(args, context) {
33
- const { flow_sys_id, inputs = {} } = args;
34
- try {
35
- const client = await (0, auth_js_1.getAuthenticatedClient)(context);
36
- const response = await client.post(`/api/now/v1/process/execute/${flow_sys_id}`, inputs);
37
- return (0, error_handler_js_1.createSuccessResult)({ executed: true, execution: response.data.result });
38
- }
39
- catch (error) {
40
- return (0, error_handler_js_1.createErrorResult)(error.message);
41
- }
42
- }
43
- exports.version = '1.0.0';
44
- //# sourceMappingURL=snow_execute_flow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snow_execute_flow.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA8BH,0BASC;AApCD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,4BAA4B;IACzC,gDAAgD;IAChD,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,CAAC,gBAAgB,EAAE,YAAY,EAAE,eAAe,CAAC;IAC5D,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,MAAM;IAEjB,yBAAyB;IACzB,sEAAsE;IACtE,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC/B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;SAChE;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;CACF,CAAC;AAEK,KAAK,UAAU,OAAO,CAAC,IAAS,EAAE,OAA0B;IACjE,MAAM,EAAE,WAAW,EAAE,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