Session Plan Artifact Patches
const url = 'https://agents.lumalabs.ai/v1/sessions/example/plan-artifact/patches?since=1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://agents.lumalabs.ai/v1/sessions/example/plan-artifact/patches?since=1' \ --header 'Authorization: Bearer <token>'The patch chain carrying a client from since to the current revision.
The delta half of the plan read path: plan.updated tells a client THAT
the document moved, this says what moved, and the snapshot stays the
fallback whenever a chain cannot be trusted.
Serves a chain only when it is provably whole — one patch per revision in
(since, current]. When it is not, the answer is complete=False and
NO patches rather than a prefix: read the full document from the snapshot
instead.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The revision the client already holds.
The revision the client already holds.
Responses
Section titled “ Responses ”Successful Response
The patch chain carrying a client from its revision to the server's.
complete=False is the ONLY thing a client needs to branch on: it means
this chain cannot be trusted to reconstruct the document (a gap, a revision
recorded twice under the unlocked revision++ race, or a client asking
from a revision with no record), so the client must fall back to the full
snapshot. patches is empty whenever it is false — an incomplete chain is
never partially served, because applying a prefix would leave the client
silently describing itself as a revision it does not hold.
object
Whether patches reconstructs revision exactly.
Echo of the requested since revision.
Ordered hops from from_revision to revision.
One revision's hop: the RFC-6902 ops carrying the previous revision's document to this one, plus the hash of the result.
object
SHA-256 over canonical JSON of the document AFTER this hop.
Tool/stage that performed the mutation.
RFC-6902 ops from revision-1 to this revision.
object
The revision this hop produces.
The server's current plan-artifact revision.
The session's state, so a delta read need not also fetch the snapshot.
Example
{ "state": "active"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}