snow-flow 8.41.22 → 8.41.24
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/dist/api/health-api.d.ts +1 -1
- package/dist/api/health-api.d.ts.map +1 -1
- package/dist/api/simple-health-api.d.ts +1 -1
- package/dist/api/simple-health-api.d.ts.map +1 -1
- package/dist/utils/auto-update-snow-code.d.ts +7 -0
- package/dist/utils/auto-update-snow-code.d.ts.map +1 -1
- package/dist/utils/auto-update-snow-code.js +62 -13
- package/dist/utils/auto-update-snow-code.js.map +1 -1
- package/package.json +1 -1
- package/.snow-code/opencode.json +0 -49
- package/dist/cli/enterprise-docs-generator.d.ts +0 -14
- package/dist/cli/enterprise-docs-generator.d.ts.map +0 -1
- package/dist/cli/enterprise-docs-generator.js +0 -875
- package/dist/cli/enterprise-docs-generator.js.map +0 -1
- package/dist/config/snowcode-config.d.ts +0 -76
- package/dist/config/snowcode-config.d.ts.map +0 -1
- package/dist/config/snowcode-config.js +0 -225
- package/dist/config/snowcode-config.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/index.d.ts +0 -8
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/index.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/index.js +0 -24
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/index.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.d.ts +0 -8
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.js +0 -44
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_execute_flow.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.d.ts +0 -8
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.js +0 -67
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.d.ts +0 -15
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.js +0 -273
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_query.d.ts +0 -14
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_query.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_query.js +0 -205
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_query.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_import_flow_from_xml.d.ts +0 -8
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_import_flow_from_xml.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_import_flow_from_xml.js +0 -68
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_import_flow_from_xml.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.d.ts +0 -143
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.js +0 -2293
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.js.map +0 -1
- package/dist/sdk/claude-agent-sdk-integration.d.ts +0 -103
- package/dist/sdk/claude-agent-sdk-integration.d.ts.map +0 -1
- package/dist/sdk/claude-agent-sdk-integration.js +0 -414
- 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,MAAM,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,aAAa,GAAG,eAAe,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAE7D,IAAI,YAAY,GAAG,+EAA+E,CAAC;IACnG,YAAY,IAAI,4CAA4C,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IACvH,YAAY,IAAI,oIAAoI,CAAC;IAErJ,wBAAwB;IACxB,IAAI,OAAO,EAAE,CAAC;QACZ,YAAY,IAAI,wBAAwB,EAAE,CAAC;IAC7C,CAAC;IAED,gCAAgC;IAChC,IAAI,OAAO,EAAE,CAAC;QACZ,YAAY,IAAI,+BAA+B,EAAE,CAAC;IACpD,CAAC;IAED,8BAA8B;IAC9B,IAAI,aAAa,EAAE,CAAC;QAClB,YAAY,IAAI,8BAA8B,EAAE,CAAC;IACnD,CAAC;IAED,8BAA8B;IAC9B,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,YAAY,IAAI,6BAA6B,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,wBAAwB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC7B,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":["../../src/config/snowcode-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,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|
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,U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M,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 +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,WA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|
|
1
|
-
/**
|
|
2
|
-
* snow_flow_connectivity_test - Test flow connectivity
|
|
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_flow_connectivity_test.d.ts.map
|
package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snow_flow_connectivity_test.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAwB5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAkCxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* snow_flow_connectivity_test - Test flow connectivity
|
|
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_flow_connectivity_test',
|
|
12
|
-
description: 'Test flow connectivity and action connections',
|
|
13
|
-
// Metadata for tool discovery (not sent to LLM)
|
|
14
|
-
category: 'automation',
|
|
15
|
-
subcategory: 'flow-designer',
|
|
16
|
-
use_cases: ['testing', 'connectivity', 'validation'],
|
|
17
|
-
complexity: 'intermediate',
|
|
18
|
-
frequency: 'medium',
|
|
19
|
-
// Permission enforcement
|
|
20
|
-
// Classification: READ - Query/analysis operation
|
|
21
|
-
permission: 'read',
|
|
22
|
-
allowedRoles: ['developer', 'stakeholder', 'admin'],
|
|
23
|
-
inputSchema: {
|
|
24
|
-
type: 'object',
|
|
25
|
-
properties: {
|
|
26
|
-
flow_sys_id: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
description: 'Flow sys_id to test connectivity'
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
required: ['flow_sys_id']
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
async function execute(args, context) {
|
|
35
|
-
const { flow_sys_id } = args;
|
|
36
|
-
try {
|
|
37
|
-
const client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
38
|
-
// Get flow details
|
|
39
|
-
const flowResponse = await client.get(`/api/now/table/sys_hub_flow/${flow_sys_id}`);
|
|
40
|
-
const flow = flowResponse.data.result;
|
|
41
|
-
// Get flow actions
|
|
42
|
-
const actionsResponse = await client.get('/api/now/table/sys_hub_action_instance', {
|
|
43
|
-
params: {
|
|
44
|
-
sysparm_query: `flow=${flow_sys_id}`,
|
|
45
|
-
sysparm_fields: 'sys_id,name,action_name,active'
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const actions = actionsResponse.data.result;
|
|
49
|
-
const connectivityResults = {
|
|
50
|
-
flow_name: flow.name,
|
|
51
|
-
flow_active: flow.active,
|
|
52
|
-
total_actions: actions.length,
|
|
53
|
-
active_actions: actions.filter((a) => a.active === 'true').length,
|
|
54
|
-
actions: actions.map((a) => ({
|
|
55
|
-
name: a.name,
|
|
56
|
-
action_name: a.action_name,
|
|
57
|
-
active: a.active
|
|
58
|
-
}))
|
|
59
|
-
};
|
|
60
|
-
return (0, error_handler_js_1.createSuccessResult)(connectivityResults);
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
return (0, error_handler_js_1.createErrorResult)(error.message);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.version = '1.0.0';
|
|
67
|
-
//# sourceMappingURL=snow_flow_connectivity_test.js.map
|
package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snow_flow_connectivity_test.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_connectivity_test.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAgCH,0BAkCC;AA/DD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,+CAA+C;IAC5D,gDAAgD;IAChD,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,YAAY,CAAC;IACpD,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,QAAQ;IAEnB,yBAAyB;IACzB,kDAAkD;IAClD,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC;IACnD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;aAChD;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;CACF,CAAC;AAEK,KAAK,UAAU,OAAO,CAAC,IAAS,EAAE,OAA0B;IACjE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,IAAA,gCAAsB,EAAC,OAA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
* Discovers available trigger types, action types, and subflows
|
|
5
|
-
* that can be used when creating flows programmatically.
|
|
6
|
-
*
|
|
7
|
-
* @version 1.0.0
|
|
8
|
-
* @author Snow-Flow v8.3.0 - Flow Designer Discovery
|
|
9
|
-
*/
|
|
10
|
-
import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
|
|
11
|
-
export declare const toolDefinition: MCPToolDefinition;
|
|
12
|
-
export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
|
|
13
|
-
export declare const version = "1.0.0";
|
|
14
|
-
export declare const author = "Snow-Flow v8.3.0 - Flow Designer Discovery";
|
|
15
|
-
//# sourceMappingURL=snow_flow_discover.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snow_flow_discover.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAkCzF,eAAO,MAAM,cAAc,EAAE,iBAmD5B,CAAC;AAIF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAsOxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,+CAA+C,CAAC"}
|