/** * The plan in the units a person reads: lines a day per statement and dollars * a month. The engine's own units, bytes per regulator window per node, stay * in the CSV rows; these sentences sit beside the rows and in their reason * column, so the files explain themselves in the repo. */ import { type Action } from '../cost.js'; export declare const SECONDS_PER_DAY = 86400; /** The engine's rate-regulator reset window. */ export declare const REGULATOR_WINDOW_SECONDS = 240; /** Lines of a statement that pass in every window before its limit applies (engine default `rateReceiverBaselineCount`). */ export declare const ALWAYS_PASS_LINES = 5; export interface ServiceLimit { service: string; action: Action; /** * Lines a day above which a statement takes the route. `null` when every * statement takes it (offload, drop, or nothing kept); `undefined` when the * rows carry no event count, so no line figure can be stated. */ limitLinesPerDay?: number | null; /** Statements the plan moves today. */ movedStatements: number; /** What those statements cost today at list, $/month; absent when no line is priced. */ movedUsdMonthly?: number; } /** A fleet-wide default for services with no row of their own. */ export interface FleetLimit { limitLinesPerDay: number; action: Action; } /** Where a statement over its limit goes, as a verb phrase. */ export declare function routeVerb(siem: string | null, action: Action): string; /** * Where tier_down sends a statement's lines over its limit. tier_down keeps * them in the SIEM, on its cheaper tier; offload is the action that sends * lines to the account's own bucket. */ export declare function tierDownTarget(siem: string | null): { short: string; stays: string; }; /** * Where a set of actions sends lines over their limits: a short name for a * title, a clause for a sentence, whether the lines leave the index the bill * counts (tier_down, offload, drop), and whether every line is kept * (sample and drop are not). tier_down stays in the SIEM on its cheaper tier, * offload goes to the account's own bucket, compact stays in the SIEM in * compact form. */ export declare function routeTarget(actions: ReadonlySet, siem: string | null): { short: string; clause: string; leavesIndex: boolean; lossless: boolean; }; /** Where kept lines land, as a noun. */ export declare function keptNoun(siem: string | null): string; export declare function fmtLinesPerDay(n: number): string; /** "about $X": rounded for reading, no trailing zeros. */ export declare function fmtAboutUsd(usd: number): string; /** * One service, one sentence pair: the limit in lines a day and what it moves * today, in statements and dollars a month. */ export declare function serviceLimitSentence(l: ServiceLimit, siem: string | null): string; /** The fleet line: services with no row of their own, and the lines that always pass. */ export declare function fleetSentence(siem: string | null, fleet?: FleetLimit, alwaysPass?: number): string; /** * The sentence as a CSV reason: commas and colons removed, since the engine * reads `,::`. */ export declare function csvReason(sentence: string): string; /** * What a set of statements costs today at list, $/month. On a destination * billed per event (Datadog) this is the Standard indexing line; elsewhere * the ingest and storage lines for a month. */ export declare function statementsUsdMonthly(siem: string | null, bytesMonthly: number, eventsMonthly?: number): number | undefined; /** * Datadog only: what Flex adds for every statement the plan moves, at the * tier that volume lands in. Stated beside the indexing figures, never netted. */ export declare function flexAddedSentence(siem: string | null, bytesMonthly: number, eventsMonthly?: number): string | undefined; /** Lines a day a per-node byte cap stands for, at a statement's average line size, across the nodes that enforce it. */ export declare function linesPerDayFromCap(capBytesPerWindowPerNode: number, nodes: number, avgBytesPerLine: number): number; /** * Service limits from a window's patterns. For each container the plan caps, * the largest statement it keeps sets the limit (matched by the plan's own * name when it gives one), and the moved statements are counted and priced * at a month. A container whose cap is zero bytes, or whose action takes the * whole container, moves every statement, and the count says so. */ export declare function serviceLimitsFromPatterns

(caps: Record, patterns: P[], isMoved: (p: P) => boolean, windowSeconds: number, siem: string | null, nameOf?: (p: P) => string): { limits: ServiceLimit[]; movedBytesMonthly: number; movedEventsMonthly: number; };