snow-flow 3.0.9 → 3.0.10

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 (294) hide show
  1. package/claude-flow.bat +0 -0
  2. package/claude-flow.ps1 +0 -0
  3. package/dist/mcp/servicenow-automation-mcp.js +0 -0
  4. package/dist/mcp/servicenow-deployment-mcp.js +0 -0
  5. package/dist/mcp/servicenow-integration-mcp.js +0 -0
  6. package/dist/mcp/servicenow-mcp-server.js +0 -0
  7. package/dist/mcp/servicenow-operations-mcp.js +0 -0
  8. package/dist/mcp/servicenow-platform-development-mcp.js +0 -0
  9. package/dist/mcp/servicenow-progressive-indexer.js +0 -0
  10. package/dist/mcp/servicenow-reporting-analytics-mcp.js +133 -19
  11. package/dist/mcp/servicenow-security-compliance-mcp.js +0 -0
  12. package/dist/mcp/servicenow-update-set-mcp.js +0 -0
  13. package/dist/mcp/start-all-mcp-servers.js +0 -0
  14. package/dist/mcp/start-servicenow-mcp.js +0 -0
  15. package/memory/agents/README.md +1 -1
  16. package/memory/claude-flow-data.json +1 -1
  17. package/memory/sessions/README.md +1 -1
  18. package/package.json +2 -2
  19. package/.mcp.json +0 -22
  20. package/claude-flow.config.json +0 -20
  21. package/dist/agents/app-creator.agent.d.ts +0 -55
  22. package/dist/agents/app-creator.agent.js +0 -1292
  23. package/dist/agents/base/base-snow-agent.d.ts +0 -75
  24. package/dist/agents/base/base-snow-agent.js +0 -169
  25. package/dist/agents/base-snow-agent.d.ts +0 -63
  26. package/dist/agents/base-snow-agent.js +0 -296
  27. package/dist/agents/coordinator.d.ts +0 -200
  28. package/dist/agents/coordinator.js +0 -777
  29. package/dist/agents/flow-builder-agent.d.ts +0 -18
  30. package/dist/agents/flow-builder-agent.js +0 -197
  31. package/dist/agents/queen-403-handler.d.ts +0 -47
  32. package/dist/agents/queen-403-handler.js +0 -175
  33. package/dist/agents/queen-agent-example.d.ts +0 -23
  34. package/dist/agents/queen-agent-example.js +0 -240
  35. package/dist/agents/queen-agent.test.d.ts +0 -6
  36. package/dist/agents/script-generator.agent.d.ts +0 -32
  37. package/dist/agents/script-generator.agent.js +0 -772
  38. package/dist/agents/script-writer-agent.d.ts +0 -22
  39. package/dist/agents/script-writer-agent.js +0 -695
  40. package/dist/agents/security-agent.d.ts +0 -23
  41. package/dist/agents/security-agent.js +0 -619
  42. package/dist/agents/specialists/automation-specialist.agent.d.ts +0 -44
  43. package/dist/agents/specialists/automation-specialist.agent.js +0 -204
  44. package/dist/agents/specialists/data-specialist.agent.d.ts +0 -165
  45. package/dist/agents/specialists/data-specialist.agent.js +0 -484
  46. package/dist/agents/specialists/integration-specialist.agent.d.ts +0 -227
  47. package/dist/agents/specialists/integration-specialist.agent.js +0 -725
  48. package/dist/agents/specialists/reporting-specialist.agent.d.ts +0 -54
  49. package/dist/agents/specialists/reporting-specialist.agent.js +0 -193
  50. package/dist/agents/specialists/security-specialist.agent.d.ts +0 -85
  51. package/dist/agents/specialists/security-specialist.agent.js +0 -309
  52. package/dist/agents/teams/adaptive/adaptive-coordinator.agent.d.ts +0 -111
  53. package/dist/agents/teams/adaptive/adaptive-coordinator.agent.js +0 -383
  54. package/dist/agents/teams/base-team.d.ts +0 -72
  55. package/dist/agents/teams/base-team.js +0 -253
  56. package/dist/agents/teams/team-types.d.ts +0 -265
  57. package/dist/agents/teams/team-types.js +0 -3
  58. package/dist/agents/teams/widget/widget-architect.agent.d.ts +0 -61
  59. package/dist/agents/teams/widget/widget-architect.agent.js +0 -436
  60. package/dist/agents/teams/widget/widget-backend.agent.d.ts +0 -74
  61. package/dist/agents/teams/widget/widget-backend.agent.js +0 -1531
  62. package/dist/agents/teams/widget/widget-frontend.agent.d.ts +0 -67
  63. package/dist/agents/teams/widget/widget-frontend.agent.js +0 -1014
  64. package/dist/agents/teams/widget/widget-platform.agent.d.ts +0 -90
  65. package/dist/agents/teams/widget/widget-platform.agent.js +0 -1190
  66. package/dist/agents/teams/widget/widget-uiux.agent.d.ts +0 -107
  67. package/dist/agents/teams/widget/widget-uiux.agent.js +0 -1033
  68. package/dist/agents/test-agent.d.ts +0 -26
  69. package/dist/agents/test-agent.js +0 -734
  70. package/dist/agents/test-agents.d.ts +0 -7
  71. package/dist/agents/test-agents.js +0 -64
  72. package/dist/agents/ui-builder.agent.d.ts +0 -50
  73. package/dist/agents/ui-builder.agent.js +0 -1539
  74. package/dist/agents/widget-builder.agent.d.ts +0 -32
  75. package/dist/agents/widget-builder.agent.js +0 -439
  76. package/dist/agents/widget-creator-agent.d.ts +0 -18
  77. package/dist/agents/widget-creator-agent.js +0 -498
  78. package/dist/agents/workflow-designer.agent.d.ts +0 -31
  79. package/dist/agents/workflow-designer.agent.js +0 -583
  80. package/dist/api/error-handling.d.ts +0 -325
  81. package/dist/api/error-handling.js +0 -1488
  82. package/dist/api/flow-designer-api.d.ts +0 -167
  83. package/dist/api/flow-designer-api.js +0 -554
  84. package/dist/api/natural-language-mapper.d.ts +0 -124
  85. package/dist/api/natural-language-mapper.js +0 -501
  86. package/dist/api/performance-optimizer.d.ts +0 -240
  87. package/dist/api/performance-optimizer.js +0 -706
  88. package/dist/api/transaction-manager.d.ts +0 -189
  89. package/dist/api/transaction-manager.js +0 -576
  90. package/dist/assembly/team-assembler.d.ts +0 -140
  91. package/dist/assembly/team-assembler.js +0 -502
  92. package/dist/benchmark-performance.d.ts +0 -41
  93. package/dist/benchmark-performance.js +0 -230
  94. package/dist/cli/snow-flow-cli-integration.d.ts +0 -30
  95. package/dist/cli/snow-flow-cli-integration.js +0 -396
  96. package/dist/coordination/coordination-engine.d.ts +0 -41
  97. package/dist/coordination/coordination-engine.js +0 -324
  98. package/dist/coordination/coordination.test.d.ts +0 -6
  99. package/dist/coordination/example.d.ts +0 -31
  100. package/dist/coordination/example.js +0 -394
  101. package/dist/coordination/execution-patterns.d.ts +0 -43
  102. package/dist/coordination/execution-patterns.js +0 -507
  103. package/dist/coordination/factory.d.ts +0 -94
  104. package/dist/coordination/factory.js +0 -433
  105. package/dist/coordination/index.d.ts +0 -71
  106. package/dist/coordination/index.js +0 -135
  107. package/dist/coordination/progress-monitor.d.ts +0 -71
  108. package/dist/coordination/progress-monitor.js +0 -505
  109. package/dist/coordination/quality-gates.d.ts +0 -124
  110. package/dist/coordination/quality-gates.js +0 -577
  111. package/dist/coordination/shared-memory.d.ts +0 -39
  112. package/dist/coordination/shared-memory.js +0 -289
  113. package/dist/coordination/task-dependencies.d.ts +0 -50
  114. package/dist/coordination/task-dependencies.js +0 -407
  115. package/dist/coordination/team-coordinator.d.ts +0 -59
  116. package/dist/coordination/team-coordinator.js +0 -550
  117. package/dist/coordination/types.d.ts +0 -152
  118. package/dist/coordination/types.js +0 -3
  119. package/dist/mcp/mcp-wrapper.d.ts +0 -8
  120. package/dist/mcp/mcp-wrapper.js +0 -77
  121. package/dist/mcp/servicenow-flow-composer-enhanced.js +0 -396
  122. package/dist/mcp/servicenow-flow-composer-mcp.d.ts +0 -7
  123. package/dist/mcp/servicenow-flow-composer-mcp.js +0 -3103
  124. package/dist/mcp/servicenow-graph-memory-mcp.d.ts +0 -7
  125. package/dist/mcp/servicenow-intelligent-mcp.d.ts +0 -143
  126. package/dist/mcp/servicenow-intelligent-mcp.js +0 -4156
  127. package/dist/mcp/servicenow-xml-flow-mcp.d.ts +0 -53
  128. package/dist/mcp/servicenow-xml-flow-mcp.js +0 -1704
  129. package/dist/mcp/singleton-check.js +0 -31
  130. package/dist/mcp/test-simple-mcp.d.ts +0 -6
  131. package/dist/mcp/test-simple-mcp.js +0 -63
  132. package/dist/memory/hierarchical-memory-system.d.ts +0 -90
  133. package/dist/memory/hierarchical-memory-system.js +0 -400
  134. package/dist/memory/index.d.ts +0 -9
  135. package/dist/memory/index.js +0 -20
  136. package/dist/memory/mcp-integration-example.d.ts +0 -6
  137. package/dist/memory/mcp-integration-example.js +0 -281
  138. package/dist/memory/memory-client.d.ts +0 -199
  139. package/dist/memory/memory-client.js +0 -364
  140. package/dist/memory/memory-manager.d.ts +0 -29
  141. package/dist/memory/memory-manager.js +0 -280
  142. package/dist/memory/memory-operations.d.ts +0 -179
  143. package/dist/memory/memory-operations.js +0 -691
  144. package/dist/memory/memory-system.d.ts +0 -153
  145. package/dist/memory/memory-system.js +0 -651
  146. package/dist/memory/memory-test.d.ts +0 -6
  147. package/dist/memory/memory-test.js +0 -161
  148. package/dist/memory/snow-flow-memory-patterns.d.ts +0 -213
  149. package/dist/memory/snow-flow-memory-patterns.js +0 -200
  150. package/dist/memory/snow-memory.d.ts +0 -54
  151. package/dist/memory/snow-memory.js +0 -301
  152. package/dist/memory/swarm-memory.d.ts +0 -135
  153. package/dist/memory/swarm-memory.js +0 -378
  154. package/dist/optimization/flow-performance-optimizer.js +0 -723
  155. package/dist/orchestration/discovery/service-discovery.d.ts +0 -81
  156. package/dist/orchestration/discovery/service-discovery.js +0 -808
  157. package/dist/orchestration/distributed-orchestrator.d.ts +0 -131
  158. package/dist/orchestration/distributed-orchestrator.js +0 -712
  159. package/dist/orchestration/distribution/task-distribution-engine.d.ts +0 -53
  160. package/dist/orchestration/distribution/task-distribution-engine.js +0 -586
  161. package/dist/orchestration/flow-update-orchestrator.js +0 -648
  162. package/dist/orchestration/interfaces/distributed-orchestration.interface.d.ts +0 -606
  163. package/dist/orchestration/interfaces/distributed-orchestration.interface.js +0 -65
  164. package/dist/orchestration/protocols/mcpx-protocol.d.ts +0 -71
  165. package/dist/orchestration/protocols/mcpx-protocol.js +0 -668
  166. package/dist/orchestration/state/distributed-state-manager.d.ts +0 -89
  167. package/dist/orchestration/state/distributed-state-manager.js +0 -716
  168. package/dist/orchestrator/flow-composer.d.ts +0 -105
  169. package/dist/orchestrator/flow-composer.js +0 -404
  170. package/dist/orchestrator/flow-pattern-templates.d.ts +0 -260
  171. package/dist/orchestrator/flow-pattern-templates.js +0 -908
  172. package/dist/orchestrator/flow-subflow-decision-engine.d.ts +0 -202
  173. package/dist/orchestrator/flow-subflow-decision-engine.js +0 -769
  174. package/dist/orchestrator/flow-validation-engine.d.ts +0 -169
  175. package/dist/orchestrator/flow-validation-engine.js +0 -913
  176. package/dist/orchestrator/snow-orchestrator.d.ts +0 -49
  177. package/dist/orchestrator/snow-orchestrator.js +0 -235
  178. package/dist/orchestrator/subflow-creation-handler.d.ts +0 -230
  179. package/dist/orchestrator/subflow-creation-handler.js +0 -791
  180. package/dist/patterns/adaptive-patterns.d.ts +0 -140
  181. package/dist/patterns/adaptive-patterns.js +0 -549
  182. package/dist/queen/advanced-integration-test.d.ts +0 -48
  183. package/dist/queen/advanced-integration-test.js +0 -473
  184. package/dist/queen/integration-example.d.ts +0 -82
  185. package/dist/queen/integration-example.js +0 -219
  186. package/dist/queen/integration-test.d.ts +0 -72
  187. package/dist/queen/integration-test.js +0 -563
  188. package/dist/queen/mock-mcp-client.d.ts +0 -71
  189. package/dist/queen/mock-mcp-client.js +0 -317
  190. package/dist/queen/run-integration-tests.d.ts +0 -9
  191. package/dist/queen/run-integration-tests.js +0 -27
  192. package/dist/sparc/coordinators/adaptive-coordinator.d.ts +0 -54
  193. package/dist/sparc/coordinators/adaptive-coordinator.js +0 -367
  194. package/dist/sparc/coordinators/team-coordinator.d.ts +0 -66
  195. package/dist/sparc/coordinators/team-coordinator.js +0 -402
  196. package/dist/sparc/modes/team-modes.d.ts +0 -33
  197. package/dist/sparc/modes/team-modes.js +0 -399
  198. package/dist/sparc/teams/application-team.d.ts +0 -73
  199. package/dist/sparc/teams/application-team.js +0 -463
  200. package/dist/sparc/teams/flow-team.d.ts +0 -67
  201. package/dist/sparc/teams/flow-team.js +0 -373
  202. package/dist/sparc/teams/widget-team.d.ts +0 -61
  203. package/dist/sparc/teams/widget-team.js +0 -280
  204. package/dist/specialists/app-specialists.d.ts +0 -93
  205. package/dist/specialists/app-specialists.js +0 -1639
  206. package/dist/specialists/base-specialist.d.ts +0 -19
  207. package/dist/specialists/base-specialist.js +0 -54
  208. package/dist/specialists/flow-specialists.d.ts +0 -113
  209. package/dist/specialists/flow-specialists.js +0 -1787
  210. package/dist/specialists/individual-specialists.d.ts +0 -67
  211. package/dist/specialists/individual-specialists.js +0 -632
  212. package/dist/specialists/widget-specialists.d.ts +0 -70
  213. package/dist/specialists/widget-specialists.js +0 -1264
  214. package/dist/src/utils/agent-detector.js +0 -655
  215. package/dist/teams/adaptive-team.d.ts +0 -81
  216. package/dist/teams/adaptive-team.js +0 -1153
  217. package/dist/teams/application-team.d.ts +0 -30
  218. package/dist/teams/application-team.js +0 -547
  219. package/dist/teams/base-team.d.ts +0 -55
  220. package/dist/teams/base-team.js +0 -243
  221. package/dist/teams/flow-team.d.ts +0 -28
  222. package/dist/teams/flow-team.js +0 -525
  223. package/dist/teams/widget-team.d.ts +0 -26
  224. package/dist/teams/widget-team.js +0 -459
  225. package/dist/templates/flow-template-system.js +0 -625
  226. package/dist/test-fetch-incidents.d.ts +0 -2
  227. package/dist/test-fetch-incidents.js +0 -84
  228. package/dist/test-incident-access.d.ts +0 -2
  229. package/dist/test-incident-access.js +0 -72
  230. package/dist/test-iphone-flow.js +0 -189
  231. package/dist/test-limit-problem.d.ts +0 -2
  232. package/dist/test-limit-problem.js +0 -60
  233. package/dist/test-ml-batch-fix.d.ts +0 -2
  234. package/dist/test-ml-batch-fix.js +0 -104
  235. package/dist/test-ml-batch.d.ts +0 -2
  236. package/dist/test-ml-batch.js +0 -87
  237. package/dist/test-ml-query.d.ts +0 -2
  238. package/dist/test-ml-query.js +0 -100
  239. package/dist/test-ml-training-fix.d.ts +0 -12
  240. package/dist/test-ml-training-fix.js +0 -113
  241. package/dist/test-ml-training.d.ts +0 -2
  242. package/dist/test-ml-training.js +0 -32
  243. package/dist/test-operations-query.d.ts +0 -2
  244. package/dist/test-operations-query.js +0 -84
  245. package/dist/test-performance-query.d.ts +0 -2
  246. package/dist/test-performance-query.js +0 -52
  247. package/dist/test-singleton-protection.d.ts +0 -8
  248. package/dist/test-singleton-protection.js +0 -110
  249. package/dist/test-smart-limits.d.ts +0 -13
  250. package/dist/test-smart-limits.js +0 -100
  251. package/dist/test-snow-query-incidents.d.ts +0 -2
  252. package/dist/test-snow-query-incidents.js +0 -66
  253. package/dist/test-universal-query.d.ts +0 -2
  254. package/dist/test-universal-query.js +0 -106
  255. package/dist/testing/flow-testing-automation.js +0 -641
  256. package/dist/utils/complete-flow-xml-generator.js +0 -1285
  257. package/dist/utils/file-storage-fallback.d.ts +0 -62
  258. package/dist/utils/file-storage-fallback.js +0 -289
  259. package/dist/utils/flow-api-discovery.d.ts +0 -151
  260. package/dist/utils/flow-api-discovery.js +0 -439
  261. package/dist/utils/flow-examples.js +0 -720
  262. package/dist/utils/flow-structure-builder.js +0 -677
  263. package/dist/utils/flow-xml-generator.d.ts +0 -41
  264. package/dist/utils/flow-xml-generator.js +0 -258
  265. package/dist/utils/improved-flow-xml-generator.js +0 -820
  266. package/dist/utils/mcp-process-manager.backup.d.ts +0 -58
  267. package/dist/utils/mcp-process-manager.backup.js +0 -220
  268. package/dist/utils/mcp-singleton-enforcer.d.ts +0 -36
  269. package/dist/utils/mcp-singleton-enforcer.js +0 -201
  270. package/dist/utils/mcp-timeout-fix.d.ts +0 -53
  271. package/dist/utils/mcp-timeout-fix.js +0 -221
  272. package/dist/utils/migrate-claude-flow.d.ts +0 -22
  273. package/dist/utils/migrate-claude-flow.js +0 -120
  274. package/dist/utils/scope-utils.d.ts +0 -72
  275. package/dist/utils/scope-utils.js +0 -386
  276. package/dist/utils/snow-oauth-old.d.ts +0 -65
  277. package/dist/utils/snow-oauth-old.js +0 -345
  278. package/dist/utils/xml-first-flow-generator.js +0 -513
  279. package/memory/servicenow_artifacts/000d9224c895221055906c7518aa2d3d.json +0 -30
  280. package/memory/servicenow_artifacts/0196b66173303010e46b4a2214f6a7a2.json +0 -36
  281. package/memory/servicenow_artifacts/125e5d1d837e2a102a7ea130ceaad397.json +0 -30
  282. package/memory/servicenow_artifacts/7637c1f2b7112210a5e5911cde11a972.json +0 -30
  283. package/memory/servicenow_artifacts/default_documentation_tables_1754056582292.json +0 -55
  284. package/memory/servicenow_artifacts/default_documentation_tables_1754057477189.json +0 -55
  285. package/memory/update-set-sessions/01f82af583faea102a7ea130ceaad3d4.json +0 -9
  286. package/memory/update-set-sessions/27718fb983faea102a7ea130ceaad34b.json +0 -9
  287. package/memory/update-set-sessions/412e9bf6833e22502a7ea130ceaad30a.json +0 -8
  288. package/memory/update-set-sessions/66fc5a79837aea102a7ea130ceaad3ab.json +0 -9
  289. package/memory/update-set-sessions/71a30ff5837eea102a7ea130ceaad37f.json +0 -9
  290. package/memory/update-set-sessions/74fba27983faea102a7ea130ceaad3bd.json +0 -9
  291. package/memory/update-set-sessions/a0b147b5837eea102a7ea130ceaad344.json +0 -58
  292. package/memory/update-set-sessions/b13f5eb983baea102a7ea130ceaad33e.json +0 -9
  293. package/reports/swarm-auto-centralized-1752649029776.json +0 -13
  294. package/src/memory/README.md +0 -240
@@ -1,606 +0,0 @@
1
- /**
2
- * Distributed Orchestration Interfaces
3
- *
4
- * Complete interface definitions for the distributed orchestration system
5
- * that coordinates external Claude Code instances.
6
- */
7
- export declare enum InstanceStatus {
8
- ACTIVE = "active",
9
- IDLE = "idle",
10
- BUSY = "busy",
11
- MAINTENANCE = "maintenance",
12
- OFFLINE = "offline",
13
- UNREACHABLE = "unreachable"
14
- }
15
- export declare enum ConsistencyLevel {
16
- EVENTUAL = "eventual",
17
- STRONG = "strong",
18
- WEAK = "weak"
19
- }
20
- export declare enum OrchestrationMode {
21
- INTERNAL_ONLY = "internal",
22
- EXTERNAL_ONLY = "external",
23
- HYBRID = "hybrid",
24
- AUTO_BALANCE = "auto"
25
- }
26
- export declare enum MCPXCommand {
27
- ORCHESTRATE_SESSION_START = "mcpx.orchestrate.session.start",
28
- ORCHESTRATE_SESSION_END = "mcpx.orchestrate.session.end",
29
- ORCHESTRATE_TASK_ASSIGN = "mcpx.orchestrate.task.assign",
30
- ORCHESTRATE_TASK_COMPLETE = "mcpx.orchestrate.task.complete",
31
- COORDINATE_STATE_SYNC = "mcpx.coordinate.state.sync",
32
- COORDINATE_DEPENDENCY_RESOLVE = "mcpx.coordinate.dependency.resolve",
33
- COORDINATE_QUALITY_GATE = "mcpx.coordinate.quality.gate",
34
- DISTRIBUTE_TASK_SPLIT = "mcpx.distribute.task.split",
35
- DISTRIBUTE_LOAD_BALANCE = "mcpx.distribute.load.balance",
36
- DISTRIBUTE_RESULT_MERGE = "mcpx.distribute.result.merge",
37
- HEALTH_CHECK = "mcpx.health.check",
38
- METRICS_REPORT = "mcpx.metrics.report",
39
- STATUS_UPDATE = "mcpx.status.update"
40
- }
41
- export interface PerformanceMetrics {
42
- averageResponseTime: number;
43
- throughput: number;
44
- errorRate: number;
45
- cpuUtilization: number;
46
- memoryUtilization: number;
47
- taskCompletionRate: number;
48
- }
49
- export interface AgentCapability {
50
- domain: 'servicenow' | 'development' | 'analysis' | 'security' | 'integration' | 'reporting';
51
- specialization: string[];
52
- proficiencyLevel: 'basic' | 'intermediate' | 'expert' | 'specialist';
53
- resourceRequirements: ResourceRequirement[];
54
- supportedMCPCommands: string[];
55
- maxConcurrentTasks: number;
56
- }
57
- export interface ResourceRequirement {
58
- type: 'memory' | 'compute' | 'servicenow_access' | 'external_api' | 'storage';
59
- amount?: number;
60
- unit?: string;
61
- metadata?: Record<string, any>;
62
- }
63
- export interface ClaudeCodeInstance {
64
- id: string;
65
- endpoint: string;
66
- capabilities: AgentCapability[];
67
- status: InstanceStatus;
68
- metadata: {
69
- region: string;
70
- version: string;
71
- maxConcurrentTasks: number;
72
- specializations: string[];
73
- performanceMetrics: PerformanceMetrics;
74
- tags: Record<string, string>;
75
- };
76
- healthcheck: {
77
- lastSeen: Date;
78
- responseTime: number;
79
- errorRate: number;
80
- consecutiveFailures: number;
81
- };
82
- authentication: {
83
- apiKey?: string;
84
- certificate?: string;
85
- tokenEndpoint?: string;
86
- };
87
- }
88
- export interface MCPMessage {
89
- jsonrpc: '2.0';
90
- id?: string | number;
91
- method?: string;
92
- params?: any;
93
- result?: any;
94
- error?: {
95
- code: number;
96
- message: string;
97
- data?: any;
98
- };
99
- }
100
- export interface OrchestrationContext {
101
- sessionId: string;
102
- executionId: string;
103
- parentTaskId?: string;
104
- coordinatorInstance: string;
105
- sharedState: SharedStateReference;
106
- qualityGates: QualityGateConfig[];
107
- timeout: number;
108
- retryPolicy: RetryPolicy;
109
- }
110
- export interface CoordinationMetadata {
111
- dependencies: string[];
112
- synchronizationPoints: SyncPoint[];
113
- rollbackStrategy: RollbackStrategy;
114
- progressReporting: ProgressConfig;
115
- affinityRules: AffinityRule[];
116
- }
117
- export interface DistributionInfo {
118
- taskPartition: TaskPartition;
119
- loadBalancing: LoadBalancingStrategy;
120
- preferredRegions: string[];
121
- dataLocality: DataLocalityConfig;
122
- }
123
- export interface MCPXMessage extends MCPMessage {
124
- orchestration?: OrchestrationContext;
125
- coordination?: CoordinationMetadata;
126
- distribution?: DistributionInfo;
127
- timestamp: number;
128
- source: string;
129
- target?: string;
130
- priority: 'low' | 'normal' | 'high' | 'critical';
131
- }
132
- export interface MCPXResponse {
133
- success: boolean;
134
- result?: any;
135
- error?: MCPXError;
136
- metadata?: {
137
- processingTime: number;
138
- instanceId: string;
139
- resourceUsage: ResourceUsage;
140
- };
141
- }
142
- export interface MCPXError {
143
- code: string;
144
- message: string;
145
- details?: any;
146
- retryable: boolean;
147
- suggestedRetryDelay?: number;
148
- }
149
- export interface TaskSpecification {
150
- id: string;
151
- name: string;
152
- description: string;
153
- type: 'widget' | 'flow' | 'integration' | 'analysis' | 'deployment';
154
- requirements: TaskRequirements;
155
- dependencies: string[];
156
- outputs: string[];
157
- priority: 'low' | 'medium' | 'high' | 'critical';
158
- estimatedDuration?: number;
159
- maxRetries?: number;
160
- deadline?: Date;
161
- affinityRules?: AffinityRule[];
162
- }
163
- export interface TaskRequirements {
164
- capabilities: string[];
165
- resources: ResourceRequirement[];
166
- constraints: Constraint[];
167
- inputs: Record<string, any>;
168
- environment: EnvironmentRequirement[];
169
- }
170
- export interface EnvironmentRequirement {
171
- type: 'servicenow_instance' | 'database' | 'external_api' | 'file_system';
172
- configuration: Record<string, any>;
173
- required: boolean;
174
- }
175
- export interface Constraint {
176
- type: 'time' | 'resource' | 'dependency' | 'quality' | 'security';
177
- value: any;
178
- description: string;
179
- enforced: boolean;
180
- }
181
- export interface DistributionPlan {
182
- taskId: string;
183
- assignments: AgentAssignment[];
184
- executionOrder: ExecutionPhase[];
185
- estimated: {
186
- totalDuration: number;
187
- parallelization: number;
188
- resourceUsage: ResourceUsage;
189
- };
190
- fallbackPlan?: DistributionPlan;
191
- }
192
- export interface AgentAssignment {
193
- agentId: string;
194
- taskPortion: TaskPortion;
195
- priority: number;
196
- estimatedStart: Date;
197
- estimatedEnd: Date;
198
- resourceAllocation: ResourceAllocation[];
199
- }
200
- export interface TaskPortion {
201
- id: string;
202
- parentTaskId: string;
203
- work: any;
204
- inputs: Record<string, any>;
205
- expectedOutputs: string[];
206
- dependencies: string[];
207
- }
208
- export interface ExecutionPhase {
209
- id: string;
210
- type: 'sequential' | 'parallel' | 'conditional';
211
- tasks: string[];
212
- estimatedDuration: number;
213
- dependencies: string[];
214
- conditions?: ExecutionCondition[];
215
- }
216
- export interface ExecutionCondition {
217
- type: 'success' | 'failure' | 'timeout' | 'quality_gate';
218
- reference: string;
219
- action: 'continue' | 'skip' | 'retry' | 'abort';
220
- }
221
- export interface LoadBalancingStrategy {
222
- name: string;
223
- type: 'round_robin' | 'weighted' | 'capability_based' | 'geographic' | 'ai_optimized';
224
- parameters: Record<string, any>;
225
- }
226
- export interface LoadBalancingContext {
227
- currentLoad: Map<string, number>;
228
- historicalPerformance: Map<string, PerformanceMetrics>;
229
- geographicDistribution: Map<string, string>;
230
- affinityRules: AffinityRule[];
231
- }
232
- export interface AffinityRule {
233
- type: 'agent_affinity' | 'anti_affinity' | 'data_locality' | 'cost_optimization';
234
- scope: 'task' | 'session' | 'user' | 'global';
235
- rules: AffinityConstraint[];
236
- weight: number;
237
- }
238
- export interface AffinityConstraint {
239
- property: string;
240
- operator: 'equals' | 'contains' | 'matches' | 'in_range';
241
- value: any;
242
- required: boolean;
243
- }
244
- export interface DistributedSharedMemory {
245
- store(key: string, value: any, ttl?: number, consistency?: ConsistencyLevel): Promise<void>;
246
- retrieve(key: string, consistency?: ConsistencyLevel): Promise<any>;
247
- delete(key: string): Promise<void>;
248
- subscribe(pattern: string, callback: MemoryChangeCallback): Promise<string>;
249
- unsubscribe(subscriptionId: string): Promise<void>;
250
- synchronize(targetInstances: string[], keys?: string[]): Promise<SyncResult>;
251
- }
252
- export interface MemoryValue {
253
- value: any;
254
- timestamp: number;
255
- version: number;
256
- instanceId: string;
257
- metadata?: {
258
- ttl?: number;
259
- checksum: string;
260
- tags?: string[];
261
- };
262
- }
263
- export interface SharedStateReference {
264
- namespace: string;
265
- keys: string[];
266
- consistencyLevel: ConsistencyLevel;
267
- synchronizationStrategy: 'push' | 'pull' | 'bidirectional';
268
- }
269
- export type MemoryChangeCallback = (key: string, value: MemoryValue, changeType: 'create' | 'update' | 'delete') => void;
270
- export interface SyncResult {
271
- success: boolean;
272
- synchronized: string[];
273
- conflicts: MemoryConflict[];
274
- errors: SyncError[];
275
- duration: number;
276
- }
277
- export interface MemoryConflict {
278
- key: string;
279
- localValue: MemoryValue;
280
- remoteValues: Map<string, MemoryValue>;
281
- resolutionStrategy: ConflictResolutionStrategy;
282
- }
283
- export interface ConflictResolutionStrategy {
284
- type: 'last_write_wins' | 'vector_clock' | 'merge' | 'manual';
285
- parameters?: Record<string, any>;
286
- }
287
- export interface SyncError {
288
- instanceId: string;
289
- error: string;
290
- retryable: boolean;
291
- }
292
- export interface ServiceRegistry {
293
- register(service: ServiceDefinition): Promise<void>;
294
- deregister(serviceId: string): Promise<void>;
295
- findServices(serviceName: string, criteria?: DiscoveryCriteria): Promise<ServiceDefinition[]>;
296
- watchServices(serviceName: string, callback: ServiceChangeCallback): Promise<string>;
297
- unwatchServices(watchId: string): Promise<void>;
298
- }
299
- export interface ServiceDefinition {
300
- id: string;
301
- name: string;
302
- endpoint: string;
303
- metadata: Record<string, any>;
304
- health: HealthConfig;
305
- tags: string[];
306
- capabilities: AgentCapability[];
307
- registeredAt: Date;
308
- lastSeen: Date;
309
- }
310
- export interface HealthConfig {
311
- check: string;
312
- interval: number;
313
- timeout: number;
314
- retries: number;
315
- gracePeriod: number;
316
- }
317
- export interface DiscoveryCriteria {
318
- tags?: string[];
319
- capabilities?: string[];
320
- regions?: string[];
321
- minVersion?: string;
322
- maxVersion?: string;
323
- healthStatus?: 'healthy' | 'unhealthy' | 'any';
324
- filters?: DiscoveryFilter[];
325
- }
326
- export interface DiscoveryFilter {
327
- property: string;
328
- operator: 'equals' | 'contains' | 'greater_than' | 'less_than';
329
- value: any;
330
- }
331
- export type ServiceChangeCallback = (event: ServiceEvent) => void;
332
- export interface ServiceEvent {
333
- type: 'registered' | 'deregistered' | 'health_changed' | 'updated';
334
- service: ServiceDefinition;
335
- timestamp: Date;
336
- }
337
- export interface MCPServerInfo {
338
- id: string;
339
- name: string;
340
- endpoint: string;
341
- version: string;
342
- capabilities: MCPCapability[];
343
- metadata: Record<string, any>;
344
- discoveredAt: Date;
345
- lastValidated: Date;
346
- }
347
- export interface MCPCapability {
348
- type: 'tool' | 'resource' | 'prompt';
349
- name: string;
350
- description: string;
351
- schema?: any;
352
- metadata?: Record<string, any>;
353
- }
354
- export interface MCPRequirements {
355
- capabilities: string[];
356
- version?: string;
357
- performance?: PerformanceRequirement[];
358
- }
359
- export interface PerformanceRequirement {
360
- metric: 'response_time' | 'throughput' | 'availability';
361
- threshold: number;
362
- unit: string;
363
- }
364
- export interface OrchestrationSession {
365
- id: string;
366
- name: string;
367
- description: string;
368
- createdAt: Date;
369
- updatedAt: Date;
370
- status: SessionStatus;
371
- config: SessionConfig;
372
- state: SessionState;
373
- participants: SessionParticipant[];
374
- metrics: SessionMetrics;
375
- }
376
- export declare enum SessionStatus {
377
- INITIALIZING = "initializing",
378
- ACTIVE = "active",
379
- PAUSED = "paused",
380
- COMPLETING = "completing",
381
- COMPLETED = "completed",
382
- FAILED = "failed",
383
- CANCELLED = "cancelled"
384
- }
385
- export interface SessionConfig {
386
- mode: OrchestrationMode;
387
- maxConcurrentTasks: number;
388
- timeout: number;
389
- retryPolicy: RetryPolicy;
390
- qualityGates: boolean;
391
- progressMonitoring: boolean;
392
- stateReplication: boolean;
393
- rollbackEnabled: boolean;
394
- }
395
- export interface SessionState {
396
- sharedMemory: Map<string, any>;
397
- taskResults: Map<string, any>;
398
- executionPlan: DistributionPlan;
399
- currentPhase: string;
400
- completedTasks: string[];
401
- failedTasks: string[];
402
- }
403
- export interface SessionParticipant {
404
- instanceId: string;
405
- role: 'coordinator' | 'worker' | 'observer';
406
- joinedAt: Date;
407
- lastActivity: Date;
408
- taskAssignments: string[];
409
- }
410
- export interface SessionMetrics {
411
- tasksCompleted: number;
412
- tasksFailed: number;
413
- averageTaskDuration: number;
414
- totalExecutionTime: number;
415
- resourceUsage: ResourceUsage;
416
- qualityScores: Map<string, number>;
417
- }
418
- export interface QualityGateConfig {
419
- name: string;
420
- taskIds: string[];
421
- gates: QualityGate[];
422
- blocking: boolean;
423
- timeout: number;
424
- }
425
- export interface QualityGate {
426
- name: string;
427
- type: 'validation' | 'performance' | 'security' | 'compliance';
428
- blocking: boolean;
429
- validator: QualityValidator;
430
- }
431
- export interface QualityValidator {
432
- validate(result: any, context: ValidationContext): Promise<ValidationResult>;
433
- }
434
- export interface ValidationContext {
435
- taskId: string;
436
- sessionId: string;
437
- requirements: TaskRequirements;
438
- previousResults: Record<string, any>;
439
- }
440
- export interface ValidationResult {
441
- passed: boolean;
442
- score?: number;
443
- error?: string;
444
- warnings?: string[];
445
- suggestions?: string[];
446
- metadata?: Record<string, any>;
447
- }
448
- export interface ProgressMonitor {
449
- startMonitoring(sessionId: string): Promise<void>;
450
- stopMonitoring(sessionId: string): Promise<void>;
451
- getProgress(sessionId: string): Promise<ProgressStatus>;
452
- subscribe(sessionId: string, callback: ProgressCallback): Promise<string>;
453
- unsubscribe(subscriptionId: string): Promise<void>;
454
- }
455
- export interface ProgressStatus {
456
- sessionId: string;
457
- total: number;
458
- completed: number;
459
- failed: number;
460
- inProgress: number;
461
- percentage: number;
462
- estimatedCompletion?: Date;
463
- currentPhase?: string;
464
- bottlenecks?: Bottleneck[];
465
- throughput: number;
466
- }
467
- export interface Bottleneck {
468
- type: 'resource' | 'dependency' | 'performance' | 'quality_gate';
469
- description: string;
470
- affectedTasks: string[];
471
- severity: 'low' | 'medium' | 'high' | 'critical';
472
- suggestedAction?: string;
473
- }
474
- export type ProgressCallback = (progress: ProgressStatus) => void;
475
- export interface RetryPolicy {
476
- maxAttempts: number;
477
- backoffStrategy: 'linear' | 'exponential' | 'fixed';
478
- initialDelay: number;
479
- maxDelay: number;
480
- multiplier: number;
481
- retryableErrors: string[];
482
- }
483
- export interface RollbackStrategy {
484
- type: 'full' | 'partial' | 'compensating';
485
- triggers: RollbackTrigger[];
486
- actions: RollbackAction[];
487
- }
488
- export interface RollbackTrigger {
489
- condition: 'task_failure' | 'quality_gate_failure' | 'timeout' | 'manual';
490
- threshold?: number;
491
- scope: 'task' | 'phase' | 'session';
492
- }
493
- export interface RollbackAction {
494
- type: 'restore_state' | 'undo_changes' | 'compensate' | 'notify';
495
- parameters: Record<string, any>;
496
- order: number;
497
- }
498
- export interface ResourceUsage {
499
- cpu: number;
500
- memory: number;
501
- network: number;
502
- storage: number;
503
- apiCalls: number;
504
- customMetrics?: Record<string, number>;
505
- }
506
- export interface ResourceAllocation {
507
- type: string;
508
- amount: number;
509
- unit: string;
510
- guaranteed: boolean;
511
- priority: number;
512
- }
513
- export interface SyncPoint {
514
- id: string;
515
- type: 'barrier' | 'checkpoint' | 'milestone';
516
- description: string;
517
- waitFor: string[];
518
- timeout: number;
519
- }
520
- export interface ProgressConfig {
521
- reportingInterval: number;
522
- enableRealTimeUpdates: boolean;
523
- includeDetailedMetrics: boolean;
524
- notificationThresholds: number[];
525
- }
526
- export interface TaskPartition {
527
- strategy: 'data_parallel' | 'task_parallel' | 'pipeline' | 'custom';
528
- partitions: TaskPortion[];
529
- mergeStrategy: 'concatenate' | 'aggregate' | 'custom';
530
- }
531
- export interface DataLocalityConfig {
532
- enableDataLocality: boolean;
533
- dataLocation: string[];
534
- movementCost: number;
535
- cachingStrategy: 'local' | 'distributed' | 'hybrid';
536
- }
537
- export interface DistributedOrchestrator {
538
- createSession(config: SessionConfig): Promise<OrchestrationSession>;
539
- getSession(sessionId: string): Promise<OrchestrationSession | null>;
540
- terminateSession(sessionId: string): Promise<void>;
541
- listSessions(): Promise<OrchestrationSession[]>;
542
- registerAgent(agent: ClaudeCodeInstance): Promise<void>;
543
- deregisterAgent(agentId: string): Promise<void>;
544
- getAvailableAgents(criteria?: DiscoveryCriteria): Promise<ClaudeCodeInstance[]>;
545
- getAgentHealth(agentId: string): Promise<HealthStatus>;
546
- orchestrateTask(task: TaskSpecification, session: OrchestrationSession): Promise<OrchestrationResult>;
547
- distributeTask(task: TaskSpecification, agents: ClaudeCodeInstance[]): Promise<DistributionResult>;
548
- monitorExecution(sessionId: string): AsyncIterable<ExecutionUpdate>;
549
- pauseExecution(sessionId: string): Promise<void>;
550
- resumeExecution(sessionId: string): Promise<void>;
551
- cancelExecution(sessionId: string, reason: string): Promise<void>;
552
- getSharedState(sessionId: string): Promise<SharedState>;
553
- updateSharedState(sessionId: string, updates: StateUpdate[]): Promise<void>;
554
- syncState(sessionId: string, targetAgents: string[]): Promise<SyncResult>;
555
- discoverServices(criteria: DiscoveryCriteria): Promise<ServiceDefinition[]>;
556
- watchServices(criteria: DiscoveryCriteria, callback: ServiceChangeCallback): Promise<string>;
557
- }
558
- export interface OrchestrationResult {
559
- sessionId: string;
560
- success: boolean;
561
- results: Record<string, any>;
562
- metrics: SessionMetrics;
563
- errors: OrchestrationError[];
564
- warnings: string[];
565
- recommendations?: string[];
566
- }
567
- export interface DistributionResult {
568
- taskId: string;
569
- plan: DistributionPlan;
570
- assignments: AgentAssignment[];
571
- estimatedCompletion: Date;
572
- }
573
- export interface ExecutionUpdate {
574
- sessionId: string;
575
- type: 'progress' | 'completion' | 'error' | 'state_change';
576
- timestamp: Date;
577
- data: any;
578
- }
579
- export interface SharedState {
580
- sessionId: string;
581
- data: Map<string, any>;
582
- version: number;
583
- lastUpdated: Date;
584
- }
585
- export interface StateUpdate {
586
- key: string;
587
- value: any;
588
- operation: 'set' | 'delete' | 'merge';
589
- metadata?: Record<string, any>;
590
- }
591
- export interface OrchestrationError {
592
- code: string;
593
- message: string;
594
- taskId?: string;
595
- agentId?: string;
596
- timestamp: Date;
597
- retryable: boolean;
598
- context?: Record<string, any>;
599
- }
600
- export interface HealthStatus {
601
- status: 'healthy' | 'degraded' | 'unhealthy';
602
- lastCheck: Date;
603
- metrics: PerformanceMetrics;
604
- issues?: string[];
605
- }
606
- //# sourceMappingURL=distributed-orchestration.interface.d.ts.map
@@ -1,65 +0,0 @@
1
- "use strict";
2
- /**
3
- * Distributed Orchestration Interfaces
4
- *
5
- * Complete interface definitions for the distributed orchestration system
6
- * that coordinates external Claude Code instances.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.SessionStatus = exports.MCPXCommand = exports.OrchestrationMode = exports.ConsistencyLevel = exports.InstanceStatus = void 0;
10
- // ========================================
11
- // Core Types and Enums
12
- // ========================================
13
- var InstanceStatus;
14
- (function (InstanceStatus) {
15
- InstanceStatus["ACTIVE"] = "active";
16
- InstanceStatus["IDLE"] = "idle";
17
- InstanceStatus["BUSY"] = "busy";
18
- InstanceStatus["MAINTENANCE"] = "maintenance";
19
- InstanceStatus["OFFLINE"] = "offline";
20
- InstanceStatus["UNREACHABLE"] = "unreachable";
21
- })(InstanceStatus || (exports.InstanceStatus = InstanceStatus = {}));
22
- var ConsistencyLevel;
23
- (function (ConsistencyLevel) {
24
- ConsistencyLevel["EVENTUAL"] = "eventual";
25
- ConsistencyLevel["STRONG"] = "strong";
26
- ConsistencyLevel["WEAK"] = "weak";
27
- })(ConsistencyLevel || (exports.ConsistencyLevel = ConsistencyLevel = {}));
28
- var OrchestrationMode;
29
- (function (OrchestrationMode) {
30
- OrchestrationMode["INTERNAL_ONLY"] = "internal";
31
- OrchestrationMode["EXTERNAL_ONLY"] = "external";
32
- OrchestrationMode["HYBRID"] = "hybrid";
33
- OrchestrationMode["AUTO_BALANCE"] = "auto";
34
- })(OrchestrationMode || (exports.OrchestrationMode = OrchestrationMode = {}));
35
- var MCPXCommand;
36
- (function (MCPXCommand) {
37
- // Orchestration Commands
38
- MCPXCommand["ORCHESTRATE_SESSION_START"] = "mcpx.orchestrate.session.start";
39
- MCPXCommand["ORCHESTRATE_SESSION_END"] = "mcpx.orchestrate.session.end";
40
- MCPXCommand["ORCHESTRATE_TASK_ASSIGN"] = "mcpx.orchestrate.task.assign";
41
- MCPXCommand["ORCHESTRATE_TASK_COMPLETE"] = "mcpx.orchestrate.task.complete";
42
- // Coordination Commands
43
- MCPXCommand["COORDINATE_STATE_SYNC"] = "mcpx.coordinate.state.sync";
44
- MCPXCommand["COORDINATE_DEPENDENCY_RESOLVE"] = "mcpx.coordinate.dependency.resolve";
45
- MCPXCommand["COORDINATE_QUALITY_GATE"] = "mcpx.coordinate.quality.gate";
46
- // Distribution Commands
47
- MCPXCommand["DISTRIBUTE_TASK_SPLIT"] = "mcpx.distribute.task.split";
48
- MCPXCommand["DISTRIBUTE_LOAD_BALANCE"] = "mcpx.distribute.load.balance";
49
- MCPXCommand["DISTRIBUTE_RESULT_MERGE"] = "mcpx.distribute.result.merge";
50
- // Health & Monitoring
51
- MCPXCommand["HEALTH_CHECK"] = "mcpx.health.check";
52
- MCPXCommand["METRICS_REPORT"] = "mcpx.metrics.report";
53
- MCPXCommand["STATUS_UPDATE"] = "mcpx.status.update";
54
- })(MCPXCommand || (exports.MCPXCommand = MCPXCommand = {}));
55
- var SessionStatus;
56
- (function (SessionStatus) {
57
- SessionStatus["INITIALIZING"] = "initializing";
58
- SessionStatus["ACTIVE"] = "active";
59
- SessionStatus["PAUSED"] = "paused";
60
- SessionStatus["COMPLETING"] = "completing";
61
- SessionStatus["COMPLETED"] = "completed";
62
- SessionStatus["FAILED"] = "failed";
63
- SessionStatus["CANCELLED"] = "cancelled";
64
- })(SessionStatus || (exports.SessionStatus = SessionStatus = {}));
65
- //# sourceMappingURL=distributed-orchestration.interface.js.map