import { type LiveGraphOutput } from './graph-report.js'; import { type EngineShardPolicyResolution } from './orchestrate/engine-shard-policy.js'; import type { GraphCommandOptions } from './graph-options.js'; import type { Shard } from './orchestrate/shard-model.js'; import type { GraphProgressCallback, RunGraphResult } from './orchestrate.js'; import type { GraphProfileRunRecorder } from './profile.js'; import type { GraphConfig, ResolutionMode, Rule } from '../types.js'; import type { ToolCliContext } from '@opensip-cli/core'; import type { DataStore } from '@opensip-cli/datastore'; /** * Resolve a path to absolute (a relative input resolves against `base`, not * necessarily `process.cwd()`), then realpath it so exact and sharded engines see * one canonical run root. Falls back to the absolute path when realpath fails. */ export declare function realpathOrSelf(input: string, base: string): string; /** Shard resolution plus optional synthetic-partition timing. */ export type ShardResolution = EngineShardPolicyResolution; /** * Engine-selection policy (ADR-0033, superseding ADR-0032/0031). The sharded * engine is the default when the project can actually shard; exact is selected * for `--exact`, positional runs, or non-shardable projects. */ export declare function resolveEngineShards(opts: GraphCommandOptions, cli: ToolCliContext, positionalPaths: readonly string[]): Promise; /** Human-readable explanation for the graph engine observability event. */ export declare function engineSelectionReason(opts: GraphCommandOptions, positionalPaths: readonly string[], sharded: boolean): string; /** * Resolve a project's shard set the same way a production `graph` run does, * exposed for the real-repo equivalence guardrail. */ export declare function resolveShardsForCwd(cwd: string, cliScript: string, cli: ToolCliContext): Promise; /** Inputs the sharded build path threads from `executeGraph`. */ export interface ShardedBuildContext { readonly opts: GraphCommandOptions; readonly shards: readonly Shard[]; readonly projectRoot: string; readonly cli: ToolCliContext; readonly config: GraphConfig; readonly rules: readonly Rule[]; readonly onProgress?: GraphProgressCallback; } /** * Run a sharded build and record its wall-clock stage in the optional graph * profile. The build result is unchanged; this helper only centralizes timing * so the main command handler does not own sharded profiling mechanics. */ export declare function runProfiledShardedBuild(profileRun: GraphProfileRunRecorder | undefined, ctx: ShardedBuildContext): Promise; /** * Serializable live-build request handed from the interactive runner to the * graph engine. Mirrors the subset of GraphCommandOptions the live view needs. */ export interface GraphLiveBuildArgs { readonly cwd: string; readonly noCache?: boolean; readonly resolution?: ResolutionMode; readonly exact?: boolean; readonly config?: GraphConfig; readonly rules?: readonly Rule[]; readonly cliScript?: string; } /** * Resolve the live runner's build engine with the same shardability policy the * static `graph` command uses. The live UI consumes the returned shard list to * choose exact vs. sharded worker execution. */ export declare function resolveLiveEngineShards(args: GraphLiveBuildArgs, cli: ToolCliContext): Promise; /** * Execute a sharded graph build for the interactive/live runner and reduce the * result to the serializable `LiveGraphOutput` shape consumed by Ink and worker * transports. */ export declare function runShardedLiveBuild(args: GraphLiveBuildArgs, shards: readonly Shard[], datastore: DataStore | undefined, onProgress: GraphProgressCallback): Promise; //# sourceMappingURL=graph-sharded-engine.d.ts.map