/** * Build the standard sync-rest patch failure message for missing anchors. * * @param functionName Name of the patcher that could not complete. * @param syncRestScriptPath Path to the workspace sync-rest script. * @param anchorDescription Human-readable description of the missing anchor. * @param subject Configuration subject the patcher was trying to wire. * @returns A formatted error message with manual recovery guidance. */ export declare function getSyncRestPatchErrorMessage(functionName: string, syncRestScriptPath: string, anchorDescription: string, subject: string): string; /** * Match the last `console.log(options.check ? ...)` block in sync-rest. * * Earlier logs can belong to the no-resources guard or package export branch; * generated sync loops must be inserted immediately before the final summary. */ export declare const FINAL_SYNC_SUMMARY_PATTERN: RegExp; /** * Add a required block-config value and type import to sync-rest source. * * @param options Import patching options. * @param options.functionName Name of the calling patcher for error messages. * @param options.nextSource Current sync-rest script source. * @param options.subject Value and type names that must be imported. * @param options.syncRestScriptPath Path to the target sync-rest script. * @returns Source with the block-config import updated or left unchanged. * @throws When the generated block-config import anchor cannot be found. */ export declare function replaceBlockConfigImport({ functionName, nextSource, subject, syncRestScriptPath }: { functionName: string; nextSource: string; subject: { configTypeName: string; constName: string; }; syncRestScriptPath: string; }): string; /** * Render a sync-rest guard for the selected empty resource collections. * * @param options Guard rendering options. * @param options.lineEnding Newline sequence to use in the emitted block. * @param options.subjects Candidate guard subjects and conditions. * @returns TypeScript source for the no-resources guard block. */ export declare function buildNoResourcesGuard({ lineEnding, subjects }: { lineEnding?: '\n' | '\r\n'; subjects: readonly { condition: string; include: boolean; subject: string; }[]; }): string; /** * Replace the generated no-resources guard in sync-rest source. * * @param nextSource Current sync-rest script source. * @param replacement New no-resources guard source. * @param functionName Name of the calling patcher for error messages. * @param syncRestScriptPath Path to the target sync-rest script. * @param subject Configuration subject the patcher was trying to wire. * @returns Source with the no-resources guard replaced. * @throws When the generated no-resources guard cannot be found. */ export declare function replaceNoResourcesGuard(nextSource: string, replacement: string, functionName: string, syncRestScriptPath: string, subject: string): string;