@autonomaai/agent-core 1.0.2
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/base-agent.d.ts +112 -0
- package/dist/base-agent.d.ts.map +1 -0
- package/dist/base-agent.js +173 -0
- package/dist/base-agent.js.map +1 -0
- package/dist/core.d.ts +81 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +633 -0
- package/dist/core.js.map +1 -0
- package/dist/error-handler.d.ts +78 -0
- package/dist/error-handler.d.ts.map +1 -0
- package/dist/error-handler.js +129 -0
- package/dist/error-handler.js.map +1 -0
- package/dist/factory.d.ts +60 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +621 -0
- package/dist/factory.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/streaming.d.ts +24 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/streaming.js +36 -0
- package/dist/streaming.js.map +1 -0
- package/dist/trading/formatters.d.ts +167 -0
- package/dist/trading/formatters.d.ts.map +1 -0
- package/dist/trading/formatters.js +271 -0
- package/dist/trading/formatters.js.map +1 -0
- package/dist/trading/index.d.ts +9 -0
- package/dist/trading/index.d.ts.map +1 -0
- package/dist/trading/index.js +10 -0
- package/dist/trading/index.js.map +1 -0
- package/dist/trading/types.d.ts +205 -0
- package/dist/trading/types.d.ts.map +1 -0
- package/dist/trading/types.js +7 -0
- package/dist/trading/types.js.map +1 -0
- package/dist/trading/utils.d.ts +120 -0
- package/dist/trading/utils.d.ts.map +1 -0
- package/dist/trading/utils.js +291 -0
- package/dist/trading/utils.js.map +1 -0
- package/dist/trading/validation.d.ts +40 -0
- package/dist/trading/validation.d.ts.map +1 -0
- package/dist/trading/validation.js +247 -0
- package/dist/trading/validation.js.map +1 -0
- package/dist/types.d.ts +282 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +21 -0
- package/dist/types.js.map +1 -0
- package/package.json +57 -0
- package/src/base-agent.ts +263 -0
- package/src/core.ts +792 -0
- package/src/error-handler.ts +166 -0
- package/src/factory.ts +687 -0
- package/src/global.d.ts +12 -0
- package/src/index.ts +24 -0
- package/src/streaming.ts +50 -0
- package/src/trading/formatters.ts +363 -0
- package/src/trading/index.ts +10 -0
- package/src/trading/types.ts +263 -0
- package/src/trading/utils.ts +355 -0
- package/src/trading/validation.ts +321 -0
- package/src/types.ts +402 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standardized Error Handling for autonoma Agents
|
|
3
|
+
*
|
|
4
|
+
* Provides consistent error handling, logging, and user-friendly messages
|
|
5
|
+
* across all agent implementations.
|
|
6
|
+
*/
|
|
7
|
+
export interface ErrorMetadata {
|
|
8
|
+
executionTime: number;
|
|
9
|
+
errorType: string;
|
|
10
|
+
agentName: string;
|
|
11
|
+
timestamp: string;
|
|
12
|
+
}
|
|
13
|
+
export interface StandardErrorResponse {
|
|
14
|
+
error: string;
|
|
15
|
+
timestamp: string;
|
|
16
|
+
metadata?: ErrorMetadata;
|
|
17
|
+
statusCode?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for agent-specific error messages
|
|
21
|
+
*/
|
|
22
|
+
export declare const AGENT_ERROR_CONFIGS: {
|
|
23
|
+
readonly 'market-maker': {
|
|
24
|
+
readonly name: "Market Maker Agent";
|
|
25
|
+
readonly defaultMessage: "I'm sorry, I encountered an error while processing your trading request. Please check your connection and try again.";
|
|
26
|
+
readonly errorPrefix: "Trading Error";
|
|
27
|
+
};
|
|
28
|
+
readonly apy: {
|
|
29
|
+
readonly name: "DeFi Yield Agent";
|
|
30
|
+
readonly defaultMessage: "I'm sorry, I encountered an error while processing your DeFi request. Please check your connection and try again.";
|
|
31
|
+
readonly errorPrefix: "DeFi Error";
|
|
32
|
+
};
|
|
33
|
+
readonly 'portfolio-manager': {
|
|
34
|
+
readonly name: "Portfolio Manager Agent";
|
|
35
|
+
readonly defaultMessage: "I'm sorry, I encountered an error while processing your portfolio request. Please check your connection and try again.";
|
|
36
|
+
readonly errorPrefix: "Portfolio Error";
|
|
37
|
+
};
|
|
38
|
+
readonly memecoin: {
|
|
39
|
+
readonly name: "Memecoin Agent";
|
|
40
|
+
readonly defaultMessage: "I'm sorry, I encountered an error while analyzing memecoins. Please check your connection and try again.";
|
|
41
|
+
readonly errorPrefix: "Memecoin Error";
|
|
42
|
+
};
|
|
43
|
+
readonly orchestrator: {
|
|
44
|
+
readonly name: "Agent Orchestrator";
|
|
45
|
+
readonly defaultMessage: "I'm sorry, I encountered an error while coordinating agents. Please check your connection and try again.";
|
|
46
|
+
readonly errorPrefix: "Orchestrator Error";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type AgentType = keyof typeof AGENT_ERROR_CONFIGS;
|
|
50
|
+
/**
|
|
51
|
+
* Standardized error handler for all autonoma agents
|
|
52
|
+
*/
|
|
53
|
+
export declare class AgentErrorHandler {
|
|
54
|
+
private agentType;
|
|
55
|
+
private startTime;
|
|
56
|
+
constructor(agentType: AgentType, startTime?: number);
|
|
57
|
+
/**
|
|
58
|
+
* Handle and format errors with consistent logging and user messages
|
|
59
|
+
*/
|
|
60
|
+
handleError(error: unknown, customMessage?: string): StandardErrorResponse;
|
|
61
|
+
/**
|
|
62
|
+
* Handle validation errors specifically
|
|
63
|
+
*/
|
|
64
|
+
handleValidationError(field: string, issue: string): StandardErrorResponse;
|
|
65
|
+
/**
|
|
66
|
+
* Handle service unavailable errors (like MCP servers down)
|
|
67
|
+
*/
|
|
68
|
+
handleServiceUnavailable(serviceName: string): StandardErrorResponse;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Quick factory function for creating error handlers
|
|
72
|
+
*/
|
|
73
|
+
export declare function createErrorHandler(agentType: AgentType, startTime?: number): AgentErrorHandler;
|
|
74
|
+
/**
|
|
75
|
+
* Simple error response for cases where we don't need the full handler
|
|
76
|
+
*/
|
|
77
|
+
export declare function createErrorResponse(agentType: AgentType, error: unknown, customMessage?: string): StandardErrorResponse;
|
|
78
|
+
//# sourceMappingURL=error-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../src/error-handler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAEzD;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,SAAS,CAAS;gBAEd,SAAS,EAAE,SAAS,EAAE,SAAS,GAAE,MAAmB;IAKhE;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,qBAAqB;IAgC1E;;OAEG;IACH,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,qBAAqB;IAoB1E;;OAEG;IACH,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB;CAmBrE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAE9F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,OAAO,EACd,aAAa,CAAC,EAAE,MAAM,GACrB,qBAAqB,CAGvB"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standardized Error Handling for autonoma Agents
|
|
3
|
+
*
|
|
4
|
+
* Provides consistent error handling, logging, and user-friendly messages
|
|
5
|
+
* across all agent implementations.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for agent-specific error messages
|
|
9
|
+
*/
|
|
10
|
+
export const AGENT_ERROR_CONFIGS = {
|
|
11
|
+
'market-maker': {
|
|
12
|
+
name: 'Market Maker Agent',
|
|
13
|
+
defaultMessage: "I'm sorry, I encountered an error while processing your trading request. Please check your connection and try again.",
|
|
14
|
+
errorPrefix: "Trading Error"
|
|
15
|
+
},
|
|
16
|
+
'apy': {
|
|
17
|
+
name: 'DeFi Yield Agent',
|
|
18
|
+
defaultMessage: "I'm sorry, I encountered an error while processing your DeFi request. Please check your connection and try again.",
|
|
19
|
+
errorPrefix: "DeFi Error"
|
|
20
|
+
},
|
|
21
|
+
'portfolio-manager': {
|
|
22
|
+
name: 'Portfolio Manager Agent',
|
|
23
|
+
defaultMessage: "I'm sorry, I encountered an error while processing your portfolio request. Please check your connection and try again.",
|
|
24
|
+
errorPrefix: "Portfolio Error"
|
|
25
|
+
},
|
|
26
|
+
'memecoin': {
|
|
27
|
+
name: 'Memecoin Agent',
|
|
28
|
+
defaultMessage: "I'm sorry, I encountered an error while analyzing memecoins. Please check your connection and try again.",
|
|
29
|
+
errorPrefix: "Memecoin Error"
|
|
30
|
+
},
|
|
31
|
+
'orchestrator': {
|
|
32
|
+
name: 'Agent Orchestrator',
|
|
33
|
+
defaultMessage: "I'm sorry, I encountered an error while coordinating agents. Please check your connection and try again.",
|
|
34
|
+
errorPrefix: "Orchestrator Error"
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Standardized error handler for all autonoma agents
|
|
39
|
+
*/
|
|
40
|
+
export class AgentErrorHandler {
|
|
41
|
+
constructor(agentType, startTime = Date.now()) {
|
|
42
|
+
this.agentType = agentType;
|
|
43
|
+
this.startTime = startTime;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Handle and format errors with consistent logging and user messages
|
|
47
|
+
*/
|
|
48
|
+
handleError(error, customMessage) {
|
|
49
|
+
const config = AGENT_ERROR_CONFIGS[this.agentType];
|
|
50
|
+
const timestamp = new Date().toISOString();
|
|
51
|
+
const executionTime = Date.now() - this.startTime;
|
|
52
|
+
// Enhanced error logging for debugging
|
|
53
|
+
const errorDetails = {
|
|
54
|
+
agent: config.name,
|
|
55
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
56
|
+
stack: error instanceof Error ? error.stack : undefined,
|
|
57
|
+
timestamp,
|
|
58
|
+
executionTime
|
|
59
|
+
};
|
|
60
|
+
console.error(`${config.errorPrefix}:`, errorDetails);
|
|
61
|
+
// User-friendly error message
|
|
62
|
+
const userMessage = customMessage || config.defaultMessage;
|
|
63
|
+
return {
|
|
64
|
+
error: userMessage,
|
|
65
|
+
timestamp,
|
|
66
|
+
statusCode: 500,
|
|
67
|
+
metadata: {
|
|
68
|
+
executionTime,
|
|
69
|
+
errorType: error instanceof Error ? error.constructor.name : 'UnknownError',
|
|
70
|
+
agentName: config.name,
|
|
71
|
+
timestamp
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Handle validation errors specifically
|
|
77
|
+
*/
|
|
78
|
+
handleValidationError(field, issue) {
|
|
79
|
+
const config = AGENT_ERROR_CONFIGS[this.agentType];
|
|
80
|
+
const timestamp = new Date().toISOString();
|
|
81
|
+
const executionTime = Date.now() - this.startTime;
|
|
82
|
+
console.error(`${config.errorPrefix} - Validation:`, { field, issue, timestamp });
|
|
83
|
+
return {
|
|
84
|
+
error: `Invalid request: ${field} ${issue}`,
|
|
85
|
+
timestamp,
|
|
86
|
+
statusCode: 400,
|
|
87
|
+
metadata: {
|
|
88
|
+
executionTime,
|
|
89
|
+
errorType: 'ValidationError',
|
|
90
|
+
agentName: config.name,
|
|
91
|
+
timestamp
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Handle service unavailable errors (like MCP servers down)
|
|
97
|
+
*/
|
|
98
|
+
handleServiceUnavailable(serviceName) {
|
|
99
|
+
const config = AGENT_ERROR_CONFIGS[this.agentType];
|
|
100
|
+
const timestamp = new Date().toISOString();
|
|
101
|
+
const executionTime = Date.now() - this.startTime;
|
|
102
|
+
console.warn(`${config.errorPrefix} - Service Unavailable:`, { serviceName, timestamp });
|
|
103
|
+
return {
|
|
104
|
+
error: `I'm currently unable to access the ${serviceName} service. I can still help with general questions and guidance. Please try again later for advanced features.`,
|
|
105
|
+
timestamp,
|
|
106
|
+
statusCode: 503,
|
|
107
|
+
metadata: {
|
|
108
|
+
executionTime,
|
|
109
|
+
errorType: 'ServiceUnavailableError',
|
|
110
|
+
agentName: config.name,
|
|
111
|
+
timestamp
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Quick factory function for creating error handlers
|
|
118
|
+
*/
|
|
119
|
+
export function createErrorHandler(agentType, startTime) {
|
|
120
|
+
return new AgentErrorHandler(agentType, startTime);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Simple error response for cases where we don't need the full handler
|
|
124
|
+
*/
|
|
125
|
+
export function createErrorResponse(agentType, error, customMessage) {
|
|
126
|
+
const handler = new AgentErrorHandler(agentType);
|
|
127
|
+
return handler.handleError(error, customMessage);
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=error-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../src/error-handler.ts"],"names":[],"mappings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;QAC1C,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnD,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC;QAElD,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,WAAW,yBAAyB,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;QAEzF,OAAO;YACL,KAAK,EAAE,sCAAsC,WAAW,+GAA+G;YACvK,SAAS;YACT,UAAU,EAAE,GAAG;YACf,QAAQ,EAAE;gBACR,aAAa;gBACb,SAAS,EAAE,yBAAyB;gBACpC,SAAS,EAAE,MAAM,CAAC,IAAI;gBACtB,SAAS;aACV;SACF,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAoB,EAAE,SAAkB;IACzE,OAAO,IAAI,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAAoB,EACpB,KAAc,EACd,aAAsB;IAEtB,MAAM,OAAO,GAAG,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACjD,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory functions for creating pre-configured agents.
|
|
3
|
+
*
|
|
4
|
+
* Provides convenient functions for creating agents optimized for specific use cases
|
|
5
|
+
* with appropriate defaults and capabilities.
|
|
6
|
+
*/
|
|
7
|
+
import { AgentConfig, TradingAgentConfig, DataAnalysisAgentConfig, CustomerServiceAgentConfig } from './types.js';
|
|
8
|
+
import { StandardAgent, AgentBuilder } from './core.js';
|
|
9
|
+
/**
|
|
10
|
+
* Create a trading agent with pre-configured capabilities for market making,
|
|
11
|
+
* exchange connectivity, and risk management.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createTradingAgent(config?: Partial<TradingAgentConfig>): StandardAgent;
|
|
14
|
+
/**
|
|
15
|
+
* Create a data analysis agent optimized for market research,
|
|
16
|
+
* pattern recognition, and report generation.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createDataAnalysisAgent(config?: Partial<DataAnalysisAgentConfig>): StandardAgent;
|
|
19
|
+
/**
|
|
20
|
+
* Create a customer service agent optimized for answering questions,
|
|
21
|
+
* knowledge base search, and issue resolution.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createCustomerServiceAgent(config?: Partial<CustomerServiceAgentConfig>): StandardAgent;
|
|
24
|
+
/**
|
|
25
|
+
* Create a general-purpose agent with minimal configuration.
|
|
26
|
+
* Good starting point for custom implementations.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createGenericAgent(config: Partial<AgentConfig>): StandardAgent;
|
|
29
|
+
/**
|
|
30
|
+
* Create an agent using a fluent builder pattern for complex configurations.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createAgentBuilder(): AgentBuilder;
|
|
33
|
+
/**
|
|
34
|
+
* Create a Solana token analysis agent using DexScreener MCP tools.
|
|
35
|
+
* Specialized for discovering trending tokens, market analysis, and risk assessment.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createSolanaAnalysisAgent(config?: Partial<DataAnalysisAgentConfig>): StandardAgent;
|
|
38
|
+
/**
|
|
39
|
+
* Create a multi-chain market data agent using the enhanced data-collector MCP tools.
|
|
40
|
+
* Supports Hyperliquid L1 and EVM chains with advanced market intelligence.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createMarketDataAgent(config?: Partial<DataAnalysisAgentConfig>): StandardAgent;
|
|
43
|
+
/**
|
|
44
|
+
* Create a RAG-enhanced trading agent with comprehensive knowledge retrieval and decision support.
|
|
45
|
+
* Integrates dual-layer RAG (concept + history) with market data and Solana analysis capabilities.
|
|
46
|
+
*
|
|
47
|
+
* This agent represents the Phase 2 RAG-Agent Integration from the Consolidation Memorandum.
|
|
48
|
+
*/
|
|
49
|
+
export declare function createRAGEnhancedTradingAgent(config?: Partial<TradingAgentConfig>): StandardAgent;
|
|
50
|
+
/**
|
|
51
|
+
* Create an agent from environment variables.
|
|
52
|
+
* Useful for deployment scenarios where configuration comes from env vars.
|
|
53
|
+
*/
|
|
54
|
+
export declare function createAgentFromEnvironment(overrides?: Partial<AgentConfig>): StandardAgent;
|
|
55
|
+
/**
|
|
56
|
+
* Create a DeFi Yield Optimization agent with comprehensive yield farming,
|
|
57
|
+
* risk assessment, and portfolio optimization capabilities.
|
|
58
|
+
*/
|
|
59
|
+
export declare function createDeFiYieldAgent(config?: Partial<DataAnalysisAgentConfig>): StandardAgent;
|
|
60
|
+
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAClH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAc,MAAM,WAAW,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,aAAa,CA+D1F;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAAG,aAAa,CA4DpG;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAAG,aAAa,CAyD1G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,aAAa,CAsC9E;AAED;;GAEG;AACH,wBAAgB,kBAAk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