@dsh-agentic-roleplay/state 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -66,7 +66,7 @@ The package owns how a story is remembered, not only where it is stored:
66
66
  - `session.records(scope)` reads the records back in the same wire format.
67
67
  - `session.recall({ characterId, situation, turn, policy })` is what a character is reminded of: events it took in and things it believes, by who the situation mentions, shared words and tags, importance and story-time recency; with `policy.flaky` the older and less important are told as faded or vague, or are gone. Age is elapsed story time from `session.clock`, never turn count; an unimportant event has a six-story-day half-life. It counts what it brings back as recalled, which makes it last longer.
68
68
  - `session.recallStored(query, { queryVector? })` adds the session's search index to the cues: texts that match the situation by words and, with the vector of the situation, by meaning. `session.searchEvents({ text, vector?, fromTurn, toTurn, minImportance, limit })` finds what happened by the same two searches, merged by reciprocal rank.
69
- - `session.recallRanked(query, signal, { queryVector? })` is the call for anything that reminds a character of something: `recall`, ranked by meaning when a plugin has registered a ranker with `roleplayState.rankMemories(ranker)` (an embedding model, a reranker; see `docs/capabilities.md`). `session.recallCandidates(query)` gives what could be recalled, with the text to match, for a ranker.
69
+ - `session.recallRanked(query, signal, { queryVector? })` is the call for anything that reminds a character of something: `recall`, ranked by meaning when a plugin has registered a ranker with `roleplayState.rankMemories(ranker)` (an embedding model, a reranker; see `docs/capabilities.md`). `session.recallCandidates(query)` gives what could be recalled, with the text to match, for a ranker. With `explain: true` in the query each recalled thing carries `why`: the cues of the moment (people named, words shared, place), what each search scored it, how much it matters, how long ago it was, how much of it is left in mind and what it was ranked by.
70
70
  - `session.knowledge` is the closed-world awareness graph for locations, items and directed exits (`learn`, `knows`, `get`, `list`, `forget`). Directional relationships are the corresponding character-to-character edges. Awareness grants identity only, not current state or whereabouts. `session.planKnownMove` plans through only a character's known places and exits; `planMove` remains the authoritative world planner.
71
71
  - `session.factions`, `factionStates`, `factionMemberships`, `factionRelationships` and `factionIntents` store persistent organisations separately from characters that act in scenes. Membership is many-to-many; relationships involving factions are directional and double as closed-world awareness edges.
72
72
  - `roleplayState.bind(resolver)` tells the tools which roleplay session an agent works in (the plugin that runs the agents supplies it, with the turn being played and the memory policy).
@@ -149,9 +149,15 @@ application id, so a file that is not a session database is refused.
149
149
  ## Changing the schema
150
150
 
151
151
  Migrations are applied in order when a session is opened and are never edited
152
- once released: a change is a new entry in `src/sqlite/schema.ts`. Before the
153
- first release the schema is still being shaped, and migration 1 is edited in
154
- place. A database from a newer version is refused rather than damaged.
152
+ once released: a change is a new entry in `src/sqlite/schema.ts`, and a test
153
+ pins the migrations of each release. A database from a newer version is refused
154
+ rather than damaged.
155
+
156
+ Before a file that is behind the latest schema is upgraded, it must pass SQLite's
157
+ quick integrity check (a damaged file is refused with `CorruptDataError`, untouched)
158
+ and a copy of it as it was is written to `migration-backups/schema-<version>.sqlite`
159
+ beside the database, once per old version. `migrationBackupPath(location, version)`
160
+ says where.
155
161
 
156
162
  ## Errors
157
163
 
package/lib/index.d.ts CHANGED
@@ -273,8 +273,10 @@ interface Location {
273
273
  createdAt: string;
274
274
  }
275
275
  type NewLocation = Omit<Location, 'id' | 'createdAt'>;
276
- /** What may change about a place once it exists; where it is stays. */
277
- type LocationPatch = Partial<Pick<Location, 'name' | 'description' | 'features'>>;
276
+ /** What may change about a place once it exists. `parentId: null` takes it out of the place that contains it. */
277
+ type LocationPatch = Partial<Pick<Location, 'name' | 'description' | 'features'>> & {
278
+ parentId?: LocationId | null;
279
+ };
278
280
  /** Whether people can go through an exit now. */
279
281
  declare const EXIT_STATES: readonly ["open", "locked", "blocked"];
280
282
  type ExitState = (typeof EXIT_STATES)[number];
@@ -627,7 +629,9 @@ interface Item {
627
629
  createdAt: string;
628
630
  }
629
631
  type NewItem = Omit<Item, 'id' | 'createdAt'>;
630
- type ItemPatch = Partial<Pick<Item, 'name' | 'description' | 'quantity' | 'quality' | 'notable' | 'hidden' | 'ownerId'>> & {
632
+ /** What may change about a thing. `ownerId: null` says it belongs to no one. */
633
+ type ItemPatch = Partial<Pick<Item, 'name' | 'description' | 'quantity' | 'quality' | 'notable' | 'hidden'>> & {
634
+ ownerId?: CharacterId | null;
631
635
  container?: ContainerSpec;
632
636
  };
633
637
  /** What holds an item: a place, a character (in its hands, or worn) or another item (inside it). */
@@ -1003,7 +1007,7 @@ type TriggerId = number;
1003
1007
  declare const COMPARISONS: readonly ["eq", "ne", "lt", "le", "gt", "ge"];
1004
1008
  type Comparison = (typeof COMPARISONS)[number];
1005
1009
  /**
1006
- * When something happens, decided in code from what the story has recorded; nothing here is judged by a model.
1010
+ * When something happens, decided in code from what the story has recorded; only `judged` is a model's reading of the story, kept as a verdict that the code reads.
1007
1011
  * Keys name characters, places, items and variables as the world's files and the tools do. Times are local to
1008
1012
  * the story's zone: `YYYY-MM-DDTHH:MM`, and `HH:MM` for a time of day.
1009
1013
  */
@@ -1050,6 +1054,11 @@ type TriggerCondition =
1050
1054
  {
1051
1055
  type: 'fired';
1052
1056
  trigger: string;
1057
+ } |
1058
+ /** A statement about the story that a model judges true or false after each turn, for what no record can say ("the mayor has lost the town's trust"); false until judged. */
1059
+ {
1060
+ type: 'judged';
1061
+ text: string;
1053
1062
  } | {
1054
1063
  type: 'all';
1055
1064
  conditions: TriggerCondition[];
@@ -2389,7 +2398,11 @@ declare function triggerReferenceProblems(target: Reading, definition: TriggerDe
2389
2398
  interface TriggerClock {
2390
2399
  now: number;
2391
2400
  zone: string;
2401
+ /** Whether a model has judged a statement true; a statement nobody judged is false. */
2402
+ judged?: (statement: string) => boolean;
2392
2403
  }
2404
+ /** The statements of the `judged` parts of a condition, in order, each once. */
2405
+ declare function judgedStatements(condition: TriggerCondition): string[];
2393
2406
  declare function holds(target: RecordsTarget, condition: TriggerCondition, clock: TriggerClock): boolean;
2394
2407
  /** Whether a condition holds now, judged only from what the story has recorded. */
2395
2408
  declare const conditionHolds: typeof holds;
@@ -2489,6 +2502,16 @@ interface MemoryPolicy {
2489
2502
  * reranker judges, and it also gives importance and recency something to choose between. At least 1.
2490
2503
  */
2491
2504
  overRetrieve?: number;
2505
+ /**
2506
+ * How many more things come to mind because they are strongly tied to what the moment recalled (the same people together with the same
2507
+ * place or tags) and matter enough. 0 or absent: none.
2508
+ */
2509
+ associate?: number;
2510
+ /**
2511
+ * How much a memory that says what one already chosen says counts against it, from 0 (the best by score, repeats
2512
+ * included) to 1 (only what adds something new): maximal marginal relevance over the pool. 0 or absent: none.
2513
+ */
2514
+ diversity?: number;
2492
2515
  }
2493
2516
  declare const DEFAULT_MEMORY_POLICY: MemoryPolicy;
2494
2517
  /** How much of a memory is left: what the character is told of it. */
@@ -2506,6 +2529,38 @@ interface Recalled {
2506
2529
  kind: 'perception' | 'memory';
2507
2530
  id: number;
2508
2531
  };
2532
+ /** It did not match the moment itself: it came to mind with something that did ({@link MemoryPolicy.associate}). */
2533
+ linked?: true;
2534
+ /** Why it came back, when the query asked to be told ({@link RecallQuery.explain}). */
2535
+ why?: RecallWhy;
2536
+ }
2537
+ /** What made one thing come back, for finding out why a character was or was not reminded of something. */
2538
+ interface RecallWhy {
2539
+ /** What the cues of the moment gave, in the units of a cue: people named (a name counts 3, more for social weight), words and tags shared (at most 6), being where it happened. */
2540
+ cues: {
2541
+ people: number;
2542
+ words: number;
2543
+ place: number;
2544
+ };
2545
+ /** What each search scored it, from 0 to 1; absent when that search did not run or did not find it. */
2546
+ lexical?: number;
2547
+ dense?: number;
2548
+ rerank?: number;
2549
+ /** What it counted for in the end: the fused retrieval score, blended with the reranker's when there was one. */
2550
+ relevance: number;
2551
+ importance: number;
2552
+ /** How long ago it was in story days; 0 when the story has no clock. */
2553
+ ageDays: number;
2554
+ /** How much of it is left in mind, from 1 to 0, when memories fade. */
2555
+ retention?: number;
2556
+ /** What it was ranked by, together with how much it matters and how recent it is. */
2557
+ score: number;
2558
+ /** For something that came to mind with another: what it shares with the closest of the things recalled for the moment. */
2559
+ linked?: {
2560
+ people: number;
2561
+ tags: number;
2562
+ place: boolean;
2563
+ };
2509
2564
  }
2510
2565
  interface RecallQuery {
2511
2566
  characterId: CharacterId;
@@ -2517,6 +2572,10 @@ interface RecallQuery {
2517
2572
  locationId?: number;
2518
2573
  turn: number;
2519
2574
  policy: MemoryPolicy;
2575
+ /** Say why each thing came back ({@link Recalled.why}). */
2576
+ explain?: boolean;
2577
+ /** Only what involves or is about one of these people comes back: "what do I know about her", which a name in the words would not reliably find. */
2578
+ about?: readonly CharacterId[];
2520
2579
  }
2521
2580
  /** What recall reads: the events a character took in and what it believes. */
2522
2581
  interface RecallSource {
@@ -2543,14 +2602,22 @@ declare function clarityAt(value: number, importance: number): Clarity | undefin
2543
2602
  declare function tokens(text: string): Set<string>;
2544
2603
  /** The characters a text mentions by name or alias. */
2545
2604
  declare function mentioned(text: string, characters: readonly Character[]): Set<number>;
2605
+ /** What ties a candidate to others: the people it involves (other than the one remembering), its tags and where it happened. */
2606
+ interface Links {
2607
+ people: readonly number[];
2608
+ tags: readonly string[];
2609
+ place?: number;
2610
+ }
2546
2611
  interface Candidate {
2547
2612
  key: string;
2548
- recalled: Omit<Recalled, 'clarity' | 'text'> & {
2613
+ links: Links;
2614
+ recalled: Omit<Recalled, 'clarity' | 'text' | 'why'> & {
2549
2615
  clear: string;
2550
2616
  faded: string;
2551
2617
  vague: string;
2552
2618
  };
2553
2619
  relevance: number;
2620
+ cues: RecallWhy['cues'];
2554
2621
  importance: number;
2555
2622
  ageDays: number;
2556
2623
  recalls: number;
@@ -2579,7 +2646,7 @@ interface RecallEvidence {
2579
2646
  rerank?: ReadonlyMap<string, number>;
2580
2647
  }
2581
2648
  /** Everything the character could be reminded of, for a caller that ranks by meaning (an embedding, a reranker) before asking for the recall. */
2582
- declare function recallCandidates(source: RecallSource, query: Pick<RecallQuery, 'characterId' | 'characters' | 'situation' | 'turn' | 'locationId'>): RecallCandidate[];
2649
+ declare function recallCandidates(source: RecallSource, query: Pick<RecallQuery, 'characterId' | 'characters' | 'situation' | 'turn' | 'locationId' | 'about'>): RecallCandidate[];
2583
2650
  /** Fuse scores from 0 to 1 into one, per key: the weighted average over the searches that ran (those with any score above 0). */
2584
2651
  declare function fuseScores(searches: readonly {
2585
2652
  weight: number;
@@ -2589,11 +2656,18 @@ interface PoolEntry {
2589
2656
  candidate: Candidate;
2590
2657
  /** How well retrieval alone matches the moment, from 0 to 1. */
2591
2658
  fused: number;
2659
+ /** What each search scored it, when it was found by it. */
2660
+ found: {
2661
+ lexical?: number;
2662
+ dense?: number;
2663
+ };
2592
2664
  }
2593
2665
  /** What retrieval over-retrieved for one recall, waiting for a reranker's judgement and the final choice. */
2594
2666
  interface RecallPool {
2595
2667
  entries: readonly PoolEntry[];
2596
- query: Pick<RecallQuery, 'policy'>;
2668
+ /** What retrieval left out, which an association may still bring to mind. */
2669
+ others: readonly Candidate[];
2670
+ query: Pick<RecallQuery, 'policy' | 'explain'>;
2597
2671
  }
2598
2672
  /**
2599
2673
  * The first stage of reminding a character of what the moment calls to mind: retrieve, by the cues
@@ -2606,7 +2680,7 @@ declare function recallPool(source: RecallSource, query: RecallQuery, evidence?:
2606
2680
  /** What a reranker is asked to judge: every candidate of the pool, with the text it would be recalled by. */
2607
2681
  declare function poolCandidates(pool: RecallPool): RecallCandidate[];
2608
2682
  /**
2609
- * The last stage: choose the `policy.recall` best of the pool. With a reranker's judgement each
2683
+ * The last stage: choose the `policy.recall` best of the pool, spread by `policy.diversity`. With a reranker's judgement each
2610
2684
  * candidate's relevance is mostly that (a candidate it left out counts as 0), and the rest is what
2611
2685
  * retrieval found; without, it is what retrieval found.
2612
2686
  */
@@ -2950,6 +3024,10 @@ declare function createSessionStore(location: string, session: NewSession, optio
2950
3024
  * @throws {SchemaError} when the file is not a session database, or is from a newer version.
2951
3025
  */
2952
3026
  declare function openSessionStore(location: string, options?: StoreOptions): SessionStore;
3027
+ /** Folder, beside the database, holding the copies made before a schema upgrade. */
3028
+ declare const MIGRATION_BACKUP_FOLDER = "migration-backups";
3029
+ /** Where the copy of a database as it was at schema `version` is kept. */
3030
+ declare function migrationBackupPath(location: string, version: number): string;
2953
3031
  //#endregion
2954
3032
  //#region src/sessions.d.ts
2955
3033
  declare const SESSION_DATABASE_FILE = "session.sqlite";
@@ -3295,5 +3373,5 @@ type LintTarget = Pick<RecordsTarget, 'characters' | 'locations' | 'placements'
3295
3373
  */
3296
3374
  declare function lintWorld(target: LintTarget): LintFinding[];
3297
3375
  //#endregion
3298
- export { ACCURACIES, Accuracy, type Agenda, type AgendaEngagement, type AgendaOptions, type AgentLink, type AgentResolver, type Announcement, type BeliefEdit, CHARACTER_CONTROLS, CHARACTER_KINDS, CHARACTER_ROLES, CHARACTER_TIERS, CLOCK_MODES, COMPARISONS, CONSOLIDATION_KINDS, CONTAINER_STATES, Character, CharacterControl, CharacterDefinition, CharacterFilter, CharacterId, CharacterIntent, CharacterKind, CharacterMemory, CharacterMemoryPatch, type CharacterMove, CharacterPatch, type CharacterRepository, CharacterRole, CharacterSpeech, CharacterStart, CharacterState, CharacterStatePatch, type CharacterStateRepository, CharacterTier, type Clarity, type Clock, ClockMode, ClockState, Comparison, Config, ConflictError, ConsolidationItem, ConsolidationItemId, ConsolidationKind, type ConsolidationRepository, ContainerSpec, ContainerState, CorruptDataError, DAY, DAY_PARTS, DEFAULT_MEMORY_POLICY, DEFAULT_SLOTS, type DayPart, EMOTION_VARIABLES, ENGAGEMENT_GRACE, ENGAGEMENT_STATUSES, EXIT_STATES, type EditChecker, type EditResult, EmbeddingIndexInfo, EmotionStart, EmotionVector, Engagement, EngagementFilter, EngagementId, EngagementPatch, EngagementStatus, EntityKnowledge, type EventEdit, EventId, type EventRepository, Exit, type ExitChange, ExitDefinition, ExitId, ExitOpener, ExitPatch, ExitState, Faction, FactionDefinition, FactionId, FactionIntent, type FactionIntentRepository, FactionMembership, FactionMembershipDefinition, type FactionMembershipRepository, FactionPatch, FactionRelationship, FactionRelationshipDefinition, type FactionRelationshipRepository, type FactionRepository, FactionState, FactionStatePatch, type FactionStateRepository, type FiredTrigger, HOUR, Holder, Holding, IMPORTANCE_MAX, IMPORTANCE_MIN, INTENT_HORIZONS, INTENT_STATUSES, INTENT_TYPES, ITEM_ACTIONS, Intent, IntentFilter, IntentHorizon, IntentId, IntentPatch, type IntentRepository, IntentStatus, IntentType, InvalidEditError, InvalidMoveError, InvalidValueError, Item, type ItemAction, type ItemChange, type ItemChangeSpec, type ItemContext, ItemDefinition, type ItemEditSpec, type ItemEffect, ItemId, ItemPatch, type ItemPlan, type ItemRepository, JsonValue, KNOWLEDGE_KINDS, KnowledgeDefinition, KnowledgeKind, type KnowledgeRepository, type KnownMoveContext, LORE_KINDS, LORE_SUBJECT_KINDS, type LintFinding, type LintSeverity, type LintTarget, type LocalTime, Location, LocationDefinition, LocationFeature, LocationId, LocationPatch, type LocationRepository, Lore, LoreDefinition, LoreId, LoreKind, LorePatch, LoreSubject, LoreSubjectDefinition, LoreSubjectKind, MAX_LOCATION_FEATURES, MAX_ROUTINE_WINDOWS, MAX_SHOWN, MAX_TRIGGERS, MAX_VARIABLES, MEMBERSHIP_STATUSES, MEMORY_KINDS, MINUTE, MembershipPatch, MembershipStatus, MemoryId, MemoryKind, type MemoryPolicy, type MemoryRepository, type MetadataRepository, Move, type MoveContext, MovePlan, type NewBelief, NewCharacter, NewCharacterMemory, type NewCharacterSpec, NewCharacterState, NewEngagement, type NewEvent, NewExit, type NewExitBetween, type NewExit$1 as NewExitEdit, NewFaction, NewFactionState, NewItem, type NewItemSpec, NewLocation, NewLore, NewPerception, type NewPlace, NewPlacement, NewRelationship, NewSession, NewStoryEvent, NewSummary, NewTriggerNote, NotFoundError, type Occurrence, type OpenOptions, PERCEPTION_MODES, PLACEABLE_KINDS, PLOT_NUDGE_MODES, PLOT_STATUSES, PendingCommit, type PendingCommitRepository, PendingEmbedding, type PerceivedBy, PerceivedEvent, Perception, type PerceptionAddition, type PerceptionEdit, PerceptionId, PerceptionMode, PerceptionPatch, type PlaceEdit, PlaceableKind, Placement, type PlacementRepository, PlotDefinition, PlotDevelopment, PlotNudgeMode, PlotProgress, PlotStatus, RECALL_ITEM_KINDS, type RankedGoal, type RecallCandidate, type RecallEvidence, RecallHit, type RecallIndexRepository, RecallItemKind, type RecallPool, type RecallQuery, type RecallSearch, type RecallSource, type Recalled, type RecordsEdit, type RecordsScope, type RecordsTarget, type RecordsView, Relationship, RelationshipDefinition, RelationshipId, RelationshipPatch, type RelationshipRepository, type RelationshipRetraction, type RelationshipSet, RoleplayState, RoutineDefinition, RoutineWindow, type RunResult, LATEST_VERSION as SCHEMA_VERSION, SECOND, SESSION_DATABASE_FILE, SLOT_ID, SUMMARY_LEVELS, SchemaError, type SemanticRanker, type Session, type SessionInit, type SessionListing, SessionMetadata, type SessionStore, type ShownVariable, Slot, type SlotRepository, SocialSubjectKind, type SqlDatabase, type SqlDriver, type SqlValue, StateError, type StatePatch, type StoreOptions, StoredRoutineWindow, StoredVariable, StoryEvent, StoryEventFilter, StoryEventPatch, StoryThread, Summary, SummaryId, SummaryLevel, type SummaryRepository, THREAD_STATUSES, TIME_CHANGE_KINDS, TRIGGER_NOTE_KINDS, TRIGGER_STATUSES, ThreadId, type ThreadRepository, ThreadStatus, TimeChange, TimeChangeFilter, TimeChangeKind, Trigger, TriggerAnnouncement, TriggerAudience, type TriggerClock, TriggerCondition, TriggerDefinition, TriggerEffect, TriggerId, TriggerNote, TriggerNoteKind, type TriggerRun, type TriggerRunOptions, TriggerStatus, VARIABLE_KEY, VARIABLE_KINDS, VARIABLE_SUBJECTS, VARIABLE_VISIBILITIES, VISUAL_SUBJECT_KINDS, type VariableAudience, VariableBand, type VariableChangeSpec, type VariableContext, VariableDefinition, VariableDefinitionInput, type VariableEffect, VariableKind, type VariablePlan, VariableSubject, VariableValue, VariableVisibility, type VectorSearch, type VectorSupport, VisualIdentity, VisualIdentityInput, VisualIdentityPatch, type VisualIdentityRepository, VisualSubjectKind, WEEKDAY_NAMES, WorldReference, addLocalDays, agendaAt, announcements, apply, applyItemPlan, applyRecordsEdit, audienceIds, catchUpPlan, changeItem, changeVariable, characterKey, clarityAt, clockTime, conditionHolds, createCharacterTools, createSession, createSessionStore, createTools, dayPart, deleteSession, denseScore, describeDuration, describeHolder, describeInstant, describeValue, finishRecall, fuseScores, inAudience, inWindow, isSessionId, isTimeZone, itemKey, jitter, lapseNotes, lintWorld, listSessions, localIso, localTime, locationKey, mentioned, moveCharacter, name, nextOccurrence, nextTimeOfDay, nodeSqliteDriver, occurrenceAt, openSession, openSessionStore, overlap, parseInstant, parseRecordsEdit, parseTimeOfDay, parseTriggerDefinition, planItemChange, planKnownMove, planMove, planVariableChange, poolCandidates, rankGoals, readRecords, readTriggerDefinition, recall, recallCandidates, recallPool, recordsEditSchema, retention, runTriggers, seededRoll, sessionDatabase, sessionFolder, shownVariables, subjectOf, systemClock, systemTimeZone, tokens, triggerReferenceProblems, valueIssue, zonedInstant };
3376
+ export { ACCURACIES, Accuracy, type Agenda, type AgendaEngagement, type AgendaOptions, type AgentLink, type AgentResolver, type Announcement, type BeliefEdit, CHARACTER_CONTROLS, CHARACTER_KINDS, CHARACTER_ROLES, CHARACTER_TIERS, CLOCK_MODES, COMPARISONS, CONSOLIDATION_KINDS, CONTAINER_STATES, Character, CharacterControl, CharacterDefinition, CharacterFilter, CharacterId, CharacterIntent, CharacterKind, CharacterMemory, CharacterMemoryPatch, type CharacterMove, CharacterPatch, type CharacterRepository, CharacterRole, CharacterSpeech, CharacterStart, CharacterState, CharacterStatePatch, type CharacterStateRepository, CharacterTier, type Clarity, type Clock, ClockMode, ClockState, Comparison, Config, ConflictError, ConsolidationItem, ConsolidationItemId, ConsolidationKind, type ConsolidationRepository, ContainerSpec, ContainerState, CorruptDataError, DAY, DAY_PARTS, DEFAULT_MEMORY_POLICY, DEFAULT_SLOTS, type DayPart, EMOTION_VARIABLES, ENGAGEMENT_GRACE, ENGAGEMENT_STATUSES, EXIT_STATES, type EditChecker, type EditResult, EmbeddingIndexInfo, EmotionStart, EmotionVector, Engagement, EngagementFilter, EngagementId, EngagementPatch, EngagementStatus, EntityKnowledge, type EventEdit, EventId, type EventRepository, Exit, type ExitChange, ExitDefinition, ExitId, ExitOpener, ExitPatch, ExitState, Faction, FactionDefinition, FactionId, FactionIntent, type FactionIntentRepository, FactionMembership, FactionMembershipDefinition, type FactionMembershipRepository, FactionPatch, FactionRelationship, FactionRelationshipDefinition, type FactionRelationshipRepository, type FactionRepository, FactionState, FactionStatePatch, type FactionStateRepository, type FiredTrigger, HOUR, Holder, Holding, IMPORTANCE_MAX, IMPORTANCE_MIN, INTENT_HORIZONS, INTENT_STATUSES, INTENT_TYPES, ITEM_ACTIONS, Intent, IntentFilter, IntentHorizon, IntentId, IntentPatch, type IntentRepository, IntentStatus, IntentType, InvalidEditError, InvalidMoveError, InvalidValueError, Item, type ItemAction, type ItemChange, type ItemChangeSpec, type ItemContext, ItemDefinition, type ItemEditSpec, type ItemEffect, ItemId, ItemPatch, type ItemPlan, type ItemRepository, JsonValue, KNOWLEDGE_KINDS, KnowledgeDefinition, KnowledgeKind, type KnowledgeRepository, type KnownMoveContext, LORE_KINDS, LORE_SUBJECT_KINDS, type LintFinding, type LintSeverity, type LintTarget, type LocalTime, Location, LocationDefinition, LocationFeature, LocationId, LocationPatch, type LocationRepository, Lore, LoreDefinition, LoreId, LoreKind, LorePatch, LoreSubject, LoreSubjectDefinition, LoreSubjectKind, MAX_LOCATION_FEATURES, MAX_ROUTINE_WINDOWS, MAX_SHOWN, MAX_TRIGGERS, MAX_VARIABLES, MEMBERSHIP_STATUSES, MEMORY_KINDS, MIGRATION_BACKUP_FOLDER, MINUTE, MembershipPatch, MembershipStatus, MemoryId, MemoryKind, type MemoryPolicy, type MemoryRepository, type MetadataRepository, Move, type MoveContext, MovePlan, type NewBelief, NewCharacter, NewCharacterMemory, type NewCharacterSpec, NewCharacterState, NewEngagement, type NewEvent, NewExit, type NewExitBetween, type NewExit$1 as NewExitEdit, NewFaction, NewFactionState, NewItem, type NewItemSpec, NewLocation, NewLore, NewPerception, type NewPlace, NewPlacement, NewRelationship, NewSession, NewStoryEvent, NewSummary, NewTriggerNote, NotFoundError, type Occurrence, type OpenOptions, PERCEPTION_MODES, PLACEABLE_KINDS, PLOT_NUDGE_MODES, PLOT_STATUSES, PendingCommit, type PendingCommitRepository, PendingEmbedding, type PerceivedBy, PerceivedEvent, Perception, type PerceptionAddition, type PerceptionEdit, PerceptionId, PerceptionMode, PerceptionPatch, type PlaceEdit, PlaceableKind, Placement, type PlacementRepository, PlotDefinition, PlotDevelopment, PlotNudgeMode, PlotProgress, PlotStatus, RECALL_ITEM_KINDS, type RankedGoal, type RecallCandidate, type RecallEvidence, RecallHit, type RecallIndexRepository, RecallItemKind, type RecallPool, type RecallQuery, type RecallSearch, type RecallSource, type RecallWhy, type Recalled, type RecordsEdit, type RecordsScope, type RecordsTarget, type RecordsView, Relationship, RelationshipDefinition, RelationshipId, RelationshipPatch, type RelationshipRepository, type RelationshipRetraction, type RelationshipSet, RoleplayState, RoutineDefinition, RoutineWindow, type RunResult, LATEST_VERSION as SCHEMA_VERSION, SECOND, SESSION_DATABASE_FILE, SLOT_ID, SUMMARY_LEVELS, SchemaError, type SemanticRanker, type Session, type SessionInit, type SessionListing, SessionMetadata, type SessionStore, type ShownVariable, Slot, type SlotRepository, SocialSubjectKind, type SqlDatabase, type SqlDriver, type SqlValue, StateError, type StatePatch, type StoreOptions, StoredRoutineWindow, StoredVariable, StoryEvent, StoryEventFilter, StoryEventPatch, StoryThread, Summary, SummaryId, SummaryLevel, type SummaryRepository, THREAD_STATUSES, TIME_CHANGE_KINDS, TRIGGER_NOTE_KINDS, TRIGGER_STATUSES, ThreadId, type ThreadRepository, ThreadStatus, TimeChange, TimeChangeFilter, TimeChangeKind, Trigger, TriggerAnnouncement, TriggerAudience, type TriggerClock, TriggerCondition, TriggerDefinition, TriggerEffect, TriggerId, TriggerNote, TriggerNoteKind, type TriggerRun, type TriggerRunOptions, TriggerStatus, VARIABLE_KEY, VARIABLE_KINDS, VARIABLE_SUBJECTS, VARIABLE_VISIBILITIES, VISUAL_SUBJECT_KINDS, type VariableAudience, VariableBand, type VariableChangeSpec, type VariableContext, VariableDefinition, VariableDefinitionInput, type VariableEffect, VariableKind, type VariablePlan, VariableSubject, VariableValue, VariableVisibility, type VectorSearch, type VectorSupport, VisualIdentity, VisualIdentityInput, VisualIdentityPatch, type VisualIdentityRepository, VisualSubjectKind, WEEKDAY_NAMES, WorldReference, addLocalDays, agendaAt, announcements, apply, applyItemPlan, applyRecordsEdit, audienceIds, catchUpPlan, changeItem, changeVariable, characterKey, clarityAt, clockTime, conditionHolds, createCharacterTools, createSession, createSessionStore, createTools, dayPart, deleteSession, denseScore, describeDuration, describeHolder, describeInstant, describeValue, finishRecall, fuseScores, inAudience, inWindow, isSessionId, isTimeZone, itemKey, jitter, judgedStatements, lapseNotes, lintWorld, listSessions, localIso, localTime, locationKey, mentioned, migrationBackupPath, moveCharacter, name, nextOccurrence, nextTimeOfDay, nodeSqliteDriver, occurrenceAt, openSession, openSessionStore, overlap, parseInstant, parseRecordsEdit, parseTimeOfDay, parseTriggerDefinition, planItemChange, planKnownMove, planMove, planVariableChange, poolCandidates, rankGoals, readRecords, readTriggerDefinition, recall, recallCandidates, recallPool, recordsEditSchema, retention, runTriggers, seededRoll, sessionDatabase, sessionFolder, shownVariables, subjectOf, systemClock, systemTimeZone, tokens, triggerReferenceProblems, valueIssue, zonedInstant };
3299
3377
  //# sourceMappingURL=index.d.ts.map