- 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
26 lines
792 B
JavaScript
26 lines
792 B
JavaScript
/*
|
|
* Copyright The OpenTelemetry Authors
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
export function isExportHTTPErrorRetryable(statusCode) {
|
|
return (statusCode === 429 ||
|
|
statusCode === 502 ||
|
|
statusCode === 503 ||
|
|
statusCode === 504);
|
|
}
|
|
export function parseRetryAfterToMills(retryAfter) {
|
|
if (retryAfter == null) {
|
|
return undefined;
|
|
}
|
|
const seconds = Number.parseInt(retryAfter, 10);
|
|
if (Number.isInteger(seconds)) {
|
|
return seconds > 0 ? seconds * 1000 : -1;
|
|
}
|
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#directives
|
|
const delay = new Date(retryAfter).getTime() - Date.now();
|
|
if (delay >= 0) {
|
|
return delay;
|
|
}
|
|
return 0;
|
|
}
|
|
//# sourceMappingURL=is-export-retryable.js.map
|