import { EdgeBundleManager, EdgeModule, LocalGrants, type EdgeDecisionRecord, type LocalFinalizationRecord, type ReplayStore } from "@decionis/agent-safe-pipeline"; import type { HashChain } from "../audit/HashChain.js"; import type { LineWriter } from "../audit/LineAuditSink.js"; import type { ExecutorConfig } from "../config/ExecutorConfig.js"; import { EdgeLicence } from "../edge/EdgeLicence.js"; import { type LoadPg } from "../edge/EdgeReplay.js"; import { UsageMeter } from "../edge/UsageMeter.js"; import type { FetchLike } from "../handlers/HandlerRegistration.js"; import type { SecurityEvents } from "../incident/SecurityEvents.js"; import type { SecretStore } from "../secrets/SecretStore.js"; export interface EdgeRuntimeOptions { readonly config: ExecutorConfig; /** Where the replay store's connection string and the usage-report key are read from. */ readonly secrets: SecretStore; /** The organisation's Decionis key, read at the moment of each bundle fetch. */ readonly apiKey: () => string; /** The guarded fetch: a bundle comes from the authority's origin, and nowhere else. */ readonly fetch: FetchLike; readonly events: SecurityEvents; /** The executor's evidence chain, and the writer its audit lines go through. */ readonly chain: HashChain; readonly write: LineWriter; /** Loads the module; the configured file unless a test hands in its own. */ readonly loadModule?: (path: string) => EdgeModule; /** Loads `pg` for the Postgres replay store; the installed package unless a test hands in its own. */ readonly loadPg?: LoadPg; readonly clock?: () => number; } /** * The long-lived half of the edge authority: the module, the bundle it holds, * the local grants, the replay store, the usage meter and the licence check. * It outlives a rebuild of the authority clients, so a rotated Presence * credential neither reloads the module nor forgets which intents have run. */ export declare class EdgeRuntime { private readonly options; readonly module: EdgeModule; readonly bundles: EdgeBundleManager; readonly grants: LocalGrants; readonly replay: ReplayStore; readonly usage: UsageMeter; readonly licence: EdgeLicence; readonly onUnavailable: "hosted" | "block"; readonly clock: () => number; private readonly shared; private timer; private constructor(); /** * The runtime the configuration asks for, or null for a hosted deployment. * A module that cannot be read, is not WebAssembly, or is not ABI 3, and a * usage-report key that is not an Ed25519 private key, are refusals to * start that name the variable and the reason, never a deployment that * quietly decides hosted instead. */ static create(options: EdgeRuntimeOptions): EdgeRuntime | null; /** * Links one local decision, or a local attempt's outcome, on the evidence * chain. A decision is counted as its line is written, with the sequence * and hash that line carries, so the count is the chain's own. */ record(record: EdgeDecisionRecord | LocalFinalizationRecord): void; /** * The replay store first: a shared store that cannot be reached is a * refusal to start, since nothing could be run once. Then the first * bundle fetch, the first usage report and licence check, and the hourly * schedule for both and for removing lapsed claims. */ start(): Promise; /** One round of housekeeping. Never throws, and touches no decision. */ tick(): Promise; stop(): void; } //# sourceMappingURL=EdgeRuntime.d.ts.map