/** * Runtime Config * * Loads the `runtime-architecture` rule from webpieces.config.json and exposes * typed accessors shared by the generate + validate + visualize executors. * * "runtime-architecture": { * "mode": "ON", // "OFF" disables the whole feature * "turnOffRuleUntilEpoch": 0, // whole-rule punt (epoch seconds) * "turnOffRuleWhileOnBranch": null, // whole-rule punt while on a named branch * "allowedCycles": [ { "services": ["a","b"], "reason": "...", "until": 1771931925 } ], * "showExternalNodes": true, // draw firestore/gmail/... as terminal nodes * "externalApiPaths": ["libraries/apis/external/**"] // where those vendor contracts live * } */ import { SkipRuleResult } from '@webpieces/rules-config'; export declare const RUNTIME_RULE_NAME = "runtime-architecture"; export interface AllowedCycle { services: string[]; reason?: string; until?: number; } export interface RuntimeRuleConfig { off: boolean; turnOffRuleUntilEpoch?: number; turnOffRuleWhileOnBranch?: string; allowedCycles: AllowedCycle[]; /** Render the dashed external terminal nodes in the runtime viz (default true). */ showExternalNodes: boolean; /** * Globs of project roots whose exported `*Api` types are contracts for systems OUTSIDE this repo. * Empty (the default) means the scan looks for no vendor seams at all. */ externalApiPaths: string[]; } /** Load the runtime-architecture rule config (with safe defaults). */ export declare function loadRuntimeConfig(workspaceRoot: string): RuntimeRuleConfig; /** * Whole-rule report-only window honoring BOTH escape hatches: skip while on the * named branch (turnOffRuleWhileOnBranch) or until the epoch passes * (turnOffRuleUntilEpoch). When `.skip` is true, problems are reported but * the build is not failed. */ export declare function runtimeReportOnly(config: RuntimeRuleConfig): SkipRuleResult; /** * Whole-rule grace window: while now < epoch, failures are reported but do not * fail the build (warn). Mirrors the other webpieces rules. */ export declare function isGraceActive(epoch: number | undefined): boolean; /** Format the epoch as an ISO date for log messages. */ export declare function epochDate(epoch: number): string;