/** * Local Ory environment manager. * * Manages the Docker Compose lifecycle for running Kratos, Keto, Hydra, * and an API gateway locally. The gateway defaults to Ory Console Lite when * its source tree is present at `/../cloud/console/console`, * and falls back to the bundled nginx routing layer otherwise. * `ORY_CONSOLE_LITE_PATH` overrides the path explicitly. * * Runtime directory: .ory-dev/ory/ (relative to where the command is run, * or the project root when invoked from a plugin CLI). Sibling of * .ory-dev/registry/ owned by the local npm registry manager. */ export interface EnsureLocalOryStackResult { status: "already-running" | "started" | "skipped:no-docker" | "port-conflict" | "compose-failed" | "gateway-unhealthy" | "console-misconfigured"; /** Local Ory gateway URL. Set when status is `already-running` or `started`. */ gatewayUrl?: string; /** Filesystem path to the compose project (for log hints). */ localDir: string; /** Human-readable detail / error message for logging. */ detail?: string; } /** * Bring up the local Ory stack and wait for the gateway to be healthy. * * Idempotent and fail-graceful: returns a typed result instead of exiting. * If the gateway is already healthy AND the running stack's config matches * what the current code generates (verified by a config fingerprint), the * function short-circuits without touching Docker; otherwise it regenerates * the config and runs `docker compose up -d --wait` to reconcile. When * `quiet` is set, progress is logged to stderr only (suitable for the dev * launcher); otherwise it prints to stdout in the format `localUp` historically used. */ export declare function ensureLocalOryStack(opts?: { quiet?: boolean; localDir?: string; }): Promise; export declare function localUp(opts?: { seed?: boolean; }): Promise; export declare function localDown(): Promise; export declare function localStatus(): Promise; export declare function localSeed(): Promise; export declare function localLogs(args: string[]): void; export declare function localReset(): Promise; export declare function localEnv(): void; /** * Point the shared config at the local Ory stack. * * The local stack is part of the plugin's developer-experience surface and * runs perfectly well without this: `local up` starts Kratos, Hydra, Keto, * and the Console regardless of what any plugin is connected to, and * connecting a plugin to a hosted Ory project takes none of that away. * * This command is the *opt-in* extra step of also pointing the security half * at the local stack, so sign-in runs against local Kratos/Hydra and permission * checks use the canonical local Agent Security origin. Because that writes the * connection values into the config every installed plugin shares, an existing * connection is reported before it is replaced — silently repointing someone's * hosted project at localhost is the kind of surprise this warns about. * * The Agent Security service is provided separately at * ``https://agents.console.ory:8080``; when it is not running, checks and * delegation recording retain their normal classified fail-open behavior. */ export declare function localConfigure(): void;