Skip to content

List the Op invocation records of the project.

API version mission-status unreleased

GET
/ops/invocations

Returns one page of the Op invocations of the project, newest first: startedAt descending, with ties broken by invocationId descending. An Op is one governed invocation of an agent profile on an action, recorded in the Ops directory. Paging uses the shared opaque page cursor: pass the nextPageCursor of one response as pageCursor to fetch the next page, and stop when hasNextPage is false. A pageCursor that is malformed, forged, or issued for another profile is answered with 400 and a problem whose code is invalid_page_cursor. The optional profile query parameter keeps the Ops of one profile; a profile that matches no Op gives an empty page, and a profile that fails its pattern is a 400 problem. Records with legacy or malformed content are skipped, never served and never a failure: a record of an older shape, an empty or truncated file, a file whose name differs from its invocation id, an index entry that names no file and a malformed field are skipped and counted in skippedCount, over the same candidate set as totalCount and independent of profile, because a skipped record has no reliable profile. totalCount is the number of served Ops matching profile, and it can lag the newest records, which an Op appended after the read began may not yet be part of. An Op is closed when its own file holds a completion or the closure spine holds a record for its id. A directory, the closure spine or an Op file that exists but cannot be opened is a 500 problem, never an empty page. The operation never starts an agent and never writes.

Parameters

Query Parameters

pageSize
integer
default: 50 >= 1 <= 200

The number of items to return in one page. The service may apply a smaller maximum.

pageCursor
PageCursor

An opaque pagination token. A consumer passes it back unchanged to fetch the next page and never parses, builds or compares it. It has no relationship to the event stream position that GET /events uses for resuming a stream.

string
>= 1 characters

The opaque token from the previous page’s nextPageCursor. Omit it to fetch the first page.

profile
string
/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/

Keeps only the Op invocations of one agent profile, by its profile id. A profile that matches no Op gives an empty page, and a value that fails the pattern is refused with 400. A page cursor is bound to the profile it was issued for.

Responses

200

One page of Op invocations.

Media type application/json
OpsInvocationPage

One page of Op invocations, ordered by startedAt descending with ties broken by invocationId descending, plus the shared pagination state and two counts. totalCount is the number of served Ops that match the profile filter and can lag the newest records. skippedCount is the number of legacy or unreadable records that were skipped, over the same candidate set and independent of the profile filter. Skipped records are in neither items nor totalCount. A project with no Ops directory answers an empty page with both counts 0.

object
items
required

The Ops of this page, in the order the operation defines.

Array<object>
OpsInvocation

One Op: a governed invocation of an agent profile on an action, as recorded in the Ops directory, with the state of its closure. It is open until its own file holds a completion or the closure spine holds a record for its id, and then closed; an open Op has no outcome, closer, completion instant or evidence. A record of an older shape or an unreadable record is never served as an Op; it is skipped and counted. Record fields left out on purpose, because they are free text, model identity or internal routing state: request_text, model_id, governance_context_hash, governance_context_available and router_confidence. The schema is closed, so a payload carrying any of them is invalid.

object
action
required

The canonical action token the Op was opened for. A record whose value does not fit the pattern is skipped, never served.

string
/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/
actor
required
ActorHandle

The handle of the tool, role or agent that opened the Op, or null when the stored value is not a handle or holds a credential.

string | null
>= 1 characters <= 128 characters /^[A-Za-z0-9._:-]+$/
closedBy
required
One of:
OpsClosedBy

Who closed an Op: the agent that ran it, or doctor_sweep when a sweep closed an Op that the agent left open. An open Op has no closer.

string
Allowed values: agent doctor_sweep
completedAt
required

When the Op was closed, as an RFC 3339 date-time with an offset, or null while it is open. For an Op closed by a sweep it is the instant of the closure.

string | null format: date-time
evidence
required
One of:
OpsEvidence

The evidence a closed Op recorded, made safe to show: a class, a value of at most 512 characters and whether the value was changed. Host paths are replaced by [path], e-mail addresses by [email], and the userinfo, query and fragment of an address are removed. A value that holds a credential is never served at all, so the evidence of the Op is null instead.

object
kind
required
OpsEvidenceKind

The class of the evidence, decided by the shape of the stored value.

string
Allowed values: repo_path url text
redacted
required

True exactly when value differs from the stored evidence reference, because something was removed or the text was cut.

boolean
value
required

The stored evidence with host paths, e-mail addresses and address userinfo removed, cut to at most 512 characters.

string
<= 512 characters
invocationId
required

The 26-character ULID of the Op, which is also the stem of its file name.

string
/^[0-9A-HJKMNP-TV-Z]{26}$/
missionId
required
One of:
MissionId

The canonical machine identity of a Mission: a 26-character Crockford ULID minted when the Mission is created and never changed. Never confuse it with displayNumber, which is display-only and repeats.

string
/^[0-9A-HJKMNP-TV-Z]{26}$/
modeOfWork
required
OpsModeOfWork

How the work of the Op was framed.

string
Allowed values: task_execution advisory mission_step query
outcome
required
One of:
OpsOutcome

How a closed Op ended, done, failed or abandoned. An open Op has no outcome.

string
Allowed values: done failed abandoned
profileId
required

The identifier of the agent profile the Op ran under. A record whose value does not fit the pattern is skipped, never served.

string
/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/
startedAt
required

When the Op was opened, as an RFC 3339 date-time with an offset.

string format: date-time
status
required
OpsInvocationStatus

Whether the Op is open or closed, counting the closure spine.

string
Allowed values: open closed
wpId
required
One of:
WpId

The identifier of a work package inside one Mission: the letters WP and at least two digits, for example WP01 (the same rule the planning-file reader enforces). A status-transition row of the event log whose work package id does not match is not forwarded as an event and is counted as dropped. It is unique within a Mission and is not unique across Missions, so it is always read together with a missionId.

string
>= 1 characters <= 64 characters /^WP[0-9]{2,}$/
pageInfo
required
PageInfo

Whether another page follows and the token that fetches it.

object
hasNextPage
required

True when another page follows this one.

boolean
nextPageCursor
required
One of:
PageCursor

An opaque pagination token. A consumer passes it back unchanged to fetch the next page and never parses, builds or compares it. It has no relationship to the event stream position that GET /events uses for resuming a stream.

string
>= 1 characters
pageSize
required

The number of items the service applied as the page size for this response.

integer
>= 1
skippedCount
required

The number of legacy or unreadable records skipped over the candidate set, independent of the profile filter.

integer
totalCount
required

The number of served Ops that match the profile filter, over the candidate set. It can lag the newest records.

integer

400

The page cursor of the list request was refused. The body is a problem details object whose code is invalid_page_cursor.

Media type application/problem+json
PageCursorRefusal

The problem details body of a refused page cursor: the pageCursor of a list request is malformed, forged or no longer valid. It is a Problem whose code is always invalid_page_cursor and whose status is always 400. A refused request is answered before any page is returned. Consumers branch on code, never on title. It is unrelated to the refusals of the event stream (StreamRefusal) and to the stream cursor.

object
code
required

A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies this occurrence of the problem.

string
status
required

The HTTP status code of this occurrence.

integer
>= 400 <= 599
title
required

A short, human-readable summary of the kind of problem. It does not change between occurrences.

string
type

A URI reference that identifies the kind of problem. Absent means about:blank.

string
code
required

The only refusal reason of a page cursor.

string
Allowed value: invalid_page_cursor
status
required

The HTTP status of the refusal, always 400 for a refused page cursor.

integer
Allowed value: 400

500

The Ops directory, the closure spine or an Op file could not be opened, refused with 500 and never answered as an empty or partial page. The body is a problem details object whose code is ops_unreadable.

Media type application/problem+json
OpsRefusal

The problem details body of a refused Ops read. It is a Problem whose code is ops_unreadable, and the status is 500. The body carries no host path, no directory and no record content. Consumers branch on code, never on title.

object
code
required

A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies this occurrence of the problem.

string
status
required

The HTTP status code of this occurrence.

integer
>= 400 <= 599
title
required

A short, human-readable summary of the kind of problem. It does not change between occurrences.

string
type

A URI reference that identifies the kind of problem. Absent means about:blank.

string
code
required
OpsRefusalCode

The reason of the refusal. The status is fixed by it, 500 for ops_unreadable.

string
Allowed values: ops_unreadable

default

The request failed. The body is a problem details object.

Media type application/problem+json
Problem

The only non-2xx body of any module. A problem details object in the sense of RFC 9457, served as application/problem+json.

object
code

A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies this occurrence of the problem.

string
status
required

The HTTP status code of this occurrence.

integer
>= 400 <= 599
title
required

A short, human-readable summary of the kind of problem. It does not change between occurrences.

string
type

A URI reference that identifies the kind of problem. Absent means about:blank.

string