import type { Config } from "../types/index.js"; export declare const CODEWITH_NATIVE_IMPORTS_ENV = "HASNA_CONFIGS_CODEWITH_NATIVE_IMPORTS"; export declare const SESSION_RENDER_MANAGED_MARKER = "Managed by @hasna/configs session render"; export declare const SESSION_RENDER_SCHEMA = "hasna.configs.session-render/v1"; export declare const RAW_STORE_ROOT_ENV = "HASNA_CONFIGS_HOME"; export declare const SESSION_RENDER_TOOLS: readonly ["claude", "codex", "cursor", "opencode", "codewith"]; export type SessionRenderTool = (typeof SESSION_RENDER_TOOLS)[number]; export type SessionRenderMode = "native-imports" | "flattened-markdown" | "cursor-mdc" | "opencode-instructions"; export type SessionInstructionLayer = "global" | "tool" | "account" | "agent" | "project" | "local"; export type SessionInstructionMerge = "append" | "replace"; export type SessionRenderFileRole = "index" | "fragment" | "rule" | "config" | "manifest"; export type SessionRenderTargetKind = "session-home" | "project-root" | "blocked"; export type SessionTargetOwnerKind = "provider-profile" | "project" | "blocked"; export interface SessionInstructionOwner { kind: string; id: string; } export interface SessionInstructionSourcePath { path: string; editable?: boolean; required?: boolean; hash?: string; } export interface SessionInstructionRule { id: string; content: string; label?: string; path?: string; globs?: string[]; hash?: string; metadata?: Record | null; } export interface SessionToolAdapter { tool: SessionRenderTool; mode: SessionRenderMode; indexFile?: string; configFile?: string; managedDir: string; envVar?: string; nativeImports: boolean; description: string; } export interface SessionInstructionSource { id: string; content: string; label?: string; layer?: SessionInstructionLayer; merge?: SessionInstructionMerge; order?: number; path?: string; rules?: SessionInstructionRule[]; provenance?: Record | null; targetProviders?: string[]; owner?: SessionInstructionOwner | null; sourcePaths?: SessionInstructionSourcePath[]; globs?: string[]; hash?: string; nonOverridable?: boolean; replacementScope?: string; metadata?: Record | null; } export interface SessionTargetOwner { kind: SessionTargetOwnerKind; tool: SessionRenderTool; profile: string; targetHome: string; projectRoot: string | null; ownedBy: "open-configs"; reason: string; } export interface SessionRenderInput { tool: SessionRenderTool; profile: string; sources: SessionInstructionSource[]; projectRoot?: string; targetHome?: string; sessionId?: string; generatedAt?: string; codewithNativeImports?: boolean; allowEmptySources?: boolean; } export interface SessionRenderFile { path: string; relativePath: string; role: SessionRenderFileRole; content: string; sha256: string; sourceIds: string[]; } export interface SessionRenderManifest { schema: typeof SESSION_RENDER_SCHEMA; tool: SessionRenderTool; adapterMode: SessionRenderMode; profile: string; sessionId: string | null; targetHome: string; targetKind: SessionRenderTargetKind; targetOwner: SessionTargetOwner; writable: boolean; blocked: boolean; blockers: string[]; generatedAt: string; env: Record; sourceHash: string; sources: Array<{ id: string; label: string; layer: SessionInstructionLayer; merge: SessionInstructionMerge; order: number; path: string | null; targetProviders: string[]; owner: SessionInstructionOwner | null; sourcePaths: SessionInstructionSourcePath[]; hash: string | null; nonOverridable: boolean; replacementScope: string | null; rules: Array<{ id: string; label: string; path: string; globs: string[]; hash: string | null; }>; provenance: Record | null; }>; skippedSources: Array<{ id: string; label: string; targetProviders: string[]; reason: string; }>; files: Array<{ path: string; relativePath: string; role: SessionRenderFileRole; sha256: string; sourceIds: string[]; }>; warnings: string[]; } export interface SessionRenderPlan { dryRun: true; tool: SessionRenderTool; adapter: SessionToolAdapter; profile: string; sessionId: string | null; targetHome: string; targetKind: SessionRenderTargetKind; targetOwner: SessionTargetOwner; writable: boolean; blocked: boolean; blockers: string[]; env: Record; files: SessionRenderFile[]; manifest: SessionRenderManifest; manifestFile: SessionRenderFile; allFiles: SessionRenderFile[]; warnings: string[]; } export declare const SESSION_TOOL_ADAPTERS: Record; export declare function cleanSessionPathInput(path: string): string; export declare function resolveSessionPath(path: string): string; export declare function resolveSessionTargetOwnership(input: Pick, target: { targetHome: string; targetKind: SessionRenderTargetKind; }): SessionTargetOwner; export declare function planSessionRender(input: SessionRenderInput): SessionRenderPlan; export declare function sourceFromFilePath(path: string, content: string, order?: number): SessionInstructionSource; export declare function sourceFromConfig(config: Pick, order?: number, layer?: SessionInstructionLayer): SessionInstructionSource; export declare function sourcesFromIdentityExport(value: unknown, options?: { path?: string; tool?: SessionRenderTool; orderOffset?: number; }): SessionInstructionSource[]; //# sourceMappingURL=session-render.d.ts.map