import type { Config } from './config.js'; import { type DiagnosticContext } from './diagnostics.js'; import type { ReviewUsage } from './gitlab-review.js'; import type { OtelBridge } from './otel.js'; import { type ScmResponseInfo } from './platform.js'; import type { SummaryResult } from './posting.js'; import type { GeneratedComment, Severity } from './types.js'; export type { DiagnosticContext, DiagnosticError, DiagnosticPhase, DiagnosticUsage, DiagnosticUsageBreakdown, } from './diagnostics.js'; export { DIAGNOSTIC_CHANNEL_NAMES, DIAGNOSTIC_CHANNEL_PREFIX, createDiagnosticContext, createDiagnosticRunId, diagnosticChannels, traceDiagnostic, traceDiagnosticPhase, } from './diagnostics.js'; export type { OtelBridge, OtelBridgeOptions, OtelRuntime } from './otel.js'; export { isOtelEnabled, startOtelBridge } from './otel.js'; export interface RunResult { generated: GeneratedComment[]; posted: number; usage: ReviewUsage; summary: SummaryResult | null; skipped?: boolean; } export interface RunBridges { /** Pre-started OTel bridge for per-turn and per-tool-call agent telemetry. */ otel?: OtelBridge; } export declare function run(config: Config, bridges?: RunBridges): Promise; /** The labels a review outcome adds and the opposite set it removes. */ export interface LabelChange { outcome: 'findings' | 'clean'; add: string[]; remove: string[]; } /** * Pick the label change for a review outcome: `findings` when the review * published at least one fresh comment, `clean` otherwise. The outcome's labels * are added and the other outcome's labels removed, since GitLab CE does not * enforce scoped-label exclusivity. Returns `null` when neither label set is * configured, so the feature makes no API call unless opted in. */ export declare function resolveLabelChange(config: Pick, hasFreshComments: boolean): LabelChange | null; /** Render a label change for logs, e.g. `add [mr::needs-review]; remove [mr::change-requested]`. */ export declare function formatLabelChange(change: LabelChange): string; export declare function formatUsageLine(usage: ReviewUsage): string; /** * Render the per-model usage breakdown for heterogeneous `full`-depth runs: one * indented line per pool member with its billable input / output tokens and * cost. Returns `undefined` when there is no breakdown (single-model runs), so * the caller prints nothing extra. Surfaces model ids and numbers only — never * any key or secret. */ export declare function formatPerModelUsage(usage: ReviewUsage): string | undefined; /** * Wraps a phase operation so the phase context gets HTTP semantic-convention * attributes stamped from the most recent platform response — on both success * and error paths. `readLastHttp` returns the platform's latest response holder; * the wrapper snapshots it before the operation and only stamps when the * operation's own request produced a *new* response, so a phase that threw * before any HTTP call never inherits a previous phase's URL/status. * * Used by every traced platform phase, including the write phases * (`scm.post_comments`, `scm.upsert_summary`) so a failure like a 500 on * `bulk_publish` carries http.response.status_code / url.full / server.address. */ export declare function withHttpStamping(readLastHttp: () => ScmResponseInfo | undefined, operation: (context: DiagnosticContext) => Promise): (context: DiagnosticContext) => Promise; /** * Count the comments posted to the MR, grouped by severity. Duplicates are * excluded since they are never posted. The total equals the new-comment count; * in `draft` mode a concurrent run can race-delete some drafts before publish, * so the breakdown reflects posted intent and may slightly exceed the published * count in that rare case. */ export declare function countPostedBySeverity(generated: GeneratedComment[]): Partial>; export declare function main(argv?: string[]): Promise; //# sourceMappingURL=cli.d.ts.map