Refusal

works.iterative.claude.ui.transcript.Refusal
object Refusal

The shape a refusal travels in.

Every refusal this contract carries says the same three things: which case it is, what it is about where that means anything, and the words to show a reader. Written once here, so a page has one thing to read whether what failed was a transcript or a session.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Refusal.type

Members list

Value members

Concrete methods

def bounded(subject: String): String

A subject cut down to something safe to repeat back.

A subject cut down to something safe to repeat back.

A subject is shaped by whoever asked, so it is repeated only far enough for them to recognise their own mistake: no control characters, and a bound on how much of it travels. Shared, because every refusal vocabulary that names what it refused wants the same rule.

Attributes

def read(json: Json): Option[(String, Option[String])]

The case and its subject, read back off the wire.

The case and its subject, read back off the wire.

The words are not read back: they are the host's to write and the reader's to show, and a consumer acting on a refusal acts on the case.

Attributes

def written(code: String, subject: Option[String], message: String): Json

A refusal, written down.

A refusal, written down.

Attributes

Concrete fields

val messageField: String

What the words to show are called there.

What the words to show are called there.

Attributes

val reasonField: String

What the case is called where a refusal is written down.

What the case is called where a refusal is written down.

Attributes

val subjectField: String

What the subject is called there.

What the subject is called there.

Attributes