- 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
29 lines
1.0 KiB
JavaScript
29 lines
1.0 KiB
JavaScript
const alphabetByEncoding = {};
|
|
const alphabetByValue = new Array(64);
|
|
for (let i = 0, start = "A".charCodeAt(0), limit = "Z".charCodeAt(0); i + start <= limit; i++) {
|
|
const char = String.fromCharCode(i + start);
|
|
alphabetByEncoding[char] = i;
|
|
alphabetByValue[i] = char;
|
|
}
|
|
for (let i = 0, start = "a".charCodeAt(0), limit = "z".charCodeAt(0); i + start <= limit; i++) {
|
|
const char = String.fromCharCode(i + start);
|
|
const index = i + 26;
|
|
alphabetByEncoding[char] = index;
|
|
alphabetByValue[index] = char;
|
|
}
|
|
for (let i = 0; i < 10; i++) {
|
|
alphabetByEncoding[i.toString(10)] = i + 52;
|
|
const char = i.toString(10);
|
|
const index = i + 52;
|
|
alphabetByEncoding[char] = index;
|
|
alphabetByValue[index] = char;
|
|
}
|
|
alphabetByEncoding["+"] = 62;
|
|
alphabetByValue[62] = "+";
|
|
alphabetByEncoding["/"] = 63;
|
|
alphabetByValue[63] = "/";
|
|
const bitsPerLetter = 6;
|
|
const bitsPerByte = 8;
|
|
const maxLetterValue = 0b111111;
|
|
export { alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue };
|