/** * Shared contributor-set resolution for aggregate ownership units. * * An aggregate managed output (the Rules region, an agent's managed hook * entries, the Hook fallback region, the Knowledge discovery region) is always * rendered whole from the complete contributor set the desired-state graph * reaches. Writers receive contributors from these helpers and never derive * membership from raw settings entries, lock rows, or the unit's own content. * * @experimental This API is unstable and may change without notice. */ import * as Effect from "effect/Effect"; import type * as FileSystem from "effect/FileSystem"; import * as Option from "effect/Option"; import type * as Path from "effect/Path"; import { type AppError } from "../app-error/index.js"; import { type ExtensionType, type ExtensionTypePlural } from "../extensions/index.js"; import { type ExtensionPathLockEntry } from "../extensions/extension-paths.js"; import { type TreeIntegrity } from "../extensions/materialized-tree.js"; import type { Handle } from "../extensions/handle.js"; import type { DesiredExtensionNode, DesiredStateGraph } from "../workspace/desired-state-graph.js"; import type { WorkspaceLayout } from "../workspace/layout.js"; /** * Minimal structural view of a per-extension source lock entry. Registry * entries locate a canonical package under the registry extensions tree; * every other source class materializes under the external extensions tree. */ export type SourceLockEntryLike = ExtensionPathLockEntry & { readonly workspaceName: string; readonly packageOwner?: Handle | undefined; readonly treeIntegrity: TreeIntegrity; }; /** One member of an aggregate unit's contributor set, resolved to content. */ export interface AggregateContributor { readonly node: DesiredExtensionNode; readonly packageRoot: string; /** * Marker identity owner for registry and workspace sources. Git and local * sources derive marker identity from the canonical manifest instead. */ readonly identityOwner: Option.Option; } /** Stable recovery-conformance identity for aggregate writes blocked by an incomplete graph. */ export declare const INCOMPLETE_DESIRED_STATE_BLOCKER_ID: "projection/desired-state-graph-complete"; /** * Gate aggregate-unit writes on a complete desired-state graph. An operation * that cannot enumerate the complete contributor set writes nothing. */ export declare const requireCompleteGraph: (graph: DesiredStateGraph) => Effect.Effect; /** Enabled desired nodes of one extension type. */ export declare const activeNodesOfType: (graph: DesiredStateGraph, type: ExtensionType) => ReadonlyArray; /** * Resolve the canonical package root for one contributor from its node * identity and accepted lock entry. Never reads settings, never resolves * sources, and never touches the network. */ export declare const contributorForNode: (args: { readonly layout: WorkspaceLayout; readonly path: Path.Path; readonly node: DesiredExtensionNode; /** Type-specific segment under the extensions trees, e.g. `rules`. */ readonly extensionDir: ExtensionTypePlural; readonly locked: SourceLockEntryLike | undefined; }) => Effect.Effect; /** * Resolve the complete contributor set for one extension type: every enabled * node the complete desired-state graph reaches, whether declared directly or * contributed by a Pack, each resolved to its canonical package root. */ export declare const activeContributors: (args: { readonly layout: WorkspaceLayout; readonly path: Path.Path; readonly type: ExtensionType; readonly extensionDir: ExtensionTypePlural; readonly graph: DesiredStateGraph; readonly locked: Readonly>; }) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; //# sourceMappingURL=contributors.d.ts.map