Skip to content

errors

An operation that requires a clean tree found uncommitted changes.

  • object & YieldableError<this>
new DirtyTree(...args): DirtyTree;

…[props: object, options?: MakeOptions]

DirtyTree

Schema.TaggedError<DirtyTree>()("DirtyTree", { paths: Schema.Array(Schema.String) }).constructor

readonly paths: readonly string[];

Schema.TaggedError<DirtyTree>()("DirtyTree", { paths: Schema.Array(Schema.String) }).paths


The content hash already belongs to an active file. existingPath is what the caller wanted to create, so a deduped write is answerable without a second query.

  • object & YieldableError<this>
new DuplicateContent(...args): DuplicateContent;

…[props: object, options?: MakeOptions]

DuplicateContent

Schema.TaggedError<DuplicateContent>()("DuplicateContent", { contentHash: Schema.String, existingPath: Schema.String }).constructor

readonly contentHash: string = Schema.String;

Schema.TaggedError<DuplicateContent>()("DuplicateContent", { contentHash: Schema.String, existingPath: Schema.String }).contentHash

readonly existingPath: string = Schema.String;

Schema.TaggedError<DuplicateContent>()("DuplicateContent", { contentHash: Schema.String, existingPath: Schema.String }).existingPath


A git subprocess exited non-zero, or could not be spawned. command is the subcommand name only, never the full argv, because arguments carry memory paths and commit subjects carry memory titles, and a GitFailure is returned to an agent through a tool response. The stderr text goes to Effect.logError at the spawning boundary instead of into the payload.

Declared here rather than in @memhtml/store because two packages spawn git: the store through its Git service, and @memhtml/session through its own execFile (it needs GIT_INDEX_FILE, which the store scrubs). One class means one _tag, so the CLI’s ERR_GIT mapping and an instanceof check hold for either producer.

  • object & YieldableError<this>
new GitFailure(...args): GitFailure;

…[props: object, options?: MakeOptions]

GitFailure

Schema.TaggedError<GitFailure>()("GitFailure", { command: Schema.String, /** The process exit code, or `null` when the process never started. */ exitCode: Schema.NullOr(Schema.Int) }).constructor

readonly command: string = Schema.String;

Schema.TaggedError<GitFailure>()("GitFailure", { command: Schema.String, /** The process exit code, or `null` when the process never started. */ exitCode: Schema.NullOr(Schema.Int) }).command

readonly exitCode: number | null;

The process exit code, or null when the process never started.

Schema.TaggedError<GitFailure>()("GitFailure", { command: Schema.String, /** The process exit code, or `null` when the process never started. */ exitCode: Schema.NullOr(Schema.Int) }).exitCode


A memory that violates the file format or the type/placement vocabulary.

  • object & YieldableError<this>
new InvalidMemory(...args): InvalidMemory;

…[props: object, options?: MakeOptions]

InvalidMemory

Schema.TaggedError<InvalidMemory>()("InvalidMemory", { reason: Schema.String }).constructor

readonly reason: string = Schema.String;

Schema.TaggedError<InvalidMemory>()("InvalidMemory", { reason: Schema.String }).reason


The model broke its structured-output contract: an undecodable tool payload, a max_tokens stop, or a refusal. The item is reported with no result, and a violation does not become a value.

  • object & YieldableError<this>
new LlmContractViolation(...args): LlmContractViolation;

…[props: object, options?: MakeOptions]

LlmContractViolation

Schema.TaggedError<LlmContractViolation>()( "LlmContractViolation", { reason: Schema.String } ).constructor

readonly reason: string = Schema.String;

Schema.TaggedError<LlmContractViolation>()( "LlmContractViolation", { reason: Schema.String } ).reason


Bedrock refused the call: throttling, an unavailable model, or a denied region.

  • object & YieldableError<this>
new ModelUnavailable(...args): ModelUnavailable;

…[props: object, options?: MakeOptions]

ModelUnavailable

Schema.TaggedError<ModelUnavailable>()("ModelUnavailable", { modelId: Schema.String, reason: Schema.String }).constructor

readonly modelId: string = Schema.String;

Schema.TaggedError<ModelUnavailable>()("ModelUnavailable", { modelId: Schema.String, reason: Schema.String }).modelId

readonly reason: string = Schema.String;

Schema.TaggedError<ModelUnavailable>()("ModelUnavailable", { modelId: Schema.String, reason: Schema.String }).reason


A repo-root-relative path with no file behind it.

  • object & YieldableError<this>
new PathNotFound(...args): PathNotFound;

…[props: object, options?: MakeOptions]

PathNotFound

Schema.TaggedError<PathNotFound>()("PathNotFound", { path: Schema.String }).constructor

readonly path: string = Schema.String;

Schema.TaggedError<PathNotFound>()("PathNotFound", { path: Schema.String }).path


A driver or filesystem rejection, reduced to the operation that failed. The payload deliberately excludes SQL text, parameters, and row contents so a storage error can be returned to an agent without leaking corpus content; the driver’s own message goes to Effect.logError at the adapter edge instead.

  • object & YieldableError<this>
new StorageFailure(...args): StorageFailure;

…[props: object, options?: MakeOptions]

StorageFailure

Schema.TaggedError<StorageFailure>()("StorageFailure", { operation: Schema.String }).constructor

readonly operation: string = Schema.String;

Schema.TaggedError<StorageFailure>()("StorageFailure", { operation: Schema.String }).operation


The store’s policy file (memhtml.config.json at the store root) could not be read or does not decode. Fails closed: every write that needs the policy refuses rather than running under the library defaults, because a typo in a policy file must not loosen the policy it states. path is the file; reason names what is wrong and where.

  • object & YieldableError<this>
new StoreConfigInvalid(...args): StoreConfigInvalid;

…[props: object, options?: MakeOptions]

StoreConfigInvalid

Schema.TaggedError<StoreConfigInvalid>()( "StoreConfigInvalid", { path: Schema.String, reason: Schema.String } ).constructor

readonly path: string = Schema.String;

Schema.TaggedError<StoreConfigInvalid>()( "StoreConfigInvalid", { path: Schema.String, reason: Schema.String } ).path

readonly reason: string = Schema.String;

Schema.TaggedError<StoreConfigInvalid>()( "StoreConfigInvalid", { path: Schema.String, reason: Schema.String } ).reason


A v1 door that creates a record was called where the store’s v1Doors mode closes it. door is the command or tool (write, memory_write); session is the MEMHTML_SESSION the process carries, or null when the mode is closed and no session is set.

  • object & YieldableError<this>
new V1DoorClosed(...args): V1DoorClosed;

…[props: object, options?: MakeOptions]

V1DoorClosed

Schema.TaggedError<V1DoorClosed>()("V1DoorClosed", { door: Schema.String, mode: Schema.String, session: Schema.NullOr(Schema.String) }).constructor

readonly door: string = Schema.String;

Schema.TaggedError<V1DoorClosed>()("V1DoorClosed", { door: Schema.String, mode: Schema.String, session: Schema.NullOr(Schema.String) }).door

readonly mode: string = Schema.String;

Schema.TaggedError<V1DoorClosed>()("V1DoorClosed", { door: Schema.String, mode: Schema.String, session: Schema.NullOr(Schema.String) }).mode

readonly session: string | null;

Schema.TaggedError<V1DoorClosed>()("V1DoorClosed", { door: Schema.String, mode: Schema.String, session: Schema.NullOr(Schema.String) }).session


Two writers touched the same file. ourSha is the blob sha this process wrote from, theirSha the blob sha now in the tree. Recovery belongs to the caller: re-read the current content and reapply.

  • object & YieldableError<this>
new WriteConflict(...args): WriteConflict;

…[props: object, options?: MakeOptions]

WriteConflict

Schema.TaggedError<WriteConflict>()("WriteConflict", { path: Schema.String, ourSha: Schema.String, theirSha: Schema.String }).constructor

readonly ourSha: string = Schema.String;

Schema.TaggedError<WriteConflict>()("WriteConflict", { path: Schema.String, ourSha: Schema.String, theirSha: Schema.String }).ourSha

readonly path: string = Schema.String;

Schema.TaggedError<WriteConflict>()("WriteConflict", { path: Schema.String, ourSha: Schema.String, theirSha: Schema.String }).path

readonly theirSha: string = Schema.String;

Schema.TaggedError<WriteConflict>()("WriteConflict", { path: Schema.String, ourSha: Schema.String, theirSha: Schema.String }).theirSha