holonovel 2026.9.3 → 2026.9.7
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/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/state.d.ts +64 -4
- package/dist/core/state.js +282 -69
- package/dist/core/state.js.map +1 -1
- package/dist/core/{enrichment.d.ts → wisdom.d.ts} +9 -9
- package/dist/core/{enrichment.js → wisdom.js} +5 -5
- package/dist/core/wisdom.js.map +1 -0
- package/dist/generated/contract-fingerprints.d.ts +2 -2
- package/dist/generated/contract-fingerprints.js +2 -2
- package/dist/index.js +1091 -76
- package/dist/index.js.map +1 -1
- package/dist/rulesets.d.ts +13 -0
- package/dist/rulesets.js +103 -4
- package/dist/rulesets.js.map +1 -1
- package/dist/world/model.d.ts +12 -0
- package/dist/world/model.js +116 -3
- package/dist/world/model.js.map +1 -1
- package/dist/world/parser.js +211 -0
- package/dist/world/parser.js.map +1 -1
- package/package.json +14 -5
- package/dist/core/enrichment.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export { StateManager, normalizeBadge, migrateNovelData } from "./state.js";
|
|
|
4
4
|
export type { Badge, NovelState, NovelEntity, NpcState, LoreEntry, Countdown, CombatState, AuditEntry, } from "./state.js";
|
|
5
5
|
export { initServer, getBadge, requireGM, requirePlayer, requireNotObserver, requireNovel, novelSnapshot, withForbiddenAudit, } from "./server.js";
|
|
6
6
|
export type { ToolCtx, ToolHandler } from "./server.js";
|
|
7
|
-
export {
|
|
8
|
-
export type {
|
|
7
|
+
export { DEFAULT_WISDOM } from "./wisdom.js";
|
|
8
|
+
export type { WisdomItem, ActionPattern, WisdomManifest, NarrativeVoice, } from "./wisdom.js";
|
package/dist/core/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { expandMacros } from "./macros.js";
|
|
2
2
|
export { StateManager, normalizeBadge, migrateNovelData } from "./state.js";
|
|
3
3
|
export { initServer, getBadge, requireGM, requirePlayer, requireNotObserver, requireNovel, novelSnapshot, withForbiddenAudit, } from "./server.js";
|
|
4
|
-
export {
|
|
4
|
+
export { DEFAULT_WISDOM } from "./wisdom.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAW5E,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAW5E,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/core/state.d.ts
CHANGED
|
@@ -53,6 +53,11 @@ export interface NpcState {
|
|
|
53
53
|
dialogue: string;
|
|
54
54
|
tag?: string;
|
|
55
55
|
}[];
|
|
56
|
+
mind?: {
|
|
57
|
+
private_journal?: string[];
|
|
58
|
+
directive?: string;
|
|
59
|
+
auto_play?: boolean;
|
|
60
|
+
};
|
|
56
61
|
conditions: string[];
|
|
57
62
|
condition_rounds: Record<string, number>;
|
|
58
63
|
memory?: {
|
|
@@ -129,6 +134,7 @@ export interface AuditEntry {
|
|
|
129
134
|
args: string;
|
|
130
135
|
output_prefix: string;
|
|
131
136
|
hash: string;
|
|
137
|
+
security_event?: boolean;
|
|
132
138
|
}
|
|
133
139
|
export interface StoryEntry {
|
|
134
140
|
index: number;
|
|
@@ -259,6 +265,43 @@ export interface ConditionState {
|
|
|
259
265
|
conditions: string[];
|
|
260
266
|
condition_rounds: Record<string, number>;
|
|
261
267
|
}
|
|
268
|
+
export interface FateState {
|
|
269
|
+
aspects: Array<{
|
|
270
|
+
name: string;
|
|
271
|
+
target: string;
|
|
272
|
+
}>;
|
|
273
|
+
fate_points: Record<string, number>;
|
|
274
|
+
stress: Record<string, {
|
|
275
|
+
physical: number;
|
|
276
|
+
mental: number;
|
|
277
|
+
consequences: string[];
|
|
278
|
+
}>;
|
|
279
|
+
}
|
|
280
|
+
export declare const FATE_REFRESH = 3;
|
|
281
|
+
export declare function normalizeFateState(raw: unknown): FateState;
|
|
282
|
+
export interface IronswornProgressTrack {
|
|
283
|
+
name: string;
|
|
284
|
+
rank: "troublesome" | "dangerous" | "formidable" | "extreme" | "epic";
|
|
285
|
+
ticks: number;
|
|
286
|
+
}
|
|
287
|
+
export interface IronswornState {
|
|
288
|
+
momentum: Record<string, number>;
|
|
289
|
+
progress_tracks: IronswornProgressTrack[];
|
|
290
|
+
}
|
|
291
|
+
export declare const IRONSWORN_MOMENTUM_DEFAULT = 2;
|
|
292
|
+
export declare const IRONSWORN_MOMENTUM_MIN = -6;
|
|
293
|
+
export declare const IRONSWORN_MOMENTUM_MAX = 10;
|
|
294
|
+
export declare const IRONSWORN_TRACK_BOXES = 10;
|
|
295
|
+
export declare function normalizeIronswornState(raw: unknown): IronswornState;
|
|
296
|
+
export interface ForgedCharacterState {
|
|
297
|
+
stress: number;
|
|
298
|
+
trauma: string[];
|
|
299
|
+
}
|
|
300
|
+
export interface ForgedState {
|
|
301
|
+
characters: Record<string, ForgedCharacterState>;
|
|
302
|
+
}
|
|
303
|
+
export declare const FORGED_STRESS_MAX = 8;
|
|
304
|
+
export declare function normalizeForgedState(raw: unknown): ForgedState;
|
|
262
305
|
export interface WorkflowSnapshot {
|
|
263
306
|
timestamp: string;
|
|
264
307
|
state: any;
|
|
@@ -397,6 +440,7 @@ export interface NovelState {
|
|
|
397
440
|
audit_gap: number;
|
|
398
441
|
timestamp_gap_ms: number;
|
|
399
442
|
recorded_at: string;
|
|
443
|
+
backup_index?: number;
|
|
400
444
|
} | null;
|
|
401
445
|
last_mutation_at: string | null;
|
|
402
446
|
mutation_counts_by_group: Record<string, number>;
|
|
@@ -434,6 +478,9 @@ export interface NovelState {
|
|
|
434
478
|
imported_at: string;
|
|
435
479
|
codex_modified_at: string;
|
|
436
480
|
}>;
|
|
481
|
+
fate: FateState;
|
|
482
|
+
ironsworn: IronswornState;
|
|
483
|
+
forged: ForgedState;
|
|
437
484
|
}
|
|
438
485
|
export interface RosterEntity extends NovelEntity {
|
|
439
486
|
}
|
|
@@ -449,19 +496,20 @@ export declare class StateManager {
|
|
|
449
496
|
rulesetHash: string;
|
|
450
497
|
buildTimestamp: string;
|
|
451
498
|
lastSpecReview?: string;
|
|
452
|
-
|
|
499
|
+
lastPatternBuffer?: string;
|
|
453
500
|
};
|
|
454
501
|
enriched: boolean;
|
|
455
|
-
|
|
502
|
+
wisdomManifest: any;
|
|
456
503
|
maxLoreTokens: number | null;
|
|
457
504
|
serverNotes: Map<string, {
|
|
458
505
|
content: string;
|
|
459
506
|
narrative_tag?: string;
|
|
460
507
|
}>;
|
|
461
508
|
codex: Map<string, CodexEntry>;
|
|
462
|
-
readonly dataFormat = "
|
|
509
|
+
readonly dataFormat = "15312d5bcb533c32b852179fdbff0b8ee6e21473af3c1981f01fd7074709f6ad";
|
|
463
510
|
staleData: Map<string, string>;
|
|
464
511
|
corruptData: Map<string, string>;
|
|
512
|
+
private restoredThisSession;
|
|
465
513
|
private npcCounter;
|
|
466
514
|
private entityCounter;
|
|
467
515
|
private stateDir;
|
|
@@ -477,7 +525,9 @@ export declare class StateManager {
|
|
|
477
525
|
createNovel(name: string, ruleset?: string | null): NovelState;
|
|
478
526
|
bindNovelRuleset(slug: string): NovelState;
|
|
479
527
|
private computeStateRegression;
|
|
528
|
+
private hasValidChecksum;
|
|
480
529
|
resumeNovel(slug: string): NovelState;
|
|
530
|
+
activateHydratedNovel(slug: string): NovelState;
|
|
481
531
|
hydrateNovelsFromDisk(): void;
|
|
482
532
|
private loadNovelFromData;
|
|
483
533
|
switchNovel(slug: string): NovelState;
|
|
@@ -507,9 +557,15 @@ export declare class StateManager {
|
|
|
507
557
|
redo(novel: NovelState, badge: Badge): {
|
|
508
558
|
data: any;
|
|
509
559
|
} | null;
|
|
560
|
+
auditLogAtCapacity(novel: NovelState): boolean;
|
|
561
|
+
private static readonly SECURITY_EVENT_TOOLS;
|
|
510
562
|
audit(novel: NovelState, badge: Badge, tool: string, args: any, output_prefix?: string): void;
|
|
511
563
|
auditForbidden(badge: Badge, tool: string, args: any): void;
|
|
512
564
|
recordMutation(novel: NovelState, tool: string, group: string): void;
|
|
565
|
+
private aiMutationCount;
|
|
566
|
+
private autonomyCeiling;
|
|
567
|
+
registerAiMutation(novel: NovelState): string | null;
|
|
568
|
+
resetAiMutationTurn(): void;
|
|
513
569
|
closeSessionWindow(novel: NovelState, sessionId: string): void;
|
|
514
570
|
stateGate(): "off" | "warn" | "block";
|
|
515
571
|
stateDriftActive(novel: NovelState): boolean;
|
|
@@ -519,7 +575,7 @@ export declare class StateManager {
|
|
|
519
575
|
entries: number;
|
|
520
576
|
first_broken_index?: number;
|
|
521
577
|
};
|
|
522
|
-
|
|
578
|
+
getWisdomHealth(): any;
|
|
523
579
|
initCombat(novel: NovelState, participants: string[], dangers: {
|
|
524
580
|
name: string;
|
|
525
581
|
ac?: number;
|
|
@@ -537,6 +593,10 @@ export declare class StateManager {
|
|
|
537
593
|
};
|
|
538
594
|
combatReport(novel: NovelState): string;
|
|
539
595
|
worldHasRooms(novel: NovelState): boolean;
|
|
596
|
+
private backupCount;
|
|
597
|
+
private backupCandidates;
|
|
598
|
+
private restoreFromBackups;
|
|
599
|
+
private backupFilesOnDisk;
|
|
540
600
|
saveNovel(novel: NovelState): void;
|
|
541
601
|
saveRoster(): void;
|
|
542
602
|
loadRoster(): void;
|