The idea#
An agent plans against one revisionA number that goes up by one every time the project is changed. and sends the whole batchA list of edits sent together and applied as one step.. The core applies all of it or none of it, as one undo step.
Quick start#
- Read the revision with
project_get. - Plan the batch. Give your own ids to what later operations in the same batch use.
- Send it with
base_revision. Add anidempotency_keyif the call may be retried. - Read the result:
revision,created,diffandfindings.
When the answer is E_REVISION_CONFLICT, the error carries the changes since your revision as a text diff. Read it, plan again against the new revision and send a new batch.
Common mistakes#
- Reusing an
idempotency_keyfor a different batch:E_IDEMPOTENCY_MISMATCH. - Retrying an error whose
retryableis false. Only retry when it is true.