@theaiinc/yggdrasil 0.0.1

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,62 @@
1
+ import { AgentInfo, RequestContext } from '@/types';
2
+ /**
3
+ * Load balancer for distributing requests across healthy agents
4
+ * Implements multiple algorithms and session affinity
5
+ */
6
+ export declare class LoadBalancer {
7
+ private logger;
8
+ private currentIndex;
9
+ private sessionMap;
10
+ private algorithm;
11
+ private sessionAffinity;
12
+ private stickySessionTimeout;
13
+ constructor(algorithm?: 'round-robin' | 'least-connections' | 'ip-hash' | 'weighted', sessionAffinity?: boolean, stickySessionTimeout?: number);
14
+ /**
15
+ * Select an agent for the given request
16
+ */
17
+ selectAgent(agents: AgentInfo[], context: RequestContext): AgentInfo | null;
18
+ /**
19
+ * Round-robin algorithm
20
+ */
21
+ private roundRobin;
22
+ /**
23
+ * Least connections algorithm
24
+ */
25
+ private leastConnections;
26
+ /**
27
+ * IP hash algorithm (uses request ID as hash input)
28
+ */
29
+ private ipHash;
30
+ /**
31
+ * Weighted algorithm (based on agent health and performance)
32
+ */
33
+ private weighted;
34
+ /**
35
+ * Simple hash function for IP hash algorithm
36
+ */
37
+ private hashCode;
38
+ /**
39
+ * Clean up stale session mappings
40
+ */
41
+ private cleanupStaleSessions;
42
+ /**
43
+ * Remove session mapping
44
+ */
45
+ removeSession(sessionId: string): void;
46
+ /**
47
+ * Get session statistics
48
+ */
49
+ getSessionStats(): {
50
+ totalSessions: number;
51
+ sessionMapSize: number;
52
+ };
53
+ /**
54
+ * Update algorithm
55
+ */
56
+ setAlgorithm(algorithm: 'round-robin' | 'least-connections' | 'ip-hash' | 'weighted'): void;
57
+ /**
58
+ * Update session affinity settings
59
+ */
60
+ setSessionAffinity(enabled: boolean, timeout?: number): void;
61
+ }
62
+ //# sourceMappingURL=load-balancer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-balancer.d.ts","sourceRoot":"","sources":["../../../src/services/load-balancer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGpD;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,UAAU,CAA6B;IAC/C,OAAO,CAAC,SAAS,CAIF;IACf,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,oBAAoB,CAAS;gBAGnC,SAAS,GACL,aAAa,GACb,mBAAmB,GACnB,SAAS,GACT,UAA0B,EAC9B,eAAe,GAAE,OAAc,EAC/B,oBAAoB,GAAE,MAAgB;IAOxC;;OAEG;IACI,WAAW,CAChB,MAAM,EAAE,SAAS,EAAE,EACnB,OAAO,EAAE,cAAc,GACtB,SAAS,GAAG,IAAI;IA2EnB;;OAEG;IACH,OAAO,CAAC,UAAU;IASlB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAQxB;;OAEG;IACH,OAAO,CAAC,MAAM;IASd;;OAEG;IACH,OAAO,CAAC,QAAQ;IA+BhB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAUhB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA+B5B;;OAEG;IACI,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI7C;;OAEG;IACI,eAAe,IAAI;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE;IAO3E;;OAEG;IACI,YAAY,CACjB,SAAS,EAAE,aAAa,GAAG,mBAAmB,GAAG,SAAS,GAAG,UAAU,GACtE,IAAI;IAKP;;OAEG;IACI,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;CAUpE"}
@@ -0,0 +1,221 @@
1
+ import { getLogger } from './logger';
2
+ /**
3
+ * Load balancer for distributing requests across healthy agents
4
+ * Implements multiple algorithms and session affinity
5
+ */
6
+ export class LoadBalancer {
7
+ logger = getLogger();
8
+ currentIndex = 0;
9
+ sessionMap = new Map(); // sessionId -> agentId
10
+ algorithm;
11
+ sessionAffinity;
12
+ stickySessionTimeout;
13
+ constructor(algorithm = 'round-robin', sessionAffinity = true, stickySessionTimeout = 3600000 // 1 hour
14
+ ) {
15
+ this.algorithm = algorithm;
16
+ this.sessionAffinity = sessionAffinity;
17
+ this.stickySessionTimeout = stickySessionTimeout;
18
+ }
19
+ /**
20
+ * Select an agent for the given request
21
+ */
22
+ selectAgent(agents, context) {
23
+ if (agents.length === 0) {
24
+ this.logger.warn('No healthy agents available');
25
+ return null;
26
+ }
27
+ // Filter to only healthy agents
28
+ const healthyAgents = agents.filter(agent => agent.health.status === 'healthy');
29
+ if (healthyAgents.length === 0) {
30
+ this.logger.warn('No healthy agents available');
31
+ return null;
32
+ }
33
+ // Check session affinity first
34
+ if (this.sessionAffinity && context.sessionId) {
35
+ const sessionAgentId = this.sessionMap.get(context.sessionId);
36
+ if (sessionAgentId) {
37
+ const sessionAgent = healthyAgents.find(agent => agent.id === sessionAgentId);
38
+ if (sessionAgent) {
39
+ this.logger.debug('Using session affinity', {
40
+ sessionId: context.sessionId,
41
+ agentId: sessionAgent.id,
42
+ });
43
+ return sessionAgent;
44
+ }
45
+ else {
46
+ // Remove stale session mapping
47
+ this.sessionMap.delete(context.sessionId);
48
+ }
49
+ }
50
+ }
51
+ // Select agent based on algorithm
52
+ let selectedAgent = null;
53
+ try {
54
+ switch (this.algorithm) {
55
+ case 'round-robin':
56
+ selectedAgent = this.roundRobin(healthyAgents);
57
+ break;
58
+ case 'least-connections':
59
+ selectedAgent = this.leastConnections(healthyAgents);
60
+ break;
61
+ case 'ip-hash':
62
+ selectedAgent = this.ipHash(healthyAgents, context);
63
+ break;
64
+ case 'weighted':
65
+ selectedAgent = this.weighted(healthyAgents);
66
+ break;
67
+ default:
68
+ selectedAgent = this.roundRobin(healthyAgents);
69
+ }
70
+ }
71
+ catch (error) {
72
+ this.logger.error('Agent selection failed', {
73
+ error,
74
+ algorithm: this.algorithm,
75
+ });
76
+ return null;
77
+ }
78
+ // Update session mapping if session affinity is enabled
79
+ if (this.sessionAffinity && context.sessionId && selectedAgent) {
80
+ this.sessionMap.set(context.sessionId, selectedAgent.id);
81
+ // Clean up old session mappings periodically
82
+ this.cleanupStaleSessions();
83
+ }
84
+ return selectedAgent;
85
+ }
86
+ /**
87
+ * Round-robin algorithm
88
+ */
89
+ roundRobin(agents) {
90
+ const agent = agents[this.currentIndex % agents.length];
91
+ if (!agent) {
92
+ throw new Error('No agents available for round-robin selection');
93
+ }
94
+ this.currentIndex = (this.currentIndex + 1) % agents.length;
95
+ return agent;
96
+ }
97
+ /**
98
+ * Least connections algorithm
99
+ */
100
+ leastConnections(agents) {
101
+ return agents.reduce((min, current) => current.metrics.activeConnections < min.metrics.activeConnections
102
+ ? current
103
+ : min);
104
+ }
105
+ /**
106
+ * IP hash algorithm (uses request ID as hash input)
107
+ */
108
+ ipHash(agents, context) {
109
+ const hash = this.hashCode(context.id);
110
+ const agent = agents[Math.abs(hash) % agents.length];
111
+ if (!agent) {
112
+ throw new Error('No agents available for IP hash selection');
113
+ }
114
+ return agent;
115
+ }
116
+ /**
117
+ * Weighted algorithm (based on agent health and performance)
118
+ */
119
+ weighted(agents) {
120
+ const weights = agents.map(agent => {
121
+ let weight = 1;
122
+ // Reduce weight for agents with high error rates
123
+ if (agent.metrics.errorRate > 0.1) {
124
+ weight *= 0.5;
125
+ }
126
+ // Reduce weight for agents with high response times
127
+ if (agent.metrics.averageResponseTime > 1000) {
128
+ weight *= 0.7;
129
+ }
130
+ // Increase weight for agents with low CPU usage
131
+ if (agent.metrics.cpuUsage < 0.5) {
132
+ weight *= 1.2;
133
+ }
134
+ return { agent, weight };
135
+ });
136
+ // Sort by weight and return the highest weighted agent
137
+ weights.sort((a, b) => b.weight - a.weight);
138
+ const selectedAgent = weights[0]?.agent;
139
+ if (!selectedAgent) {
140
+ throw new Error('No agents available for weighted selection');
141
+ }
142
+ return selectedAgent;
143
+ }
144
+ /**
145
+ * Simple hash function for IP hash algorithm
146
+ */
147
+ hashCode(str) {
148
+ let hash = 0;
149
+ for (let i = 0; i < str.length; i++) {
150
+ const char = str.charCodeAt(i);
151
+ hash = (hash << 5) - hash + char;
152
+ hash = hash & hash; // Convert to 32-bit integer
153
+ }
154
+ return hash;
155
+ }
156
+ /**
157
+ * Clean up stale session mappings
158
+ */
159
+ cleanupStaleSessions() {
160
+ const staleSessions = [];
161
+ // This is a simplified cleanup - in a real implementation,
162
+ // you'd want to track session creation times
163
+ if (this.sessionMap.size > 1000) {
164
+ // If we have too many sessions, clean up some randomly
165
+ const sessions = Array.from(this.sessionMap.keys());
166
+ const toRemove = Math.floor(sessions.length * 0.1); // Remove 10%
167
+ for (let i = 0; i < toRemove; i++) {
168
+ const randomIndex = Math.floor(Math.random() * sessions.length);
169
+ const sessionId = sessions[randomIndex];
170
+ if (sessionId) {
171
+ staleSessions.push(sessionId);
172
+ sessions.splice(randomIndex, 1);
173
+ }
174
+ }
175
+ }
176
+ staleSessions.forEach(sessionId => {
177
+ this.sessionMap.delete(sessionId);
178
+ });
179
+ if (staleSessions.length > 0) {
180
+ this.logger.debug('Cleaned up stale sessions', {
181
+ count: staleSessions.length,
182
+ });
183
+ }
184
+ }
185
+ /**
186
+ * Remove session mapping
187
+ */
188
+ removeSession(sessionId) {
189
+ this.sessionMap.delete(sessionId);
190
+ }
191
+ /**
192
+ * Get session statistics
193
+ */
194
+ getSessionStats() {
195
+ return {
196
+ totalSessions: this.sessionMap.size,
197
+ sessionMapSize: this.sessionMap.size,
198
+ };
199
+ }
200
+ /**
201
+ * Update algorithm
202
+ */
203
+ setAlgorithm(algorithm) {
204
+ this.algorithm = algorithm;
205
+ this.logger.info('Load balancer algorithm updated', { algorithm });
206
+ }
207
+ /**
208
+ * Update session affinity settings
209
+ */
210
+ setSessionAffinity(enabled, timeout) {
211
+ this.sessionAffinity = enabled;
212
+ if (timeout) {
213
+ this.stickySessionTimeout = timeout;
214
+ }
215
+ this.logger.info('Session affinity settings updated', {
216
+ enabled: this.sessionAffinity,
217
+ timeout: this.stickySessionTimeout,
218
+ });
219
+ }
220
+ }
221
+ //# sourceMappingURL=load-balancer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-balancer.js","sourceRoot":"","sources":["../../../src/services/load-balancer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;;GAGG;AACH,MAAM,OAAO,YAAY;IACf,MAAM,GAAG,SAAS,EAAE,CAAC;IACrB,YAAY,GAAG,CAAC,CAAC;IACjB,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC,CAAC,uBAAuB;IAC/D,SAAS,CAIF;IACP,eAAe,CAAU;IACzB,oBAAoB,CAAS;IAErC,YACE,YAIiB,aAAa,EAC9B,kBAA2B,IAAI,EAC/B,uBAA+B,OAAO,CAAC,SAAS;;QAEhD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAED;;OAEG;IACI,WAAW,CAChB,MAAmB,EACnB,OAAuB;QAEvB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAChD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,gCAAgC;QAChC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACjC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,SAAS,CAC3C,CAAC;QAEF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAChD,OAAO,IAAI,CAAC;QACd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AC,OAAO,CAAC,SAAS,CAAC,EAAE;YAChC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE;gBAC7C,KAAK,EAAE,aAAa,CAAC,MAAM;aAC5B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,SAAiB;QACpC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACI,eAAe;QACpB,OAAO;YACL,aAAa,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI;YACnC,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI;SACrC,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,YAAY,CACjB,SAAuE;QAEvE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACI,kBAAkB,CAAC,OAAgB,EAAE,OAAgB;QAC1D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;QAC/B,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC;QACtC,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mCAAmC,EAAE;YACpD,OAAO,EAAE,IAAI,CAAC,eAAe;YAC7B,OAAO,EAAE,IAAI,CAAC,oBAAoB;SACnC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,36 @@
1
+ import winston from 'winston';
2
+ import { LoggerConfig, LogLevel } from '@/types';
3
+ /**
4
+ * Centralized logging service for Yggdrasil orchestration system
5
+ * Uses Winston for stable, well-documented logging
6
+ */
7
+ export declare class Logger {
8
+ private logger;
9
+ private static instance;
10
+ private constructor();
11
+ static getInstance(config?: LoggerConfig): Logger;
12
+ log(level: LogLevel, message: string, meta?: Record<string, unknown>): void;
13
+ error(message: string, meta?: Record<string, unknown>): void;
14
+ warn(message: string, meta?: Record<string, unknown>): void;
15
+ info(message: string, meta?: Record<string, unknown>): void;
16
+ debug(message: string, meta?: Record<string, unknown>): void;
17
+ child(meta: Record<string, unknown>): winston.Logger;
18
+ }
19
+ /**
20
+ * Convenience function to get logger instance
21
+ */
22
+ export declare const getLogger: (config?: LoggerConfig) => Logger;
23
+ /**
24
+ * Structured logging helpers for common operations
25
+ */
26
+ export declare class StructuredLogger {
27
+ private logger;
28
+ constructor(logger: Logger);
29
+ agentHealthCheck(agentId: string, healthy: boolean, responseTime: number, error?: string): void;
30
+ requestRouted(requestId: string, agentId: string, sessionId?: string): void;
31
+ scalingEvent(currentInstances: number, targetInstances: number, reason: string): void;
32
+ circuitBreakerOpened(agentId: string, failureCount: number): void;
33
+ queueMetrics(queueDepth: number, oldestItemAge: number): void;
34
+ performanceMetrics(agentId: string, metrics: Record<string, unknown>): void;
35
+ }
36
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/services/logger.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEjD;;;GAGG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAEhC,OAAO;WAiDO,WAAW,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM;IAYjD,GAAG,CACR,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAA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ACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,IAAI;CAOR"}
@@ -0,0 +1,126 @@
1
+ import winston from 'winston';
2
+ /**
3
+ * Centralized logging service for Yggdrasil orchestration system
4
+ * Uses Winston for stable, well-documented logging
5
+ */
6
+ export class Logger {
7
+ logger;
8
+ static instance;
9
+ constructor(config) {
10
+ const transports = [
11
+ new winston.transports.Console({
12
+ format: winston.format.combine(winston.format.timestamp(), winston.format.errors({ stack: true }), config.format === 'json'
13
+ ? winston.format.json()
14
+ : winston.format.combine(winston.format.colorize(), winston.format.simple())),
15
+ }),
16
+ ];
17
+ // Add file transport for production
18
+ if (config.transports.includes('file')) {
19
+ transports.push(new winston.transports.File({
20
+ filename: 'logs/error.log',
21
+ level: 'error',
22
+ format: winston.format.combine(winston.format.timestamp(), winston.format.json()),
23
+ }), new winston.transports.File({
24
+ filename: 'logs/combined.log',
25
+ format: winston.format.combine(winston.format.timestamp(), winston.format.json()),
26
+ }));
27
+ }
28
+ this.logger = winston.createLogger({
29
+ level: config.level,
30
+ format: winston.format.combine(winston.format.timestamp(), winston.format.errors({ stack: true }), winston.format.json()),
31
+ defaultMeta: { service: 'yggdrasil' },
32
+ transports,
33
+ });
34
+ }
35
+ static getInstance(config) {
36
+ if (!Logger.instance) {
37
+ const defaultConfig = {
38
+ level: 'info',
39
+ format: 'json',
40
+ transports: ['console'],
41
+ };
42
+ Logger.instance = new Logger(config || defaultConfig);
43
+ }
44
+ return Logger.instance;
45
+ }
46
+ log(level, message, meta) {
47
+ this.logger.log(level, message, meta);
48
+ }
49
+ error(message, meta) {
50
+ this.logger.error(message, meta);
51
+ }
52
+ warn(message, meta) {
53
+ this.logger.warn(message, meta);
54
+ }
55
+ info(message, meta) {
56
+ this.logger.info(message, meta);
57
+ }
58
+ debug(message, meta) {
59
+ this.logger.debug(message, meta);
60
+ }
61
+ child(meta) {
62
+ return this.logger.child(meta);
63
+ }
64
+ }
65
+ /**
66
+ * Convenience function to get logger instance
67
+ */
68
+ export const getLogger = (config) => {
69
+ return Logger.getInstance(config);
70
+ };
71
+ /**
72
+ * Structured logging helpers for common operations
73
+ */
74
+ export class StructuredLogger {
75
+ logger;
76
+ constructor(logger) {
77
+ this.logger = logger;
78
+ }
79
+ agentHealthCheck(agentId, healthy, responseTime, error) {
80
+ this.logger.info('Agent health check completed', {
81
+ agentId,
82
+ healthy,
83
+ responseTime,
84
+ error,
85
+ operation: 'health_check',
86
+ });
87
+ }
88
+ requestRouted(requestId, agentId, sessionId) {
89
+ this.logger.info('Request routed to agent', {
90
+ requestId,
91
+ agentId,
92
+ sessionId,
93
+ operation: 'request_routing',
94
+ });
95
+ }
96
+ scalingEvent(currentInstances, targetInstances, reason) {
97
+ this.logger.info('Scaling event triggered', {
98
+ currentInstances,
99
+ targetInstances,
100
+ reason,
101
+ operation: 'scaling',
102
+ });
103
+ }
104
+ circuitBreakerOpened(agentId, failureCount) {
105
+ this.logger.warn('Circuit breaker opened for agent', {
106
+ agentId,
107
+ failureCount,
108
+ operation: 'circuit_breaker',
109
+ });
110
+ }
111
+ queueMetrics(queueDepth, oldestItemAge) {
112
+ this.logger.debug('Queue metrics', {
113
+ queueDepth,
114
+ oldestItemAge,
115
+ operation: 'queue_metrics',
116
+ });
117
+ }
118
+ performanceMetrics(agentId, metrics) {
119
+ this.logger.debug('Performance metrics collected', {
120
+ agentId,
121
+ metrics,
122
+ operation: 'performance_metrics',
123
+ });
124
+ }
125
+ }
126
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/services/logger.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B;;;GAGG;AACH,MAAM,OAAO,MAAM;IACT,MAAM,CAAiB;IACvB,MAAM,CAAC,QAAQ,CAAS;IAEhC,YAAoB,MAAoB;QACtC,MAAM,UAAU,GAAwB;YACtC,IAAI,OAAO,CAAC,UAAU,CAAC,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eAAe,EAAE;YACjC,UAAU;YACV,aAAa;YACb,SAAS,EAAE,eAAe;SAC3B,CAAC,CAAC;IACL,CAAC;IAEM,kBAAkB,CACvB,OAAe,EACf,OAAgC;QAEhC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE;YACjD,OAAO;YACP,OAAO;YACP,SAAS,EAAE,qBAAqB;SACjC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Core types for the Yggdrasil orchestration system
3
+ */
4
+ export interface AgentInfo {
5
+ id: string;
6
+ url: string;
7
+ health: AgentHealth;
8
+ metrics: AgentMetrics;
9
+ lastSeen: Date;
10
+ sessionId?: string;
11
+ }
12
+ export interface AgentHealth {
13
+ status: 'healthy' | 'unhealthy' | 'unknown';
14
+ lastCheck: Date;
15
+ responseTime: number;
16
+ errorCount: number;
17
+ consecutiveFailures: number;
18
+ }
19
+ export interface AgentMetrics {
20
+ cpuUsage: number;
21
+ memoryUsage: number;
22
+ requestCount: number;
23
+ errorRate: number;
24
+ averageResponseTime: number;
25
+ activeConnections: number;
26
+ }
27
+ export interface RequestContext {
28
+ id: string;
29
+ sessionId?: string;
30
+ timestamp: Date;
31
+ priority: 'low' | 'normal' | 'high' | 'critical';
32
+ retryCount: number;
33
+ maxRetries: number;
34
+ timeout: number;
35
+ }
36
+ export interface OrchestrationConfig {
37
+ maxConcurrency: number;
38
+ minInstances: number;
39
+ maxInstances: number;
40
+ healthCheckInterval: number;
41
+ retryBackoffMs: number;
42
+ maxRetries: number;
43
+ sessionAffinity: boolean;
44
+ circuitBreakerThreshold: number;
45
+ queueTimeoutMs: number;
46
+ }
47
+ export interface LoadBalancerConfig {
48
+ algorithm: 'round-robin' | 'least-connections' | 'ip-hash' | 'weighted';
49
+ healthCheckPath: string;
50
+ healthCheckInterval: number;
51
+ sessionAffinity: boolean;
52
+ stickySessionTimeout: number;
53
+ }
54
+ export interface MonitoringConfig {
55
+ prometheusEnabled: boolean;
56
+ prometheusPort: number;
57
+ grafanaEnabled: boolean;
58
+ grafanaPort: number;
59
+ customMetrics: boolean;
60
+ alertingEnabled: boolean;
61
+ }
62
+ export interface QueueItem {
63
+ id: string;
64
+ request: Record<string, unknown>;
65
+ context: RequestContext;
66
+ timestamp: Date;
67
+ priority: number;
68
+ }
69
+ export interface CircuitBreakerState {
70
+ isOpen: boolean;
71
+ failureCount: number;
72
+ lastFailureTime: Date;
73
+ nextAttemptTime: Date;
74
+ }
75
+ export interface ScalingMetrics {
76
+ currentInstances: number;
77
+ targetInstances: number;
78
+ cpuUtilization: number;
79
+ memoryUtilization: number;
80
+ queueDepth: number;
81
+ errorRate: number;
82
+ responseTime: number;
83
+ }
84
+ export interface HealthCheckResult {
85
+ agentId: string;
86
+ healthy: boolean;
87
+ responseTime: number;
88
+ error?: string;
89
+ timestamp: Date;
90
+ }
91
+ export interface SessionInfo {
92
+ sessionId: string;
93
+ agentId: string;
94
+ createdAt: Date;
95
+ lastActivity: Date;
96
+ requestCount: number;
97
+ }
98
+ export interface MetricsData {
99
+ timestamp: Date;
100
+ agentId: string;
101
+ metrics: AgentMetrics;
102
+ scalingMetrics: ScalingMetrics;
103
+ }
104
+ export type LogLevel = 'error' | 'warn' | 'info' | 'debug';
105
+ export interface LoggerConfig {
106
+ level: LogLevel;
107
+ format: 'json' | 'simple';
108
+ transports: string[];
109
+ }
110
+ export interface DockerConfig {
111
+ image: string;
112
+ tag: string;
113
+ ports: number[];
114
+ environment: Record<string, string>;
115
+ volumes: string[];
116
+ resourceLimits: {
117
+ cpu: string;
118
+ memory: string;
119
+ };
120
+ }
121
+ export interface CloudRunConfig {
122
+ serviceName: string;
123
+ region: string;
124
+ maxConcurrency: number;
125
+ minInstances: number;
126
+ maxInstances: number;
127
+ cpu: number;
128
+ memory: string;
129
+ timeout: number;
130
+ }
131
+ export interface DeploymentConfig {
132
+ environment: 'local' | 'staging' | 'production';
133
+ docker: DockerConfig;
134
+ cloudRun?: CloudRunConfig;
135
+ monitoring: MonitoringConfig;
136
+ orchestration: OrchestrationConfig;
137
+ loadBalancer: LoadBalancerConfig;
138
+ }
139
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,IAAI,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC5C,SAAS,EAAE,IAAI,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,YAA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YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,GAAG,SAAS,GAAG,YAAY,CAAC;IAChD,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,aAAa,EAAE,mBAAmB,CAAC;IACnC,YAAY,EAAE,kBAAkB,CAAC;CAClC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Core types for the Yggdrasil orchestration system
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}