Files
admin 875c7f9b91 feat: Complete zCode CLI X with Telegram bot integration
- 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
2026-05-05 09:01:26 +00:00

61 lines
2.7 KiB
TypeScript

import type { Accumulation, AccumulationRecord, Aggregator } from './types';
import { AggregatorKind } from './types';
import type { HistogramMetricData } from '../export/MetricData';
import type { HrTime } from '@opentelemetry/api';
import type { Maybe } from '../utils';
import type { AggregationTemporality } from '../export/AggregationTemporality';
import type { InstrumentDescriptor } from '../InstrumentDescriptor';
/**
* Internal value type for HistogramAggregation.
* Differs from the exported type as undefined sum/min/max complicate arithmetic
* performed by this aggregation, but are required to be undefined in the exported types.
*/
interface InternalHistogram {
buckets: {
boundaries: number[];
counts: number[];
};
sum: number;
count: number;
hasMinMax: boolean;
min: number;
max: number;
}
export declare class HistogramAccumulation implements Accumulation {
startTime: HrTime;
private readonly _boundaries;
private _recordMinMax;
private _current;
constructor(startTime: HrTime, boundaries: number[], recordMinMax?: boolean, current?: InternalHistogram);
record(value: number): void;
setStartTime(startTime: HrTime): void;
toPointValue(): InternalHistogram;
}
/**
* Basic aggregator which observes events and counts them in pre-defined buckets
* and provides the total sum and count of all observations.
*/
export declare class HistogramAggregator implements Aggregator<HistogramAccumulation> {
kind: AggregatorKind.HISTOGRAM;
private readonly _boundaries;
private readonly _recordMinMax;
/**
* @param _boundaries sorted upper bounds of recorded values.
* @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded.
*/
constructor(boundaries: number[], recordMinMax: boolean);
createAccumulation(startTime: HrTime): HistogramAccumulation;
/**
* Return the result of the merge of two histogram accumulations. As long as one Aggregator
* instance produces all Accumulations with constant boundaries we don't need to worry about
* merging accumulations with different boundaries.
*/
merge(previous: HistogramAccumulation, delta: HistogramAccumulation): HistogramAccumulation;
/**
* Returns a new DELTA aggregation by comparing two cumulative measurements.
*/
diff(previous: HistogramAccumulation, current: HistogramAccumulation): HistogramAccumulation;
toMetricData(descriptor: InstrumentDescriptor, aggregationTemporality: AggregationTemporality, accumulationByAttributes: AccumulationRecord<HistogramAccumulation>[], endTime: HrTime): Maybe<HistogramMetricData>;
}
export {};
//# sourceMappingURL=Histogram.d.ts.map