- Add full Telegram bot functionality with Z.AI API integration
- Implement 4 tools: Bash, FileEdit, WebSearch, Git
- Add 3 agents: Code Reviewer, Architect, DevOps Engineer
- Add 6 skills for common coding tasks
- Add systemd service file for 24/7 operation
- Add nginx configuration for HTTPS webhook
- Add comprehensive documentation
- Implement WebSocket server for real-time updates
- Add logging system with Winston
- Add environment validation
🤖 zCode CLI X - Agentic coder with Z.AI + Telegram integration
43 lines
1.8 KiB
JavaScript
43 lines
1.8 KiB
JavaScript
import { diag } from '@opentelemetry/api';
|
|
import { getNodeHttpConfigurationDefaults, mergeOtlpNodeHttpConfigurationWithDefaults, } from './otlp-node-http-configuration';
|
|
import { httpAgentFactoryFromOptions } from '../index-node-http';
|
|
import { getNodeHttpConfigurationFromEnvironment } from './otlp-node-http-env-configuration';
|
|
import { convertLegacyHeaders } from './convert-legacy-http-options';
|
|
function convertLegacyAgentOptions(config) {
|
|
if (typeof config.httpAgentOptions === 'function') {
|
|
return config.httpAgentOptions;
|
|
}
|
|
let legacy = config.httpAgentOptions;
|
|
if (config.keepAlive != null) {
|
|
legacy = { keepAlive: config.keepAlive, ...legacy };
|
|
}
|
|
if (legacy != null) {
|
|
return httpAgentFactoryFromOptions(legacy);
|
|
}
|
|
else {
|
|
return undefined;
|
|
}
|
|
}
|
|
/**
|
|
* @deprecated this will be removed in 2.0
|
|
* @param config
|
|
* @param signalIdentifier
|
|
* @param signalResourcePath
|
|
* @param requiredHeaders
|
|
*/
|
|
export function convertLegacyHttpOptions(config, signalIdentifier, signalResourcePath, requiredHeaders) {
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
if (config.metadata) {
|
|
diag.warn('Metadata cannot be set when using http');
|
|
}
|
|
return mergeOtlpNodeHttpConfigurationWithDefaults({
|
|
url: config.url,
|
|
headers: convertLegacyHeaders(config),
|
|
concurrencyLimit: config.concurrencyLimit,
|
|
timeoutMillis: config.timeoutMillis,
|
|
compression: config.compression,
|
|
agentFactory: convertLegacyAgentOptions(config),
|
|
userAgent: config.userAgent,
|
|
}, getNodeHttpConfigurationFromEnvironment(signalIdentifier, signalResourcePath), getNodeHttpConfigurationDefaults(requiredHeaders, signalResourcePath));
|
|
}
|
|
//# sourceMappingURL=convert-legacy-node-http-options.js.map
|