@agent-os-lab/agent-game-sdk 0.1.12 → 0.1.14

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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/avatar/canvas-view.ts +55 -7
  3. package/src/avatar/three-view.ts +1 -1
  4. package/src/core/agent-game-store.ts +5 -5
  5. package/src/core/agent-service-event-adapter.ts +2 -2
  6. package/src/core/assets.ts +2 -2
  7. package/src/core/event-adapter.ts +2 -2
  8. package/src/core/index.ts +23 -23
  9. package/src/core/life-presets.ts +2 -2
  10. package/src/core/movement.ts +4 -4
  11. package/src/core/office-building-layout.ts +6 -6
  12. package/src/core/office-layout.ts +1 -1
  13. package/src/core/pixel-character-avatar.ts +2 -2
  14. package/src/core/pixel-character.ts +1 -1
  15. package/src/core/realtime-events.ts +3 -3
  16. package/src/core/realtime-transport.ts +1 -1
  17. package/src/core/reducer.ts +4 -4
  18. package/src/core/scene.ts +1 -1
  19. package/src/core/schedule.ts +1 -1
  20. package/src/core/sequence.ts +1 -1
  21. package/src/core/state.ts +2 -2
  22. package/src/core/svg-pixel-avatar.ts +1 -1
  23. package/src/core/town-office-room-presets.ts +2 -2
  24. package/src/core/town-office-seat-layout.ts +3 -3
  25. package/src/graph.ts +1 -1
  26. package/src/phaser/agent-game-scene.ts +8 -8
  27. package/src/phaser/anchor-debug.ts +4 -4
  28. package/src/phaser/avatar-registry.ts +1 -1
  29. package/src/phaser/camera-controls.ts +1 -1
  30. package/src/phaser/create-agent-game.ts +8 -8
  31. package/src/phaser/debug-overlay.ts +3 -3
  32. package/src/phaser/index.ts +13 -13
  33. package/src/phaser/office-background.ts +3 -3
  34. package/src/phaser/office-building-renderer.ts +4 -4
  35. package/src/phaser/office-layout-renderer.ts +3 -3
  36. package/src/phaser/scene-reconciler.ts +4 -4
  37. package/src/phaser/scene-renderer.ts +6 -6
  38. package/src/phaser/town-office-business-props.ts +1 -1
  39. package/src/phaser/town-office-environment.ts +3 -3
  40. package/src/phaser/town-office-furniture.ts +1 -1
  41. package/src/phaser/town-office-primitives.ts +4 -4
  42. package/src/phaser/town-office-renderer.ts +9 -9
  43. package/src/phaser/types.ts +11 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-os-lab/agent-game-sdk",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -1,10 +1,27 @@
1
- import {
2
- AgentGameError,
3
- normalizeAgentAvatarAnimationFrames,
4
- validateAgentAvatarDefinition,
5
- type AgentAvatarAnimationName,
6
- type AgentAvatarDefinition,
7
- } from "../core";
1
+ import { AgentGameError } from "../core/errors";
2
+
3
+ const REQUIRED_AGENT_AVATAR_ANIMATIONS = [
4
+ "idle.down",
5
+ "idle.up",
6
+ "idle.left",
7
+ "idle.right",
8
+ "walk.down",
9
+ "walk.up",
10
+ "walk.left",
11
+ "walk.right",
12
+ "work.typing",
13
+ "emote.think",
14
+ "emote.talk",
15
+ ] as const;
16
+
17
+ export type AgentAvatarAnimationName = (typeof REQUIRED_AGENT_AVATAR_ANIMATIONS)[number];
18
+ export type AgentAvatarAnimationFrames = string | string[];
19
+ export type AgentAvatarDefinition = {
20
+ id: string;
21
+ imageUrl: string;
22
+ atlasUrl: string;
23
+ animations: Partial<Record<AgentAvatarAnimationName, AgentAvatarAnimationFrames>> & Record<string, AgentAvatarAnimationFrames>;
24
+ };
8
25
 
9
26
  export type AgentAvatarAtlasFrame = {
10
27
  frame: {
@@ -195,6 +212,37 @@ function resolveAnimationFrameName(
195
212
  return frames[index]!;
196
213
  }
197
214
 
215
+ function validateAgentAvatarDefinition(avatar: AgentAvatarDefinition): AgentAvatarDefinition {
216
+ assertNonEmpty(avatar.id, "avatar id");
217
+ assertNonEmpty(avatar.imageUrl, "avatar image url");
218
+ assertNonEmpty(avatar.atlasUrl, "avatar atlas url");
219
+
220
+ for (const animation of REQUIRED_AGENT_AVATAR_ANIMATIONS) {
221
+ if (!avatar.animations[animation]) {
222
+ throw new AgentGameError("missing_animation", `Agent game avatar ${avatar.id} is missing animation: ${animation}`);
223
+ }
224
+ const frames = normalizeAgentAvatarAnimationFrames(avatar.animations[animation]);
225
+ if (frames.length === 0) {
226
+ throw new AgentGameError("missing_animation", `Agent game avatar ${avatar.id} is missing animation: ${animation}`);
227
+ }
228
+ }
229
+
230
+ return avatar;
231
+ }
232
+
233
+ function normalizeAgentAvatarAnimationFrames(frames: AgentAvatarAnimationFrames | undefined): string[] {
234
+ if (frames === undefined) {
235
+ return [];
236
+ }
237
+ return Array.isArray(frames) ? frames : [frames];
238
+ }
239
+
240
+ function assertNonEmpty(value: string, field: string): void {
241
+ if (!value || value.trim().length === 0) {
242
+ throw new AgentGameError("invalid_asset_manifest", `Agent game ${field} must not be empty`);
243
+ }
244
+ }
245
+
198
246
  function assertPositiveFiniteInteger(value: number, field: string): number {
199
247
  if (!Number.isInteger(value) || value <= 0) {
200
248
  throw new AgentGameError("invalid_asset_manifest", `Agent avatar canvas ${field} must be a positive integer`);
@@ -1,7 +1,7 @@
1
1
  import * as THREE from "three";
2
2
 
3
3
  import type { AgentGameOfficeAgent, AgentGameOfficeSceneState } from "../office/core/types";
4
- import { AgentGameError } from "../core";
4
+ import { AgentGameError } from "../core/errors";
5
5
  import {
6
6
  createAgentAvatar3DScene,
7
7
  type ResolvedAgentAvatar3DState,
@@ -1,13 +1,13 @@
1
- import { applyAgentGameCommand, createAgentGameSnapshot } from "./reducer.js";
2
- import { validateAgentGameScene, type AgentGameSceneDefinition } from "./scene.js";
3
- import type { AgentGameCommand } from "./commands.js";
4
- import type { AgentGameAgent, AgentGameSnapshot } from "./state.js";
1
+ import { applyAgentGameCommand, createAgentGameSnapshot } from "./reducer";
2
+ import { validateAgentGameScene, type AgentGameSceneDefinition } from "./scene";
3
+ import type { AgentGameCommand } from "./commands";
4
+ import type { AgentGameAgent, AgentGameSnapshot } from "./state";
5
5
  import type {
6
6
  AgentGameConnectionStatus,
7
7
  AgentGameRealtimeCursor,
8
8
  AgentGameRealtimeEvent,
9
9
  AgentGameSnapshotPatch,
10
- } from "./realtime-events.js";
10
+ } from "./realtime-events";
11
11
 
12
12
  export type AgentGameStoreListener = (snapshot: AgentGameSnapshot) => void;
13
13
 
@@ -1,5 +1,5 @@
1
- import type { AgentGameRealtimeEvent } from "./realtime-events.js";
2
- import { mapAgentServiceEventToGameCommands, type AgentServiceEventLike } from "./event-adapter.js";
1
+ import type { AgentGameRealtimeEvent } from "./realtime-events";
2
+ import { mapAgentServiceEventToGameCommands, type AgentServiceEventLike } from "./event-adapter";
3
3
 
4
4
  export type MapAgentServiceEventToRealtimeEventsOptions = {
5
5
  nextId: () => string;
@@ -1,5 +1,5 @@
1
- import { AgentGameError } from "./errors.js";
2
- import type { TiledMapLike } from "./scene.js";
1
+ import { AgentGameError } from "./errors";
2
+ import type { TiledMapLike } from "./scene";
3
3
 
4
4
  export const REQUIRED_AGENT_AVATAR_ANIMATIONS = [
5
5
  "idle.down",
@@ -1,5 +1,5 @@
1
- import type { AgentGameCommand } from "./commands.js";
2
- import { AgentGameError } from "./errors.js";
1
+ import type { AgentGameCommand } from "./commands";
2
+ import { AgentGameError } from "./errors";
3
3
 
4
4
  export type AgentServiceEventLike = {
5
5
  type: string;
package/src/core/index.ts CHANGED
@@ -1,23 +1,23 @@
1
- export * from "./assets.js";
2
- export * from "./agent-game-store.js";
3
- export * from "./agent-service-event-adapter.js";
4
- export * from "./commands.js";
5
- export * from "./event-adapter.js";
6
- export * from "./errors.js";
7
- export * from "./life-presets.js";
8
- export * from "./movement.js";
9
- export * from "./office-building-layout.js";
10
- export * from "./office-layout.js";
11
- export * from "./pixel-character-avatar.js";
12
- export * from "./pixel-character.js";
13
- export * from "./reducer.js";
14
- export * from "./realtime-events.js";
15
- export * from "./realtime-transport.js";
16
- export * from "./schedule.js";
17
- export * from "./scene.js";
18
- export * from "./sequence.js";
19
- export * from "./state.js";
20
- export * from "./svg-pixel-avatar.js";
21
- export * from "./town-office-assets.js";
22
- export * from "./town-office-room-presets.js";
23
- export * from "./town-office-seat-layout.js";
1
+ export * from "./assets";
2
+ export * from "./agent-game-store";
3
+ export * from "./agent-service-event-adapter";
4
+ export * from "./commands";
5
+ export * from "./event-adapter";
6
+ export * from "./errors";
7
+ export * from "./life-presets";
8
+ export * from "./movement";
9
+ export * from "./office-building-layout";
10
+ export * from "./office-layout";
11
+ export * from "./pixel-character-avatar";
12
+ export * from "./pixel-character";
13
+ export * from "./reducer";
14
+ export * from "./realtime-events";
15
+ export * from "./realtime-transport";
16
+ export * from "./schedule";
17
+ export * from "./scene";
18
+ export * from "./sequence";
19
+ export * from "./state";
20
+ export * from "./svg-pixel-avatar";
21
+ export * from "./town-office-assets";
22
+ export * from "./town-office-room-presets";
23
+ export * from "./town-office-seat-layout";
@@ -1,5 +1,5 @@
1
- import type { AgentGameAnchor, AgentGameSceneDefinition } from "./scene.js";
2
- import { validateAgentGameScene } from "./scene.js";
1
+ import type { AgentGameAnchor, AgentGameSceneDefinition } from "./scene";
2
+ import { validateAgentGameScene } from "./scene";
3
3
 
4
4
  export type AgentGameLifeSceneKind = "home" | "cafe" | "commute" | "sleep";
5
5
 
@@ -1,7 +1,7 @@
1
- import { AgentGameError } from "./errors.js";
2
- import { findAgentGameAnchor } from "./scene.js";
3
- import type { AgentGameCommand } from "./commands.js";
4
- import type { AgentGameSnapshot } from "./state.js";
1
+ import { AgentGameError } from "./errors";
2
+ import { findAgentGameAnchor } from "./scene";
3
+ import type { AgentGameCommand } from "./commands";
4
+ import type { AgentGameSnapshot } from "./state";
5
5
 
6
6
  export type CreateAgentGameMovePathCommandsOptions = {
7
7
  agentId: string;
@@ -1,14 +1,14 @@
1
- import { AgentGameError } from "./errors.js";
2
- import type { OfficeObjectAtlasDefinition } from "./office-layout.js";
1
+ import { AgentGameError } from "./errors";
2
+ import type { OfficeObjectAtlasDefinition } from "./office-layout";
3
3
  import type {
4
4
  AgentGameAnchor,
5
5
  AgentGameAnchorKind,
6
6
  AgentGameDirection,
7
7
  AgentGameSceneDefinition,
8
- } from "./scene.js";
9
- import { validateAgentGameScene } from "./scene.js";
10
- import { createTownOfficeRoomAnchors } from "./town-office-seat-layout.js";
11
- import { isTownOfficeRoomType, type TownOfficeRoomType } from "./town-office-assets.js";
8
+ } from "./scene";
9
+ import { validateAgentGameScene } from "./scene";
10
+ import { createTownOfficeRoomAnchors } from "./town-office-seat-layout";
11
+ import { isTownOfficeRoomType, type TownOfficeRoomType } from "./town-office-assets";
12
12
 
13
13
  export type OfficeBuildingGridRect = {
14
14
  x: number;
@@ -1,4 +1,4 @@
1
- import { AgentGameError } from "./errors.js";
1
+ import { AgentGameError } from "./errors";
2
2
 
3
3
  export type OfficeObjectAtlasFrame = {
4
4
  frame: {
@@ -1,5 +1,5 @@
1
- import type { AgentAvatarDefinition } from "./assets.js";
2
- import type { PixelCharacterSprite } from "./pixel-character.js";
1
+ import type { AgentAvatarDefinition } from "./assets";
2
+ import type { PixelCharacterSprite } from "./pixel-character";
3
3
 
4
4
  export type PixelCharacterAvatarAtlas = {
5
5
  frames: Record<string, { frame: { x: number; y: number; w: number; h: number } }>;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  REQUIRED_AGENT_AVATAR_ANIMATIONS,
3
3
  type AgentAvatarAnimationName,
4
- } from "./assets.js";
4
+ } from "./assets";
5
5
 
6
6
  export type PixelCharacterRole = "engineer" | "manager" | "support" | string;
7
7
  export type PixelCharacterStyle = "office" | "simple-chibi";
@@ -1,6 +1,6 @@
1
- import type { AgentGameCommand } from "./commands.js";
2
- import type { AgentGameSceneDefinition } from "./scene.js";
3
- import type { AgentGameAgent, AgentGameSnapshot } from "./state.js";
1
+ import type { AgentGameCommand } from "./commands";
2
+ import type { AgentGameSceneDefinition } from "./scene";
3
+ import type { AgentGameAgent, AgentGameSnapshot } from "./state";
4
4
 
5
5
  export type AgentGameRealtimeCursor = string;
6
6
 
@@ -1,4 +1,4 @@
1
- import type { AgentGameRealtimeEvent } from "./realtime-events.js";
1
+ import type { AgentGameRealtimeEvent } from "./realtime-events";
2
2
 
3
3
  export type AgentGameTransportMessage = AgentGameRealtimeEvent | AgentGameRealtimeEvent[];
4
4
 
@@ -1,7 +1,7 @@
1
- import type { AgentGameCommand } from "./commands.js";
2
- import { AgentGameError } from "./errors.js";
3
- import { findAgentGameAnchor, validateAgentGameScene, type AgentGameSceneDefinition } from "./scene.js";
4
- import type { AgentGameAgent, AgentGameSnapshot } from "./state.js";
1
+ import type { AgentGameCommand } from "./commands";
2
+ import { AgentGameError } from "./errors";
3
+ import { findAgentGameAnchor, validateAgentGameScene, type AgentGameSceneDefinition } from "./scene";
4
+ import type { AgentGameAgent, AgentGameSnapshot } from "./state";
5
5
 
6
6
  export function createAgentGameSnapshot(scene: AgentGameSceneDefinition): AgentGameSnapshot {
7
7
  return {
package/src/core/scene.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentGameError } from "./errors.js";
1
+ import { AgentGameError } from "./errors";
2
2
 
3
3
  export type AgentGameDirection = "up" | "down" | "left" | "right";
4
4
  export type AgentGameAnchorKind = "spawn" | "desk" | "meeting" | "break" | "living";
@@ -1,4 +1,4 @@
1
- import type { AgentGameCommand } from "./commands.js";
1
+ import type { AgentGameCommand } from "./commands";
2
2
 
3
3
  export type OfficeWorkdaySequenceOptions = {
4
4
  agentId: string;
@@ -1,4 +1,4 @@
1
- import type { AgentGameCommand } from "./commands.js";
1
+ import type { AgentGameCommand } from "./commands";
2
2
 
3
3
  export type PlayAgentGameSequenceOptions = {
4
4
  dispatch: (command: AgentGameCommand) => void;
package/src/core/state.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { AgentGameEmotion, AgentToolCallStatus } from "./commands.js";
2
- import type { AgentGameDirection, AgentGameSceneDefinition } from "./scene.js";
1
+ import type { AgentGameEmotion, AgentToolCallStatus } from "./commands";
2
+ import type { AgentGameDirection, AgentGameSceneDefinition } from "./scene";
3
3
 
4
4
  export type AgentGameActivity =
5
5
  | { kind: "idle" }
@@ -1,4 +1,4 @@
1
- import type { AgentAvatarDefinition } from "./assets.js";
1
+ import type { AgentAvatarDefinition } from "./assets";
2
2
 
3
3
  export const SVG_PIXEL_AVATAR_FRAME_NAMES = [
4
4
  "idle-down-0",
@@ -1,5 +1,5 @@
1
- import type { OfficeBuildingObjectDefinition } from "./office-building-layout.js";
2
- import type { TownOfficeObjectFrame, TownOfficeRoomType } from "./town-office-assets.js";
1
+ import type { OfficeBuildingObjectDefinition } from "./office-building-layout";
2
+ import type { TownOfficeObjectFrame, TownOfficeRoomType } from "./town-office-assets";
3
3
 
4
4
  export type TownOfficeRoomObjectsOptions = {
5
5
  roomId: string;
@@ -1,6 +1,6 @@
1
- import type { OfficeBuildingAnchorDefinition } from "./office-building-layout.js";
2
- import type { AgentGameAnchorKind } from "./scene.js";
3
- import type { TownOfficeRoomType } from "./town-office-assets.js";
1
+ import type { OfficeBuildingAnchorDefinition } from "./office-building-layout";
2
+ import type { AgentGameAnchorKind } from "./scene";
3
+ import type { TownOfficeRoomType } from "./town-office-assets";
4
4
 
5
5
  export type TownOfficeRoomAnchorsOptions = {
6
6
  roomId: string;
package/src/graph.ts CHANGED
@@ -6,7 +6,7 @@ import type {
6
6
  NormalizedAgentGameEdge,
7
7
  NormalizedAgentGameGraph,
8
8
  NormalizedAgentGameNode,
9
- } from "./types.js";
9
+ } from "./types";
10
10
 
11
11
  const DEFAULT_LAYER_ORDER = [
12
12
  "profile",
@@ -1,19 +1,19 @@
1
- import type { AgentAvatarDefinition, AgentGameSceneDefinition, OfficeBuildingLayout, OfficeLayoutDefinition } from "../core/index.js";
2
- import { drawAnchorDebug } from "./anchor-debug.js";
3
- import { registerAgentAvatarAnimations } from "./avatar-registry.js";
1
+ import type { AgentAvatarDefinition, AgentGameSceneDefinition, OfficeBuildingLayout, OfficeLayoutDefinition } from "../core/index";
2
+ import { drawAnchorDebug } from "./anchor-debug";
3
+ import { registerAgentAvatarAnimations } from "./avatar-registry";
4
4
  import {
5
5
  installCameraControls,
6
6
  type AgentGameCameraControlsController,
7
7
  type AgentGameCameraControlsOptions,
8
- } from "./camera-controls.js";
9
- import type { AgentGameDebugOverlays } from "./debug-overlay.js";
8
+ } from "./camera-controls";
9
+ import type { AgentGameDebugOverlays } from "./debug-overlay";
10
10
  import {
11
11
  createDefaultAgentGameSceneRendererRegistry,
12
12
  type AgentGameRendererConfig,
13
13
  type AgentGameSceneRendererRegistry,
14
- } from "./scene-renderer.js";
15
- import type { AgentGameSceneReconciler, PhaserReconcilerSceneLike } from "./scene-reconciler.js";
16
- import type { TownOfficeDomOverlayRoot } from "./town-office-renderer.js";
14
+ } from "./scene-renderer";
15
+ import type { AgentGameSceneReconciler, PhaserReconcilerSceneLike } from "./scene-reconciler";
16
+ import type { TownOfficeDomOverlayRoot } from "./town-office-renderer";
17
17
 
18
18
  export const AGENT_GAME_PHASER_SCENE_KEY = "agent-game-scene";
19
19
 
@@ -1,7 +1,7 @@
1
- import type { AgentGameSceneDefinition } from "../core/index.js";
2
- import { debugDepth } from "./render-layers.js";
3
- import type { PhaserDisplayObjectLike, PhaserTextLike } from "./scene-reconciler.js";
4
- import { crispTextStyle } from "./text-style.js";
1
+ import type { AgentGameSceneDefinition } from "../core/index";
2
+ import { debugDepth } from "./render-layers";
3
+ import type { PhaserDisplayObjectLike, PhaserTextLike } from "./scene-reconciler";
4
+ import { crispTextStyle } from "./text-style";
5
5
 
6
6
  export type AnchorDebugSceneLike = {
7
7
  add: {
@@ -5,7 +5,7 @@ import {
5
5
  validateAgentAvatarDefinition,
6
6
  type AgentAvatarDefinition,
7
7
  type AgentAvatarAnimationName,
8
- } from "../core/index.js";
8
+ } from "../core/index";
9
9
 
10
10
  export type PhaserAnimationSceneLike = {
11
11
  textures?: {
@@ -4,7 +4,7 @@ import {
4
4
  getCameraScrollBounds,
5
5
  snapCameraScrollToPixel,
6
6
  zoomAroundPoint,
7
- } from "./camera-model.js";
7
+ } from "./camera-model";
8
8
 
9
9
  export type AgentGameCameraControlsOptions = {
10
10
  enabled?: boolean;
@@ -5,18 +5,18 @@ import {
5
5
  validateAgentGameScene,
6
6
  validateOfficeBuildingLayout,
7
7
  validateOfficeLayoutDefinition,
8
- } from "../core/index.js";
9
- import { createAgentGamePhaserSceneConfig } from "./agent-game-scene.js";
8
+ } from "../core/index";
9
+ import { createAgentGamePhaserSceneConfig } from "./agent-game-scene";
10
10
  import {
11
11
  createSceneReconciler,
12
12
  type AgentDomOverlayRoot,
13
13
  type AgentGameSceneReconciler,
14
- } from "./scene-reconciler.js";
15
- import type { AgentGameCameraControlsController } from "./camera-controls.js";
16
- import type { AgentGameRendererConfig } from "./scene-renderer.js";
17
- import type { TownOfficeDomOverlayRoot } from "./town-office-renderer.js";
18
- import type { AgentGameController, AgentGamePhaserOptions, PhaserGameLike } from "./types.js";
19
- import { resolveAgentGameViewportSize } from "./viewport.js";
14
+ } from "./scene-reconciler";
15
+ import type { AgentGameCameraControlsController } from "./camera-controls";
16
+ import type { AgentGameRendererConfig } from "./scene-renderer";
17
+ import type { TownOfficeDomOverlayRoot } from "./town-office-renderer";
18
+ import type { AgentGameController, AgentGamePhaserOptions, PhaserGameLike } from "./types";
19
+ import { resolveAgentGameViewportSize } from "./viewport";
20
20
 
21
21
  type RuntimeDomOverlayRoot = HTMLElement & AgentDomOverlayRoot & TownOfficeDomOverlayRoot;
22
22
 
@@ -1,6 +1,6 @@
1
- import { parseHexColor } from "../core/index.js";
2
- import type { TownOfficeSceneLike } from "./town-office-primitives.js";
3
- import { debugDepth } from "./render-layers.js";
1
+ import { parseHexColor } from "../core/index";
2
+ import type { TownOfficeSceneLike } from "./town-office-primitives";
3
+ import { debugDepth } from "./render-layers";
4
4
 
5
5
  export type AgentGameDebugOverlays = {
6
6
  worldBounds?: boolean;
@@ -1,13 +1,13 @@
1
- export * from "./agent-game-scene.js";
2
- export * from "./avatar-registry.js";
3
- export * from "./camera-model.js";
4
- export * from "./camera-controls.js";
5
- export * from "./create-agent-game.js";
6
- export * from "./debug-overlay.js";
7
- export * from "./office-building-renderer.js";
8
- export * from "./office-layout-renderer.js";
9
- export * from "./scene-renderer.js";
10
- export * from "./scene-reconciler.js";
11
- export * from "./town-office-renderer.js";
12
- export * from "./types.js";
13
- export * from "./viewport.js";
1
+ export * from "./agent-game-scene";
2
+ export * from "./avatar-registry";
3
+ export * from "./camera-model";
4
+ export * from "./camera-controls";
5
+ export * from "./create-agent-game";
6
+ export * from "./debug-overlay";
7
+ export * from "./office-building-renderer";
8
+ export * from "./office-layout-renderer";
9
+ export * from "./scene-renderer";
10
+ export * from "./scene-reconciler";
11
+ export * from "./town-office-renderer";
12
+ export * from "./types";
13
+ export * from "./viewport";
@@ -1,6 +1,6 @@
1
- import type { AgentGameSceneDefinition } from "../core/index.js";
2
- import { officeDepth } from "./render-layers.js";
3
- import type { PhaserDisplayObjectLike } from "./scene-reconciler.js";
1
+ import type { AgentGameSceneDefinition } from "../core/index";
2
+ import { officeDepth } from "./render-layers";
3
+ import type { PhaserDisplayObjectLike } from "./scene-reconciler";
4
4
 
5
5
  export type OfficeBackgroundSceneLike = {
6
6
  add: {
@@ -2,10 +2,10 @@ import {
2
2
  getOfficeRoomBounds,
3
3
  parseHexColor,
4
4
  type OfficeBuildingLayout,
5
- } from "../core/index.js";
6
- import { officeDepth } from "./render-layers.js";
7
- import type { PhaserDisplayObjectLike, PhaserTextLike } from "./scene-reconciler.js";
8
- import { crispTextStyle } from "./text-style.js";
5
+ } from "../core/index";
6
+ import { officeDepth } from "./render-layers";
7
+ import type { PhaserDisplayObjectLike, PhaserTextLike } from "./scene-reconciler";
8
+ import { crispTextStyle } from "./text-style";
9
9
 
10
10
  export type OfficeBuildingSceneLike = {
11
11
  add: {
@@ -1,6 +1,6 @@
1
- import type { OfficeLayoutDefinition } from "../core/index.js";
2
- import { officeDepth } from "./render-layers.js";
3
- import type { PhaserDisplayObjectLike } from "./scene-reconciler.js";
1
+ import type { OfficeLayoutDefinition } from "../core/index";
2
+ import { officeDepth } from "./render-layers";
3
+ import type { PhaserDisplayObjectLike } from "./scene-reconciler";
4
4
 
5
5
  export type OfficeLayoutSceneLike = {
6
6
  add: {
@@ -6,10 +6,10 @@ import {
6
6
  type AgentGameAgent,
7
7
  type AgentGameDirection,
8
8
  type AgentGameSnapshot,
9
- } from "../core/index.js";
10
- import { createMovementTweenConfig, type MovementTimingOptions } from "./movement-tween.js";
11
- import { agentDepth, agentUiDepth } from "./render-layers.js";
12
- import { crispTextStyle } from "./text-style.js";
9
+ } from "../core/index";
10
+ import { createMovementTweenConfig, type MovementTimingOptions } from "./movement-tween";
11
+ import { agentDepth, agentUiDepth } from "./render-layers";
12
+ import { crispTextStyle } from "./text-style";
13
13
 
14
14
  const SPRITE_AGENT_SCALE = 1;
15
15
  const SPRITE_AGENT_FOOT_ORIGIN_Y = 1;
@@ -3,12 +3,12 @@ import {
3
3
  type AgentGameSceneDefinition,
4
4
  type OfficeBuildingLayout,
5
5
  type OfficeLayoutDefinition,
6
- } from "../core/index.js";
7
- import { drawOfficeBackground } from "./office-background.js";
8
- import { drawOfficeBuildingLayout } from "./office-building-renderer.js";
9
- import { drawOfficeLayout } from "./office-layout-renderer.js";
10
- import type { PhaserReconcilerSceneLike } from "./scene-reconciler.js";
11
- import { drawTownOfficeBuildingLayout, type TownOfficeBuildingRenderOptions } from "./town-office-renderer.js";
6
+ } from "../core/index";
7
+ import { drawOfficeBackground } from "./office-background";
8
+ import { drawOfficeBuildingLayout } from "./office-building-renderer";
9
+ import { drawOfficeLayout } from "./office-layout-renderer";
10
+ import type { PhaserReconcilerSceneLike } from "./scene-reconciler";
11
+ import { drawTownOfficeBuildingLayout, type TownOfficeBuildingRenderOptions } from "./town-office-renderer";
12
12
 
13
13
  export type AgentGameSceneRenderer = {
14
14
  preload?: (scene: PhaserReconcilerSceneLike) => void;
@@ -1,4 +1,4 @@
1
- import { rect, text, type TownOfficeSceneLike } from "./town-office-primitives.js";
1
+ import { rect, text, type TownOfficeSceneLike } from "./town-office-primitives";
2
2
 
3
3
  export function drawServerRack(scene: TownOfficeSceneLike, x: number, y: number, scale: number): void {
4
4
  const s = scale;
@@ -1,6 +1,6 @@
1
- import type { OfficeRoomBounds } from "../core/index.js";
2
- import { drawBookshelf, drawWhiteboard } from "./town-office-furniture.js";
3
- import { rect, type TownOfficeSceneLike } from "./town-office-primitives.js";
1
+ import type { OfficeRoomBounds } from "../core/index";
2
+ import { drawBookshelf, drawWhiteboard } from "./town-office-furniture";
3
+ import { rect, type TownOfficeSceneLike } from "./town-office-primitives";
4
4
 
5
5
  export type TownOfficeRoomStyle = {
6
6
  floor: string;
@@ -1,4 +1,4 @@
1
- import { rect, type TownOfficeSceneLike } from "./town-office-primitives.js";
1
+ import { rect, type TownOfficeSceneLike } from "./town-office-primitives";
2
2
 
3
3
  export function drawDesk(scene: TownOfficeSceneLike, x: number, y: number, scale: number, hasMonitor: boolean): void {
4
4
  const s = 1.5 * scale;
@@ -1,7 +1,7 @@
1
- import { parseHexColor } from "../core/index.js";
2
- import { officeDepth } from "./render-layers.js";
3
- import type { PhaserDisplayObjectLike, PhaserTextLike } from "./scene-reconciler.js";
4
- import { crispTextStyle } from "./text-style.js";
1
+ import { parseHexColor } from "../core/index";
2
+ import { officeDepth } from "./render-layers";
3
+ import type { PhaserDisplayObjectLike, PhaserTextLike } from "./scene-reconciler";
4
+ import { crispTextStyle } from "./text-style";
5
5
 
6
6
  export type TownOfficeSceneLike = {
7
7
  add: {
@@ -6,7 +6,7 @@ import {
6
6
  type OfficeBuildingLayout,
7
7
  type OfficeBuildingObjectDefinition,
8
8
  type OfficeRoomBounds,
9
- } from "../core/index.js";
9
+ } from "../core/index";
10
10
  import {
11
11
  drawBattery,
12
12
  drawBeaker,
@@ -33,8 +33,8 @@ import {
33
33
  drawTree,
34
34
  drawTV,
35
35
  drawWindTurbine,
36
- } from "./town-office-business-props.js";
37
- import { drawWorldBoundsDebugOverlay, type AgentGameDebugOverlays } from "./debug-overlay.js";
36
+ } from "./town-office-business-props";
37
+ import { drawWorldBoundsDebugOverlay, type AgentGameDebugOverlays } from "./debug-overlay";
38
38
  import {
39
39
  drawAirConditioner,
40
40
  drawDoor,
@@ -46,7 +46,7 @@ import {
46
46
  drawSocket,
47
47
  drawWindow,
48
48
  type TownOfficeRoomStyle,
49
- } from "./town-office-environment.js";
49
+ } from "./town-office-environment";
50
50
  import {
51
51
  drawBench,
52
52
  drawBookshelf,
@@ -70,12 +70,12 @@ import {
70
70
  drawTrashCan,
71
71
  drawVendingMachine,
72
72
  drawWhiteboard,
73
- } from "./town-office-furniture.js";
74
- import { rect, type TownOfficeSceneLike } from "./town-office-primitives.js";
75
- import { crispTextStyle } from "./text-style.js";
76
- import { officeDepth } from "./render-layers.js";
73
+ } from "./town-office-furniture";
74
+ import { rect, type TownOfficeSceneLike } from "./town-office-primitives";
75
+ import { crispTextStyle } from "./text-style";
76
+ import { officeDepth } from "./render-layers";
77
77
 
78
- export type { TownOfficeSceneLike } from "./town-office-primitives.js";
78
+ export type { TownOfficeSceneLike } from "./town-office-primitives";
79
79
 
80
80
  const HEADER_HEIGHT = 34;
81
81
  const HEADER_TITLE_PADDING_X = 12;
@@ -1,14 +1,14 @@
1
- import type { AgentGameAssetManifest } from "../core/assets.js";
2
- import type { AgentGameCommand } from "../core/commands.js";
3
- import type { OfficeBuildingLayout } from "../core/office-building-layout.js";
4
- import type { OfficeLayoutDefinition, OfficeObjectAtlasDefinition } from "../core/office-layout.js";
5
- import type { AgentGameSceneDefinition } from "../core/scene.js";
6
- import type { AgentGameSnapshot } from "../core/state.js";
7
- import type { AgentGameStore } from "../core/agent-game-store.js";
8
- import type { AgentGameCameraControlsController, AgentGameCameraControlsOptions } from "./camera-controls.js";
9
- import type { AgentGameDebugOverlays } from "./debug-overlay.js";
10
- import type { AgentGameRendererConfig, AgentGameSceneRendererRegistry } from "./scene-renderer.js";
11
- import type { AgentGameViewportOptions } from "./viewport.js";
1
+ import type { AgentGameAssetManifest } from "../core/assets";
2
+ import type { AgentGameCommand } from "../core/commands";
3
+ import type { OfficeBuildingLayout } from "../core/office-building-layout";
4
+ import type { OfficeLayoutDefinition, OfficeObjectAtlasDefinition } from "../core/office-layout";
5
+ import type { AgentGameSceneDefinition } from "../core/scene";
6
+ import type { AgentGameSnapshot } from "../core/state";
7
+ import type { AgentGameStore } from "../core/agent-game-store";
8
+ import type { AgentGameCameraControlsController, AgentGameCameraControlsOptions } from "./camera-controls";
9
+ import type { AgentGameDebugOverlays } from "./debug-overlay";
10
+ import type { AgentGameRendererConfig, AgentGameSceneRendererRegistry } from "./scene-renderer";
11
+ import type { AgentGameViewportOptions } from "./viewport";
12
12
 
13
13
  export type PhaserGameLike = {
14
14
  destroy(removeCanvas?: boolean): void;