snow-flow 1.4.18 → 1.4.20

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.
@@ -0,0 +1,8 @@
1
+
2
+ ❄ ❄
3
+ ❄ ❄ Snow-Flow
4
+ /\ ❄ ServiceNow Multi-Agent Framework
5
+ / \ ❄
6
+ / \❄
7
+ /______\
8
+ ||||
@@ -0,0 +1,51 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
3
+ <!-- Mountain -->
4
+ <path d="M 50 150 L 100 50 L 150 150 Z" fill="#4A90E2" stroke="#2E5C8A" stroke-width="2"/>
5
+
6
+ <!-- Snow cap on mountain -->
7
+ <path d="M 100 50 L 80 90 L 120 90 Z" fill="#FFFFFF" stroke="#E0E0E0" stroke-width="1"/>
8
+
9
+ <!-- Mountain base -->
10
+ <rect x="40" y="150" width="120" height="10" fill="#2E5C8A"/>
11
+
12
+ <!-- Snowflakes falling from top -->
13
+ <!-- Motion trail from top -->
14
+ <circle cx="100" cy="20" r="1" fill="#4A90E2" opacity="0.1"/>
15
+ <circle cx="105" cy="30" r="1.2" fill="#4A90E2" opacity="0.2"/>
16
+ <circle cx="95" cy="40" r="1.5" fill="#4A90E2" opacity="0.3"/>
17
+
18
+ <!-- Main snowflake -->
19
+ <g transform="translate(100, 55)">
20
+ <!-- Snowflake center -->
21
+ <circle cx="0" cy="0" r="3" fill="#FFFFFF" stroke="#4A90E2" stroke-width="1"/>
22
+
23
+ <!-- Snowflake arms -->
24
+ <line x1="-12" y1="0" x2="12" y2="0" stroke="#4A90E2" stroke-width="2"/>
25
+ <line x1="0" y1="-12" x2="0" y2="12" stroke="#4A90E2" stroke-width="2"/>
26
+ <line x1="-8" y1="-8" x2="8" y2="8" stroke="#4A90E2" stroke-width="2"/>
27
+ <line x1="-8" y1="8" x2="8" y2="-8" stroke="#4A90E2" stroke-width="2"/>
28
+
29
+ <!-- Snowflake decorations -->
30
+ <circle cx="-8" cy="0" r="2" fill="#FFFFFF"/>
31
+ <circle cx="8" cy="0" r="2" fill="#FFFFFF"/>
32
+ <circle cx="0" cy="-8" r="2" fill="#FFFFFF"/>
33
+ <circle cx="0" cy="8" r="2" fill="#FFFFFF"/>
34
+ </g>
35
+
36
+ <!-- Additional smaller snowflakes -->
37
+ <g transform="translate(80, 70) scale(0.7)">
38
+ <circle cx="0" cy="0" r="2" fill="#FFFFFF" stroke="#4A90E2" stroke-width="1"/>
39
+ <line x1="-8" y1="0" x2="8" y2="0" stroke="#4A90E2" stroke-width="1.5"/>
40
+ <line x1="0" y1="-8" x2="0" y2="8" stroke="#4A90E2" stroke-width="1.5"/>
41
+ </g>
42
+
43
+ <g transform="translate(120, 65) scale(0.5)">
44
+ <circle cx="0" cy="0" r="2" fill="#FFFFFF" stroke="#4A90E2" stroke-width="1"/>
45
+ <line x1="-8" y1="0" x2="8" y2="0" stroke="#4A90E2" stroke-width="1.5"/>
46
+ <line x1="0" y1="-8" x2="0" y2="8" stroke="#4A90E2" stroke-width="1.5"/>
47
+ </g>
48
+
49
+ <!-- Text -->
50
+ <text x="100" y="180" font-family="Arial, sans-serif" font-size="20" font-weight="bold" text-anchor="middle" fill="#2E5C8A">Snow-Flow</text>
51
+ </svg>
@@ -1 +1 @@
1
- {"version":3,"file":"snow-flow-config.d.ts","sourceRoot":"","sources":["../../src/config/snow-flow-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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I,MAAM;;;;;;MAET;IACD,IAAI,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAET;IACD,IAAI,MAAM;;;;;;;;;;;;;;;;;;;;;;MAET;IACD,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEN;IACD,IAAI,UAAU;;;;;;;;;;;;;;;;;;;;;;;;MAEb;IACD,IAAI,UAAU;;;;;;;;;;;;;;;;;;;;;;;MAEb;IACD,IAAI,MAAM;;;;;;;;;;;;MAET;IACD,IAAI,QAAQ;;;;;;;;;;MAEX;CACF;AAGD,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
@@ -15,122 +15,181 @@ const zod_1 = require("zod");
15
15
  // Configuration Schema using Zod for validation
16
16
  const ConfigSchema = zod_1.z.object({
17
17
  // System-wide settings
18
- system: zod_1.z.object({
18
+ system: zod_1.z
19
+ .object({
19
20
  environment: zod_1.z.enum(['development', 'staging', 'production']).default('development'),
20
21
  logLevel: zod_1.z.enum(['debug', 'info', 'warn', 'error']).default('info'),
21
- dataDir: zod_1.z.string().default(process.env.SNOW_FLOW_HOME || path_1.default.join(os_1.default.homedir(), '.snow-flow')),
22
+ dataDir: zod_1.z
23
+ .string()
24
+ .default(process.env.SNOW_FLOW_HOME || path_1.default.join(os_1.default.homedir(), '.snow-flow')),
22
25
  maxConcurrentOperations: zod_1.z.number().min(1).max(100).default(10),
23
26
  sessionTimeout: zod_1.z.number().min(300000).default(3600000), // 1 hour default
24
- }).default({}),
27
+ })
28
+ .default({}),
25
29
  // Agent configuration
26
- agents: zod_1.z.object({
27
- queen: zod_1.z.object({
30
+ agents: zod_1.z
31
+ .object({
32
+ queen: zod_1.z
33
+ .object({
28
34
  maxWorkerAgents: zod_1.z.number().min(1).max(50).default(10),
29
35
  spawnTimeout: zod_1.z.number().min(5000).default(30000),
30
36
  coordinationInterval: zod_1.z.number().min(1000).default(5000),
31
37
  decisionThreshold: zod_1.z.number().min(0).max(1).default(0.7),
32
38
  retryAttempts: zod_1.z.number().min(1).max(10).default(3),
33
- }).default({}),
34
- worker: zod_1.z.object({
39
+ })
40
+ .default({}),
41
+ worker: zod_1.z
42
+ .object({
35
43
  heartbeatInterval: zod_1.z.number().min(1000).default(10000),
36
44
  taskTimeout: zod_1.z.number().min(60000).default(300000), // 5 minutes
37
45
  maxMemoryUsage: zod_1.z.number().min(100).default(500), // MB
38
46
  autoShutdownIdle: zod_1.z.number().min(60000).default(600000), // 10 minutes
39
- }).default({}),
40
- specializations: zod_1.z.object({
41
- widgetCreator: zod_1.z.object({
47
+ })
48
+ .default({}),
49
+ specializations: zod_1.z
50
+ .object({
51
+ widgetCreator: zod_1.z
52
+ .object({
42
53
  enabled: zod_1.z.boolean().default(true),
43
54
  priority: zod_1.z.number().min(1).max(10).default(8),
44
- capabilities: zod_1.z.array(zod_1.z.string()).default(['html', 'css', 'javascript', 'servicenow-api']),
45
- }).default({}),
46
- flowBuilder: zod_1.z.object({
55
+ capabilities: zod_1.z
56
+ .array(zod_1.z.string())
57
+ .default(['html', 'css', 'javascript', 'servicenow-api']),
58
+ })
59
+ .default({}),
60
+ flowBuilder: zod_1.z
61
+ .object({
47
62
  enabled: zod_1.z.boolean().default(true),
48
63
  priority: zod_1.z.number().min(1).max(10).default(8),
49
- capabilities: zod_1.z.array(zod_1.z.string()).default(['flow-designer', 'triggers', 'actions', 'approvals']),
50
- }).default({}),
51
- scriptWriter: zod_1.z.object({
64
+ capabilities: zod_1.z
65
+ .array(zod_1.z.string())
66
+ .default(['flow-designer', 'triggers', 'actions', 'approvals']),
67
+ })
68
+ .default({}),
69
+ scriptWriter: zod_1.z
70
+ .object({
52
71
  enabled: zod_1.z.boolean().default(true),
53
72
  priority: zod_1.z.number().min(1).max(10).default(7),
54
- capabilities: zod_1.z.array(zod_1.z.string()).default(['business-rules', 'script-includes', 'client-scripts']),
55
- }).default({}),
56
- securityAgent: zod_1.z.object({
73
+ capabilities: zod_1.z
74
+ .array(zod_1.z.string())
75
+ .default(['business-rules', 'script-includes', 'client-scripts']),
76
+ })
77
+ .default({}),
78
+ securityAgent: zod_1.z
79
+ .object({
57
80
  enabled: zod_1.z.boolean().default(true),
58
81
  priority: zod_1.z.number().min(1).max(10).default(9),
59
82
  capabilities: zod_1.z.array(zod_1.z.string()).default(['acl', 'security-scan', 'compliance']),
60
- }).default({}),
61
- testAgent: zod_1.z.object({
83
+ })
84
+ .default({}),
85
+ testAgent: zod_1.z
86
+ .object({
62
87
  enabled: zod_1.z.boolean().default(true),
63
88
  priority: zod_1.z.number().min(1).max(10).default(6),
64
- capabilities: zod_1.z.array(zod_1.z.string()).default(['unit-test', 'integration-test', 'performance-test']),
65
- }).default({}),
66
- }).default({}),
67
- }).default({}),
89
+ capabilities: zod_1.z
90
+ .array(zod_1.z.string())
91
+ .default(['unit-test', 'integration-test', 'performance-test']),
92
+ })
93
+ .default({}),
94
+ })
95
+ .default({}),
96
+ })
97
+ .default({}),
68
98
  // Memory system configuration
69
- memory: zod_1.z.object({
99
+ memory: zod_1.z
100
+ .object({
70
101
  dbPath: zod_1.z.string().optional(),
71
- schema: zod_1.z.object({
102
+ schema: zod_1.z
103
+ .object({
72
104
  version: zod_1.z.string().default('1.0.0'),
73
105
  autoMigrate: zod_1.z.boolean().default(true),
74
- }).default({}),
75
- cache: zod_1.z.object({
106
+ })
107
+ .default({}),
108
+ cache: zod_1.z
109
+ .object({
76
110
  enabled: zod_1.z.boolean().default(true),
77
111
  maxSize: zod_1.z.number().min(10).default(100), // MB
78
112
  ttl: zod_1.z.number().min(60000).default(3600000), // 1 hour
79
- }).default({}),
80
- ttl: zod_1.z.object({
113
+ })
114
+ .default({}),
115
+ ttl: zod_1.z
116
+ .object({
81
117
  default: zod_1.z.number().min(3600000).default(86400000), // 24 hours
82
118
  session: zod_1.z.number().min(3600000).default(86400000), // 24 hours
83
119
  artifact: zod_1.z.number().min(86400000).default(604800000), // 7 days
84
120
  metric: zod_1.z.number().min(86400000).default(2592000000), // 30 days
85
- }).default({}),
86
- cleanup: zod_1.z.object({
121
+ })
122
+ .default({}),
123
+ cleanup: zod_1.z
124
+ .object({
87
125
  enabled: zod_1.z.boolean().default(true),
88
126
  interval: zod_1.z.number().min(3600000).default(86400000), // 24 hours
89
127
  retentionDays: zod_1.z.number().min(7).default(30),
90
- }).default({}),
91
- }).default({}),
128
+ })
129
+ .default({}),
130
+ })
131
+ .default({}),
92
132
  // MCP server configuration
93
- mcp: zod_1.z.object({
94
- servers: zod_1.z.object({
95
- deployment: zod_1.z.object({
133
+ mcp: zod_1.z
134
+ .object({
135
+ servers: zod_1.z
136
+ .object({
137
+ deployment: zod_1.z
138
+ .object({
96
139
  enabled: zod_1.z.boolean().default(true),
97
140
  port: zod_1.z.number().min(3000).max(65535).default(3001),
98
141
  host: zod_1.z.string().default('localhost'),
99
- }).default({}),
100
- intelligent: zod_1.z.object({
142
+ })
143
+ .default({}),
144
+ intelligent: zod_1.z
145
+ .object({
101
146
  enabled: zod_1.z.boolean().default(true),
102
147
  port: zod_1.z.number().min(3000).max(65535).default(3002),
103
148
  host: zod_1.z.string().default('localhost'),
104
- }).default({}),
105
- operations: zod_1.z.object({
149
+ })
150
+ .default({}),
151
+ operations: zod_1.z
152
+ .object({
106
153
  enabled: zod_1.z.boolean().default(true),
107
154
  port: zod_1.z.number().min(3000).max(65535).default(3003),
108
155
  host: zod_1.z.string().default('localhost'),
109
- }).default({}),
110
- flowComposer: zod_1.z.object({
156
+ })
157
+ .default({}),
158
+ flowComposer: zod_1.z
159
+ .object({
111
160
  enabled: zod_1.z.boolean().default(true),
112
161
  port: zod_1.z.number().min(3000).max(65535).default(3004),
113
162
  host: zod_1.z.string().default('localhost'),
114
- }).default({}),
115
- platformDevelopment: zod_1.z.object({
163
+ })
164
+ .default({}),
165
+ platformDevelopment: zod_1.z
166
+ .object({
116
167
  enabled: zod_1.z.boolean().default(true),
117
168
  port: zod_1.z.number().min(3000).max(65535).default(3005),
118
169
  host: zod_1.z.string().default('localhost'),
119
- }).default({}),
120
- }).default({}),
121
- transport: zod_1.z.object({
170
+ })
171
+ .default({}),
172
+ })
173
+ .default({}),
174
+ transport: zod_1.z
175
+ .object({
122
176
  type: zod_1.z.enum(['stdio', 'http', 'websocket']).default('stdio'),
123
177
  timeout: zod_1.z.number().min(0).default(30000), // Allow 0 to disable timeout, or set via MCP_TIMEOUT env var
124
178
  retryAttempts: zod_1.z.number().min(1).max(10).default(3),
125
179
  retryDelay: zod_1.z.number().min(1000).default(5000),
126
- }).default({}),
127
- authentication: zod_1.z.object({
180
+ })
181
+ .default({}),
182
+ authentication: zod_1.z
183
+ .object({
128
184
  required: zod_1.z.boolean().default(true),
129
185
  tokenExpiry: zod_1.z.number().min(3600000).default(86400000), // 24 hours
130
- }).default({}),
131
- }).default({}),
186
+ })
187
+ .default({}),
188
+ })
189
+ .default({}),
132
190
  // ServiceNow connection settings
133
- servicenow: zod_1.z.object({
191
+ servicenow: zod_1.z
192
+ .object({
134
193
  instance: zod_1.z.string().optional(),
135
194
  clientId: zod_1.z.string().optional(),
136
195
  clientSecret: zod_1.z.string().optional(),
@@ -139,63 +198,87 @@ const ConfigSchema = zod_1.z.object({
139
198
  authType: zod_1.z.enum(['oauth', 'basic']).default('oauth'),
140
199
  apiVersion: zod_1.z.string().default('now'),
141
200
  timeout: zod_1.z.number().min(5000).default(60000),
142
- retryConfig: zod_1.z.object({
201
+ retryConfig: zod_1.z
202
+ .object({
143
203
  maxRetries: zod_1.z.number().min(0).max(10).default(3),
144
204
  retryDelay: zod_1.z.number().min(1000).default(2000),
145
205
  backoffMultiplier: zod_1.z.number().min(1).max(5).default(2),
146
- }).default({}),
147
- cache: zod_1.z.object({
206
+ })
207
+ .default({}),
208
+ cache: zod_1.z
209
+ .object({
148
210
  enabled: zod_1.z.boolean().default(true),
149
211
  ttl: zod_1.z.number().min(60000).default(300000), // 5 minutes
150
212
  maxSize: zod_1.z.number().min(10).default(50), // MB
151
- }).default({}),
152
- oauth: zod_1.z.object({
213
+ })
214
+ .default({}),
215
+ oauth: zod_1.z
216
+ .object({
153
217
  redirectHost: zod_1.z.string().default('localhost'),
154
218
  redirectPort: zod_1.z.number().min(3000).max(65535).default(3005),
155
219
  redirectPath: zod_1.z.string().default('/callback'),
156
- }).default({}),
157
- }).default({}),
220
+ })
221
+ .default({}),
222
+ })
223
+ .default({}),
158
224
  // Monitoring configuration
159
- monitoring: zod_1.z.object({
160
- performance: zod_1.z.object({
225
+ monitoring: zod_1.z
226
+ .object({
227
+ performance: zod_1.z
228
+ .object({
161
229
  enabled: zod_1.z.boolean().default(true),
162
230
  sampleRate: zod_1.z.number().min(0).max(1).default(1),
163
231
  metricsRetention: zod_1.z.number().min(86400000).default(604800000), // 7 days
164
232
  aggregationInterval: zod_1.z.number().min(60000).default(300000), // 5 minutes
165
- }).default({}),
166
- health: zod_1.z.object({
233
+ })
234
+ .default({}),
235
+ health: zod_1.z
236
+ .object({
167
237
  enabled: zod_1.z.boolean().default(true),
168
238
  checkInterval: zod_1.z.number().min(30000).default(60000), // 1 minute
169
239
  endpoints: zod_1.z.array(zod_1.z.string()).default([]),
170
- thresholds: zod_1.z.object({
240
+ thresholds: zod_1.z
241
+ .object({
171
242
  memoryUsage: zod_1.z.number().min(0).max(1).default(0.8), // 80%
172
243
  cpuUsage: zod_1.z.number().min(0).max(1).default(0.8), // 80%
173
244
  errorRate: zod_1.z.number().min(0).max(1).default(0.05), // 5%
174
- }).default({}),
175
- }).default({}),
176
- alerts: zod_1.z.object({
245
+ })
246
+ .default({}),
247
+ })
248
+ .default({}),
249
+ alerts: zod_1.z
250
+ .object({
177
251
  enabled: zod_1.z.boolean().default(true),
178
252
  channels: zod_1.z.array(zod_1.z.enum(['console', 'file', 'webhook'])).default(['console']),
179
253
  webhookUrl: zod_1.z.string().url().optional(),
180
254
  severityThreshold: zod_1.z.enum(['info', 'warn', 'error']).default('warn'),
181
- }).default({}),
182
- }).default({}),
255
+ })
256
+ .default({}),
257
+ })
258
+ .default({}),
183
259
  // Health check configuration
184
- health: zod_1.z.object({
185
- checks: zod_1.z.object({
260
+ health: zod_1.z
261
+ .object({
262
+ checks: zod_1.z
263
+ .object({
186
264
  memory: zod_1.z.boolean().default(true),
187
265
  mcp: zod_1.z.boolean().default(true),
188
266
  servicenow: zod_1.z.boolean().default(true),
189
267
  queen: zod_1.z.boolean().default(true),
190
- }).default({}),
191
- thresholds: zod_1.z.object({
268
+ })
269
+ .default({}),
270
+ thresholds: zod_1.z
271
+ .object({
192
272
  responseTime: zod_1.z.number().min(100).default(5000), // ms
193
273
  memoryUsage: zod_1.z.number().min(100).default(1000), // MB
194
274
  queueSize: zod_1.z.number().min(10).default(100),
195
- }).default({}),
196
- }).default({}),
275
+ })
276
+ .default({}),
277
+ })
278
+ .default({}),
197
279
  // Feature flags
198
- features: zod_1.z.object({
280
+ features: zod_1.z
281
+ .object({
199
282
  autoPermissions: zod_1.z.boolean().default(false),
200
283
  smartDiscovery: zod_1.z.boolean().default(true),
201
284
  liveTesting: zod_1.z.boolean().default(true),
@@ -205,7 +288,8 @@ const ConfigSchema = zod_1.z.object({
205
288
  progressMonitoring: zod_1.z.boolean().default(true),
206
289
  neuralPatterns: zod_1.z.boolean().default(false),
207
290
  cognitiveAnalysis: zod_1.z.boolean().default(false),
208
- }).default({}),
291
+ })
292
+ .default({}),
209
293
  });
210
294
  class SnowFlowConfig {
211
295
  constructor(overrides) {
@@ -523,7 +607,7 @@ class SnowFlowConfig {
523
607
  env.mcp = env.mcp || {};
524
608
  env.mcp.servers = env.mcp.servers || {};
525
609
  // Apply to all servers
526
- ['deployment', 'intelligent', 'operations', 'flowComposer', 'platformDevelopment'].forEach(server => {
610
+ ['deployment', 'intelligent', 'operations', 'flowComposer', 'platformDevelopment'].forEach((server) => {
527
611
  env.mcp.servers[server] = env.mcp.servers[server] || {};
528
612
  env.mcp.servers[server].host = process.env.MCP_HOST;
529
613
  });
@@ -823,14 +907,30 @@ class SnowFlowConfig {
823
907
  }
824
908
  }
825
909
  // Convenience getters
826
- get system() { return this.config.system; }
827
- get agents() { return this.config.agents; }
828
- get memory() { return this.config.memory; }
829
- get mcp() { return this.config.mcp; }
830
- get servicenow() { return this.config.servicenow; }
831
- get monitoring() { return this.config.monitoring; }
832
- get health() { return this.config.health; }
833
- get features() { return this.config.features; }
910
+ get system() {
911
+ return this.config.system;
912
+ }
913
+ get agents() {
914
+ return this.config.agents;
915
+ }
916
+ get memory() {
917
+ return this.config.memory;
918
+ }
919
+ get mcp() {
920
+ return this.config.mcp;
921
+ }
922
+ get servicenow() {
923
+ return this.config.servicenow;
924
+ }
925
+ get monitoring() {
926
+ return this.config.monitoring;
927
+ }
928
+ get health() {
929
+ return this.config.health;
930
+ }
931
+ get features() {
932
+ return this.config.features;
933
+ }
834
934
  }
835
935
  exports.SnowFlowConfig = SnowFlowConfig;
836
936
  // Export singleton instance