**sneq-engine API** *** # sneq-engine API ## Classes - [CampaignContext](classes/CampaignContext.md) - [Engine](classes/Engine.md) - [NarrationGateRegistry](classes/NarrationGateRegistry.md) - [PreGenerationRegistry](classes/PreGenerationRegistry.md) - [ProviderHttpError](classes/ProviderHttpError.md) - [Resolver](classes/Resolver.md) - [Router](classes/Router.md) - [RouterExhaustedError](classes/RouterExhaustedError.md) - [SneqCampaignContextInvalidatedError](classes/SneqCampaignContextInvalidatedError.md) - [SneqCampaignNotFoundError](classes/SneqCampaignNotFoundError.md) - [SneqConcurrentEntityCreationError](classes/SneqConcurrentEntityCreationError.md) - [SneqContradictionError](classes/SneqContradictionError.md) - [SneqProviderError](classes/SneqProviderError.md) - [SneqValidationError](classes/SneqValidationError.md) - [UserPromptRegistry](classes/UserPromptRegistry.md) - [Validator](classes/Validator.md) ## Interfaces - [AddConstraintCommand](interfaces/AddConstraintCommand.md) - [AddConstraintDecision](interfaces/AddConstraintDecision.md) - [AddConstraintDecisionInput](interfaces/AddConstraintDecisionInput.md) - [AddConstraintResult](interfaces/AddConstraintResult.md) - [AdvanceTurnCommand](interfaces/AdvanceTurnCommand.md) - [AdvanceTurnDecision](interfaces/AdvanceTurnDecision.md) - [AdvanceTurnDecisionInput](interfaces/AdvanceTurnDecisionInput.md) - [AdvanceTurnResult](interfaces/AdvanceTurnResult.md) - [Alias](interfaces/Alias.md) - [AreteGCN](interfaces/AreteGCN.md) - [AskUserArgs](interfaces/AskUserArgs.md) - [AtomicCommand](interfaces/AtomicCommand.md) - [AtomicWriteStrategy](interfaces/AtomicWriteStrategy.md) - [AttributFige](interfaces/AttributFige.md) - [Avertissement](interfaces/Avertissement.md) - [CampaignMeta](interfaces/CampaignMeta.md) - [ChatRequest](interfaces/ChatRequest.md) - [ChatResponse](interfaces/ChatResponse.md) - [ConfirmEntityMatchCommand](interfaces/ConfirmEntityMatchCommand.md) - [ConfirmEntityMatchDecision](interfaces/ConfirmEntityMatchDecision.md) - [ConfirmEntityMatchDecisionInput](interfaces/ConfirmEntityMatchDecisionInput.md) - [ConfirmEntityMatchInput](interfaces/ConfirmEntityMatchInput.md) - [ConfirmEntityMatchResult](interfaces/ConfirmEntityMatchResult.md) - [ContexteGeneratif](interfaces/ContexteGeneratif.md) - [Contrainte](interfaces/Contrainte.md) - [ContraintePropagee](interfaces/ContraintePropagee.md) - [CreateEntityCommand](interfaces/CreateEntityCommand.md) - [CreateEntityDecision](interfaces/CreateEntityDecision.md) - [CreateEntityDecisionInput](interfaces/CreateEntityDecisionInput.md) - [DefaultDepsOptions](interfaces/DefaultDepsOptions.md) - [Embedder](interfaces/Embedder.md) - [EmbeddingRequest](interfaces/EmbeddingRequest.md) - [EmbeddingResponse](interfaces/EmbeddingResponse.md) - [EngineConfig](interfaces/EngineConfig.md) - [Entity](interfaces/Entity.md) - [EntityCandidateSummary](interfaces/EntityCandidateSummary.md) - [EntityWithScore](interfaces/EntityWithScore.md) - [FactQuery](interfaces/FactQuery.md) - [Logger](interfaces/Logger.md) - [MentionInput](interfaces/MentionInput.md) - [NarrationGateContext](interfaces/NarrationGateContext.md) - [NarrationGateHook](interfaces/NarrationGateHook.md) - [NarrationGateInput](interfaces/NarrationGateInput.md) - [NarrationIssue](interfaces/NarrationIssue.md) - [NewCampaignInput](interfaces/NewCampaignInput.md) - [NoeudGCN](interfaces/NoeudGCN.md) - [Observation](interfaces/Observation.md) - [Potentialite](interfaces/Potentialite.md) - [PredictionEvent](interfaces/PredictionEvent.md) - [PreGenerationHook](interfaces/PreGenerationHook.md) - [PropagationInput](interfaces/PropagationInput.md) - [PropagationResult](interfaces/PropagationResult.md) - [Provider](interfaces/Provider.md) - [ProviderChain](interfaces/ProviderChain.md) - [ProviderRef](interfaces/ProviderRef.md) - [RegisterFactCommand](interfaces/RegisterFactCommand.md) - [RegisterFactDecision](interfaces/RegisterFactDecision.md) - [RegisterFactDecisionInput](interfaces/RegisterFactDecisionInput.md) - [RegisterFactInput](interfaces/RegisterFactInput.md) - [RegisterFactResult](interfaces/RegisterFactResult.md) - [ReglePropagation](interfaces/ReglePropagation.md) - [Repository](interfaces/Repository.md) - [ResolutionResult](interfaces/ResolutionResult.md) - [ResolvedCandidate](interfaces/ResolvedCandidate.md) - [ResolveOptions](interfaces/ResolveOptions.md) - [ResolverThresholds](interfaces/ResolverThresholds.md) - [RouterConfig](interfaces/RouterConfig.md) - [RouterDeps](interfaces/RouterDeps.md) - [RouterTiers](interfaces/RouterTiers.md) - [Scene](interfaces/Scene.md) - [SetSceneCommand](interfaces/SetSceneCommand.md) - [SetSceneDecision](interfaces/SetSceneDecision.md) - [SetSceneDecisionInput](interfaces/SetSceneDecisionInput.md) - [SetSceneResult](interfaces/SetSceneResult.md) - [SuggestionResult](interfaces/SuggestionResult.md) - [Tendance](interfaces/Tendance.md) - [ToolCallContext](interfaces/ToolCallContext.md) - [Turn](interfaces/Turn.md) - [ValidationContext](interfaces/ValidationContext.md) - [ValidationFailure](interfaces/ValidationFailure.md) - [ValidationFailureDetail](interfaces/ValidationFailureDetail.md) - [ValidationReport](interfaces/ValidationReport.md) - [ValidationResult](interfaces/ValidationResult.md) - [ValidatorOptions](interfaces/ValidatorOptions.md) - [VectorSearchOpts](interfaces/VectorSearchOpts.md) ## Type Aliases - [AliasSource](type-aliases/AliasSource.md) - [AskUserFn](type-aliases/AskUserFn.md) - [AttributValue](type-aliases/AttributValue.md) - [CampaignContextInvalidationReason](type-aliases/CampaignContextInvalidationReason.md) - [CampaignId](type-aliases/CampaignId.md) - [CategorieAttribut](type-aliases/CategorieAttribut.md) - [ConstraintId](type-aliases/ConstraintId.md) - [ContrainteSource](type-aliases/ContrainteSource.md) - [CreateEntityResult](type-aliases/CreateEntityResult.md) - [EntityID](type-aliases/EntityID.md) - [EntityType](type-aliases/EntityType.md) - [EtatAttribut](type-aliases/EtatAttribut.md) - [FactId](type-aliases/FactId.md) - [Fiabilite](type-aliases/Fiabilite.md) - [MentionResult](type-aliases/MentionResult.md) - [ObservationMethod](type-aliases/ObservationMethod.md) - [ObservationSource](type-aliases/ObservationSource.md) - [ProviderErrorCode](type-aliases/ProviderErrorCode.md) - [ProviderKind](type-aliases/ProviderKind.md) - [RegleContrainte](type-aliases/RegleContrainte.md) - [RepositoryAccess](type-aliases/RepositoryAccess.md) - [SceneId](type-aliases/SceneId.md) - [Tier](type-aliases/Tier.md) - [ToolName](type-aliases/ToolName.md) - [TypeRelation](type-aliases/TypeRelation.md) ## Variables - [ADVERTISED\_TOOL\_NAMES](variables/ADVERTISED_TOOL_NAMES.md) - [defaultNarrationGateHook](variables/defaultNarrationGateHook.md) - [noopLogger](variables/noopLogger.md) - [noopPreGenerationHook](variables/noopPreGenerationHook.md) - [SNEQ\_ENGINE\_VERSION](variables/SNEQ_ENGINE_VERSION.md) - [toolDescriptions](variables/toolDescriptions.md) - [toolJsonSchemas](variables/toolJsonSchemas.md) - [ToolNames](variables/ToolNames.md) - [toolSchemas](variables/toolSchemas.md) ## Functions - [anthropicTools](functions/anthropicTools.md) - [asCampaignId](functions/asCampaignId.md) - [asConstraintId](functions/asConstraintId.md) - [asEntityID](functions/asEntityID.md) - [asFactId](functions/asFactId.md) - [asSceneId](functions/asSceneId.md) - [createDefaultDeps](functions/createDefaultDeps.md) - [decideAddConstraint](functions/decideAddConstraint.md) - [decideAdvanceTurn](functions/decideAdvanceTurn.md) - [decideConfirmEntityMatch](functions/decideConfirmEntityMatch.md) - [decideCreateEntity](functions/decideCreateEntity.md) - [decideRegisterFact](functions/decideRegisterFact.md) - [decideSetScene](functions/decideSetScene.md) - [defaultRouterConfig](functions/defaultRouterConfig.md) - [dispatchToolCall](functions/dispatchToolCall.md) - [geminiTools](functions/geminiTools.md) - [genericTools](functions/genericTools.md) - [loadConfigFromFile](functions/loadConfigFromFile.md) - [openAITools](functions/openAITools.md) - [propagate](functions/propagate.md) - [validateValue](functions/validateValue.md) ## classes [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CampaignContext # Class: CampaignContext ## Implements - [`ToolCallContext`](../interfaces/ToolCallContext.md) ## Constructors ### Constructor > **new CampaignContext**(`deps`): `CampaignContext` #### Parameters ##### deps `CampaignContextDeps` #### Returns `CampaignContext` ## Properties ### id > `readonly` **id**: [`CampaignId`](../type-aliases/CampaignId.md) ## Methods ### addConstraint() > **addConstraint**(`input`): `Promise`\<\{ `constraintId`: [`ConstraintId`](../type-aliases/ConstraintId.md); \}\> #### Parameters ##### input ###### attributeKey `string` ###### entityId [`EntityID`](../type-aliases/EntityID.md) ###### justification `string` ###### rule [`RegleContrainte`](../type-aliases/RegleContrainte.md) #### Returns `Promise`\<\{ `constraintId`: [`ConstraintId`](../type-aliases/ConstraintId.md); \}\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`addConstraint`](../interfaces/ToolCallContext.md#addconstraint) *** ### advanceTurn() > **advanceTurn**(`summary?`): `Promise`\<\{ `turnNumber`: `number`; \}\> #### Parameters ##### summary? `string` #### Returns `Promise`\<\{ `turnNumber`: `number`; \}\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`advanceTurn`](../interfaces/ToolCallContext.md#advanceturn) *** ### confirmEntityMatch() > **confirmEntityMatch**(`input`): `Promise`\<\{ `aliasAdded`: `boolean`; `entityId`: [`EntityID`](../type-aliases/EntityID.md); \}\> #### Parameters ##### input [`ConfirmEntityMatchInput`](../interfaces/ConfirmEntityMatchInput.md) #### Returns `Promise`\<\{ `aliasAdded`: `boolean`; `entityId`: [`EntityID`](../type-aliases/EntityID.md); \}\> *** ### currentScene() > **currentScene**(): `Promise`\<[`Scene`](../interfaces/Scene.md) \| `null`\> #### Returns `Promise`\<[`Scene`](../interfaces/Scene.md) \| `null`\> *** ### getEntity() > **getEntity**(`entityId`): `Promise`\<[`Entity`](../interfaces/Entity.md) \| `null`\> #### Parameters ##### entityId [`EntityID`](../type-aliases/EntityID.md) #### Returns `Promise`\<[`Entity`](../interfaces/Entity.md) \| `null`\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`getEntity`](../interfaces/ToolCallContext.md#getentity) *** ### getRelevantFacts() > **getRelevantFacts**(`entityId`, `opts?`): `Promise`\<[`AttributFige`](../interfaces/AttributFige.md)[]\> #### Parameters ##### entityId [`EntityID`](../type-aliases/EntityID.md) ##### opts? ###### attributeKeys? `string`[] ###### depth? `0` \| `1` #### Returns `Promise`\<[`AttributFige`](../interfaces/AttributFige.md)[]\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`getRelevantFacts`](../interfaces/ToolCallContext.md#getrelevantfacts) *** ### handleToolCall() > **handleToolCall**(`name`, `args`): `Promise`\<`unknown`\> #### Parameters ##### name `string` ##### args `unknown` #### Returns `Promise`\<`unknown`\> *** ### mentionEntity() > **mentionEntity**(`input`): `Promise`\<[`MentionResult`](../type-aliases/MentionResult.md)\> #### Parameters ##### input [`MentionInput`](../interfaces/MentionInput.md) #### Returns `Promise`\<[`MentionResult`](../type-aliases/MentionResult.md)\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`mentionEntity`](../interfaces/ToolCallContext.md#mentionentity) *** ### prepareTurn() > **prepareTurn**(): `Promise`\<\{ `presentEntities`: `object`[]; `scene`: [`Scene`](../interfaces/Scene.md) \| `null`; \}\> #### Returns `Promise`\<\{ `presentEntities`: `object`[]; `scene`: [`Scene`](../interfaces/Scene.md) \| `null`; \}\> *** ### registerFact() > **registerFact**(`input`): `Promise`\<\{ `contradictions`: [`AttributFige`](../interfaces/AttributFige.md)[]; `factId`: [`FactId`](../type-aliases/FactId.md) \| `null`; \}\> #### Parameters ##### input [`RegisterFactInput`](../interfaces/RegisterFactInput.md) #### Returns `Promise`\<\{ `contradictions`: [`AttributFige`](../interfaces/AttributFige.md)[]; `factId`: [`FactId`](../type-aliases/FactId.md) \| `null`; \}\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`registerFact`](../interfaces/ToolCallContext.md#registerfact) *** ### registerNarrationGate() > **registerNarrationGate**(`hook`): `object` #### Parameters ##### hook [`NarrationGateHook`](../interfaces/NarrationGateHook.md) #### Returns `object` ##### dispose() > **dispose**(): `void` ###### Returns `void` *** ### registerPreGenerationHook() > **registerPreGenerationHook**(`hook`): `object` #### Parameters ##### hook [`PreGenerationHook`](../interfaces/PreGenerationHook.md) #### Returns `object` ##### dispose() > **dispose**(): `void` ###### Returns `void` *** ### registerUserPromptHandler() > **registerUserPromptHandler**(`fn`): `object` #### Parameters ##### fn [`AskUserFn`](../type-aliases/AskUserFn.md) #### Returns `object` ##### dispose() > **dispose**(): `void` ###### Returns `void` *** ### resolveEntity() > **resolveEntity**(`opts`): `Promise`\<[`ResolutionResult`](../interfaces/ResolutionResult.md)\> #### Parameters ##### opts ###### mention `string` ###### type? [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`ResolutionResult`](../interfaces/ResolutionResult.md)\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`resolveEntity`](../interfaces/ToolCallContext.md#resolveentity) *** ### setScene() > **setScene**(`input`): `Promise`\<\{ `sceneId`: [`SceneId`](../type-aliases/SceneId.md); `turnNumber`: `number`; \}\> #### Parameters ##### input ###### description `string` ###### locationEntityId [`EntityID`](../type-aliases/EntityID.md) ###### presentEntityIds [`EntityID`](../type-aliases/EntityID.md)[] #### Returns `Promise`\<\{ `sceneId`: [`SceneId`](../type-aliases/SceneId.md); `turnNumber`: `number`; \}\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`setScene`](../interfaces/ToolCallContext.md#setscene) *** ### suggestExisting() > **suggestExisting**(`mention`, `type`): `Promise`\<[`SuggestionResult`](../interfaces/SuggestionResult.md)\> #### Parameters ##### mention `string` ##### type [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`SuggestionResult`](../interfaces/SuggestionResult.md)\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`suggestExisting`](../interfaces/ToolCallContext.md#suggestexisting) *** ### validateNarration() > **validateNarration**(`input`): `Promise`\<[`ValidationReport`](../interfaces/ValidationReport.md)\> #### Parameters ##### input [`NarrationGateInput`](../interfaces/NarrationGateInput.md) #### Returns `Promise`\<[`ValidationReport`](../interfaces/ValidationReport.md)\> #### Implementation of [`ToolCallContext`](../interfaces/ToolCallContext.md).[`validateNarration`](../interfaces/ToolCallContext.md#validatenarration) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Engine # Class: Engine ## Constructors ### Constructor > **new Engine**(`cfg`): `Engine` #### Parameters ##### cfg [`EngineConfig`](../interfaces/EngineConfig.md) #### Returns `Engine` ## Properties ### tools > `readonly` `static` **tools**: `object` #### anthropic > `readonly` **anthropic**: `object`[] #### gemini > `readonly` **gemini**: `object`[] #### generic > `readonly` **generic**: `object`[] #### jsonSchema > `readonly` **jsonSchema**: `Record`\<`"sneq__lookup_entity"` \| `"sneq__get_entity"` \| `"sneq__get_relevant_facts"` \| `"sneq__suggest_existing"` \| `"sneq__mention_entity"` \| `"sneq__register_fact"` \| `"sneq__add_constraint"` \| `"sneq__set_scene"` \| `"sneq__advance_turn"` \| `"sneq__validate_narration"`, `object`\> = `jsonSchemas` #### openai > `readonly` **openai**: `object`[] #### zod > `readonly` **zod**: `object` = `zodSchemas` ##### zod.sneq\_\_add\_constraint > `readonly` **sneq\_\_add\_constraint**: `ZodObject`\<\{ `attributeKey`: `ZodString`; `entityId`: `ZodString`; `justification`: `ZodString`; `rule`: `ZodUnknown`; \}, `$strip`\> ##### zod.sneq\_\_advance\_turn > `readonly` **sneq\_\_advance\_turn**: `ZodObject`\<\{ `summary`: `ZodOptional`\<`ZodString`\>; \}, `$strip`\> ##### zod.sneq\_\_get\_entity > `readonly` **sneq\_\_get\_entity**: `ZodObject`\<\{ `entityId`: `ZodString`; \}, `$strip`\> ##### zod.sneq\_\_get\_relevant\_facts > `readonly` **sneq\_\_get\_relevant\_facts**: `ZodObject`\<\{ `attributeKeys`: `ZodOptional`\<`ZodArray`\<`ZodString`\>\>; `depth`: `ZodOptional`\<`ZodUnion`\, `ZodLiteral`\<`1`\>\]\>\>; `entityId`: `ZodString`; \}, `$strip`\> ##### zod.sneq\_\_lookup\_entity > `readonly` **sneq\_\_lookup\_entity**: `ZodObject`\<\{ `mention`: `ZodString`; `type`: `ZodOptional`\<`ZodEnum`\<\{ `EVENEMENT`: `"EVENEMENT"`; `FACTION`: `"FACTION"`; `LIEU`: `"LIEU"`; `OBJET`: `"OBJET"`; `PERSONNAGE`: `"PERSONNAGE"`; `RELATION`: `"RELATION"`; `SCENE`: `"SCENE"`; `WORLD`: `"WORLD"`; \}\>\>; \}, `$strip`\> ##### zod.sneq\_\_mention\_entity > `readonly` **sneq\_\_mention\_entity**: `ZodObject`\<\{ `aliases`: `ZodOptional`\<`ZodArray`\<`ZodString`\>\>; `canonicalName`: `ZodString`; `description`: `ZodString`; `force`: `ZodOptional`\<`ZodBoolean`\>; `type`: `ZodEnum`\<\{ `EVENEMENT`: `"EVENEMENT"`; `FACTION`: `"FACTION"`; `LIEU`: `"LIEU"`; `OBJET`: `"OBJET"`; `PERSONNAGE`: `"PERSONNAGE"`; `RELATION`: `"RELATION"`; `SCENE`: `"SCENE"`; `WORLD`: `"WORLD"`; \}\>; \}, `$strip`\> ##### zod.sneq\_\_register\_fact > `readonly` **sneq\_\_register\_fact**: `ZodObject`\<\{ `attributeKey`: `ZodString`; `category`: `ZodEnum`\<\{ `COMPETENCE`: `"COMPETENCE"`; `ETAT`: `"ETAT"`; `HISTORIQUE`: `"HISTORIQUE"`; `IDENTITE`: `"IDENTITE"`; `POSSESSION`: `"POSSESSION"`; `PSYCHOLOGIE`: `"PSYCHOLOGIE"`; `SECRET`: `"SECRET"`; `SOCIAL`: `"SOCIAL"`; \}\>; `entityId`: `ZodString`; `observation`: `ZodObject`\<\{ `emittedBy`: `ZodOptional`\<`ZodString`\>; `excerpt`: `ZodOptional`\<`ZodString`\>; `fiabilite`: `ZodEnum`\<\{ `CERTAINE`: `"CERTAINE"`; `RUMEUR_CONFIRMEE`: `"RUMEUR_CONFIRMEE"`; `TEMOIGNAGE`: `"TEMOIGNAGE"`; \}\>; `method`: `ZodEnum`\<\{ `AVEU`: `"AVEU"`; `DEDUCTION_CONFIRMEE`: `"DEDUCTION_CONFIRMEE"`; `DEMONSTRATION`: `"DEMONSTRATION"`; `DIALOGUE_DIRECT`: `"DIALOGUE_DIRECT"`; `DOCUMENT`: `"DOCUMENT"`; `OBSERVATION_VISUELLE`: `"OBSERVATION_VISUELLE"`; \}\>; `sceneId`: `ZodOptional`\<`ZodString`\>; `source`: `ZodEnum`\<\{ `DICE_ROLL`: `"DICE_ROLL"`; `GM_NARRATION`: `"GM_NARRATION"`; `PLAYER_UTTERANCE`: `"PLAYER_UTTERANCE"`; `SYSTEM`: `"SYSTEM"`; \}\>; `timestamp`: `ZodNumber`; \}, `$strip`\>; `value`: `ZodType`\<`unknown`, `unknown`, `$ZodTypeInternals`\<`unknown`, `unknown`\>\>; \}, `$strip`\> ##### zod.sneq\_\_set\_scene > `readonly` **sneq\_\_set\_scene**: `ZodObject`\<\{ `description`: `ZodString`; `locationEntityId`: `ZodString`; `presentEntityIds`: `ZodArray`\<`ZodString`\>; \}, `$strip`\> ##### zod.sneq\_\_suggest\_existing > `readonly` **sneq\_\_suggest\_existing**: `ZodObject`\<\{ `mention`: `ZodString`; `type`: `ZodEnum`\<\{ `EVENEMENT`: `"EVENEMENT"`; `FACTION`: `"FACTION"`; `LIEU`: `"LIEU"`; `OBJET`: `"OBJET"`; `PERSONNAGE`: `"PERSONNAGE"`; `RELATION`: `"RELATION"`; `SCENE`: `"SCENE"`; `WORLD`: `"WORLD"`; \}\>; \}, `$strip`\> ##### zod.sneq\_\_validate\_narration > `readonly` **sneq\_\_validate\_narration**: `ZodObject`\<\{ `narration`: `ZodString`; `strict`: `ZodOptional`\<`ZodBoolean`\>; `type`: `ZodOptional`\<`ZodEnum`\<\{ `EVENEMENT`: `"EVENEMENT"`; `FACTION`: `"FACTION"`; `LIEU`: `"LIEU"`; `OBJET`: `"OBJET"`; `PERSONNAGE`: `"PERSONNAGE"`; `RELATION`: `"RELATION"`; `SCENE`: `"SCENE"`; `WORLD`: `"WORLD"`; \}\>\>; \}, `$strip`\> ## Methods ### campaign() > **campaign**(`id`): [`CampaignContext`](CampaignContext.md) #### Parameters ##### id [`CampaignId`](../type-aliases/CampaignId.md) #### Returns [`CampaignContext`](CampaignContext.md) *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### createCampaign() > **createCampaign**(`input`): `Promise`\<[`CampaignContext`](CampaignContext.md)\> #### Parameters ##### input [`NewCampaignInput`](../interfaces/NewCampaignInput.md) #### Returns `Promise`\<[`CampaignContext`](CampaignContext.md)\> *** ### deleteCampaign() > **deleteCampaign**(`id`): `Promise`\<`void`\> #### Parameters ##### id [`CampaignId`](../type-aliases/CampaignId.md) #### Returns `Promise`\<`void`\> *** ### listCampaigns() > **listCampaigns**(): `Promise`\<[`CampaignMeta`](../interfaces/CampaignMeta.md)[]\> #### Returns `Promise`\<[`CampaignMeta`](../interfaces/CampaignMeta.md)[]\> *** ### routerClient() > **routerClient**(): [`Router`](Router.md) #### Returns [`Router`](Router.md) *** ### defaultRouterConfig() > `static` **defaultRouterConfig**(): [`RouterConfig`](../interfaces/RouterConfig.md) #### Returns [`RouterConfig`](../interfaces/RouterConfig.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / NarrationGateRegistry # Class: NarrationGateRegistry ## Constructors ### Constructor > **new NarrationGateRegistry**(`fallback`): `NarrationGateRegistry` #### Parameters ##### fallback [`NarrationGateHook`](../interfaces/NarrationGateHook.md) #### Returns `NarrationGateRegistry` ## Methods ### register() > **register**(`h`): `object` #### Parameters ##### h [`NarrationGateHook`](../interfaces/NarrationGateHook.md) #### Returns `object` ##### dispose() > **dispose**(): `void` ###### Returns `void` *** ### validate() > **validate**(`input`, `ctx`): `Promise`\<[`ValidationReport`](../interfaces/ValidationReport.md)\> #### Parameters ##### input [`NarrationGateInput`](../interfaces/NarrationGateInput.md) ##### ctx [`NarrationGateContext`](../interfaces/NarrationGateContext.md) #### Returns `Promise`\<[`ValidationReport`](../interfaces/ValidationReport.md)\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / PreGenerationRegistry # Class: PreGenerationRegistry ## Constructors ### Constructor > **new PreGenerationRegistry**(): `PreGenerationRegistry` #### Returns `PreGenerationRegistry` ## Methods ### emit() > **emit**(`e`): `void` #### Parameters ##### e [`PredictionEvent`](../interfaces/PredictionEvent.md) #### Returns `void` *** ### register() > **register**(`h`): `object` #### Parameters ##### h [`PreGenerationHook`](../interfaces/PreGenerationHook.md) #### Returns `object` ##### dispose() > **dispose**(): `void` ###### Returns `void` *** ### setErrorHandler() > **setErrorHandler**(`fn`): `void` #### Parameters ##### fn (`err`) => `void` #### Returns `void` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ProviderHttpError # Class: ProviderHttpError ## Extends - `Error` ## Constructors ### Constructor > **new ProviderHttpError**(`code`, `status`, `message`): `ProviderHttpError` #### Parameters ##### code [`ProviderErrorCode`](../type-aliases/ProviderErrorCode.md) ##### status `number` \| `null` ##### message `string` #### Returns `ProviderHttpError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### code > **code**: [`ProviderErrorCode`](../type-aliases/ProviderErrorCode.md) *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### status > **status**: `number` \| `null` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Resolver # Class: Resolver ## Constructors ### Constructor > **new Resolver**(`deps`): `Resolver` #### Parameters ##### deps `ResolverDeps` #### Returns `Resolver` ## Methods ### resolveEntity() > **resolveEntity**(`opts`): `Promise`\<[`ResolutionResult`](../interfaces/ResolutionResult.md)\> #### Parameters ##### opts [`ResolveOptions`](../interfaces/ResolveOptions.md) #### Returns `Promise`\<[`ResolutionResult`](../interfaces/ResolutionResult.md)\> *** ### suggestExisting() > **suggestExisting**(`opts`): `Promise`\<[`SuggestionResult`](../interfaces/SuggestionResult.md)\> #### Parameters ##### opts ###### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ###### mention `string` ###### type [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`SuggestionResult`](../interfaces/SuggestionResult.md)\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Router # Class: Router ## Constructors ### Constructor > **new Router**(`cfg`, `deps`): `Router` #### Parameters ##### cfg [`RouterConfig`](../interfaces/RouterConfig.md) ##### deps [`RouterDeps`](../interfaces/RouterDeps.md) #### Returns `Router` ## Methods ### chat() > **chat**(`tier`, `req`): `Promise`\<[`ChatResponse`](../interfaces/ChatResponse.md)\> #### Parameters ##### tier [`Tier`](../type-aliases/Tier.md) ##### req [`ChatRequest`](../interfaces/ChatRequest.md) #### Returns `Promise`\<[`ChatResponse`](../interfaces/ChatResponse.md)\> *** ### embed() > **embed**(`req`): `Promise`\<[`EmbeddingResponse`](../interfaces/EmbeddingResponse.md)\> #### Parameters ##### req [`EmbeddingRequest`](../interfaces/EmbeddingRequest.md) #### Returns `Promise`\<[`EmbeddingResponse`](../interfaces/EmbeddingResponse.md)\> *** ### embeddingDim() > **embeddingDim**(): `number` \| `undefined` Declared dim of the embeddings primary, if annotated. #### Returns `number` \| `undefined` *** ### hasEmbeddings() > **hasEmbeddings**(): `boolean` #### Returns `boolean` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RouterExhaustedError # Class: RouterExhaustedError ## Extends - `Error` ## Constructors ### Constructor > **new RouterExhaustedError**(`tier`, `attempts`): `RouterExhaustedError` #### Parameters ##### tier [`Tier`](../type-aliases/Tier.md) ##### attempts `object`[] #### Returns `RouterExhaustedError` #### Overrides `Error.constructor` ## Properties ### attempts > **attempts**: `object`[] #### error > **error**: `string` #### model > **model**: `string` #### provider > **provider**: `string` *** ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### tier > **tier**: [`Tier`](../type-aliases/Tier.md) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SneqCampaignContextInvalidatedError # Class: SneqCampaignContextInvalidatedError ## Extends - `Error` ## Constructors ### Constructor > **new SneqCampaignContextInvalidatedError**(`campaignId`, `reason`): `SneqCampaignContextInvalidatedError` #### Parameters ##### campaignId `string` ##### reason [`CampaignContextInvalidationReason`](../type-aliases/CampaignContextInvalidationReason.md) #### Returns `SneqCampaignContextInvalidatedError` #### Overrides `Error.constructor` ## Properties ### campaignId > `readonly` **campaignId**: `string` *** ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### reason > `readonly` **reason**: [`CampaignContextInvalidationReason`](../type-aliases/CampaignContextInvalidationReason.md) *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SneqCampaignNotFoundError # Class: SneqCampaignNotFoundError ## Extends - `Error` ## Constructors ### Constructor > **new SneqCampaignNotFoundError**(`campaignId`): `SneqCampaignNotFoundError` #### Parameters ##### campaignId `string` #### Returns `SneqCampaignNotFoundError` #### Overrides `Error.constructor` ## Properties ### campaignId > `readonly` **campaignId**: `string` *** ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SneqConcurrentEntityCreationError # Class: SneqConcurrentEntityCreationError ## Extends - `Error` ## Constructors ### Constructor > **new SneqConcurrentEntityCreationError**(`campaignId`, `attempts`): `SneqConcurrentEntityCreationError` #### Parameters ##### campaignId `string` ##### attempts `number` #### Returns `SneqConcurrentEntityCreationError` #### Overrides `Error.constructor` ## Properties ### attempts > `readonly` **attempts**: `number` *** ### campaignId > `readonly` **campaignId**: `string` *** ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SneqContradictionError # Class: SneqContradictionError ## Extends - `Error` ## Constructors ### Constructor > **new SneqContradictionError**(`contradictions`): `SneqContradictionError` #### Parameters ##### contradictions [`AttributFige`](../interfaces/AttributFige.md)[] #### Returns `SneqContradictionError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### contradictions > `readonly` **contradictions**: [`AttributFige`](../interfaces/AttributFige.md)[] *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SneqProviderError # Class: SneqProviderError ## Extends - `Error` ## Constructors ### Constructor > **new SneqProviderError**(`tier`, `exhausted`, `message`): `SneqProviderError` #### Parameters ##### tier [`Tier`](../type-aliases/Tier.md) ##### exhausted `boolean` ##### message `string` #### Returns `SneqProviderError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### exhausted > `readonly` **exhausted**: `boolean` *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### tier > `readonly` **tier**: [`Tier`](../type-aliases/Tier.md) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SneqValidationError # Class: SneqValidationError ## Extends - `Error` ## Constructors ### Constructor > **new SneqValidationError**(`details`): `SneqValidationError` #### Parameters ##### details [`ValidationFailureDetail`](../interfaces/ValidationFailureDetail.md)[] #### Returns `SneqValidationError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` #### Inherited from `Error.cause` *** ### details > `readonly` **details**: [`ValidationFailureDetail`](../interfaces/ValidationFailureDetail.md)[] *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / UserPromptRegistry # Class: UserPromptRegistry ## Constructors ### Constructor > **new UserPromptRegistry**(): `UserPromptRegistry` #### Returns `UserPromptRegistry` ## Methods ### ask() > **ask**(`args`): `Promise`\<[`Entity`](../interfaces/Entity.md) \| `null`\> #### Parameters ##### args [`AskUserArgs`](../interfaces/AskUserArgs.md) #### Returns `Promise`\<[`Entity`](../interfaces/Entity.md) \| `null`\> *** ### hasHandler() > **hasHandler**(): `boolean` #### Returns `boolean` *** ### register() > **register**(`fn`): `object` #### Parameters ##### fn [`AskUserFn`](../type-aliases/AskUserFn.md) #### Returns `object` ##### dispose() > **dispose**(): `void` ###### Returns `void` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Validator # Class: Validator ## Constructors ### Constructor > **new Validator**(`resolver`, `router`, `opts?`): `Validator` #### Parameters ##### resolver [`Resolver`](Resolver.md) ##### router [`Router`](Router.md) ##### opts? [`ValidatorOptions`](../interfaces/ValidatorOptions.md) = `{}` #### Returns `Validator` ## Methods ### extract() > **extract**(`text`): `string`[] Stage 1 — regex extraction of capitalized name candidates. #### Parameters ##### text `string` #### Returns `string`[] *** ### llmPass() > **llmPass**(`_campaignId`, `narration`, `resolved`, `topEntities`): `Promise`\<\{ `candidates`: [`ResolvedCandidate`](../interfaces/ResolvedCandidate.md)[]; `partial`: `boolean`; \}\> Stage 3 — light-tier LLM second opinion on NO-MATCH candidates. #### Parameters ##### \_campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### narration `string` ##### resolved [`ResolvedCandidate`](../interfaces/ResolvedCandidate.md)[] ##### topEntities [`Entity`](../interfaces/Entity.md)[] #### Returns `Promise`\<\{ `candidates`: [`ResolvedCandidate`](../interfaces/ResolvedCandidate.md)[]; `partial`: `boolean`; \}\> *** ### resolvePass() > **resolvePass**(`campaignId`, `candidates`, `type?`): `Promise`\<[`ResolvedCandidate`](../interfaces/ResolvedCandidate.md)[]\> Stage 2 — alias/vector/judge pass via existing resolver. #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### candidates `string`[] ##### type? [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`ResolvedCandidate`](../interfaces/ResolvedCandidate.md)[]\> *** ### validate() > **validate**(`input`, `campaignId`, `repo`): `Promise`\<[`ValidationReport`](../interfaces/ValidationReport.md)\> Full pipeline: extract → resolve → llm → assemble. #### Parameters ##### input [`NarrationGateInput`](../interfaces/NarrationGateInput.md) ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### repo ###### topEntities #### Returns `Promise`\<[`ValidationReport`](../interfaces/ValidationReport.md)\> ## interfaces [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AddConstraintCommand # Interface: AddConstraintCommand ## Extends - [`AtomicCommand`](AtomicCommand.md) ## Extended by - [`AddConstraintDecisionInput`](AddConstraintDecisionInput.md) ## Properties ### attributeKey > **attributeKey**: `string` *** ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### constraintId > **constraintId**: [`ConstraintId`](../type-aliases/ConstraintId.md) *** ### createdAt > **createdAt**: `number` *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### justification > **justification**: `string` *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`AtomicCommand`](AtomicCommand.md).[`operationId`](AtomicCommand.md#operationid) *** ### rule > **rule**: [`RegleContrainte`](../type-aliases/RegleContrainte.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AddConstraintDecision # Interface: AddConstraintDecision ## Properties ### potentialite > **potentialite**: [`Potentialite`](Potentialite.md) *** ### result > **result**: [`AddConstraintResult`](AddConstraintResult.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AddConstraintDecisionInput # Interface: AddConstraintDecisionInput ## Extends - [`AddConstraintCommand`](AddConstraintCommand.md) ## Properties ### attributeKey > **attributeKey**: `string` #### Inherited from [`AddConstraintCommand`](AddConstraintCommand.md).[`attributeKey`](AddConstraintCommand.md#attributekey) *** ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) #### Inherited from [`AddConstraintCommand`](AddConstraintCommand.md).[`campaignId`](AddConstraintCommand.md#campaignid) *** ### constraintId > **constraintId**: [`ConstraintId`](../type-aliases/ConstraintId.md) #### Inherited from [`AddConstraintCommand`](AddConstraintCommand.md).[`constraintId`](AddConstraintCommand.md#constraintid) *** ### createdAt > **createdAt**: `number` #### Inherited from [`AddConstraintCommand`](AddConstraintCommand.md).[`createdAt`](AddConstraintCommand.md#createdat) *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) #### Inherited from [`AddConstraintCommand`](AddConstraintCommand.md).[`entityId`](AddConstraintCommand.md#entityid) *** ### existing > **existing**: [`Potentialite`](Potentialite.md) \| `null` *** ### justification > **justification**: `string` #### Inherited from [`AddConstraintCommand`](AddConstraintCommand.md).[`justification`](AddConstraintCommand.md#justification) *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`AddConstraintCommand`](AddConstraintCommand.md).[`operationId`](AddConstraintCommand.md#operationid) *** ### rule > **rule**: [`RegleContrainte`](../type-aliases/RegleContrainte.md) #### Inherited from [`AddConstraintCommand`](AddConstraintCommand.md).[`rule`](AddConstraintCommand.md#rule) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AddConstraintResult # Interface: AddConstraintResult ## Properties ### constraintId > **constraintId**: [`ConstraintId`](../type-aliases/ConstraintId.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AdvanceTurnCommand # Interface: AdvanceTurnCommand ## Extends - [`AtomicCommand`](AtomicCommand.md) ## Extended by - [`AdvanceTurnDecisionInput`](AdvanceTurnDecisionInput.md) ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### createdAt > **createdAt**: `number` *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`AtomicCommand`](AtomicCommand.md).[`operationId`](AtomicCommand.md#operationid) *** ### summary? > `optional` **summary?**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AdvanceTurnDecision # Interface: AdvanceTurnDecision ## Properties ### turn > **turn**: [`Turn`](Turn.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AdvanceTurnDecisionInput # Interface: AdvanceTurnDecisionInput ## Extends - [`AdvanceTurnCommand`](AdvanceTurnCommand.md) ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) #### Inherited from [`AdvanceTurnCommand`](AdvanceTurnCommand.md).[`campaignId`](AdvanceTurnCommand.md#campaignid) *** ### createdAt > **createdAt**: `number` #### Inherited from [`AdvanceTurnCommand`](AdvanceTurnCommand.md).[`createdAt`](AdvanceTurnCommand.md#createdat) *** ### latestTurn > **latestTurn**: [`Turn`](Turn.md) \| `null` *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`AdvanceTurnCommand`](AdvanceTurnCommand.md).[`operationId`](AdvanceTurnCommand.md#operationid) *** ### summary? > `optional` **summary?**: `string` #### Inherited from [`AdvanceTurnCommand`](AdvanceTurnCommand.md).[`summary`](AdvanceTurnCommand.md#summary) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AdvanceTurnResult # Interface: AdvanceTurnResult ## Properties ### turnNumber > **turnNumber**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Alias # Interface: Alias ## Properties ### observedAt > **observedAt**: `number` *** ### source > **source**: [`AliasSource`](../type-aliases/AliasSource.md) *** ### text > **text**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AreteGCN # Interface: AreteGCN ## Properties ### attributs > **attributs**: `Record`\<`string`, [`AttributValue`](../type-aliases/AttributValue.md)\> *** ### cible > **cible**: [`EntityID`](../type-aliases/EntityID.md) *** ### directionnalite > **directionnalite**: `"UNIDIRECTIONNELLE"` \| `"BIDIRECTIONNELLE"` *** ### etatArete > **etatArete**: `EtatArete` *** ### forcePropagation > **forcePropagation**: `number` *** ### key > **key**: `string` *** ### source > **source**: [`EntityID`](../type-aliases/EntityID.md) *** ### typeRelation > **typeRelation**: [`TypeRelation`](../type-aliases/TypeRelation.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AskUserArgs # Interface: AskUserArgs ## Properties ### candidates > **candidates**: [`Entity`](Entity.md)[] *** ### mention > **mention**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AtomicCommand # Interface: AtomicCommand ## Extended by - [`AddConstraintCommand`](AddConstraintCommand.md) - [`CreateEntityCommand`](CreateEntityCommand.md) - [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md) - [`RegisterFactCommand`](RegisterFactCommand.md) - [`SetSceneCommand`](SetSceneCommand.md) - [`AdvanceTurnCommand`](AdvanceTurnCommand.md) ## Properties ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AtomicWriteStrategy # Interface: AtomicWriteStrategy ## Methods ### addConstraint() > **addConstraint**(`command`): `Promise`\<[`AddConstraintResult`](AddConstraintResult.md)\> #### Parameters ##### command [`AddConstraintCommand`](AddConstraintCommand.md) #### Returns `Promise`\<[`AddConstraintResult`](AddConstraintResult.md)\> *** ### advanceTurn() > **advanceTurn**(`command`): `Promise`\<[`AdvanceTurnResult`](AdvanceTurnResult.md)\> #### Parameters ##### command [`AdvanceTurnCommand`](AdvanceTurnCommand.md) #### Returns `Promise`\<[`AdvanceTurnResult`](AdvanceTurnResult.md)\> *** ### confirmEntityMatch() > **confirmEntityMatch**(`command`): `Promise`\<[`ConfirmEntityMatchResult`](ConfirmEntityMatchResult.md)\> #### Parameters ##### command [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md) #### Returns `Promise`\<[`ConfirmEntityMatchResult`](ConfirmEntityMatchResult.md)\> *** ### createEntity() > **createEntity**(`command`): `Promise`\<[`CreateEntityResult`](../type-aliases/CreateEntityResult.md)\> #### Parameters ##### command [`CreateEntityCommand`](CreateEntityCommand.md) #### Returns `Promise`\<[`CreateEntityResult`](../type-aliases/CreateEntityResult.md)\> *** ### registerFact() > **registerFact**(`command`): `Promise`\<[`RegisterFactResult`](RegisterFactResult.md)\> #### Parameters ##### command [`RegisterFactCommand`](RegisterFactCommand.md) #### Returns `Promise`\<[`RegisterFactResult`](RegisterFactResult.md)\> *** ### setScene() > **setScene**(`command`): `Promise`\<[`SetSceneResult`](SetSceneResult.md)\> #### Parameters ##### command [`SetSceneCommand`](SetSceneCommand.md) #### Returns `Promise`\<[`SetSceneResult`](SetSceneResult.md)\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AttributFige # Interface: AttributFige ## Properties ### category > **category**: [`CategorieAttribut`](../type-aliases/CategorieAttribut.md) *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### factId > **factId**: [`FactId`](../type-aliases/FactId.md) *** ### key > **key**: `string` *** ### observation > **observation**: [`Observation`](Observation.md) *** ### turn > **turn**: `number` *** ### value > **value**: [`AttributValue`](../type-aliases/AttributValue.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Avertissement # Interface: Avertissement ## Properties ### contrainte > **contrainte**: [`Contrainte`](Contrainte.md) *** ### message > **message**: `string` *** ### type > **type**: `"CONTRAINTE_SOUPLE"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CampaignMeta # Interface: CampaignMeta ## Properties ### createdAt > **createdAt**: `number` *** ### embeddingDim > **embeddingDim**: `number` *** ### id > **id**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### name > **name**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ChatRequest # Interface: ChatRequest ## Properties ### maxTokens? > `optional` **maxTokens?**: `number` *** ### messages > **messages**: `object`[] #### content > **content**: `string` #### role > **role**: `"user"` \| `"assistant"` *** ### responseFormat? > `optional` **responseFormat?**: `"text"` \| `"json"` *** ### system? > `optional` **system?**: `string` *** ### temperature? > `optional` **temperature?**: `number` *** ### tools? > `optional` **tools?**: `object`[] #### description > **description**: `string` #### inputSchema > **inputSchema**: `object` #### name > **name**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ChatResponse # Interface: ChatResponse ## Properties ### modelUsed > **modelUsed**: `string` *** ### providerUsed > **providerUsed**: `string` *** ### text > **text**: `string` *** ### toolCalls > **toolCalls**: `object`[] #### arguments > **arguments**: `unknown` #### name > **name**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ConfirmEntityMatchCommand # Interface: ConfirmEntityMatchCommand ## Extends - [`AtomicCommand`](AtomicCommand.md) ## Extended by - [`ConfirmEntityMatchDecisionInput`](ConfirmEntityMatchDecisionInput.md) ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### mention > **mention**: `string` *** ### observedAt > **observedAt**: `number` *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`AtomicCommand`](AtomicCommand.md).[`operationId`](AtomicCommand.md#operationid) *** ### type > **type**: [`EntityType`](../type-aliases/EntityType.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ConfirmEntityMatchDecision # Interface: ConfirmEntityMatchDecision ## Properties ### entity > **entity**: [`Entity`](Entity.md) *** ### result > **result**: [`ConfirmEntityMatchResult`](ConfirmEntityMatchResult.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ConfirmEntityMatchDecisionInput # Interface: ConfirmEntityMatchDecisionInput ## Extends - [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md) ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) #### Inherited from [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md).[`campaignId`](ConfirmEntityMatchCommand.md#campaignid) *** ### entity > **entity**: [`Entity`](Entity.md) \| `null` *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) #### Inherited from [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md).[`entityId`](ConfirmEntityMatchCommand.md#entityid) *** ### mention > **mention**: `string` #### Inherited from [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md).[`mention`](ConfirmEntityMatchCommand.md#mention) *** ### observedAt > **observedAt**: `number` #### Inherited from [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md).[`observedAt`](ConfirmEntityMatchCommand.md#observedat) *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md).[`operationId`](ConfirmEntityMatchCommand.md#operationid) *** ### type > **type**: [`EntityType`](../type-aliases/EntityType.md) #### Inherited from [`ConfirmEntityMatchCommand`](ConfirmEntityMatchCommand.md).[`type`](ConfirmEntityMatchCommand.md#type) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ConfirmEntityMatchInput # Interface: ConfirmEntityMatchInput ## Properties ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### mention > **mention**: `string` *** ### type > **type**: [`EntityType`](../type-aliases/EntityType.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ConfirmEntityMatchResult # Interface: ConfirmEntityMatchResult ## Properties ### aliasAdded > **aliasAdded**: `boolean` *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ContexteGeneratif # Interface: ContexteGeneratif ## Properties ### categorieAttribut > **categorieAttribut**: [`CategorieAttribut`](../type-aliases/CategorieAttribut.md) *** ### tendances > **tendances**: [`Tendance`](Tendance.md)[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Contrainte # Interface: Contrainte ## Properties ### createdAt > **createdAt**: `number` *** ### id > **id**: [`ConstraintId`](../type-aliases/ConstraintId.md) *** ### justificationNarrative > **justificationNarrative**: `string` *** ### regle > **regle**: [`RegleContrainte`](../type-aliases/RegleContrainte.md) *** ### source > **source**: [`ContrainteSource`](../type-aliases/ContrainteSource.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ContraintePropagee # Interface: ContraintePropagee ## Properties ### attributCible > **attributCible**: `string` *** ### contrainte > **contrainte**: [`Contrainte`](Contrainte.md) *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### forceAccumulee > **forceAccumulee**: `number` *** ### hopDistance > **hopDistance**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CreateEntityCommand # Interface: CreateEntityCommand ## Extends - [`AtomicCommand`](AtomicCommand.md) ## Extended by - [`CreateEntityDecisionInput`](CreateEntityDecisionInput.md) ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### candidate > **candidate**: [`Entity`](Entity.md) *** ### expectedEntityRevision > **expectedEntityRevision**: `number` *** ### force > **force**: `boolean` *** ### identityKeys > **identityKeys**: `string`[] *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`AtomicCommand`](AtomicCommand.md).[`operationId`](AtomicCommand.md#operationid) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CreateEntityDecision # Interface: CreateEntityDecision ## Properties ### entity > **entity**: [`Entity`](Entity.md) \| `null` *** ### result > **result**: [`CreateEntityResult`](../type-aliases/CreateEntityResult.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CreateEntityDecisionInput # Interface: CreateEntityDecisionInput ## Extends - [`CreateEntityCommand`](CreateEntityCommand.md) ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) #### Inherited from [`CreateEntityCommand`](CreateEntityCommand.md).[`campaignId`](CreateEntityCommand.md#campaignid) *** ### candidate > **candidate**: [`Entity`](Entity.md) #### Inherited from [`CreateEntityCommand`](CreateEntityCommand.md).[`candidate`](CreateEntityCommand.md#candidate) *** ### currentEntityRevision > **currentEntityRevision**: `number` *** ### exactMatches > **exactMatches**: [`Entity`](Entity.md)[] *** ### expectedEntityRevision > **expectedEntityRevision**: `number` #### Inherited from [`CreateEntityCommand`](CreateEntityCommand.md).[`expectedEntityRevision`](CreateEntityCommand.md#expectedentityrevision) *** ### force > **force**: `boolean` #### Inherited from [`CreateEntityCommand`](CreateEntityCommand.md).[`force`](CreateEntityCommand.md#force) *** ### identityKeys > **identityKeys**: `string`[] #### Inherited from [`CreateEntityCommand`](CreateEntityCommand.md).[`identityKeys`](CreateEntityCommand.md#identitykeys) *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`CreateEntityCommand`](CreateEntityCommand.md).[`operationId`](CreateEntityCommand.md#operationid) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / DefaultDepsOptions # Interface: DefaultDepsOptions ## Properties ### customChat? > `optional` **customChat?**: `CustomChatFn` *** ### customEmbed? > `optional` **customEmbed?**: `CustomEmbedFn` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Embedder # Interface: Embedder ## Methods ### embed() > **embed**(`text`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> #### Parameters ##### text `string` #### Returns `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / EmbeddingRequest # Interface: EmbeddingRequest ## Properties ### texts > **texts**: `string`[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / EmbeddingResponse # Interface: EmbeddingResponse ## Properties ### dim > **dim**: `number` *** ### modelUsed > **modelUsed**: `string` *** ### providerUsed > **providerUsed**: `string` *** ### vectors > **vectors**: `Float32Array`\<`ArrayBufferLike`\>[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / EngineConfig # Interface: EngineConfig ## Properties ### \_routerDeps? > `optional` **\_routerDeps?**: [`RouterDeps`](RouterDeps.md) Optional override for router provider resolution (useful in tests). *** ### logger? > `optional` **logger?**: [`Logger`](Logger.md) *** ### repository > **repository**: [`Repository`](Repository.md) \| [`RepositoryAccess`](../type-aliases/RepositoryAccess.md) *** ### resolver? > `optional` **resolver?**: `Partial`\<[`ResolverThresholds`](ResolverThresholds.md)\> *** ### router > **router**: [`RouterConfig`](RouterConfig.md) *** ### routerInstance? > `optional` **routerInstance?**: [`Router`](../classes/Router.md) Optional prebuilt Router shared with another consumer such as a GM brain. *** ### writeStrategy? > `optional` **writeStrategy?**: [`AtomicWriteStrategy`](AtomicWriteStrategy.md) Explicit write strategy for repositories without transaction(callback). [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Entity # Interface: Entity ## Properties ### aliases > **aliases**: [`Alias`](Alias.md)[] *** ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### createdAt > **createdAt**: `number` *** ### description? > `optional` **description?**: `string` Human-readable description, persisted at mention time. Feeds the judge prompt and prepare-turn. *** ### embedding > **embedding**: `Float32Array`\<`ArrayBufferLike`\> \| `null` *** ### embeddingRefreshedAt > **embeddingRefreshedAt**: `number` \| `null` *** ### id > **id**: [`EntityID`](../type-aliases/EntityID.md) *** ### name > **name**: `string` *** ### nomConnu > **nomConnu**: `boolean` *** ### tags > **tags**: `string`[] *** ### type > **type**: [`EntityType`](../type-aliases/EntityType.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / EntityCandidateSummary # Interface: EntityCandidateSummary ## Properties ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### name > **name**: `string` *** ### type > **type**: [`EntityType`](../type-aliases/EntityType.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / EntityWithScore # Interface: EntityWithScore ## Properties ### entity > **entity**: [`Entity`](Entity.md) *** ### score > **score**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / FactQuery # Interface: FactQuery ## Properties ### attributeKey? > `optional` **attributeKey?**: `string` *** ### category? > `optional` **category?**: [`CategorieAttribut`](../type-aliases/CategorieAttribut.md) *** ### entityId? > `optional` **entityId?**: [`EntityID`](../type-aliases/EntityID.md) *** ### maxTurn? > `optional` **maxTurn?**: `number` *** ### minTurn? > `optional` **minTurn?**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Logger # Interface: Logger ## Methods ### debug() > **debug**(`msg`, `fields?`): `void` #### Parameters ##### msg `string` ##### fields? `Record`\<`string`, `unknown`\> #### Returns `void` *** ### error() > **error**(`msg`, `fields?`): `void` #### Parameters ##### msg `string` ##### fields? `Record`\<`string`, `unknown`\> #### Returns `void` *** ### info() > **info**(`msg`, `fields?`): `void` #### Parameters ##### msg `string` ##### fields? `Record`\<`string`, `unknown`\> #### Returns `void` *** ### warn() > **warn**(`msg`, `fields?`): `void` #### Parameters ##### msg `string` ##### fields? `Record`\<`string`, `unknown`\> #### Returns `void` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / MentionInput # Interface: MentionInput ## Properties ### aliases? > `optional` **aliases?**: `string`[] *** ### canonicalName > **canonicalName**: `string` *** ### description > **description**: `string` *** ### force? > `optional` **force?**: `boolean` Create even when resolution is ambiguous (after the caller adjudicated). *** ### type > **type**: [`EntityType`](../type-aliases/EntityType.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / NarrationGateContext # Interface: NarrationGateContext ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### repo > **repo**: [`RepositoryAccess`](../type-aliases/RepositoryAccess.md) *** ### resolver > **resolver**: [`Resolver`](../classes/Resolver.md) *** ### router > **router**: [`Router`](../classes/Router.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / NarrationGateHook # Interface: NarrationGateHook ## Methods ### validate() > **validate**(`input`, `ctx`): `Promise`\<[`ValidationReport`](ValidationReport.md)\> #### Parameters ##### input [`NarrationGateInput`](NarrationGateInput.md) ##### ctx [`NarrationGateContext`](NarrationGateContext.md) #### Returns `Promise`\<[`ValidationReport`](ValidationReport.md)\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / NarrationGateInput # Interface: NarrationGateInput ## Properties ### narration > **narration**: `string` *** ### strict? > `optional` **strict?**: `boolean` *** ### type? > `optional` **type?**: [`EntityType`](../type-aliases/EntityType.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / NarrationIssue # Interface: NarrationIssue ## Properties ### kind > **kind**: `"no-match"` \| `"below-threshold"` \| `"ambiguous"` *** ### llmReasoning? > `optional` **llmReasoning?**: `string` *** ### noun > **noun**: `string` *** ### suggestions > **suggestions**: `object`[] #### canonicalName > **canonicalName**: `string` #### confidence > **confidence**: `number` #### entityId > **entityId**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / NewCampaignInput # Interface: NewCampaignInput ## Properties ### embeddingDim > **embeddingDim**: `number` *** ### id > **id**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### name > **name**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / NoeudGCN # Interface: NoeudGCN ## Properties ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### etatActuel > **etatActuel**: `"INCONNU"` \| `"PARTIELLEMENT_CONNU"` \| `"BIEN_CONNU"` *** ### poidsNarratif > **poidsNarratif**: `number` *** ### tags > **tags**: `string`[] *** ### type > **type**: [`EntityType`](../type-aliases/EntityType.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Observation # Interface: Observation ## Properties ### emittedBy? > `optional` **emittedBy?**: [`EntityID`](../type-aliases/EntityID.md) *** ### excerpt? > `optional` **excerpt?**: `string` *** ### fiabilite > **fiabilite**: [`Fiabilite`](../type-aliases/Fiabilite.md) *** ### method > **method**: [`ObservationMethod`](../type-aliases/ObservationMethod.md) *** ### sceneId? > `optional` **sceneId?**: [`SceneId`](../type-aliases/SceneId.md) *** ### source > **source**: [`ObservationSource`](../type-aliases/ObservationSource.md) *** ### timestamp > **timestamp**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Potentialite # Interface: Potentialite ## Properties ### attribut > **attribut**: `string` *** ### contexteGeneratif > **contexteGeneratif**: [`ContexteGeneratif`](ContexteGeneratif.md) *** ### contraintes > **contraintes**: [`Contrainte`](Contrainte.md)[] *** ### entiteId > **entiteId**: [`EntityID`](../type-aliases/EntityID.md) *** ### etat > **etat**: `"INDEFINI"` \| `"CONTRAINT"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / PreGenerationHook # Interface: PreGenerationHook ## Methods ### onEvent() > **onEvent**(`e`): `void` \| `Promise`\<`void`\> #### Parameters ##### e [`PredictionEvent`](PredictionEvent.md) #### Returns `void` \| `Promise`\<`void`\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / PredictionEvent # Interface: PredictionEvent ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### hint > **hint**: `object` #### attribute? > `optional` **attribute?**: `string` #### entityId? > `optional` **entityId?**: [`EntityID`](../type-aliases/EntityID.md) *** ### triggerKind > **triggerKind**: `"ENTRY_TO_SCENE"` \| `"DIALOGUE_OPENED"` \| `"TURN_ADVANCED"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / PropagationInput # Interface: PropagationInput ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### createdAt? > `optional` **createdAt?**: `number` *** ### edges > **edges**: readonly [`AreteGCN`](AreteGCN.md)[] *** ### fact > **fact**: [`AttributFige`](AttributFige.md) *** ### maxDepth > **maxDepth**: `number` *** ### minForce > **minForce**: `number` *** ### rules > **rules**: readonly [`ReglePropagation`](ReglePropagation.md)[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / PropagationResult # Interface: PropagationResult ## Properties ### contraintesPropagees > **contraintesPropagees**: [`ContraintePropagee`](ContraintePropagee.md)[] *** ### entitesImpactees > **entitesImpactees**: [`EntityID`](../type-aliases/EntityID.md)[] *** ### faitSource > **faitSource**: [`AttributFige`](AttributFige.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Provider # Interface: Provider ## Properties ### ref > `readonly` **ref**: [`ProviderRef`](ProviderRef.md) ## Methods ### chat() > **chat**(`req`, `signal`): `Promise`\<[`ChatResponse`](ChatResponse.md)\> #### Parameters ##### req [`ChatRequest`](ChatRequest.md) ##### signal `AbortSignal` #### Returns `Promise`\<[`ChatResponse`](ChatResponse.md)\> *** ### embed() > **embed**(`req`, `signal`): `Promise`\<[`EmbeddingResponse`](EmbeddingResponse.md)\> #### Parameters ##### req [`EmbeddingRequest`](EmbeddingRequest.md) ##### signal `AbortSignal` #### Returns `Promise`\<[`EmbeddingResponse`](EmbeddingResponse.md)\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ProviderChain # Interface: ProviderChain ## Properties ### fallbacks > **fallbacks**: [`ProviderRef`](ProviderRef.md)[] *** ### primary > **primary**: [`ProviderRef`](ProviderRef.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ProviderRef # Interface: ProviderRef ## Properties ### apiKeyEnv > **apiKeyEnv**: `string` *** ### baseUrl? > `optional` **baseUrl?**: `string` *** ### embeddingDim? > `optional` **embeddingDim?**: `number` Output dimension of the embedding model. Embeddings refs only; lets the Router reject mixed-dim chains and lets the CLI derive a default campaign dim. *** ### maxTokens? > `optional` **maxTokens?**: `number` *** ### model > **model**: `string` *** ### provider > **provider**: [`ProviderKind`](../type-aliases/ProviderKind.md) *** ### quotaHint? > `optional` **quotaHint?**: `object` #### isFreeTier? > `optional` **isFreeTier?**: `boolean` #### requestsPerDay? > `optional` **requestsPerDay?**: `number` #### requestsPerMinute? > `optional` **requestsPerMinute?**: `number` *** ### temperature? > `optional` **temperature?**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RegisterFactCommand # Interface: RegisterFactCommand ## Extends - [`AtomicCommand`](AtomicCommand.md) ## Extended by - [`RegisterFactDecisionInput`](RegisterFactDecisionInput.md) ## Properties ### attributeKey > **attributeKey**: `string` *** ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### category > **category**: [`CategorieAttribut`](../type-aliases/CategorieAttribut.md) *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### factId > **factId**: [`FactId`](../type-aliases/FactId.md) *** ### observation > **observation**: [`Observation`](Observation.md) *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`AtomicCommand`](AtomicCommand.md).[`operationId`](AtomicCommand.md#operationid) *** ### value > **value**: [`AttributValue`](../type-aliases/AttributValue.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RegisterFactDecision # Interface: RegisterFactDecision ## Properties ### contradictions > **contradictions**: [`AttributFige`](AttributFige.md)[] *** ### fact > **fact**: [`AttributFige`](AttributFige.md) & `object` \| `null` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RegisterFactDecisionInput # Interface: RegisterFactDecisionInput ## Extends - [`RegisterFactCommand`](RegisterFactCommand.md) ## Properties ### attributeKey > **attributeKey**: `string` #### Inherited from [`RegisterFactCommand`](RegisterFactCommand.md).[`attributeKey`](RegisterFactCommand.md#attributekey) *** ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) #### Inherited from [`RegisterFactCommand`](RegisterFactCommand.md).[`campaignId`](RegisterFactCommand.md#campaignid) *** ### category > **category**: [`CategorieAttribut`](../type-aliases/CategorieAttribut.md) #### Inherited from [`RegisterFactCommand`](RegisterFactCommand.md).[`category`](RegisterFactCommand.md#category) *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) #### Inherited from [`RegisterFactCommand`](RegisterFactCommand.md).[`entityId`](RegisterFactCommand.md#entityid) *** ### existing > **existing**: [`AttributFige`](AttributFige.md)[] *** ### factId > **factId**: [`FactId`](../type-aliases/FactId.md) #### Inherited from [`RegisterFactCommand`](RegisterFactCommand.md).[`factId`](RegisterFactCommand.md#factid) *** ### latestTurnNumber > **latestTurnNumber**: `number` *** ### observation > **observation**: [`Observation`](Observation.md) #### Inherited from [`RegisterFactCommand`](RegisterFactCommand.md).[`observation`](RegisterFactCommand.md#observation) *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`RegisterFactCommand`](RegisterFactCommand.md).[`operationId`](RegisterFactCommand.md#operationid) *** ### value > **value**: [`AttributValue`](../type-aliases/AttributValue.md) #### Inherited from [`RegisterFactCommand`](RegisterFactCommand.md).[`value`](RegisterFactCommand.md#value) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RegisterFactInput # Interface: RegisterFactInput ## Properties ### attributeKey > **attributeKey**: `string` *** ### category > **category**: [`CategorieAttribut`](../type-aliases/CategorieAttribut.md) *** ### entityId > **entityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### observation > **observation**: [`Observation`](Observation.md) *** ### value > **value**: [`AttributValue`](../type-aliases/AttributValue.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RegisterFactResult # Interface: RegisterFactResult ## Properties ### contradictions > **contradictions**: [`AttributFige`](AttributFige.md)[] *** ### factId > **factId**: [`FactId`](../type-aliases/FactId.md) \| `null` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ReglePropagation # Interface: ReglePropagation ## Properties ### actionType > **actionType**: `ActionTypePropagation` *** ### cibleParams > **cibleParams**: `Record`\<`string`, `unknown`\> *** ### cibleType > **cibleType**: `"RELATION_DIRECTE"` \| `"CHEMIN"` \| `"TAG"` *** ### declencheur > **declencheur**: `DeclencheurPropagation` *** ### id > **id**: `string` *** ### nom > **nom**: `string` *** ### priorite > **priorite**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Repository # Interface: Repository ## Methods ### appendFact() > **appendFact**(`f`): `Promise`\<\{ `factId`: [`FactId`](../type-aliases/FactId.md); \}\> #### Parameters ##### f [`AttributFige`](AttributFige.md) & `object` #### Returns `Promise`\<\{ `factId`: [`FactId`](../type-aliases/FactId.md); \}\> *** ### appendTurn() > **appendTurn**(`t`): `Promise`\<`void`\> #### Parameters ##### t [`Turn`](Turn.md) #### Returns `Promise`\<`void`\> *** ### close() > **close**(): `Promise`\<`void`\> #### Returns `Promise`\<`void`\> *** ### createCampaign() > **createCampaign**(`meta`): `Promise`\<`void`\> #### Parameters ##### meta [`CampaignMeta`](CampaignMeta.md) #### Returns `Promise`\<`void`\> *** ### currentScene() > **currentScene**(`campaignId`): `Promise`\<[`Scene`](Scene.md) \| `null`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) #### Returns `Promise`\<[`Scene`](Scene.md) \| `null`\> *** ### deleteCampaign() > **deleteCampaign**(`id`): `Promise`\<`void`\> #### Parameters ##### id [`CampaignId`](../type-aliases/CampaignId.md) #### Returns `Promise`\<`void`\> *** ### entityRevision() > **entityRevision**(`campaignId`): `Promise`\<`number`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) #### Returns `Promise`\<`number`\> *** ### findEntitiesByAlias() > **findEntitiesByAlias**(`campaignId`, `aliasNormalized`, `type?`): `Promise`\<[`Entity`](Entity.md)[]\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### aliasNormalized `string` ##### type? [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`Entity`](Entity.md)[]\> *** ### getEntity() > **getEntity**(`campaignId`, `entityId`): `Promise`\<[`Entity`](Entity.md) \| `null`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### entityId [`EntityID`](../type-aliases/EntityID.md) #### Returns `Promise`\<[`Entity`](Entity.md) \| `null`\> *** ### getFigedAttributes() > **getFigedAttributes**(`campaignId`, `entityId`): `Promise`\<[`AttributFige`](AttributFige.md)[]\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### entityId [`EntityID`](../type-aliases/EntityID.md) #### Returns `Promise`\<[`AttributFige`](AttributFige.md)[]\> *** ### getPotentialite() > **getPotentialite**(`campaignId`, `entityId`, `attribut`): `Promise`\<[`Potentialite`](Potentialite.md) \| `null`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### entityId [`EntityID`](../type-aliases/EntityID.md) ##### attribut `string` #### Returns `Promise`\<[`Potentialite`](Potentialite.md) \| `null`\> *** ### latestTurn() > **latestTurn**(`campaignId`): `Promise`\<[`Turn`](Turn.md) \| `null`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) #### Returns `Promise`\<[`Turn`](Turn.md) \| `null`\> *** ### listCampaigns() > **listCampaigns**(): `Promise`\<[`CampaignMeta`](CampaignMeta.md)[]\> #### Returns `Promise`\<[`CampaignMeta`](CampaignMeta.md)[]\> *** ### neighbors() > **neighbors**(`campaignId`, `entityId`): `Promise`\<`object`[]\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### entityId [`EntityID`](../type-aliases/EntityID.md) #### Returns `Promise`\<`object`[]\> *** ### queryFacts() > **queryFacts**(`campaignId`, `query`): `Promise`\<[`AttributFige`](AttributFige.md)[]\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### query [`FactQuery`](FactQuery.md) #### Returns `Promise`\<[`AttributFige`](AttributFige.md)[]\> *** ### removePotentialite() > **removePotentialite**(`campaignId`, `entityId`, `attribut`): `Promise`\<`void`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### entityId [`EntityID`](../type-aliases/EntityID.md) ##### attribut `string` #### Returns `Promise`\<`void`\> *** ### searchEntitiesByVector() > **searchEntitiesByVector**(`campaignId`, `vec`, `opts`): `Promise`\<[`EntityWithScore`](EntityWithScore.md)[]\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### vec `Float32Array` ##### opts [`VectorSearchOpts`](VectorSearchOpts.md) #### Returns `Promise`\<[`EntityWithScore`](EntityWithScore.md)[]\> *** ### topEntities() > **topEntities**(`campaignId`, `k`): `Promise`\<[`Entity`](Entity.md)[]\> Return up to `k` entities for the campaign, ordered by `embeddingRefreshedAt` descending. #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### k `number` #### Returns `Promise`\<[`Entity`](Entity.md)[]\> *** ### transaction() > **transaction**\<`T`\>(`fn`): `Promise`\<`T`\> #### Type Parameters ##### T `T` #### Parameters ##### fn (`tx`) => `Promise`\<`T`\> #### Returns `Promise`\<`T`\> *** ### upsertEdge() > **upsertEdge**(`campaignId`, `a`): `Promise`\<`void`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### a [`AreteGCN`](AreteGCN.md) #### Returns `Promise`\<`void`\> *** ### upsertEntity() > **upsertEntity**(`e`): `Promise`\<`void`\> #### Parameters ##### e [`Entity`](Entity.md) #### Returns `Promise`\<`void`\> *** ### upsertNode() > **upsertNode**(`campaignId`, `n`): `Promise`\<`void`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### n [`NoeudGCN`](NoeudGCN.md) #### Returns `Promise`\<`void`\> *** ### upsertPotentialite() > **upsertPotentialite**(`campaignId`, `p`): `Promise`\<`void`\> #### Parameters ##### campaignId [`CampaignId`](../type-aliases/CampaignId.md) ##### p [`Potentialite`](Potentialite.md) #### Returns `Promise`\<`void`\> *** ### upsertScene() > **upsertScene**(`s`): `Promise`\<`void`\> #### Parameters ##### s [`Scene`](Scene.md) #### Returns `Promise`\<`void`\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ResolutionResult # Interface: ResolutionResult ## Properties ### candidates > **candidates**: [`Entity`](Entity.md)[] *** ### confidence > **confidence**: `number` *** ### layerUsed > **layerUsed**: `"none"` \| `"alias"` \| `"vector"` \| `"judge"` \| `"user-prompt"` *** ### match > **match**: [`Entity`](Entity.md) \| `null` *** ### notFoundReason? > `optional` **notFoundReason?**: `"no-match"` \| `"below-threshold"` \| `"ambiguous"` *** ### reasoning? > `optional` **reasoning?**: `string` *** ### unavailableReason? > `optional` **unavailableReason?**: `"embeddings"` \| `"vector-search"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ResolveOptions # Interface: ResolveOptions ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### mention > **mention**: `string` *** ### sceneDescription? > `optional` **sceneDescription?**: `string` *** ### type? > `optional` **type?**: [`EntityType`](../type-aliases/EntityType.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ResolvedCandidate # Interface: ResolvedCandidate ## Properties ### kind > **kind**: `"no-match"` \| `"below-threshold"` \| `"ambiguous"` *** ### llmReasoning? > `optional` **llmReasoning?**: `string` *** ### noun > **noun**: `string` *** ### suggestions > **suggestions**: `object`[] #### canonicalName > **canonicalName**: `string` #### confidence > **confidence**: `number` #### entityId > **entityId**: `string` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ResolverThresholds # Interface: ResolverThresholds ## Properties ### embeddingRefreshThreshold > **embeddingRefreshThreshold**: `number` *** ### gapDelta > **gapDelta**: `number` *** ### tauHigh > **tauHigh**: `number` *** ### tauLow > **tauLow**: `number` *** ### topK > **topK**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RouterConfig # Interface: RouterConfig ## Properties ### defaults? > `optional` **defaults?**: `object` #### backoff? > `optional` **backoff?**: `object` ##### backoff.baseMs > **baseMs**: `number` ##### backoff.strategy > **strategy**: `"exponential"` \| `"fixed"` #### maxRetries? > `optional` **maxRetries?**: `number` #### timeoutMs? > `optional` **timeoutMs?**: `number` *** ### tiers > **tiers**: [`RouterTiers`](RouterTiers.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RouterDeps # Interface: RouterDeps ## Methods ### resolveProvider() > **resolveProvider**(`ref`): [`Provider`](Provider.md) \| `Promise`\<[`Provider`](Provider.md)\> #### Parameters ##### ref [`ProviderRef`](ProviderRef.md) #### Returns [`Provider`](Provider.md) \| `Promise`\<[`Provider`](Provider.md)\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RouterTiers # Interface: RouterTiers ## Properties ### embeddings? > `optional` **embeddings?**: [`ProviderChain`](ProviderChain.md) Optional: omit entirely to run keyless / alias-only (no vector resolution). *** ### heavy > **heavy**: [`ProviderChain`](ProviderChain.md) *** ### light > **light**: [`ProviderChain`](ProviderChain.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Scene # Interface: Scene ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### createdAtTurn > **createdAtTurn**: `number` *** ### description > **description**: `string` *** ### id > **id**: [`SceneId`](../type-aliases/SceneId.md) *** ### locationId > **locationId**: [`EntityID`](../type-aliases/EntityID.md) *** ### presentEntityIds > **presentEntityIds**: [`EntityID`](../type-aliases/EntityID.md)[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SetSceneCommand # Interface: SetSceneCommand ## Extends - [`AtomicCommand`](AtomicCommand.md) ## Extended by - [`SetSceneDecisionInput`](SetSceneDecisionInput.md) ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### createdAt > **createdAt**: `number` *** ### description > **description**: `string` *** ### locationEntityId > **locationEntityId**: [`EntityID`](../type-aliases/EntityID.md) *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`AtomicCommand`](AtomicCommand.md).[`operationId`](AtomicCommand.md#operationid) *** ### presentEntityIds > **presentEntityIds**: [`EntityID`](../type-aliases/EntityID.md)[] *** ### sceneId > **sceneId**: [`SceneId`](../type-aliases/SceneId.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SetSceneDecision # Interface: SetSceneDecision ## Properties ### scene > **scene**: [`Scene`](Scene.md) *** ### turn > **turn**: [`Turn`](Turn.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SetSceneDecisionInput # Interface: SetSceneDecisionInput ## Extends - [`SetSceneCommand`](SetSceneCommand.md) ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) #### Inherited from [`SetSceneCommand`](SetSceneCommand.md).[`campaignId`](SetSceneCommand.md#campaignid) *** ### createdAt > **createdAt**: `number` #### Inherited from [`SetSceneCommand`](SetSceneCommand.md).[`createdAt`](SetSceneCommand.md#createdat) *** ### description > **description**: `string` #### Inherited from [`SetSceneCommand`](SetSceneCommand.md).[`description`](SetSceneCommand.md#description) *** ### latestTurnNumber > **latestTurnNumber**: `number` *** ### locationEntityId > **locationEntityId**: [`EntityID`](../type-aliases/EntityID.md) #### Inherited from [`SetSceneCommand`](SetSceneCommand.md).[`locationEntityId`](SetSceneCommand.md#locationentityid) *** ### operationId > **operationId**: `string` Stable token for atomically deduplicating retries of one logical write. #### Inherited from [`SetSceneCommand`](SetSceneCommand.md).[`operationId`](SetSceneCommand.md#operationid) *** ### presentEntityIds > **presentEntityIds**: [`EntityID`](../type-aliases/EntityID.md)[] #### Inherited from [`SetSceneCommand`](SetSceneCommand.md).[`presentEntityIds`](SetSceneCommand.md#presententityids) *** ### sceneId > **sceneId**: [`SceneId`](../type-aliases/SceneId.md) #### Inherited from [`SetSceneCommand`](SetSceneCommand.md).[`sceneId`](SetSceneCommand.md#sceneid) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SetSceneResult # Interface: SetSceneResult ## Properties ### sceneId > **sceneId**: [`SceneId`](../type-aliases/SceneId.md) *** ### turnNumber > **turnNumber**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SuggestionResult # Interface: SuggestionResult ## Properties ### candidates > **candidates**: [`Entity`](Entity.md)[] *** ### recommendsNew > **recommendsNew**: `boolean` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Tendance # Interface: Tendance ## Properties ### description > **description**: `string` *** ### poids > **poids**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ToolCallContext # Interface: ToolCallContext ## Methods ### addConstraint() > **addConstraint**(`input`): `Promise`\<\{ `constraintId`: [`ConstraintId`](../type-aliases/ConstraintId.md); \}\> #### Parameters ##### input ###### attributeKey `string` ###### entityId [`EntityID`](../type-aliases/EntityID.md) ###### justification `string` ###### rule [`RegleContrainte`](../type-aliases/RegleContrainte.md) #### Returns `Promise`\<\{ `constraintId`: [`ConstraintId`](../type-aliases/ConstraintId.md); \}\> *** ### advanceTurn() > **advanceTurn**(`summary?`): `Promise`\<\{ `turnNumber`: `number`; \}\> #### Parameters ##### summary? `string` #### Returns `Promise`\<\{ `turnNumber`: `number`; \}\> *** ### getEntity() > **getEntity**(`entityId`): `Promise`\<[`Entity`](Entity.md) \| `null`\> #### Parameters ##### entityId [`EntityID`](../type-aliases/EntityID.md) #### Returns `Promise`\<[`Entity`](Entity.md) \| `null`\> *** ### getRelevantFacts() > **getRelevantFacts**(`entityId`, `opts?`): `Promise`\<[`AttributFige`](AttributFige.md)[]\> #### Parameters ##### entityId [`EntityID`](../type-aliases/EntityID.md) ##### opts? ###### attributeKeys? `string`[] ###### depth? `0` \| `1` #### Returns `Promise`\<[`AttributFige`](AttributFige.md)[]\> *** ### mentionEntity() > **mentionEntity**(`input`): `Promise`\<[`MentionResult`](../type-aliases/MentionResult.md)\> #### Parameters ##### input ###### aliases? `string`[] ###### canonicalName `string` ###### description `string` ###### force? `boolean` ###### type [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`MentionResult`](../type-aliases/MentionResult.md)\> *** ### registerFact() > **registerFact**(`input`): `Promise`\<\{ `contradictions`: [`AttributFige`](AttributFige.md)[]; `factId`: [`FactId`](../type-aliases/FactId.md) \| `null`; \}\> #### Parameters ##### input ###### attributeKey `string` ###### category [`CategorieAttribut`](../type-aliases/CategorieAttribut.md) ###### entityId [`EntityID`](../type-aliases/EntityID.md) ###### observation [`Observation`](Observation.md) ###### value [`AttributValue`](../type-aliases/AttributValue.md) #### Returns `Promise`\<\{ `contradictions`: [`AttributFige`](AttributFige.md)[]; `factId`: [`FactId`](../type-aliases/FactId.md) \| `null`; \}\> *** ### resolveEntity() > **resolveEntity**(`opts`): `Promise`\<[`ResolutionResult`](ResolutionResult.md)\> #### Parameters ##### opts ###### mention `string` ###### type? [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`ResolutionResult`](ResolutionResult.md)\> *** ### setScene() > **setScene**(`input`): `Promise`\<\{ `sceneId`: [`SceneId`](../type-aliases/SceneId.md); `turnNumber`: `number`; \}\> #### Parameters ##### input ###### description `string` ###### locationEntityId [`EntityID`](../type-aliases/EntityID.md) ###### presentEntityIds [`EntityID`](../type-aliases/EntityID.md)[] #### Returns `Promise`\<\{ `sceneId`: [`SceneId`](../type-aliases/SceneId.md); `turnNumber`: `number`; \}\> *** ### suggestExisting() > **suggestExisting**(`mention`, `type`): `Promise`\<[`SuggestionResult`](SuggestionResult.md)\> #### Parameters ##### mention `string` ##### type [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`SuggestionResult`](SuggestionResult.md)\> *** ### validateNarration() > **validateNarration**(`input`): `Promise`\<[`ValidationReport`](ValidationReport.md)\> #### Parameters ##### input ###### narration `string` ###### strict? `boolean` ###### type? [`EntityType`](../type-aliases/EntityType.md) #### Returns `Promise`\<[`ValidationReport`](ValidationReport.md)\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Turn # Interface: Turn ## Properties ### campaignId > **campaignId**: [`CampaignId`](../type-aliases/CampaignId.md) *** ### createdAt > **createdAt**: `number` *** ### sceneId > **sceneId**: [`SceneId`](../type-aliases/SceneId.md) \| `null` *** ### summary > **summary**: `string` \| `null` *** ### turnNumber > **turnNumber**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ValidationContext # Interface: ValidationContext ## Properties ### existingFiged > **existingFiged**: readonly [`AttributFige`](AttributFige.md)[] *** ### softContraintes > **softContraintes**: readonly [`Contrainte`](Contrainte.md)[] *** ### strictContraintes > **strictContraintes**: readonly [`Contrainte`](Contrainte.md)[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ValidationFailure # Interface: ValidationFailure ## Properties ### contrainte? > `optional` **contrainte?**: [`Contrainte`](Contrainte.md) *** ### message > **message**: `string` *** ### type > **type**: `ErrorType` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ValidationFailureDetail # Interface: ValidationFailureDetail ## Properties ### message > **message**: `string` *** ### type > **type**: `"FORMAT"` \| `"CONTRAINTE_STRICTE"` \| `"CONTRADICTION_RC"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ValidationReport # Interface: ValidationReport ## Properties ### extractedNames > **extractedNames**: `string`[] *** ### issues > **issues**: [`NarrationIssue`](NarrationIssue.md)[] *** ### ok > **ok**: `boolean` *** ### partial? > `optional` **partial?**: `boolean` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ValidationResult # Interface: ValidationResult ## Properties ### avertissements > **avertissements**: [`Avertissement`](Avertissement.md)[] *** ### erreurs > **erreurs**: [`ValidationFailure`](ValidationFailure.md)[] *** ### valide > **valide**: `boolean` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ValidatorOptions # Interface: ValidatorOptions ## Properties ### llmCharBudget? > `optional` **llmCharBudget?**: `number` *** ### stopwords? > `optional` **stopwords?**: `ReadonlySet`\<`string`\> *** ### topK? > `optional` **topK?**: `number` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / VectorSearchOpts # Interface: VectorSearchOpts ## Properties ### excludeEntityIds? > `optional` **excludeEntityIds?**: [`EntityID`](../type-aliases/EntityID.md)[] *** ### filterType? > `optional` **filterType?**: [`EntityType`](../type-aliases/EntityType.md) *** ### topK > **topK**: `number` ## type-aliases [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AliasSource # Type Alias: AliasSource > **AliasSource** = \{ `kind`: `"PLAYER"`; \} \| \{ `kind`: `"GM_NARRATION"`; \} \| \{ `documentId`: [`EntityID`](EntityID.md); `kind`: `"DOCUMENT"`; \} \| \{ `kind`: `"INFERENCE"`; \} [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AskUserFn # Type Alias: AskUserFn > **AskUserFn** = (`args`) => `Promise`\<[`Entity`](../interfaces/Entity.md) \| `null`\> ## Parameters ### args [`AskUserArgs`](../interfaces/AskUserArgs.md) ## Returns `Promise`\<[`Entity`](../interfaces/Entity.md) \| `null`\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / AttributValue # Type Alias: AttributValue > **AttributValue** = \{ `type`: `"STRING"`; `value`: `string`; \} \| \{ `type`: `"NUMBER"`; `value`: `number`; \} \| \{ `type`: `"BOOLEAN"`; `value`: `boolean`; \} \| \{ `id`: [`EntityID`](EntityID.md); `type`: `"ENTITY_REF"`; \} \| \{ `ids`: [`EntityID`](EntityID.md)[]; `type`: `"ENTITY_SET"`; \} \| \{ `enumType`: `string`; `type`: `"ENUM"`; `value`: `string`; \} \| \{ `fields`: `Record`\<`string`, `AttributValue`\>; `type`: `"COMPOSITE"`; \} [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CampaignContextInvalidationReason # Type Alias: CampaignContextInvalidationReason > **CampaignContextInvalidationReason** = `"deleting"` \| `"deleted"` \| `"engine-closed"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CampaignId # Type Alias: CampaignId > **CampaignId** = `string` & `object` ## Type Declaration ### \[brand\] > `readonly` **\[brand\]**: `"CampaignId"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CategorieAttribut # Type Alias: CategorieAttribut > **CategorieAttribut** = `"IDENTITE"` \| `"PSYCHOLOGIE"` \| `"HISTORIQUE"` \| `"SOCIAL"` \| `"COMPETENCE"` \| `"SECRET"` \| `"ETAT"` \| `"POSSESSION"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ConstraintId # Type Alias: ConstraintId > **ConstraintId** = `string` & `object` ## Type Declaration ### \[brand\] > `readonly` **\[brand\]**: `"ConstraintId"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ContrainteSource # Type Alias: ContrainteSource > **ContrainteSource** = \{ `factId`: [`FactId`](FactId.md); `kind`: `"FAIT_CANONIQUE"`; \} \| \{ `edgeKey`: `string`; `kind`: `"RELATION"`; \} \| \{ `kind`: `"REGLE_MONDE"`; `ruleId`: `string`; \} \| \{ `confidence`: `number`; `kind`: `"INFERENCE_IA"`; \} [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / CreateEntityResult # Type Alias: CreateEntityResult > **CreateEntityResult** = \{ `status`: `"stale"`; \} \| \{ `entityId`: [`EntityID`](EntityID.md); `isNew`: `true`; `status`: `"created"`; \} \| \{ `entityId`: [`EntityID`](EntityID.md); `isNew`: `false`; `resolvedTo`: [`EntityID`](EntityID.md); `status`: `"existing"`; \} \| \{ `candidates`: [`EntityCandidateSummary`](../interfaces/EntityCandidateSummary.md)[]; `status`: `"conflict"`; \} [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / EntityID # Type Alias: EntityID > **EntityID** = `string` & `object` ## Type Declaration ### \[brand\] > `readonly` **\[brand\]**: `"EntityID"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / EntityType # Type Alias: EntityType > **EntityType** = `"PERSONNAGE"` \| `"LIEU"` \| `"OBJET"` \| `"FACTION"` \| `"EVENEMENT"` \| `"RELATION"` \| `"SCENE"` \| `"WORLD"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / EtatAttribut # Type Alias: EtatAttribut > **EtatAttribut** = `"INDEFINI"` \| `"CONTRAINT"` \| `"FIGE"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / FactId # Type Alias: FactId > **FactId** = `string` & `object` ## Type Declaration ### \[brand\] > `readonly` **\[brand\]**: `"FactId"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Fiabilite # Type Alias: Fiabilite > **Fiabilite** = `"CERTAINE"` \| `"TEMOIGNAGE"` \| `"RUMEUR_CONFIRMEE"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / MentionResult # Type Alias: MentionResult > **MentionResult** = \{ `entityId`: [`EntityID`](EntityID.md); `isNew`: `boolean`; `needsAdjudication?`: `false`; `resolvedTo?`: [`EntityID`](EntityID.md); \} \| \{ `candidates`: `object`[]; `entityId`: `null`; `isNew`: `false`; `needsAdjudication`: `true`; `reason?`: `"ambiguous"` \| `"unavailable"`; \} [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ObservationMethod # Type Alias: ObservationMethod > **ObservationMethod** = `"DIALOGUE_DIRECT"` \| `"DOCUMENT"` \| `"OBSERVATION_VISUELLE"` \| `"DEDUCTION_CONFIRMEE"` \| `"AVEU"` \| `"DEMONSTRATION"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ObservationSource # Type Alias: ObservationSource > **ObservationSource** = `"GM_NARRATION"` \| `"PLAYER_UTTERANCE"` \| `"DICE_ROLL"` \| `"SYSTEM"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ProviderErrorCode # Type Alias: ProviderErrorCode > **ProviderErrorCode** = `"QUOTA"` \| `"AUTH"` \| `"SERVER"` \| `"TIMEOUT"` \| `"MALFORMED"` \| `"NETWORK"` \| `"UNSUPPORTED"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ProviderKind # Type Alias: ProviderKind > **ProviderKind** = `"openai-compatible"` \| `"anthropic"` \| `"google-genai"` \| `"custom"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RegleContrainte # Type Alias: RegleContrainte > **RegleContrainte** = \{ `type`: `"DOIT_ETRE"`; `valeurs`: [`AttributValue`](AttributValue.md)[]; \} \| \{ `type`: `"NE_PEUT_PAS_ETRE"`; `valeurs`: [`AttributValue`](AttributValue.md)[]; \} \| \{ `condition`: `string`; `consequence`: `string`; `type`: `"IMPLIQUE"`; \} \| \{ `autreAttribut`: `string`; `autreEntite`: [`EntityID`](EntityID.md); `type`: `"CORRELE_AVEC"`; \} \| \{ `max?`: `number`; `min?`: `number`; `type`: `"RANGE_NUMERIQUE"`; \} \| \{ `pattern`: `string`; `type`: `"REGEX"`; \} [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / RepositoryAccess # Type Alias: RepositoryAccess > **RepositoryAccess** = `Omit`\<[`Repository`](../interfaces/Repository.md), `"transaction"`\> Repository surface usable by distributed stores; atomic writes are injected separately. [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SceneId # Type Alias: SceneId > **SceneId** = `string` & `object` ## Type Declaration ### \[brand\] > `readonly` **\[brand\]**: `"SceneId"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / Tier # Type Alias: Tier > **Tier** = `"heavy"` \| `"light"` \| `"embeddings"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ToolName # Type Alias: ToolName > **ToolName** = *typeof* [`ToolNames`](../variables/ToolNames.md)\[`number`\] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / TypeRelation # Type Alias: TypeRelation > **TypeRelation** = \{ `categorie`: `"SOCIAL"`; `sousType`: `RelationSociale`; \} \| \{ `categorie`: `"CAUSAL"`; `sousType`: `RelationCausale`; \} \| \{ `categorie`: `"SPATIAL"`; `sousType`: `RelationSpatiale`; \} \| \{ `categorie`: `"TEMPOREL"`; `sousType`: `RelationTemporelle`; \} \| \{ `categorie`: `"CONCEPTUEL"`; `sousType`: `RelationConceptuelle`; \} ## functions [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / anthropicTools # Function: anthropicTools() > **anthropicTools**(): `object`[] ## Returns `object`[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / asCampaignId # Function: asCampaignId() > **asCampaignId**(`s`): [`CampaignId`](../type-aliases/CampaignId.md) ## Parameters ### s `string` ## Returns [`CampaignId`](../type-aliases/CampaignId.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / asConstraintId # Function: asConstraintId() > **asConstraintId**(`s`): [`ConstraintId`](../type-aliases/ConstraintId.md) ## Parameters ### s `string` ## Returns [`ConstraintId`](../type-aliases/ConstraintId.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / asEntityID # Function: asEntityID() > **asEntityID**(`s`): [`EntityID`](../type-aliases/EntityID.md) ## Parameters ### s `string` ## Returns [`EntityID`](../type-aliases/EntityID.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / asFactId # Function: asFactId() > **asFactId**(`s`): [`FactId`](../type-aliases/FactId.md) ## Parameters ### s `string` ## Returns [`FactId`](../type-aliases/FactId.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / asSceneId # Function: asSceneId() > **asSceneId**(`s`): [`SceneId`](../type-aliases/SceneId.md) ## Parameters ### s `string` ## Returns [`SceneId`](../type-aliases/SceneId.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / createDefaultDeps # Function: createDefaultDeps() > **createDefaultDeps**(`opts?`): [`RouterDeps`](../interfaces/RouterDeps.md) ## Parameters ### opts? [`DefaultDepsOptions`](../interfaces/DefaultDepsOptions.md) = `{}` ## Returns [`RouterDeps`](../interfaces/RouterDeps.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / decideAddConstraint # Function: decideAddConstraint() > **decideAddConstraint**(`input`): [`AddConstraintDecision`](../interfaces/AddConstraintDecision.md) ## Parameters ### input [`AddConstraintDecisionInput`](../interfaces/AddConstraintDecisionInput.md) ## Returns [`AddConstraintDecision`](../interfaces/AddConstraintDecision.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / decideAdvanceTurn # Function: decideAdvanceTurn() > **decideAdvanceTurn**(`input`): [`AdvanceTurnDecision`](../interfaces/AdvanceTurnDecision.md) ## Parameters ### input [`AdvanceTurnDecisionInput`](../interfaces/AdvanceTurnDecisionInput.md) ## Returns [`AdvanceTurnDecision`](../interfaces/AdvanceTurnDecision.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / decideConfirmEntityMatch # Function: decideConfirmEntityMatch() > **decideConfirmEntityMatch**(`input`): [`ConfirmEntityMatchDecision`](../interfaces/ConfirmEntityMatchDecision.md) ## Parameters ### input [`ConfirmEntityMatchDecisionInput`](../interfaces/ConfirmEntityMatchDecisionInput.md) ## Returns [`ConfirmEntityMatchDecision`](../interfaces/ConfirmEntityMatchDecision.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / decideCreateEntity # Function: decideCreateEntity() > **decideCreateEntity**(`input`): [`CreateEntityDecision`](../interfaces/CreateEntityDecision.md) ## Parameters ### input [`CreateEntityDecisionInput`](../interfaces/CreateEntityDecisionInput.md) ## Returns [`CreateEntityDecision`](../interfaces/CreateEntityDecision.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / decideRegisterFact # Function: decideRegisterFact() > **decideRegisterFact**(`input`): [`RegisterFactDecision`](../interfaces/RegisterFactDecision.md) ## Parameters ### input [`RegisterFactDecisionInput`](../interfaces/RegisterFactDecisionInput.md) ## Returns [`RegisterFactDecision`](../interfaces/RegisterFactDecision.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / decideSetScene # Function: decideSetScene() > **decideSetScene**(`input`): [`SetSceneDecision`](../interfaces/SetSceneDecision.md) ## Parameters ### input [`SetSceneDecisionInput`](../interfaces/SetSceneDecisionInput.md) ## Returns [`SetSceneDecision`](../interfaces/SetSceneDecision.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / defaultRouterConfig # Function: defaultRouterConfig() > **defaultRouterConfig**(): [`RouterConfig`](../interfaces/RouterConfig.md) ## Returns [`RouterConfig`](../interfaces/RouterConfig.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / dispatchToolCall # Function: dispatchToolCall() > **dispatchToolCall**(`name`, `rawArgs`, `ctx`): `Promise`\<`unknown`\> ## Parameters ### name `string` ### rawArgs `unknown` ### ctx [`ToolCallContext`](../interfaces/ToolCallContext.md) ## Returns `Promise`\<`unknown`\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / geminiTools # Function: geminiTools() > **geminiTools**(): `object`[] ## Returns `object`[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / genericTools # Function: genericTools() > **genericTools**(): `object`[] ## Returns `object`[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / loadConfigFromFile # Function: loadConfigFromFile() > **loadConfigFromFile**(`path`): `object` ## Parameters ### path `string` ## Returns `object` ### resolver? > `optional` **resolver?**: `Partial`\<[`ResolverThresholds`](../interfaces/ResolverThresholds.md)\> ### router > **router**: [`RouterConfig`](../interfaces/RouterConfig.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / openAITools # Function: openAITools() > **openAITools**(): `object`[] ## Returns `object`[] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / propagate # Function: propagate() > **propagate**(`input`): [`PropagationResult`](../interfaces/PropagationResult.md) ## Parameters ### input [`PropagationInput`](../interfaces/PropagationInput.md) ## Returns [`PropagationResult`](../interfaces/PropagationResult.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / validateValue # Function: validateValue() > **validateValue**(`value`, `ctx`): [`ValidationResult`](../interfaces/ValidationResult.md) ## Parameters ### value [`AttributValue`](../type-aliases/AttributValue.md) ### ctx [`ValidationContext`](../interfaces/ValidationContext.md) ## Returns [`ValidationResult`](../interfaces/ValidationResult.md) ## variables [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ADVERTISED\_TOOL\_NAMES # Variable: ADVERTISED\_TOOL\_NAMES > `const` **ADVERTISED\_TOOL\_NAMES**: readonly [`ToolName`](../type-aliases/ToolName.md)[] = `ToolNames` Tools advertised to LLMs. Every listed tool is implemented. [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / SNEQ\_ENGINE\_VERSION # Variable: SNEQ\_ENGINE\_VERSION > `const` **SNEQ\_ENGINE\_VERSION**: `"0.1.0"` = `"0.1.0"` [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / ToolNames # Variable: ToolNames > `const` **ToolNames**: readonly \[`"sneq__lookup_entity"`, `"sneq__get_entity"`, `"sneq__get_relevant_facts"`, `"sneq__suggest_existing"`, `"sneq__mention_entity"`, `"sneq__register_fact"`, `"sneq__add_constraint"`, `"sneq__set_scene"`, `"sneq__advance_turn"`, `"sneq__validate_narration"`\] [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / defaultNarrationGateHook # Variable: defaultNarrationGateHook > `const` **defaultNarrationGateHook**: [`NarrationGateHook`](../interfaces/NarrationGateHook.md) Default `NarrationGateHook` implementation backed by the Validator. Engine uses this as the registry fallback so a consumer that never registers a custom hook still gets the built-in behavior. [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / noopLogger # Variable: noopLogger > `const` **noopLogger**: [`Logger`](../interfaces/Logger.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / noopPreGenerationHook # Variable: noopPreGenerationHook > `const` **noopPreGenerationHook**: [`PreGenerationHook`](../interfaces/PreGenerationHook.md) [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / toolDescriptions # Variable: toolDescriptions > `const` **toolDescriptions**: `Record`\<[`ToolName`](../type-aliases/ToolName.md), `string`\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / toolJsonSchemas # Variable: toolJsonSchemas > `const` **toolJsonSchemas**: `Record`\<[`ToolName`](../type-aliases/ToolName.md), `object`\> [**sneq-engine API**](../README.md) *** [sneq-engine API](../README.md) / toolSchemas # Variable: toolSchemas > `const` **toolSchemas**: `object` ## Type Declaration ### sneq\_\_add\_constraint > `readonly` **sneq\_\_add\_constraint**: `ZodObject`\<\{ `attributeKey`: `ZodString`; `entityId`: `ZodString`; `justification`: `ZodString`; `rule`: `ZodUnknown`; \}, `$strip`\> ### sneq\_\_advance\_turn > `readonly` **sneq\_\_advance\_turn**: `ZodObject`\<\{ `summary`: `ZodOptional`\<`ZodString`\>; \}, `$strip`\> ### sneq\_\_get\_entity > `readonly` **sneq\_\_get\_entity**: `ZodObject`\<\{ `entityId`: `ZodString`; \}, `$strip`\> ### sneq\_\_get\_relevant\_facts > `readonly` **sneq\_\_get\_relevant\_facts**: `ZodObject`\<\{ `attributeKeys`: `ZodOptional`\<`ZodArray`\<`ZodString`\>\>; `depth`: `ZodOptional`\<`ZodUnion`\, `ZodLiteral`\<`1`\>\]\>\>; `entityId`: `ZodString`; \}, `$strip`\> ### sneq\_\_lookup\_entity > `readonly` **sneq\_\_lookup\_entity**: `ZodObject`\<\{ `mention`: `ZodString`; `type`: `ZodOptional`\<`ZodEnum`\<\{ `EVENEMENT`: `"EVENEMENT"`; `FACTION`: `"FACTION"`; `LIEU`: `"LIEU"`; `OBJET`: `"OBJET"`; `PERSONNAGE`: `"PERSONNAGE"`; `RELATION`: `"RELATION"`; `SCENE`: `"SCENE"`; `WORLD`: `"WORLD"`; \}\>\>; \}, `$strip`\> ### sneq\_\_mention\_entity > `readonly` **sneq\_\_mention\_entity**: `ZodObject`\<\{ `aliases`: `ZodOptional`\<`ZodArray`\<`ZodString`\>\>; `canonicalName`: `ZodString`; `description`: `ZodString`; `force`: `ZodOptional`\<`ZodBoolean`\>; `type`: `ZodEnum`\<\{ `EVENEMENT`: `"EVENEMENT"`; `FACTION`: `"FACTION"`; `LIEU`: `"LIEU"`; `OBJET`: `"OBJET"`; `PERSONNAGE`: `"PERSONNAGE"`; `RELATION`: `"RELATION"`; `SCENE`: `"SCENE"`; `WORLD`: `"WORLD"`; \}\>; \}, `$strip`\> ### sneq\_\_register\_fact > `readonly` **sneq\_\_register\_fact**: `ZodObject`\<\{ `attributeKey`: `ZodString`; `category`: `ZodEnum`\<\{ `COMPETENCE`: `"COMPETENCE"`; `ETAT`: `"ETAT"`; `HISTORIQUE`: `"HISTORIQUE"`; `IDENTITE`: `"IDENTITE"`; `POSSESSION`: `"POSSESSION"`; `PSYCHOLOGIE`: `"PSYCHOLOGIE"`; `SECRET`: `"SECRET"`; `SOCIAL`: `"SOCIAL"`; \}\>; `entityId`: `ZodString`; `observation`: `ZodObject`\<\{ `emittedBy`: `ZodOptional`\<`ZodString`\>; `excerpt`: `ZodOptional`\<`ZodString`\>; `fiabilite`: `ZodEnum`\<\{ `CERTAINE`: `"CERTAINE"`; `RUMEUR_CONFIRMEE`: `"RUMEUR_CONFIRMEE"`; `TEMOIGNAGE`: `"TEMOIGNAGE"`; \}\>; `method`: `ZodEnum`\<\{ `AVEU`: `"AVEU"`; `DEDUCTION_CONFIRMEE`: `"DEDUCTION_CONFIRMEE"`; `DEMONSTRATION`: `"DEMONSTRATION"`; `DIALOGUE_DIRECT`: `"DIALOGUE_DIRECT"`; `DOCUMENT`: `"DOCUMENT"`; `OBSERVATION_VISUELLE`: `"OBSERVATION_VISUELLE"`; \}\>; `sceneId`: `ZodOptional`\<`ZodString`\>; `source`: `ZodEnum`\<\{ `DICE_ROLL`: `"DICE_ROLL"`; `GM_NARRATION`: `"GM_NARRATION"`; `PLAYER_UTTERANCE`: `"PLAYER_UTTERANCE"`; `SYSTEM`: `"SYSTEM"`; \}\>; `timestamp`: `ZodNumber`; \}, `$strip`\>; `value`: `ZodType`\<`unknown`, `unknown`, `$ZodTypeInternals`\<`unknown`, `unknown`\>\>; \}, `$strip`\> ### sneq\_\_set\_scene > `readonly` **sneq\_\_set\_scene**: `ZodObject`\<\{ `description`: `ZodString`; `locationEntityId`: `ZodString`; `presentEntityIds`: `ZodArray`\<`ZodString`\>; \}, `$strip`\> ### sneq\_\_suggest\_existing > `readonly` **sneq\_\_suggest\_existing**: `ZodObject`\<\{ `mention`: `ZodString`; `type`: `ZodEnum`\<\{ `EVENEMENT`: `"EVENEMENT"`; `FACTION`: `"FACTION"`; `LIEU`: `"LIEU"`; `OBJET`: `"OBJET"`; `PERSONNAGE`: `"PERSONNAGE"`; `RELATION`: `"RELATION"`; `SCENE`: `"SCENE"`; `WORLD`: `"WORLD"`; \}\>; \}, `$strip`\> ### sneq\_\_validate\_narration > `readonly` **sneq\_\_validate\_narration**: `ZodObject`\<\{ `narration`: `ZodString`; `strict`: `ZodOptional`\<`ZodBoolean`\>; `type`: `ZodOptional`\<`ZodEnum`\<\{ `EVENEMENT`: `"EVENEMENT"`; `FACTION`: `"FACTION"`; `LIEU`: `"LIEU"`; `OBJET`: `"OBJET"`; `PERSONNAGE`: `"PERSONNAGE"`; `RELATION`: `"RELATION"`; `SCENE`: `"SCENE"`; `WORLD`: `"WORLD"`; \}\>\>; \}, `$strip`\>