Skip to content

Interface: VocabularyMutationOptions

@kortexya/reasoninglayer


@kortexya/reasoninglayer / VocabularyMutationOptions

Defined in: src/types/vocabulary.ts:746

The per-call options of a vocabulary mutation.

idempotencyKey is required and is never generated by the SDK: keep it across retries of the same request. The engine scopes it to (tenant, actor, operation, key):

  • an identical repeat answers the committed outcome with replayed: true and writes nothing;
  • the same key with a different request is refused (IdempotencyKeyReusedError, 422 idempotency_key_reused);
  • a refusal stores nothing, so a repeat is evaluated again.

A key is 1 to 128 characters of [A-Za-z0-9._:-]; any other value is refused 400 idempotency_key_malformed. The acting user is the client’s authenticatedUser (X-Authenticated-User: user:<uuid>).

optional authenticatedUser?: string

Defined in: src/types/common.ts:102

Override the attested user for this request (X-Authenticated-User header), as user:<uuid>. Defaults to ClientConfig.authenticatedUser.

The engine reads this header as the gateway-authenticated principal. An OSFQL AWAIT needs it (reasoninglayer#1256): the demon is registered as this user and fires with that user’s grants; a request without one is refused with refusal.code program_registrant_not_actor. Set it only where the deployment’s gateway does not set it for you, for example a trusted server that acts for several users.

RequestOptions.authenticatedUser


optional cacheControl?: "no-cache" | "no-store"

Defined in: src/types/common.ts:84

Forward Cache-Control to ReasoningLayer. Both values bypass conversation answer-cache lookup and population.

RequestOptions.cacheControl


optional causal?: AuditCausalHeaders

Defined in: src/types/common.ts:116

Causal assertions for the audit ledger, sent as the x-reasoninglayer-* request headers. See AuditCausalHeaders.

RequestOptions.causal


idempotencyKey: string

Defined in: src/types/vocabulary.ts:748

The Idempotency-Key header.


optional namespaceId?: string

Defined in: src/types/common.ts:86

Override the namespace for this request (X-Namespace-Id header).

RequestOptions.namespaceId


optional retries?: number

Defined in: src/types/common.ts:111

Number of retry attempts for this request. Set to 0 to disable retries.

RequestOptions.retries


optional signal?: AbortSignal

Defined in: src/types/common.ts:104

AbortSignal for request cancellation.

RequestOptions.signal


optional timeoutMs?: number

Defined in: src/types/common.ts:109

Per-call timeout in milliseconds. Overrides the client-level timeoutMs default. 0 disables the client deadline for this call; a negative or non-finite value is refused.

RequestOptions.timeoutMs


optional userId?: string

Defined in: src/types/common.ts:88

Override the user ID for this request (X-User-Id header). Used for admin impersonation.

RequestOptions.userId