Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/sessions / errors
errors
Typed error surface for @graphorin/sessions.
Every error class extends the base SessionError which is a thin wrapper around Error with a stable code discriminator so callers can switch on it without parsing messages.
Classes
| Class | Description |
|---|---|
| AgentNotFoundError | Thrown when an AgentRegistry.delete(...) / retire(...) is called for an unknown id and the caller passed { assertExists: true }. |
| CassetteArtifactMissingError | Thrown when a cassette's contentPartsRefs resolution fails AND onMissingArtifact: 'abort' is configured (the default). |
| CassetteCursorViolationError | Thrown when the cassette cursor is not monotonically advancing (stepNumber ascending; toolCallId tiebreak). Indicates a corrupted or maliciously crafted cassette. |
| CassetteFormatInvalidError | Thrown when the cassette JSONL stream does not begin with a kind: 'meta' sentinel header carrying format: 'graphorin-tool-cassette'. |
| CassetteIdempotencyMismatchError | Thrown when a cassette record's sha256OfArgs does not match the live invocation's argument hash AND failOnIdempotencyMismatch: true is configured. Default behaviour is to continue with the recorded result and surface the divergence in the event stream. |
| CassetteSchemaMismatchError | Thrown when a cassette's recorded output no longer validates against the tool's outputSchema AND failOnSchemaMismatch: true is configured (the default). |
| ReplayAccessDeniedError | Thrown by Session.replay({ raw: true }) when the calling context's scope set does not include traces:read:raw. |
| SessionError | Base class for every error thrown from @graphorin/sessions. |
| SessionExportChecksumMismatchError | Thrown when a --hash footer's checksum does not match the recomputed body checksum on import. |
| SessionExportEncryptionRequiredError | Thrown when --encrypt was used at write time but the import caller did not supply the matching passphrase. |
| SessionExportFormatInvalidError | Thrown by Session.import(...) when the JSONL stream does not begin with the expected kind: 'meta' sentinel header. |
| SessionExportSchemaTooNewError | Thrown when the import schema MAJOR is more than one version newer than the reader supports. |
| SessionExportSchemaUnsupportedError | Thrown when the import schema MAJOR is older than N-2 of the reader. Use the migrate-export migrator to advance to a supported MAJOR before importing. |
| SessionNotFoundError | Thrown when Session.fork(...) or other methods receive a session id that does not exist in the metadata store. |
Type Aliases
| Type Alias | Description |
|---|---|
| SessionErrorCode | Stable code discriminator surfaced on every SessionError. |