- 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
20 lines
1.1 KiB
JavaScript
20 lines
1.1 KiB
JavaScript
import { loadConfig } from "@smithy/node-config-provider";
|
|
import { parseUrl } from "@smithy/url-parser";
|
|
import { Endpoint as InstanceMetadataEndpoint } from "../config/Endpoint";
|
|
import { ENDPOINT_CONFIG_OPTIONS } from "../config/EndpointConfigOptions";
|
|
import { EndpointMode } from "../config/EndpointMode";
|
|
import { ENDPOINT_MODE_CONFIG_OPTIONS, } from "../config/EndpointModeConfigOptions";
|
|
export const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));
|
|
const getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();
|
|
const getFromEndpointModeConfig = async () => {
|
|
const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
|
|
switch (endpointMode) {
|
|
case EndpointMode.IPv4:
|
|
return InstanceMetadataEndpoint.IPv4;
|
|
case EndpointMode.IPv6:
|
|
return InstanceMetadataEndpoint.IPv6;
|
|
default:
|
|
throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);
|
|
}
|
|
};
|