repos

Apply a batch of file-level edits in an active repo session: write, replace, writeJson, delete, or move.

Apply a batch of file-level edits in an active repo session: write, replace, writeJson, delete, or move. Same-path write/replace/writeJson edits in one call compose in order against each prior result. Use write for whole-file replacements or for creating new files when a unified diff for repoApplyPatch would be brittle (for example, single-file job sources or generated package modules). A write replaces the file at path with content exactly, creates missing parent directories, and treats empty content as clearing the file. Each edit returns a per-file diff plus a changed flag. This is the file-level repo session API: use repoRebaseSession to merge from the published default branch. There is no git-command channel; branch, checkout, and remote operations are not available in sessions (use the git lane via packageGetGitRemote for full git). Each content-changing edit is subject to a 10 MiB per-file size limit on the planned result. Edits mutate the live session overlay only; pair with repoCommit, repoRunChecks, and repoPublishSession to validate and publish.

Org permission: package:write.

post/v1/repo-sessions/{session_id}/edits

Request

  • Base URL: https://api.kody.codes
  • URL: https://api.kody.codes/v1/repo-sessions/{session_id}/edits
  • Auth: HTTP bearer

Path parameters

session_idstring required

Active repo session id from repoOpenSession or repoListSessions.

Request body

dry_runboolean

Preview edits without mutating the workspace.

rollback_on_errorboolean

When true (default), roll back the batch if any edit fails. Set false to keep partial progress.

Response

Success.

dry_runboolean required
total_changedinteger required

Changes

No recorded changes to this operation across all 3 revisions of this API.