Skip to content

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

ClassDescription
AgentNotFoundErrorThrown when an AgentRegistry.delete(...) / retire(...) is called for an unknown id and the caller passed { assertExists: true }.
CassetteArtifactMissingErrorThrown when a cassette's contentPartsRefs resolution fails AND onMissingArtifact: 'abort' is configured (the default).
CassetteCursorViolationErrorThrown when the cassette cursor is not monotonically advancing (stepNumber ascending; toolCallId tiebreak). Indicates a corrupted or maliciously crafted cassette.
CassetteFormatInvalidErrorThrown when the cassette JSONL stream does not begin with a kind: 'meta' sentinel header carrying format: 'graphorin-tool-cassette'.
CassetteIdempotencyMismatchErrorThrown 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.
CassetteSchemaMismatchErrorThrown when a cassette's recorded output no longer validates against the tool's outputSchema AND failOnSchemaMismatch: true is configured (the default).
ReplayAccessDeniedErrorThrown by Session.replay({ raw: true }) when the calling context's scope set does not include traces:read:raw.
SessionErrorBase class for every error thrown from @graphorin/sessions.
SessionExportChecksumMismatchErrorThrown when a --hash footer's checksum does not match the recomputed body checksum on import.
SessionExportEncryptionRequiredErrorThrown when --encrypt was used at write time but the import caller did not supply the matching passphrase.
SessionExportFormatInvalidErrorThrown by Session.import(...) when the JSONL stream does not begin with the expected kind: 'meta' sentinel header.
SessionExportSchemaTooNewErrorThrown when the import schema MAJOR is more than one version newer than the reader supports.
SessionExportSchemaUnsupportedErrorThrown 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.
SessionNotFoundErrorThrown when Session.fork(...) or other methods receive a session id that does not exist in the metadata store.

Type Aliases

Type AliasDescription
SessionErrorCodeStable code discriminator surfaced on every SessionError.