API reference

CI records

Ciresk CI jobs attached to a session as evidence, each checked against the trees the session applied.

GET/v1/dev/sessions/{session_id}/ci_records

List CI records

The session's verified ci records, newest first, each marked current when it ran on the session's current tree.

Owner and members. Every field is what the ci cell answered when the record was made.

Permission: dev:sessions.read

Parameters

NameTypeRequiredDescription
session_idpathstringRequiredThe session's ID.
cursorquerystringOptional
limitqueryintegerOptional

Response200 OK

dataarray of objectsRequired
data[].actorstringRequired
who recorded it as a person reads it: Claude Code · Lucas
data[].agentstring or null
data[].commitstringRequired
the commit the job named as its base (ci's base_digest)
data[].currentbooleanRequired
tree_digest is the session's current root
data[].exit_codeinteger or null
data[].generationintegerRequired
the session generation whose root it is
data[].job_idstringRequired
data[].job_urlstringRequired
data[].kindstringRequired
the job's kind as ci gave it: check, test, build, lint or a manifest task
data[].pr_urlstring or null
null until forge opens change requests
data[].recorded_bystringRequired
the requester's subject
data[].session_idstringRequired
data[].tree_digeststringRequired
the tree root the job ran on
data[].verdictstringRequired
ci's terminal state of the jobOne of succeeded, failed, cancelled, timed_out, infra_error
data[].verified_atstring (date-time)Required
has_morebooleanRequired
next_cursorstring or null
curl "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/ci_records" \
  -H "Authorization: Bearer $CIRESK_KEY"
POST/v1/dev/sessions/{session_id}/ci_records

Attach a CI record

Attach a ci job to the session as evidence - dev reads the job from the ci cell and checks it ran on a tree this session applied.

The session CI record. The owner or a member with use, or their agent, names a job; dev reads it with the organisation's own service:dev credential from the ci cell (ci.jobs.get) and stores ci's answer, never the client's. Accepted only when the job is terminal (else 409 ci_job_running with Retry-After), ran on a tree (else 422 ci_job_without_tree) and its tree root is the root of a session.applied event of this session (else 422 tree_not_in_session). A job the ci cell does not show to the organisation is 404; ci unreachable is 503 ci_unavailable and nothing is stored; without a ci url the capability answers 503 ci_not_configured. Appends an inbound ci.verdict event. The same job again returns its record (200). At most 500 records per session (409 too_many_ci_records).

Permission: dev:sessions.attach

Parameters

NameTypeRequiredDescription
session_idpathstringRequiredThe session's ID.

Request body

job_idstringRequired
the ci job, as ciresk ci run --json prints data.id

Response200 OK

actorstringRequired
who recorded it as a person reads it: Claude Code · Lucas
agentstring or null
commitstringRequired
the commit the job named as its base (ci's base_digest)
currentbooleanRequired
tree_digest is the session's current root
exit_codeinteger or null
generationintegerRequired
the session generation whose root it is
job_idstringRequired
job_urlstringRequired
kindstringRequired
the job's kind as ci gave it: check, test, build, lint or a manifest task
pr_urlstring or null
null until forge opens change requests
recorded_bystringRequired
the requester's subject
session_idstringRequired
tree_digeststringRequired
the tree root the job ran on
verdictstringRequired
ci's terminal state of the jobOne of succeeded, failed, cancelled, timed_out, infra_error
verified_atstring (date-time)Required

Errors

curl -X POST "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/ci_records" \
  -H "Authorization: Bearer $CIRESK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "job_id": "job_0109badfc220cd056b2c0e862ac73d40"
  }'