/** Result type for line/offset write actions — verification data only. */ export type LineOffsetWriteResult = { /** SHA-256 hex digest of the new file content. */ hash: string; /** 12-character hex operation id assigned by `lockedTransform`. */ opId: string; }; /** * Write (replace) a range of lines with new content. The range `[startLine, endLine]` * is inclusive and 1-based. Multi-line content is allowed (each `\n` in `content` * becomes a line break in the file). * * @param projectRoot - Trusted project root. * @param filePath - Project-root-relative file path. * @param startLine - First line to replace (1-based, inclusive). * @param endLine - Last line to replace (1-based, inclusive). * @param content - Replacement text; may contain `\n` to introduce multiple lines. * @param expectedHash - Optional SHA-256 hash for stale-file detection. * @returns Hash + opId of the resulting write. * @throws {Error} When path is unsafe, file extension is non-writable, governance * denylist blocks, file exceeds size limit, or line range is invalid. */ export declare function writeLines(projectRoot: string, filePath: string, startLine: number, endLine: number, content: string, expectedHash?: string): Promise; /** * Write (replace) a character range with new content. The range is `[offset, offset+limit)`. * Use `limit = 0` for pure insertion at the offset. * * @param projectRoot - Trusted project root. * @param filePath - Project-root-relative file path. * @param offset - 0-based character offset to start the replacement. * @param limit - Number of characters to remove (0 = insert only). * @param content - Replacement text. * @param expectedHash - Optional SHA-256 hash for stale-file detection. * @returns Hash + opId of the resulting write. * @throws {Error} When path is unsafe, file extension is non-writable, governance * denylist blocks, file exceeds size limit, or offset/limit is invalid. */ export declare function writeOffset(projectRoot: string, filePath: string, offset: number, limit: number, content: string, expectedHash?: string): Promise; /** * Insert one or more lines at the given 1-based line position, shifting all * subsequent lines down. Use `startLine = totalLines + 1` to append. * * @param projectRoot - Trusted project root. * @param filePath - Project-root-relative file path. * @param startLine - 1-based line position where the new lines are inserted. * @param content - Text to insert; may contain `\n` to introduce multiple lines. * @param expectedHash - Optional SHA-256 hash for stale-file detection. * @returns Hash + opId of the resulting write. * @throws {Error} When path is unsafe or `startLine` is out of range. */ export declare function insertLines(projectRoot: string, filePath: string, startLine: number, content: string, expectedHash?: string): Promise; /** * Insert text at a 0-based character offset, shifting all subsequent characters * to the right. Use `offset = 0` to prepend, `offset = totalLength` to append. * * @param projectRoot - Trusted project root. * @param filePath - Project-root-relative file path. * @param offset - 0-based character offset where the text is inserted. * @param content - Text to insert. * @param expectedHash - Optional SHA-256 hash for stale-file detection. * @returns Hash + opId of the resulting write. * @throws {Error} When path is unsafe or `offset` is out of range. */ export declare function insertOffset(projectRoot: string, filePath: string, offset: number, content: string, expectedHash?: string): Promise; /** * Delete a range of lines `[startLine, endLine]` (1-based, inclusive). Adjacent * lines are joined cleanly via array splice. * * @param projectRoot - Trusted project root. * @param filePath - Project-root-relative file path. * @param startLine - First line to delete (1-based, inclusive). * @param endLine - Last line to delete (1-based, inclusive); must be >= startLine. * @param expectedHash - Optional SHA-256 hash for stale-file detection. * @returns Hash + opId of the resulting write. * @throws {Error} When path is unsafe or line range is invalid. */ export declare function deleteLines(projectRoot: string, filePath: string, startLine: number, endLine: number, expectedHash?: string): Promise; /** * Delete a character range `[offset, offset+limit)`. Use `limit = 0` for a * no-op. * * @param projectRoot - Trusted project root. * @param filePath - Project-root-relative file path. * @param offset - 0-based character offset where deletion begins. * @param limit - Number of characters to delete. * @param expectedHash - Optional SHA-256 hash for stale-file detection. * @returns Hash + opId of the resulting write. * @throws {Error} When path is unsafe or offset/limit is invalid. */ export declare function deleteOffset(projectRoot: string, filePath: string, offset: number, limit: number, expectedHash?: string): Promise; //# sourceMappingURL=line-offset-ops.d.ts.map