UNPKG

@hasna/domains

Version:

Domain portfolio, registrar, marketplace, and DNS management for AI agents — CLI + MCP + HTTP API + SDK, shared account API and PostgreSQL

29 lines • 1.53 kB
/** * Domain provisioning state machine (open-domains side) — pure transitions plus * a `deriveDomainState` that maps live signals (registered? zone? NS delegated? * propagated? active?) to the current lifecycle state. The CLI `provision-status` * command derives state live so no extra persistence is required, while the * daemon advances domains transition-by-transition. */ export type DomainProvState = "requested" | "registered" | "cf_zone_ready" | "ns_delegated" | "ns_propagated" | "dns_managed" | "ready" | "failed"; export type DomainProvAction = "register" | "create_cf_zone" | "delegate_ns" | "check_ns_propagation" | "verify_dns" | "finalize"; interface Step { action: DomainProvAction; next: DomainProvState; } export declare const DOMAIN_FLOW: Record<Exclude<DomainProvState, "ready" | "failed">, Step>; export declare function isDomainTerminal(s: DomainProvState): boolean; export declare function domainActionFor(s: DomainProvState): DomainProvAction | null; export declare function domainNext(s: DomainProvState): DomainProvState | null; export declare function domainHappyPath(): DomainProvState[]; export interface DomainSignals { registered?: boolean; zoneExists?: boolean; registrarNsAreCloudflare?: boolean; publicNsAreCloudflare?: boolean; zoneActive?: boolean; } /** Map observed live signals to the furthest lifecycle state reached. */ export declare function deriveDomainState(sig: DomainSignals): DomainProvState; export {}; //# sourceMappingURL=provision-state.d.ts.map