Skip to content

Read the text content of one artifact.

API version mission-status unreleased

GET
/missions/{missionId}/artifacts/content

Returns the decoded and redacted text of one artifact selected by the required query parameter path. The path is decoded once at the HTTP layer and judged as decoded. The order of decision is fixed: 400 for a missing, repeated or malformed path, 404 for an unknown Mission or a path that names no eligible artifact (eligibility denies by default, as listArtifacts describes, so a .env, a key or a credential file name is 404 and is never opened), 413 for a file larger than 262,144 bytes (it is not read), 500 when the file or the Mission directory cannot be read, 415 for a file that holds a NUL byte or is not valid UTF-8, and 422 for a file that holds a credential. A symlink is never followed, neither as the file nor as a directory on the way to it, and the two root status records of the Mission, status.events.jsonl and status.json (matched without regard to case), are not artifacts. The body of a 200 carries host paths and e-mail addresses as [path] and [email]; the size cap is measured on the raw bytes before redaction.

Parameters

Path Parameters

missionId
required
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}$/

The identity of the Mission, a 26-character ULID. It is the only identifier accepted to select a Mission; the display number is never accepted.

Query Parameters

path
required
ArtifactPath

The path of one artifact, relative to the Mission directory and written with forward slashes. It is never an absolute location: it does not start with a slash, a tilde and a slash, or a drive letter and a colon, it holds no backslash, no NUL character and no line break (a line feed, carriage return, vertical tab, form feed, one of the three information separators, the next-line character, or a line or paragraph separator), it has no empty segment and no trailing slash, and no segment is a single or double dot. A name with a space, an accented letter, an at sign, a leading dot or a directory segment named home is a valid path. The pattern restates the artifact-path rule of the service, which decides the same way on every string; a request path the rule refuses is answered 400.

string
>= 1 characters <= 512 characters /^(?![\s\S]*[\n\r\x0B\x0C\x1C-\x1E\x85\u2028\u2029])(?!~/)(?![A-Za-z]:)(?!\.\.?(?:/|$))[^/\\\x00]+(?:/(?!\.\.?(?:/|$))[^/\\\x00]+)*$/

The path of the artifact to read, relative to the Mission directory and written with forward slashes (for example tasks/WP01-example.md). It is sent once, percent-encoded as any query value, and decoded once at the HTTP layer: the service judges the decoded value, never a value that was decoded twice. A missing, repeated or malformed path is answered 400.

Responses

200

The text content of the artifact.

Media type application/json
ArtifactContent

The text content of one artifact. The content is decoded as strict UTF-8 (a leading byte order mark stays, replacement characters are never used) and then redacted: every host path becomes [path] and every e-mail address becomes [email]. A file that holds a NUL byte or invalid UTF-8 is refused 415, one larger than 262,144 bytes 413, one that holds a credential 422; a refusal never carries content.

object
content
required

The decoded text of the file with host paths and e-mail addresses replaced. It is the empty string for an empty file.

string
encoding
required

The text encoding of content. It is always utf-8.

string
Allowed value: utf-8
kind
required
ArtifactKind

The class of the file, decided from its path.

string
Allowed values: review_cycle work_package_prompt spec plan tasks data_model quickstart analysis_report research contract checklist other
mediaType
required

The media type, decided from the extension of the file and never from its content: md text/markdown, json application/json, yaml and yml application/yaml, jsonl application/x-ndjson, csv text/csv, any other extension text/plain.

string
>= 1 characters
path
required
ArtifactPath

The path of the file, relative to the Mission directory, as it was requested.

string
>= 1 characters <= 512 characters /^(?![\s\S]*[\n\r\x0B\x0C\x1C-\x1E\x85\u2028\u2029])(?!~/)(?![A-Za-z]:)(?!\.\.?(?:/|$))[^/\\\x00]+(?:/(?!\.\.?(?:/|$))[^/\\\x00]+)*$/
redacted
required

True when at least one host path or e-mail address in the decoded text was replaced, so content differs from the file.

boolean
sizeBytes
required

The size of the file in bytes as measured on the open file, before redaction. It is 0 for an empty file and is never derived from the length of content.

integer

400

The path of the artifact request was refused with 400: it is missing, repeated or malformed (empty, longer than 512 characters, absolute, with a backslash, a NUL character or a line break, with an empty, single-dot or double-dot segment). The body is a problem details object whose code is invalid_artifact_path.

Media type application/problem+json
ArtifactRefusal

The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. 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
ArtifactRefusalCode

The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.

string
Allowed values: invalid_artifact_path not_found artifact_too_large artifact_not_text artifact_secret artifact_unreadable artifact_listing_unreadable

404

The Mission or the artifact does not exist, or the path names no eligible artifact (a directory, a symlink, a path through a symlink, or a root status record, whose name is matched without regard to case), refused with 404. The body is a problem details object whose code is not_found.

Media type application/problem+json
ArtifactRefusal

The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. 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
ArtifactRefusalCode

The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.

string
Allowed values: invalid_artifact_path not_found artifact_too_large artifact_not_text artifact_secret artifact_unreadable artifact_listing_unreadable

413

The artifact is larger than 262,144 bytes, refused with 413 without reading it. The body is a problem details object whose code is artifact_too_large.

Media type application/problem+json
ArtifactRefusal

The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. 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
ArtifactRefusalCode

The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.

string
Allowed values: invalid_artifact_path not_found artifact_too_large artifact_not_text artifact_secret artifact_unreadable artifact_listing_unreadable

415

The artifact is not text, refused with 415: it holds a NUL byte or is not valid UTF-8. The body is a problem details object whose code is artifact_not_text.

Media type application/problem+json
ArtifactRefusal

The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. 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
ArtifactRefusalCode

The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.

string
Allowed values: invalid_artifact_path not_found artifact_too_large artifact_not_text artifact_secret artifact_unreadable artifact_listing_unreadable

422

The artifact holds a credential, refused with 422 and no content. The credentials are a GitHub token (the prefixes ghp, gho, ghu, ghs and ghr, and the fine-grained prefix github_pat), an AWS access key id (the prefixes AKIA and ASIA) and the header line of a PEM private key. The body is a problem details object whose code is artifact_secret.

Media type application/problem+json
ArtifactRefusal

The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. 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
ArtifactRefusalCode

The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.

string
Allowed values: invalid_artifact_path not_found artifact_too_large artifact_not_text artifact_secret artifact_unreadable artifact_listing_unreadable

500

The artifact or the Mission directory could not be read, refused with 500. The body is a problem details object whose code is artifact_unreadable.

Media type application/problem+json
ArtifactRefusal

The problem details body of a refused artifact read. It is a Problem whose code is one of seven values, and the status follows from the code: 400 for invalid_artifact_path, 404 for not_found, 413 for artifact_too_large, 415 for artifact_not_text, 422 for artifact_secret, and 500 for artifact_unreadable and artifact_listing_unreadable. The body carries no file content, no host path and no Mission directory. 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
ArtifactRefusalCode

The reason of the refusal. The status is fixed by it: 400, 404, 413, 415, 422, 500 and 500 in the order of the values.

string
Allowed values: invalid_artifact_path not_found artifact_too_large artifact_not_text artifact_secret artifact_unreadable artifact_listing_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