- 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
42 lines
1.7 KiB
JavaScript
42 lines
1.7 KiB
JavaScript
/*
|
|
* Copyright The OpenTelemetry Authors
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
export function validateTimeoutMillis(timeoutMillis) {
|
|
if (Number.isFinite(timeoutMillis) && timeoutMillis > 0) {
|
|
return timeoutMillis;
|
|
}
|
|
throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${timeoutMillis}')`);
|
|
}
|
|
export function wrapStaticHeadersInFunction(headers) {
|
|
if (headers == null) {
|
|
return undefined;
|
|
}
|
|
return async () => headers;
|
|
}
|
|
/**
|
|
* @param userProvidedConfiguration Configuration options provided by the user in code.
|
|
* @param fallbackConfiguration Fallback to use when the {@link userProvidedConfiguration} does not specify an option.
|
|
* @param defaultConfiguration The defaults as defined by the exporter specification
|
|
*/
|
|
export function mergeOtlpSharedConfigurationWithDefaults(userProvidedConfiguration, fallbackConfiguration, defaultConfiguration) {
|
|
return {
|
|
timeoutMillis: validateTimeoutMillis(userProvidedConfiguration.timeoutMillis ??
|
|
fallbackConfiguration.timeoutMillis ??
|
|
defaultConfiguration.timeoutMillis),
|
|
concurrencyLimit: userProvidedConfiguration.concurrencyLimit ??
|
|
fallbackConfiguration.concurrencyLimit ??
|
|
defaultConfiguration.concurrencyLimit,
|
|
compression: userProvidedConfiguration.compression ??
|
|
fallbackConfiguration.compression ??
|
|
defaultConfiguration.compression,
|
|
};
|
|
}
|
|
export function getSharedConfigurationDefaults() {
|
|
return {
|
|
timeoutMillis: 10000,
|
|
concurrencyLimit: 30,
|
|
compression: 'none',
|
|
};
|
|
}
|
|
//# sourceMappingURL=shared-configuration.js.map
|