/**
* Shared XML template for a Blazegraph namespace tuned for DKG V10
* (quads enabled, no truth maintenance, no text index, no statement
* identifiers). Substitutes `{namespace}` for the namespace name.
*
* Mirrors the body inlined at scripts/devnet.sh:287-294. Kept here so
* future tweaks land in one place.
*/
export declare const BLAZEGRAPH_NAMESPACE_XML_TEMPLATE = "\n\n\n {namespace}\n true\n false\n false\n false\n com.bigdata.rdf.axioms.NoAxioms\n";
/** Pinned image tag — matches devnet.sh and Blazegraph mainnet. */
export declare const BLAZEGRAPH_IMAGE = "lyrasis/blazegraph:2.1.5";
export interface DockerCommandResult {
stdout: string;
stderr: string;
exitCode: number;
}
export interface DockerRunner {
/**
* Run `docker `. Should NOT throw on non-zero exit — return
* the result so the provisioner can decide whether the failure is
* fatal (e.g. `docker run`) or expected (e.g. `docker inspect` on a
* non-existent container).
*/
run(args: readonly string[], opts?: {
timeoutMs?: number;
}): Promise;
}
export interface ProvisionBlazegraphDockerOptions {
/** Used to name the container and create the namespace inside it. */
namespace: string;
/** Override container name. Default: `dkg-blazegraph-`. */
containerName?: string;
/** Preferred host port. Default: 9999. */
port?: number;
/** Inclusive count of ports to scan starting at `port` for collisions. */
portRange?: number;
log?: (msg: string) => void;
docker?: DockerRunner;
fetch?: typeof globalThis.fetch;
/** Returns true if no listener is bound to the given port. */
isPortFree?: (port: number) => Promise;
/** Polling interval while waiting for /bigdata/status to respond. */
pollIntervalMs?: number;
/** Total time to wait for Blazegraph to come up. */
pollTimeoutMs?: number;
}
export interface ProvisionBlazegraphDockerResult {
url: string;
port: number;
containerName: string;
/**
* Marker for chain-reset-wipe (PR 1): a `managedByDkg: true` store
* may be wiped with `DROP ALL`. Always true from this function.
*/
managedByDkg: true;
/**
* Whether the container was already running and re-used. Affects
* the wizard log ("container created" vs "reusing existing").
*/
reused: boolean;
/**
* Whether the namespace was created during this run vs already
* present. Lets the wizard surface a useful summary line.
*/
namespaceCreated: boolean;
}
export declare function normaliseBlazegraphNamespace(namespace: string): string;
export declare function provisionBlazegraphDocker(opts: ProvisionBlazegraphDockerOptions): Promise;
/**
* Cheap "is docker available?" check for the wizard. Doesn't need to
* start anything — we just need to know whether to offer the Docker
* branch or skip straight to the manual-URL retry.
*/
export declare function isDockerAvailable(docker?: DockerRunner): Promise;
//# sourceMappingURL=blazegraph-docker.d.ts.map