import type { ScaffoldConfig, PipelineState, ArtifactEntry, MetaPromptFile } from '../../types/index.js'; import type { OutputContext } from '../../cli/output/context.js'; /** * Resolve a single cross-read against a foreign service's state, with allowlist * check, per-service state cache, path containment, warning symmetry with the * existing `reads` loop in run.ts, and an optional runtime global-step guard. * * Returns { completed, artifacts } so transitive callers can gate recursion on * step completion rather than artifact count (aggregator steps may produce no * artifacts of their own but still have valid transitive cross-reads). */ export declare function resolveDirectCrossRead(cr: { service: string; step: string; }, config: ScaffoldConfig, projectRoot: string, output: OutputContext, foreignStateCache: Map, globalSteps?: Set): { completed: boolean; artifacts: ArtifactEntry[]; }; /** * DFS-driven transitive cross-reads resolver with: * - cycle detection via `visiting` set (gray nodes), * - memoization via `resolved` map (black nodes) caching the FULL closure per service:step, * - per-service foreign-state cache via `foreignStateCache`, * - per-traversal dedup via a local Map, * - skips foreign meta of category: 'tool' for transitive lookup. * * Gates transitive recursion on `direct.completed` (not artifact count) so * aggregator steps with empty `produces` still participate in the chain. */ export declare function resolveTransitiveCrossReads(crossReads: Array<{ service: string; step: string; }>, config: ScaffoldConfig, projectRoot: string, metaPrompts: Map, output: OutputContext, visiting: Set, resolved: Map, foreignStateCache: Map, globalSteps?: Set, overlayCrossReads?: Record>): ArtifactEntry[]; export type CrossReadStatus = 'completed' | 'pending' | 'not-bootstrapped' | 'read-error' | 'service-unknown' | 'not-exported'; /** Human-facing rendering of CrossReadStatus for text display in next/status. */ export declare function humanCrossReadStatus(status: CrossReadStatus): string; export interface CrossReadReadiness { service: string; step: string; status: CrossReadStatus; } /** * Compute readiness status for a list of cross-reads. Shared by `next --service` * and `status --service` so both commands surface identical diagnostics. * Uses a per-call Map cache to avoid re-reading the same foreign state file. */ /** * Internal sentinel distinguishing "foreign file missing" from "foreign file * exists but failed to load". `null` = not-bootstrapped (no state.json); * `'read-error'` = state.json existed but parse/validation failed. */ type ForeignStateCacheEntry = PipelineState | null | 'read-error'; export declare function resolveCrossReadReadiness(crossReads: Array<{ service: string; step: string; }>, config: ScaffoldConfig, projectRoot: string, globalSteps?: Set, cache?: Map): CrossReadReadiness[]; export {}; //# sourceMappingURL=cross-reads.d.ts.map