zeus-api-types 1.0.65 → 1.0.67
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/game-state.d.ts +10 -8
- package/dist/game-state.js +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
package/dist/game-state.d.ts
CHANGED
|
@@ -60,11 +60,18 @@ export interface WorldReduced {
|
|
|
60
60
|
* Core game state interfaces shared between middle-layer and frontend.
|
|
61
61
|
*/
|
|
62
62
|
export interface TimeState {
|
|
63
|
-
|
|
63
|
+
/** @deprecated Do not write this field. Use computeTimeString(time) to derive it. */
|
|
64
|
+
current?: string;
|
|
64
65
|
day: number;
|
|
65
66
|
hour: number;
|
|
66
67
|
minute: number;
|
|
67
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Derives the canonical time string from scalar time fields.
|
|
71
|
+
* Use this everywhere instead of reading time.current, which may be stale.
|
|
72
|
+
* @example computeTimeString({ day: 1, hour: 10, minute: 38 }) === 'day_1_10:38'
|
|
73
|
+
*/
|
|
74
|
+
export declare function computeTimeString(time: Pick<TimeState, 'day' | 'hour' | 'minute'>): string;
|
|
68
75
|
/**
|
|
69
76
|
* Base interface for world entities (NPCs, Locations, etc.)
|
|
70
77
|
* All world entities share this common structure
|
|
@@ -82,9 +89,7 @@ export interface WorldEntity {
|
|
|
82
89
|
*/
|
|
83
90
|
export interface Player extends WorldEntity {
|
|
84
91
|
name: string;
|
|
85
|
-
|
|
86
|
-
role?: string;
|
|
87
|
-
backstory?: string;
|
|
92
|
+
description: string;
|
|
88
93
|
tone?: string;
|
|
89
94
|
}
|
|
90
95
|
/**
|
|
@@ -94,10 +99,7 @@ export interface Player extends WorldEntity {
|
|
|
94
99
|
export interface NPC extends WorldEntity {
|
|
95
100
|
name: string;
|
|
96
101
|
discovered: boolean;
|
|
97
|
-
playable
|
|
98
|
-
motivation?: string;
|
|
99
|
-
role?: string;
|
|
100
|
-
backstory?: string;
|
|
102
|
+
playable: boolean;
|
|
101
103
|
tone?: string;
|
|
102
104
|
}
|
|
103
105
|
export interface NpcExistingOrNewOp {
|
package/dist/game-state.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeTimeString = computeTimeString;
|
|
4
|
+
/**
|
|
5
|
+
* Derives the canonical time string from scalar time fields.
|
|
6
|
+
* Use this everywhere instead of reading time.current, which may be stale.
|
|
7
|
+
* @example computeTimeString({ day: 1, hour: 10, minute: 38 }) === 'day_1_10:38'
|
|
8
|
+
*/
|
|
9
|
+
function computeTimeString(time) {
|
|
10
|
+
return `day_${time.day}_${time.hour.toString().padStart(2, '0')}:${time.minute.toString().padStart(2, '0')}`;
|
|
11
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type { DoneEventPayload, ErrorEventPayload, MetadataEventPayload, Narrati
|
|
|
3
3
|
export type { AIMetadata, AIOperationTokens, AIOperationType } from './ai';
|
|
4
4
|
export type { BaseDeckCard, DeckDefinition, FixtureSet, MultiDeckDefinition, NarrativeStyleCard, StoryArc, StoryArcCard } from './deck';
|
|
5
5
|
export type { BaseEvent, DeterministicEvent, EventHistoryEntry, EventPropagation, ProbabilisticEvent, ScheduledEvent, WorldEvents } from './events';
|
|
6
|
+
export { computeTimeString } from './game-state';
|
|
6
7
|
export type { BaseImmutableState, DialogContext, DialogMessage, GameMetadata, GameState, GameStateReduced, GenreImmutableState, HistoryEntry, ImmutableState, Location, Metadata, NPC, NpcExistingOrNewOp, Player, PresentationCache, PresentationChoiceMeta, PromptVariables, Session, StateSnapshot, Tag, TimeState, World, WorldEntity, WorldReduced } from './game-state';
|
|
7
8
|
export type { AIPreferences, ModelEntry, ModelStack, ModelStackPreferences, ModelStackPreset, NarrativeFontPreferences, SoundPreferences, SystemModelPresets, UserMetadata, UserPreferences } from './user-preferences';
|
|
8
9
|
export type { CreatePresetRequest, CreatePresetResponse, DeletePresetResponse, ListPresetsResponse, PaginatedPresetsResponse, PaginationMetadata, PresetIndex, PresetMetadata, UpdatePresetRequest, UpdatePresetResponse } from './preset';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeTimeString = void 0;
|
|
4
|
+
// Game State Utilities (value exports — not type-only)
|
|
5
|
+
var game_state_1 = require("./game-state");
|
|
6
|
+
Object.defineProperty(exports, "computeTimeString", { enumerable: true, get: function () { return game_state_1.computeTimeString; } });
|