@dsh-agentic-roleplay/state 0.3.0 → 0.3.2

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
@@ -133,7 +133,7 @@ characters created during play have none.
133
133
  | `locations`, `exits`, `placements` | Places (with features), the ways between them (one direction each, `open` / `locked` / `blocked`, optional travel seconds) and where things stand (a character: place, position, feature; the same table will place items). `session.planMove` / `session.move` move a character over open exits only (`InvalidMoveError` names every reason); the edit wire format can make places, change exits and move characters. |
134
134
  | `events` | What objectively happened: turn, round, text, importance (1 to 5), tags. `event_involves` lists the characters an event is about. Events are immutable: a draft until `sealed`, final afterwards (`events.seal()`); updating or removing a sealed one throws `ConflictError`. |
135
135
  | `perceptions` | What one character took in of an event, in its own terms: mode (witnessed, heard, told, inferred), content, a gist for when it fades, an accuracy label (never shown to the character), and how often it was recalled. One per character and event. |
136
- | `memories` | What a character believes or knows beyond single events: kind (belief, relationship, knowledge), text, the characters it is about, importance, the turn it formed in. |
136
+ | `memories`, `memory_evidence` | What a character believes or knows beyond single events: kind, text, subjects, importance, confidence, formation turn, and the perceptions that support or contradict it. |
137
137
  | `story_threads` | Things not settled yet: promises, mysteries, goals; open or resolved. |
138
138
  | `summaries` | The account of the story for the conversation's head: digests of recent turns and chapters of older ones, each with the turns it covers. |
139
139
  | `recall_items`, `recall_fts`, `recall_vocab`, `recall_vec` | The search index: one row per perception, memory and event, indexed by words (FTS5) and, once vectors are stored, by meaning (sqlite-vec, cosine, partitioned by character). `store.recallIndex` lists the texts without a vector (`pending`), stores vectors (`store`, which fixes the model and dimensions of the session's vectors) and searches (`lexical`, `vector`). Vector support is optional: without the extension everything but `vector` works. |
package/lib/index.d.ts CHANGED
@@ -367,6 +367,11 @@ interface LocationDefinition {
367
367
  interface RoutineWindow {
368
368
  /** The days of the week it applies on, 0 for Sunday; every day when empty. A window past midnight belongs to the day it starts on. */
369
369
  days: number[];
370
+ /**
371
+ * Other days it applies on or does not (`dec`, `12-24`, `season:winter`, `nth:mon:1`, `holiday:<id>`, a `!` before one for a day it does not apply
372
+ * on): it applies on a day that is among `days` and that these allow. Every day when empty or left out.
373
+ */
374
+ on?: string[];
370
375
  /** The minute of the day it starts, 0 to 1439. */
371
376
  start: number;
372
377
  /** The minute it ends (exclusive); before `start` it ends the next day. Equal to `start` is not a window. */
@@ -380,6 +385,7 @@ interface RoutineWindow {
380
385
  interruptible: boolean;
381
386
  }
382
387
  interface StoredRoutineWindow extends RoutineWindow {
388
+ on: string[];
383
389
  id: number;
384
390
  characterId: CharacterId;
385
391
  }
@@ -387,6 +393,8 @@ interface StoredRoutineWindow extends RoutineWindow {
387
393
  interface RoutineDefinition {
388
394
  /** Three-letter days (`mon` to `sun`); every day when left out. */
389
395
  days: string[];
396
+ /** Other days it applies on or does not, as for {@link RoutineWindow.on}. */
397
+ on?: string[];
390
398
  /** `HH:MM`. */
391
399
  from: string;
392
400
  to: string;
@@ -714,6 +722,13 @@ declare const ACCURACIES: readonly ["accurate", "partial", "mistaken"];
714
722
  type Accuracy = (typeof ACCURACIES)[number];
715
723
  declare const MEMORY_KINDS: readonly ["belief", "relationship", "knowledge"];
716
724
  type MemoryKind = (typeof MEMORY_KINDS)[number];
725
+ /** How sure a character is of what it believes, from least to most. */
726
+ declare const MEMORY_CONFIDENCES: readonly ["doubtful", "likely", "sure"];
727
+ type MemoryConfidence = (typeof MEMORY_CONFIDENCES)[number];
728
+ declare const DEFAULT_CONFIDENCE: MemoryConfidence;
729
+ /** Whether a perception speaks for a belief or against it. */
730
+ declare const EVIDENCE_RELATIONS: readonly ["supports", "contradicts"];
731
+ type EvidenceRelation = (typeof EVIDENCE_RELATIONS)[number];
717
732
  declare const THREAD_STATUSES: readonly ["open", "resolved"];
718
733
  type ThreadStatus = (typeof THREAD_STATUSES)[number];
719
734
  /** A digest covers a stretch of recent turns closely; a chapter covers older turns briefly. */
@@ -808,17 +823,30 @@ interface CharacterMemory {
808
823
  /** The characters it is about. */
809
824
  about: CharacterId[];
810
825
  importance: number;
826
+ /** How sure the character is of it. */
827
+ confidence: MemoryConfidence;
811
828
  /** The turn it was formed in. */
812
829
  turn: number;
813
830
  recalls: number;
814
831
  lastRecalledTurn?: number;
815
832
  createdAt: string;
816
833
  }
817
- type NewCharacterMemory = Omit<CharacterMemory, 'id' | 'createdAt' | 'recalls' | 'lastRecalledTurn'>;
834
+ type NewCharacterMemory = Omit<CharacterMemory, 'id' | 'createdAt' | 'recalls' | 'lastRecalledTurn' | 'confidence'> & {
835
+ confidence?: MemoryConfidence;
836
+ };
818
837
  interface CharacterMemoryPatch {
819
838
  text?: string;
820
839
  about?: CharacterId[];
821
840
  importance?: number;
841
+ confidence?: MemoryConfidence;
842
+ }
843
+ /** What a character took in that a belief rests on, or that speaks against it. */
844
+ interface MemoryEvidence {
845
+ memoryId: MemoryId;
846
+ perceptionId: PerceptionId;
847
+ relation: EvidenceRelation;
848
+ /** The turn the link was made. */
849
+ turn: number;
822
850
  }
823
851
  /** Something in the story that is not settled yet: a promise, a mystery, a goal. */
824
852
  interface StoryThread {
@@ -1012,7 +1040,7 @@ type Comparison = (typeof COMPARISONS)[number];
1012
1040
  * the story's zone: `YYYY-MM-DDTHH:MM`, and `HH:MM` for a time of day.
1013
1041
  */
1014
1042
  type TriggerCondition =
1015
- /** True from `from` on, until `to`; or while the time of day is in `window` (past midnight when it ends before it starts), on `days` (`mon` to `sun`) when given. */
1043
+ /** True from `from` on, until `to`; or while the time of day is in `window` (past midnight when it ends before it starts), on `days` (`mon` to `sun`) when given and on the days `on` allows (months, dates, seasons, holidays of the world's calendar). */
1016
1044
  {
1017
1045
  type: 'time';
1018
1046
  from?: string;
@@ -1022,6 +1050,7 @@ type TriggerCondition =
1022
1050
  to: string;
1023
1051
  };
1024
1052
  days?: string[];
1053
+ on?: string[];
1025
1054
  } |
1026
1055
  /** A character is in a place, at a feature of it when given. */
1027
1056
  {
@@ -1170,6 +1199,90 @@ interface NewTriggerNote {
1170
1199
  /** At most this many triggers in a story. */
1171
1200
  declare const MAX_TRIGGERS = 200;
1172
1201
  //#endregion
1202
+ //#region ../dsh-roleplay-model/src/dice.d.ts
1203
+ type DiceCheckId = number;
1204
+ type DiceRollId = number;
1205
+ /** What a band of a check makes of an attempt; the same three results a round's outcome has. */
1206
+ declare const DICE_RESULTS: readonly ["succeeded", "partial", "failed"];
1207
+ type DiceResult = (typeof DICE_RESULTS)[number];
1208
+ /** How a roll is read: by its total, or by how many of the dice came up high enough. */
1209
+ declare const DICE_READINGS: readonly ["total", "successes"];
1210
+ type DiceReading = (typeof DICE_READINGS)[number];
1211
+ /**
1212
+ * What the value is compared with: `absolute` reads the value itself, `over` the amount by which it beats the target
1213
+ * (a difficulty to meet or exceed), `under` the amount by which it stays below the target (a skill to roll under).
1214
+ */
1215
+ declare const DICE_COMPARISONS: readonly ["absolute", "over", "under"];
1216
+ type DiceComparison = (typeof DICE_COMPARISONS)[number];
1217
+ /** One range of values and what it means; a range left open at an end runs on for ever. */
1218
+ interface DiceBand {
1219
+ min?: number;
1220
+ max?: number;
1221
+ /** What it is called in play ("critical failure", "success at a cost"). */
1222
+ label: string;
1223
+ result: DiceResult;
1224
+ /** A result that is more than the plain one: a critical. */
1225
+ critical?: boolean;
1226
+ }
1227
+ /** A way of settling an attempt, as a world defines it; the dice and the reading of what they show are the world's, not the model's. */
1228
+ interface DiceCheckDefinition {
1229
+ key: string;
1230
+ name: string;
1231
+ /** When the game master uses this check, in the author's words. */
1232
+ use: string;
1233
+ /** Dice notation: `1d20`, `2d6`, `4d6kh3`, `d100`. */
1234
+ dice: string;
1235
+ reading?: DiceReading;
1236
+ /** With the reading `successes`: a die counts when it shows at least this. */
1237
+ hit?: number;
1238
+ compare?: DiceComparison;
1239
+ /** The key of a variable of the acting character that is added to the total. */
1240
+ modifier?: string;
1241
+ bands: DiceBand[];
1242
+ }
1243
+ interface DiceCheck extends DiceCheckDefinition {
1244
+ id: DiceCheckId;
1245
+ }
1246
+ /** What the dice and the reading of them gave, once a roll is made. */
1247
+ interface DiceReadout {
1248
+ label: string;
1249
+ result: DiceResult;
1250
+ critical: boolean;
1251
+ }
1252
+ interface NewDiceRoll {
1253
+ turn: number;
1254
+ /** The check that was rolled, none for a plain roll. */
1255
+ check?: string;
1256
+ expression: string;
1257
+ /** Every die rolled, in order. */
1258
+ faces: number[];
1259
+ /** The dice that count, after any are dropped or only the best are kept. */
1260
+ kept: number[];
1261
+ /** What is added to the dice: constants of the expression, the character's modifier, a bonus. */
1262
+ modifier: number;
1263
+ target?: number;
1264
+ /** What the dice and the modifier add up to, or the number of dice that hit. */
1265
+ total: number;
1266
+ /** What the bands were compared with: the total, or its distance from the target. */
1267
+ value: number;
1268
+ readout?: DiceReadout;
1269
+ reason: string;
1270
+ /** The character the roll was for, by key. */
1271
+ character?: string;
1272
+ /** Who asked for it. */
1273
+ by: 'agent' | 'player';
1274
+ }
1275
+ interface DiceRoll extends NewDiceRoll {
1276
+ id: DiceRollId;
1277
+ at: string;
1278
+ }
1279
+ /** Rolls and checks are limited so that a story cannot grow without bound. */
1280
+ declare const MAX_DICE_CHECKS = 40;
1281
+ declare const MAX_DICE_BANDS = 20;
1282
+ declare const MAX_DICE_PER_ROLL = 100;
1283
+ declare const MAX_DICE_SIDES = 1000;
1284
+ declare const MAX_DICE_TERMS = 8;
1285
+ //#endregion
1173
1286
  //#region ../dsh-roleplay-model/src/lore.d.ts
1174
1287
  type LoreId = number;
1175
1288
  declare const LORE_KINDS: readonly ["history", "culture", "religion", "politics", "geography", "science", "custom", "legend", "other"];
@@ -1256,6 +1369,24 @@ interface PlotProgress {
1256
1369
  lastNudgeAt?: number;
1257
1370
  }
1258
1371
  //#endregion
1372
+ //#region ../dsh-roleplay-model/src/messages.d.ts
1373
+ /** The languages the texts a model reads are written in. English is the source: a text is its own key. */
1374
+ declare const LANGUAGES: readonly ["en", "zh"];
1375
+ type Language = (typeof LANGUAGES)[number];
1376
+ /** The language a setting such as `zh-CN` or `en` stands for; English when it is none that is known. */
1377
+ declare function languageOf(code: string | undefined): Language;
1378
+ type MessageValues = Readonly<Record<string, string | number>>;
1379
+ /** Says a text in the language of the story: `tr('{name} is in {place}.', { name, place })`. */
1380
+ type Translate = (text: string, values?: MessageValues) => string;
1381
+ /**
1382
+ * The texts the engine builds for a model (briefs, reports, refusals) in a language. The text written in the code is the English one and the key of
1383
+ * the others; a text a language lacks is told in English, and a test keeps that from happening.
1384
+ */
1385
+ declare function translator(language: Language): Translate;
1386
+ /** The texts with a translation, for the test that every text has one. */
1387
+ declare const translated: (language: Exclude<Language, "en">) => readonly string[];
1388
+ declare const translation: (language: Exclude<Language, "en">, text: string) => string | undefined;
1389
+ //#endregion
1259
1390
  //#region src/clock.d.ts
1260
1391
  type Clock = () => Date;
1261
1392
  declare const systemClock: Clock;
@@ -1482,6 +1613,17 @@ interface MemoryRepository {
1482
1613
  /** Count a memory as recalled in `turn`. */
1483
1614
  touch(ids: readonly MemoryId[], turn: number): void;
1484
1615
  remove(id: MemoryId): boolean;
1616
+ /** Record that a perception of the character's speaks for a belief or against it; one link per pair, the later replaces the earlier. @throws {NotFoundError} */
1617
+ addEvidence(memoryId: MemoryId, perceptionId: PerceptionId, relation: EvidenceRelation, turn: number): void;
1618
+ evidenceOf(memoryId: MemoryId): MemoryEvidence[];
1619
+ /**
1620
+ * What a character's beliefs rest on: for each perception that some belief of the character cites, the beliefs that do (it is folded into them),
1621
+ * and the beliefs something it took in speaks against (disputed).
1622
+ */
1623
+ evidenceIndex(characterId: CharacterId): {
1624
+ folded: Map<PerceptionId, MemoryId[]>;
1625
+ disputed: Set<MemoryId>;
1626
+ };
1485
1627
  }
1486
1628
  interface ThreadRepository {
1487
1629
  open(text: string, turn: number): StoryThread;
@@ -1815,6 +1957,21 @@ interface TriggerRepository {
1815
1957
  /** @throws {NotFoundError} */
1816
1958
  resolveNote(id: number, status: 'done' | 'lapsed'): void;
1817
1959
  }
1960
+ interface DiceRepository {
1961
+ /** @throws {ConflictError} for a key that exists. @throws {InvalidValueError} when the story has too many. */
1962
+ define(definition: DiceCheckDefinition): DiceCheck;
1963
+ /** In the order defined. */
1964
+ checks(): DiceCheck[];
1965
+ check(key: string): DiceCheck | undefined;
1966
+ /** @throws {NotFoundError} */
1967
+ removeCheck(key: string): void;
1968
+ record(roll: NewDiceRoll): DiceRoll;
1969
+ /** Oldest first: the rolls of one turn, or the latest ones. */
1970
+ rolls(filter?: {
1971
+ turn?: number;
1972
+ limit?: number;
1973
+ }): DiceRoll[];
1974
+ }
1818
1975
  //#endregion
1819
1976
  //#region src/records/items.d.ts
1820
1977
  /** The name by which models and tools refer to an item: its id in the world, or its number when it was made up in play. */
@@ -1999,6 +2156,8 @@ interface RecordsTarget {
1999
2156
  routines: RoutineRepository;
2000
2157
  engagements: EngagementRepository;
2001
2158
  triggers: TriggerRepository;
2159
+ /** What the story keeps about itself; the calendar of its world is read from here. */
2160
+ metadata: Pick<MetadataRepository, 'getValue'>;
2002
2161
  transaction<T>(fn: () => T): T;
2003
2162
  }
2004
2163
  interface PerceivedBy {
@@ -2249,12 +2408,20 @@ interface NewBelief {
2249
2408
  text: string;
2250
2409
  about?: string[];
2251
2410
  importance: number;
2411
+ /** How sure the character is; likely when not said. */
2412
+ confidence?: MemoryConfidence;
2413
+ /** The numbers of perceptions of the character's own that it rests on, and that speak against it. */
2414
+ evidenceFor?: number[];
2415
+ evidenceAgainst?: number[];
2252
2416
  }
2253
2417
  interface BeliefEdit {
2254
2418
  id: number;
2255
2419
  text?: string;
2256
2420
  about?: string[];
2257
2421
  importance?: number;
2422
+ confidence?: MemoryConfidence;
2423
+ evidenceFor?: number[];
2424
+ evidenceAgainst?: number[];
2258
2425
  }
2259
2426
  /**
2260
2427
  * A change to the story's records, applied together or not at all: the unit in which the
@@ -2309,6 +2476,8 @@ interface EngagementEditSpec {
2309
2476
  interface RoutineWindowSpec {
2310
2477
  /** `mon` to `sun`; every day when left out. */
2311
2478
  days?: string[];
2479
+ /** Other days it applies on or not: `dec`, `12-24`, `season:winter`, `nth:mon:1`, `holiday:<id>`, `!` before one for a day it does not apply on. */
2480
+ on?: string[];
2312
2481
  /** `HH:MM`. */
2313
2482
  from: string;
2314
2483
  to: string;
@@ -2397,7 +2566,7 @@ declare function parseTriggerDefinition(value: unknown, path: string, checkEdit:
2397
2566
  } | {
2398
2567
  problems: string[];
2399
2568
  };
2400
- type Reading$1 = Pick<RecordsTarget, 'characters' | 'locations' | 'items' | 'variables' | 'triggers'>;
2569
+ type Reading$1 = Pick<RecordsTarget, 'characters' | 'locations' | 'items' | 'variables' | 'triggers' | 'metadata'>;
2401
2570
  /**
2402
2571
  * What in a trigger names something the story does not have: a character, place, item or variable in a condition, the characters of a cue,
2403
2572
  * a trigger it waits for. (What an edit effect touches is checked when it is applied.)
@@ -2544,6 +2713,11 @@ interface MemoryPolicy {
2544
2713
  * included) to 1 (only what adds something new): maximal marginal relevance over the pool. 0 or absent: none.
2545
2714
  */
2546
2715
  diversity?: number;
2716
+ /**
2717
+ * How long what a character took in lasts once a belief rests on it, as a share of how long it would last: below 1 it fades sooner, the
2718
+ * belief having taken over, and it is not told again when that belief is told. 1 or absent: no change.
2719
+ */
2720
+ foldedFade?: number;
2547
2721
  }
2548
2722
  declare const DEFAULT_MEMORY_POLICY: MemoryPolicy;
2549
2723
  /** How much of a memory is left: what the character is told of it. */
@@ -2563,6 +2737,10 @@ interface Recalled {
2563
2737
  };
2564
2738
  /** It did not match the moment itself: it came to mind with something that did ({@link MemoryPolicy.associate}). */
2565
2739
  linked?: true;
2740
+ /** For what the character believes: how sure it is. */
2741
+ confidence?: MemoryConfidence;
2742
+ /** For what the character believes: something it took in since speaks against it. */
2743
+ disputed?: true;
2566
2744
  /** Why it came back, when the query asked to be told ({@link RecallQuery.explain}). */
2567
2745
  why?: RecallWhy;
2568
2746
  }
@@ -2612,7 +2790,7 @@ interface RecallQuery {
2612
2790
  /** What recall reads: the events a character took in and what it believes. */
2613
2791
  interface RecallSource {
2614
2792
  events: Pick<EventRepository, 'perceivedBy'>;
2615
- memories: Pick<MemoryRepository, 'list'>;
2793
+ memories: Pick<MemoryRepository, 'list'> & Partial<Pick<MemoryRepository, 'evidenceIndex'>>;
2616
2794
  clock: Pick<ClockRepository, 'get' | 'log'>;
2617
2795
  /** Optional for lightweight callers; a session supplies it so socially charged people are stronger cues. */
2618
2796
  relationships?: Pick<RelationshipRepository, 'from'>;
@@ -2655,6 +2833,8 @@ interface Candidate {
2655
2833
  recalls: number;
2656
2834
  seed: number;
2657
2835
  durability: number;
2836
+ /** For something the character took in that beliefs rest on: those beliefs. */
2837
+ covered?: number[];
2658
2838
  }
2659
2839
  declare function overlap(cues: ReadonlySet<string>, text: string, tags: readonly string[]): number;
2660
2840
  /** One thing a character could be reminded of, with the text to match it against the moment. */
@@ -2678,7 +2858,9 @@ interface RecallEvidence {
2678
2858
  rerank?: ReadonlyMap<string, number>;
2679
2859
  }
2680
2860
  /** Everything the character could be reminded of, for a caller that ranks by meaning (an embedding, a reranker) before asking for the recall. */
2681
- declare function recallCandidates(source: RecallSource, query: Pick<RecallQuery, 'characterId' | 'characters' | 'situation' | 'turn' | 'locationId' | 'about'>): RecallCandidate[];
2861
+ declare function recallCandidates(source: RecallSource, query: Pick<RecallQuery, 'characterId' | 'characters' | 'situation' | 'turn' | 'locationId' | 'about'> & {
2862
+ policy?: MemoryPolicy;
2863
+ }): RecallCandidate[];
2682
2864
  /** Fuse scores from 0 to 1 into one, per key: the weighted average over the searches that ran (those with any score above 0). */
2683
2865
  declare function fuseScores(searches: readonly {
2684
2866
  weight: number;
@@ -2852,6 +3034,9 @@ interface RecordsView {
2852
3034
  text: string;
2853
3035
  about: string[];
2854
3036
  importance: number;
3037
+ confidence: string;
3038
+ evidence_for: number[];
3039
+ evidence_against: number[];
2855
3040
  turn: number;
2856
3041
  }[];
2857
3042
  open_threads: {
@@ -2977,6 +3162,7 @@ interface SessionStore {
2977
3162
  /** What characters have committed to, by date. */
2978
3163
  readonly engagements: EngagementRepository;
2979
3164
  readonly triggers: TriggerRepository;
3165
+ readonly dice: DiceRepository;
2980
3166
  /** What the session can be searched by: its texts by words, and by meaning once vectors are stored. */
2981
3167
  readonly recallIndex: RecallIndexRepository;
2982
3168
  /** Run `fn` atomically across the repositories; see {@link SqlDatabase.transaction}. */
@@ -3122,7 +3308,7 @@ type SemanticRanker = (input: {
3122
3308
  //#region src/tools/index.d.ts
3123
3309
  /** The roleplay session an agent works in, as the plugin that runs the agent knows it. */
3124
3310
  interface AgentLink {
3125
- session: Pick<Session, 'characters' | 'factions' | 'factionStates' | 'factionMemberships' | 'factionRelationships' | 'factionIntents' | 'lore' | 'events' | 'memories' | 'threads' | 'records' | 'recallRanked' | 'searchEvents' | 'edit' | 'locations' | 'placements' | 'relationships' | 'knowledge' | 'consolidation' | 'planMove' | 'items' | 'slots' | 'variables' | 'intents' | 'routines' | 'engagements' | 'clock'>;
3311
+ session: Pick<Session, 'characters' | 'factions' | 'factionStates' | 'factionMemberships' | 'factionRelationships' | 'factionIntents' | 'lore' | 'events' | 'memories' | 'threads' | 'records' | 'recallRanked' | 'searchEvents' | 'edit' | 'locations' | 'placements' | 'relationships' | 'knowledge' | 'consolidation' | 'planMove' | 'items' | 'slots' | 'variables' | 'intents' | 'routines' | 'engagements' | 'clock' | 'dice'>;
3126
3312
  /** The time zone the story's times are written and read in; UTC when not given. */
3127
3313
  timeZone?: string;
3128
3314
  /** The turn the agent is playing, which is what the age of a memory is counted from. */
@@ -3164,6 +3350,11 @@ interface Config {
3164
3350
  * tools are always there; leave writing off where another agent is responsible for the records.
3165
3351
  */
3166
3352
  writeTools: boolean;
3353
+ /**
3354
+ * Whether the dice tools (`roll_dice`, `roll_check`, `list_checks`) are registered for every agent of a roleplay session. Leave off where another plugin
3355
+ * decides which agents may roll, as the roleplay core does with its per-agent tool settings.
3356
+ */
3357
+ diceTools: boolean;
3167
3358
  }
3168
3359
  declare const Config: z<Config>;
3169
3360
  /** A session's repositories. Connections belong to the service, so there is nothing to close. */
@@ -3246,10 +3437,192 @@ declare function apply(ctx: Context, config: Config): void;
3246
3437
  //#region src/tools/character.d.ts
3247
3438
  declare function createCharacterTools(link: () => AgentLink, characterId: CharacterId): ToolDefinition[];
3248
3439
  //#endregion
3440
+ //#region src/records/dice.d.ts
3441
+ /** A die with this many sides shows a number from 1 to `sides`. The system's own source of randomness is the default. */
3442
+ type Roller = (sides: number) => number;
3443
+ declare const systemRoller: Roller;
3444
+ type KeepMode = 'kh' | 'kl' | 'dh' | 'dl';
3445
+ type Term = {
3446
+ sign: 1 | -1;
3447
+ count: number;
3448
+ sides: number;
3449
+ keep?: {
3450
+ mode: KeepMode;
3451
+ n: number;
3452
+ };
3453
+ } | {
3454
+ sign: 1 | -1;
3455
+ constant: number;
3456
+ };
3457
+ interface Notation {
3458
+ /** The expression written the same way whatever the spacing and case. */
3459
+ text: string;
3460
+ terms: Term[];
3461
+ }
3462
+ /** Reads dice notation: `2d6+1`, `d20`, `4d6kh3`, `d%`, `1d8+1d4-1`. @throws {InvalidValueError} with what is wrong. */
3463
+ declare function parseNotation(input: string): Notation;
3464
+ /** The lowest and highest total the dice and constants can give. */
3465
+ declare function notationRange(notation: Notation): {
3466
+ min: number;
3467
+ max: number;
3468
+ };
3469
+ interface Rolled {
3470
+ /** Every die, in the order of the terms. */
3471
+ faces: number[];
3472
+ /** The dice that count. */
3473
+ kept: number[];
3474
+ /** The constants of the expression, signed. */
3475
+ constant: number;
3476
+ /** The dice that count with their signs, plus the constants. */
3477
+ total: number;
3478
+ }
3479
+ declare function rollNotation(notation: Notation, roll?: Roller): Rolled;
3480
+ /** What the bands of a check make of a value. @throws {InvalidValueError} when no band holds it. */
3481
+ declare function readBands(bands: readonly DiceBand[], value: number): DiceReadout;
3482
+ interface CheckRoll {
3483
+ faces: number[];
3484
+ kept: number[];
3485
+ modifier: number;
3486
+ target?: number;
3487
+ total: number;
3488
+ value: number;
3489
+ readout: DiceReadout;
3490
+ }
3491
+ /**
3492
+ * Rolls a check: the dice, the character's modifier and any bonus added, then the value read against the bands. With the reading
3493
+ * `successes` the total is the number of dice that hit. A check read against a target needs one.
3494
+ * @throws {InvalidValueError} for a target a check needs and is not given, or bands that leave the value unread.
3495
+ */
3496
+ declare function rollCheck(check: DiceCheckDefinition, input: {
3497
+ modifier?: number;
3498
+ bonus?: number;
3499
+ target?: number;
3500
+ }, roll?: Roller): CheckRoll;
3501
+ /** What is wrong with a check as a world defines it; nothing when it is sound. */
3502
+ declare function checkProblems(check: DiceCheckDefinition): string[];
3503
+ /** A roll of dice with no meaning attached, for what the world has no check for. */
3504
+ interface PlainRoll {
3505
+ expression: string;
3506
+ faces: number[];
3507
+ kept: number[];
3508
+ modifier: number;
3509
+ total: number;
3510
+ }
3511
+ declare function rollPlain(expression: string, roll?: Roller): PlainRoll;
3512
+ //#endregion
3513
+ //#region src/tools/dice.d.ts
3514
+ declare const ROLL_DICE_TOOL = "roll_dice";
3515
+ declare const ROLL_CHECK_TOOL = "roll_check";
3516
+ declare const LIST_CHECKS_TOOL = "list_checks";
3517
+ /** The tools that need the dice and nothing else of the story. */
3518
+ type DiceLink = Pick<AgentLink, 'turn'> & {
3519
+ session: Pick<AgentLink['session'], 'dice' | 'characters' | 'variables'>;
3520
+ };
3521
+ /** How a roll reads to the agent that asked for it: what fell, what it adds up to, and what the world's check makes of it. */
3522
+ declare function describeRoll(roll: DiceRoll, check?: DiceCheck): string;
3523
+ /**
3524
+ * Tools that roll dice for an agent, so that numbers are not made up. `roll_check` rolls a check the story defines and reads
3525
+ * the result with the check's own bands; `roll_dice` rolls plain notation for what has no check. The roller is the system's
3526
+ * source of randomness unless one is given.
3527
+ */
3528
+ declare function createDiceTools(resolve: (agentSessionId: string) => DiceLink | undefined, options?: {
3529
+ roller?: Roller;
3530
+ by?: 'agent' | 'player';
3531
+ }): ToolDefinition[];
3532
+ //#endregion
3249
3533
  //#region src/sqlite/variable-repository.d.ts
3250
3534
  /** Why a value is not one the variable can have, or nothing when it is. */
3251
3535
  declare function valueIssue(def: Pick<VariableDefinition, 'key' | 'kind' | 'min' | 'max' | 'integer' | 'options'>, value: unknown): string | undefined;
3252
3536
  //#endregion
3537
+ //#region src/records/calendar.d.ts
3538
+ /**
3539
+ * Which days a thing applies on, beyond the days of the week: whole months, a date every year or once, a stretch of dates, the day of the month,
3540
+ * the first or last Monday of a month, a season, and the holidays a world names. A day is told by tokens (`dec`, `12-24`, `1912-09-21..1912-09-22`,
3541
+ * `dom:1`, `nth:mon:1`, `season:winter`, `holiday:founders-day`, `fri`); a token with `!` before it is a day it does not apply on. A list holds on a
3542
+ * day when it names no day to apply on or one of them is today, and none of the days to leave out is.
3543
+ */
3544
+ declare const MONTH_NAMES: readonly ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
3545
+ declare const SEASONS: readonly ["spring", "summer", "autumn", "winter"];
3546
+ type Season = (typeof SEASONS)[number];
3547
+ type Hemisphere = 'north' | 'south';
3548
+ /** A day by the wall clock of the story: the month is 1 to 12 and the weekday 0 (Sunday) to 6. */
3549
+ interface CalendarDay {
3550
+ year: number;
3551
+ month: number;
3552
+ day: number;
3553
+ weekday: number;
3554
+ }
3555
+ interface Holiday {
3556
+ id: string;
3557
+ name: string;
3558
+ /** The days it falls on, as tokens other than `holiday:`. */
3559
+ on: string[];
3560
+ }
3561
+ interface Calendar {
3562
+ hemisphere: Hemisphere;
3563
+ holidays: Holiday[];
3564
+ }
3565
+ declare const NO_CALENDAR: Calendar;
3566
+ type Parsed = {
3567
+ kind: 'weekday';
3568
+ weekday: number;
3569
+ } | {
3570
+ kind: 'month';
3571
+ month: number;
3572
+ } | {
3573
+ kind: 'date';
3574
+ year?: number;
3575
+ month: number;
3576
+ day: number;
3577
+ } | {
3578
+ kind: 'span';
3579
+ from: {
3580
+ year?: number;
3581
+ month: number;
3582
+ day: number;
3583
+ };
3584
+ to: {
3585
+ year?: number;
3586
+ month: number;
3587
+ day: number;
3588
+ };
3589
+ } | {
3590
+ kind: 'dom';
3591
+ day: number | 'last';
3592
+ } | {
3593
+ kind: 'nth';
3594
+ weekday: number;
3595
+ n: number | 'last';
3596
+ } | {
3597
+ kind: 'season';
3598
+ season: Season;
3599
+ } | {
3600
+ kind: 'holiday';
3601
+ id: string;
3602
+ };
3603
+ /** What a token says, or why it says nothing. */
3604
+ declare function parseDayToken(raw: string): {
3605
+ token: Parsed;
3606
+ negated: boolean;
3607
+ } | {
3608
+ problem: string;
3609
+ };
3610
+ /** What is wrong with a list of day tokens, each with where it is. `holidays` are those the world names, when `holiday:` may be used. */
3611
+ declare function dayTokenProblems(tokens: readonly string[], path: string, holidays?: ReadonlySet<string> | 'any'): string[];
3612
+ /** The season a day is in, by the months of its hemisphere (winter is December to February in the north, June to August in the south). */
3613
+ declare function seasonOf(day: Pick<CalendarDay, 'month'>, hemisphere?: Hemisphere): Season;
3614
+ /** Whether a list of day tokens holds on a day; tokens that say nothing sensible count as not matching. An empty list holds on every day. */
3615
+ declare function dayMatches(tokens: readonly string[], day: CalendarDay, calendar?: Calendar): boolean;
3616
+ /** The holidays that fall on a day. A holiday is told by days that are no holidays themselves, so that none can lead back to itself. */
3617
+ declare function holidaysOn(calendar: Calendar, day: CalendarDay): Holiday[];
3618
+ /** The calendar a story was started with, from its metadata; none when the world has none. */
3619
+ declare function readCalendar(metadata: {
3620
+ getValue(key: string): unknown;
3621
+ }): Calendar;
3622
+ declare const writeCalendar: (metadata: {
3623
+ setValue(key: string, value: never): void;
3624
+ }, calendar: Calendar) => void;
3625
+ //#endregion
3253
3626
  //#region src/records/agenda.d.ts
3254
3627
  /** One occurrence of a routine window: the stretch of time it holds on a particular day. */
3255
3628
  interface Occurrence {
@@ -3260,9 +3633,9 @@ interface Occurrence {
3260
3633
  /** An engagement still pending this long after it was due (or over) is overdue. */
3261
3634
  declare const ENGAGEMENT_GRACE: number;
3262
3635
  /** The window that holds at an instant (the first of the list that does), with the stretch of this occurrence of it. */
3263
- declare function occurrenceAt(windows: readonly StoredRoutineWindow[], now: number, zone: string): Occurrence | undefined;
3636
+ declare function occurrenceAt(windows: readonly StoredRoutineWindow[], now: number, zone: string, calendar?: Calendar): Occurrence | undefined;
3264
3637
  /** The window that starts next after an instant, within `horizon`. */
3265
- declare function nextOccurrence(windows: readonly StoredRoutineWindow[], now: number, zone: string, horizon: number): Occurrence | undefined;
3638
+ declare function nextOccurrence(windows: readonly StoredRoutineWindow[], now: number, zone: string, horizon: number, calendar?: Calendar): Occurrence | undefined;
3266
3639
  interface RankedGoal {
3267
3640
  intent: CharacterIntent;
3268
3641
  /** The deadline as an instant, when it has one that can be read. */
@@ -3296,6 +3669,9 @@ declare function agendaAt(source: {
3296
3669
  routines: Pick<RoutineRepository, 'list'>;
3297
3670
  engagements: Pick<EngagementRepository, 'list'>;
3298
3671
  intents: Pick<IntentRepository, 'list'>;
3672
+ metadata?: {
3673
+ getValue(key: string): unknown;
3674
+ };
3299
3675
  }, characterId: CharacterId, now: number, zone: string, options?: AgendaOptions): Agenda;
3300
3676
  //#endregion
3301
3677
  //#region src/sqlite/agenda-repositories.d.ts
@@ -3341,16 +3717,16 @@ declare function zonedInstant(fields: {
3341
3717
  * @throws {RangeError} when it is not a date and time.
3342
3718
  */
3343
3719
  declare function parseInstant(text: string, zone: string): number;
3344
- /** `Tuesday 4 October 1912, 21:40`. */
3345
- declare function describeInstant(instant: number, zone: string): string;
3720
+ /** `Tuesday 4 October 1912, 21:40`, or `1912年10月4日 星期二 21:40`. */
3721
+ declare function describeInstant(instant: number, zone: string, language?: 'en' | 'zh'): string;
3346
3722
  /** `1912-10-04T21:40:00` as the wall clock of a zone reads, the form a file or a person can write back. */
3347
3723
  declare function localIso(instant: number, zone: string): string;
3348
3724
  declare const DAY_PARTS: readonly ["night", "morning", "afternoon", "evening"];
3349
3725
  type DayPart = (typeof DAY_PARTS)[number];
3350
3726
  /** Night is from 22:00 to 05:00, morning to 12:00, afternoon to 17:00, evening after. */
3351
3727
  declare function dayPart(minuteOfDay: number): DayPart;
3352
- /** In words and rounded to what matters: `45 seconds`, `3 hours 12 minutes`, `2 days 3 hours`. */
3353
- declare function describeDuration(milliseconds: number): string;
3728
+ /** In words and rounded to what matters: `45 seconds`, `3 hours 12 minutes`, `2 days 3 hours`; or `45秒`, `3小时12分钟`, `2天3小时`. */
3729
+ declare function describeDuration(milliseconds: number, language?: 'en' | 'zh'): string;
3354
3730
  /** The minute of the day for `HH:MM` (24-hour), or nothing when it is not one. */
3355
3731
  declare function parseTimeOfDay(text: string): number | undefined;
3356
3732
  /**
@@ -3461,5 +3837,5 @@ type LintTarget = Pick<RecordsTarget, 'characters' | 'locations' | 'placements'
3461
3837
  */
3462
3838
  declare function lintWorld(target: LintTarget): LintFinding[];
3463
3839
  //#endregion
3464
- 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, type Delivery, 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, type Placeholder, 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, SELF, 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, TEMPLATE_KINDS, THREAD_STATUSES, TIME_CHANGE_KINDS, TRIGGER_NOTE_KINDS, TRIGGER_STATUSES, type TemplateKind, ThreadId, type ThreadRepository, ThreadStatus, TimeChange, TimeChangeFilter, TimeChangeKind, Trigger, TriggerAnnouncement, TriggerAudience, type TriggerClock, TriggerCondition, TriggerDefinition, TriggerEffect, TriggerId, TriggerNote, TriggerNoteKind, type TriggerRun, type TriggerRunOptions, TriggerStatus, UnwritableError, 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, deliverNotes, 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, placeholdersOf, planItemChange, planKnownMove, planMove, planVariableChange, poolCandidates, rankGoals, readRecords, readTriggerDefinition, recall, recallCandidates, recallPool, recordsEditSchema, renderWords, retention, runTriggers, seededRoll, sessionDatabase, sessionFolder, shownVariables, subjectOf, systemClock, systemTimeZone, tokens, triggerReferenceProblems, valueIssue, zonedInstant };
3840
+ 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, type Calendar, type CalendarDay, Character, CharacterControl, CharacterDefinition, CharacterFilter, CharacterId, CharacterIntent, CharacterKind, CharacterMemory, CharacterMemoryPatch, type CharacterMove, CharacterPatch, type CharacterRepository, CharacterRole, CharacterSpeech, CharacterStart, CharacterState, CharacterStatePatch, type CharacterStateRepository, CharacterTier, type CheckRoll, type Clarity, type Clock, ClockMode, ClockState, Comparison, Config, ConflictError, ConsolidationItem, ConsolidationItemId, ConsolidationKind, type ConsolidationRepository, ContainerSpec, ContainerState, CorruptDataError, DAY, DAY_PARTS, DEFAULT_CONFIDENCE, DEFAULT_MEMORY_POLICY, DEFAULT_SLOTS, DICE_COMPARISONS, DICE_READINGS, DICE_RESULTS, type DayPart, type Delivery, DiceBand, DiceCheck, DiceCheckDefinition, DiceCheckId, DiceComparison, type DiceLink, DiceReading, DiceReadout, DiceResult, DiceRoll, DiceRollId, EMOTION_VARIABLES, ENGAGEMENT_GRACE, ENGAGEMENT_STATUSES, EVIDENCE_RELATIONS, EXIT_STATES, type EditChecker, type EditResult, EmbeddingIndexInfo, EmotionStart, EmotionVector, Engagement, EngagementFilter, EngagementId, EngagementPatch, EngagementStatus, EntityKnowledge, type EventEdit, EventId, type EventRepository, EvidenceRelation, 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, type Hemisphere, Holder, Holding, type Holiday, 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, LANGUAGES, LIST_CHECKS_TOOL, LORE_KINDS, LORE_SUBJECT_KINDS, Language, type LintFinding, type LintSeverity, type LintTarget, type LocalTime, Location, LocationDefinition, LocationFeature, LocationId, LocationPatch, type LocationRepository, Lore, LoreDefinition, LoreId, LoreKind, LorePatch, LoreSubject, LoreSubjectDefinition, LoreSubjectKind, MAX_DICE_BANDS, MAX_DICE_CHECKS, MAX_DICE_PER_ROLL, MAX_DICE_SIDES, MAX_DICE_TERMS, MAX_LOCATION_FEATURES, MAX_ROUTINE_WINDOWS, MAX_SHOWN, MAX_TRIGGERS, MAX_VARIABLES, MEMBERSHIP_STATUSES, MEMORY_CONFIDENCES, MEMORY_KINDS, MIGRATION_BACKUP_FOLDER, MINUTE, MONTH_NAMES, MembershipPatch, MembershipStatus, MemoryConfidence, MemoryEvidence, MemoryId, MemoryKind, type MemoryPolicy, type MemoryRepository, MessageValues, type MetadataRepository, Move, type MoveContext, MovePlan, NO_CALENDAR, type NewBelief, NewCharacter, NewCharacterMemory, type NewCharacterSpec, NewCharacterState, NewDiceRoll, 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 Notation, 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, type Placeholder, Placement, type PlacementRepository, type PlainRoll, PlotDefinition, PlotDevelopment, PlotNudgeMode, PlotProgress, PlotStatus, RECALL_ITEM_KINDS, ROLL_CHECK_TOOL, ROLL_DICE_TOOL, 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, type Roller, RoutineDefinition, RoutineWindow, type RunResult, LATEST_VERSION as SCHEMA_VERSION, SEASONS, SECOND, SELF, SESSION_DATABASE_FILE, SLOT_ID, SUMMARY_LEVELS, SchemaError, type Season, 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, TEMPLATE_KINDS, THREAD_STATUSES, TIME_CHANGE_KINDS, TRIGGER_NOTE_KINDS, TRIGGER_STATUSES, type TemplateKind, ThreadId, type ThreadRepository, ThreadStatus, TimeChange, TimeChangeFilter, TimeChangeKind, Translate, Trigger, TriggerAnnouncement, TriggerAudience, type TriggerClock, TriggerCondition, TriggerDefinition, TriggerEffect, TriggerId, TriggerNote, TriggerNoteKind, type TriggerRun, type TriggerRunOptions, TriggerStatus, UnwritableError, 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, checkProblems, clarityAt, clockTime, conditionHolds, createCharacterTools, createDiceTools, createSession, createSessionStore, createTools, dayMatches, dayPart, dayTokenProblems, deleteSession, deliverNotes, denseScore, describeDuration, describeHolder, describeInstant, describeRoll, describeValue, finishRecall, fuseScores, holidaysOn, inAudience, inWindow, isSessionId, isTimeZone, itemKey, jitter, judgedStatements, languageOf, lapseNotes, lintWorld, listSessions, localIso, localTime, locationKey, mentioned, migrationBackupPath, moveCharacter, name, nextOccurrence, nextTimeOfDay, nodeSqliteDriver, notationRange, occurrenceAt, openSession, openSessionStore, overlap, parseDayToken, parseInstant, parseNotation, parseRecordsEdit, parseTimeOfDay, parseTriggerDefinition, placeholdersOf, planItemChange, planKnownMove, planMove, planVariableChange, poolCandidates, rankGoals, readBands, readCalendar, readRecords, readTriggerDefinition, recall, recallCandidates, recallPool, recordsEditSchema, renderWords, retention, rollCheck, rollNotation, rollPlain, runTriggers, seasonOf, seededRoll, sessionDatabase, sessionFolder, shownVariables, subjectOf, systemClock, systemRoller, systemTimeZone, tokens, translated, translation, translator, triggerReferenceProblems, valueIssue, writeCalendar, zonedInstant };
3465
3841
  //# sourceMappingURL=index.d.ts.map