@agent-play/sdk 3.3.3 → 3.3.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { W as WorldInteractionRole, L as LangChainAgentRegistration, R as RemotePlayWorldInitAudioOptions, A as AgentPlaySnapshot, P as PlayerChainNodeResponse, a as AddAgentInput, b as RegisteredPlayer, c as AddPlayerInput, d as RecordInteractionInput, J as Journey } from './browser-Dpx-0L8A.js';
2
- export { e as AgentPlayWorldLayout, f as AgentPlayWorldLayoutZone, g as AgentPlayWorldMap, h as AgentPlayWorldMapAgentOccupant, i as AgentPlayWorldMapBounds, j as AgentPlayWorldMapMcpOccupant, k as AssistToolFieldType, l as AssistToolParameterSpec, m as AssistToolSpec, C as CONTINUOUS_RENDER_OFFSET, n as CarWashCar, o as CarWashCarSchema, D as DEFAULT_AGENT_SPAWN_MIN_DISTANCE, p as DEFAULT_PLAYER_WALLET_BALANCE_USD, q as DestinationJourneyStep, r as JourneyStep, M as MINIMUM_PLAY_WORLD_BOUNDS, O as OCCUPANCY_POINT_MULTIPLIER, s as OccupancyGridPoint, t as OccupantGroup, u as OriginJourneyStep, v as P2aEnableFlag, w as PLAYER_CHAIN_GENESIS_STABLE_KEY, x as PLAYER_CHAIN_HEADER_STABLE_KEY, y as PlatformAgentInformation, z as PlayAgentInformation, B as PlayerChainFanoutNotify, E as PlayerChainGenesisNode, F as PlayerChainHeaderNode, G as PlayerChainNotifyNodeRef, H as PlayerChainOccupantPresentNode, I as PlayerChainOccupantRemovedNode, K as PlayerWallet, N as PlayerWalletSchema, Q as PositionedStep, S as PurchaseRecord, T as PurchaseRecordSchema, U as RealtimeWebrtcClientSecret, V as RegisteredAgentSummary, X as RemotePlayWorldOpenAiAudioOptions, Y as SPATIAL_ZONE_INDEX_AGENTS, Z as SPATIAL_ZONE_INDEX_SPACES, _ as STREET_NAME_POOL, $ as SaleState, a0 as SaleStateSchema, a1 as ShopItem, a2 as ShopItemSchema, a3 as SpaceContentItem, a4 as Street, a5 as StreetPoolEntry, a6 as StructureJourneyStep, a7 as SupermarketItem, a8 as SupermarketItemSchema, a9 as WorldBounds, aa as WorldJourneyUpdate, ab as WorldLayout, ac as WorldLayoutBoundsField, ad as YieldEventInfo, ae as Zone, af as ZoneEventInfo, ag as applyBoundsFieldUpdateToLayout, ah as availableCellsForZone, ai as boundingWorldRectForOccupancyPoints, aj as boundsContain, ak as buildRankedOccupancyPoints, al as buildRankedOccupancyPointsForSpatialZone, am as buildRankedOccupancyPointsForZone, an as buildRankedOccupancyPointsInRect, ao as cellsForZone, ap as centerOfZone, aq as clampWorldPosition, ar as createInitialPlayerWallet, as as createVerticalStripSeedLayout, at as desaturateColor, au as enumerateIntegerCellsInRect, av as expandBoundsToMinimumPlayArea, aw as getStreetPoolEntryById, ax as isAgentSpawnOccupancyPointAvailable, ay as isAgentSpawnOccupancyPointAvailableInRect, az as isAgentSpawnOccupancyPointAvailableInZone, aA as isItemAvailableForPurchase, aB as isSpaceAnchorOccupancyPointAvailable, aC as isSpaceAnchorOccupancyPointAvailableInRect, aD as isSpaceAnchorOccupancyPointAvailableInZone, aE as listAllowedOccupancyPoints, aF as listOccupancyPointsForSpatialZone, aG as listOccupancyPointsForZone, aH as listOccupancyPointsInRect, aI as mergeSnapshotWithPlayerChainNode, aJ as migrateWorldLayoutBounds, aK as nextStreetFromPool, aL as occupancyKeyForPosition, aM as occupancyPointsGroupedBySpatialZone, aN as occupancyPointsGroupedByZones, aO as parsePlayerChainFanoutNotify, aP as parsePlayerChainFanoutNotifyFromSsePayload, aQ as parsePlayerChainNodeRpcBody, aR as pickZoneForGroup, aS as pointCellInRect, aT as pointCellInSpatialZone, aU as pointCellInZone, aV as primaryZoneForGroup, aW as sortNodeRefsForSerializedFetch, aX as spatialZoneBounds, aY as spatialZoneCenter, aZ as streetFromPoolEntry, a_ as zonesForGroup } from './browser-Dpx-0L8A.js';
1
+ import { W as WorldInteractionRole, L as LangChainAgentRegistration, R as RemotePlayWorldInitAudioOptions, A as AgentPlaySnapshot, P as PlayerChainNodeResponse, a as AddAgentInput, b as RegisteredPlayer, c as AddPlayerInput, d as RecordInteractionInput, J as Journey } from './browser-da9E-kSP.js';
2
+ export { e as AgentPlayWorldLayout, f as AgentPlayWorldLayoutZone, g as AgentPlayWorldMap, h as AgentPlayWorldMapAgentOccupant, i as AgentPlayWorldMapBounds, j as AgentPlayWorldMapMcpOccupant, k as AssistToolFieldType, l as AssistToolParameterSpec, m as AssistToolSpec, C as CONTINUOUS_RENDER_OFFSET, n as CarWashCar, o as CarWashCarSchema, p as ComputeTalkAgentPowerUpsEarnedInput, D as DEFAULT_AGENT_SPAWN_MIN_DISTANCE, q as DEFAULT_PLAYER_WALLET_BALANCE_USD, r as DestinationJourneyStep, s as JourneyStep, M as MINIMUM_PLAY_WORLD_BOUNDS, t as MINIMUM_STREET_LAYOUT_BOUNDS, O as OCCUPANCY_POINT_MULTIPLIER, u as OccupancyGridPoint, v as OccupantGroup, w as OriginJourneyStep, x as P2aEnableFlag, y as PLAYER_CHAIN_GENESIS_STABLE_KEY, z as PLAYER_CHAIN_HEADER_STABLE_KEY, B as PlatformAgentInformation, E as PlayAgentInformation, F as PlayerChainFanoutNotify, G as PlayerChainGenesisNode, H as PlayerChainHeaderNode, I as PlayerChainNotifyNodeRef, K as PlayerChainOccupantPresentNode, N as PlayerChainOccupantRemovedNode, Q as PlayerWallet, S as PlayerWalletSchema, T as PositionedStep, U as PurchaseRecord, V as PurchaseRecordSchema, X as RealtimeWebrtcClientSecret, Y as RegisteredAgentSummary, Z as RemotePlayWorldOpenAiAudioOptions, _ as SPACE_STRUCTURE_ANCHOR_MIN_DISTANCE, $ as SPATIAL_ZONE_INDEX_AGENTS, a0 as SPATIAL_ZONE_INDEX_SPACES, a1 as STREET_NAME_POOL, a2 as SaleState, a3 as SaleStateSchema, a4 as ShopItem, a5 as ShopItemSchema, a6 as SpaceContentItem, a7 as Street, a8 as StreetPoolEntry, a9 as StructureJourneyStep, aa as SupermarketItem, ab as SupermarketItemSchema, ac as TALK_AGENT_PU_BILLED_SECONDS_PER_UNIT, ad as TALK_AGENT_PU_MAX_PER_LEG, ae as TALK_PRICE_PER_60S_USD, af as TALK_PRICE_PER_SECOND_USD, ag as TALK_TICK_SECONDS, ah as WALLET_BUNDLE_OFFERS, ai as WalletBundleId, aj as WalletBundleOffer, ak as WorldBounds, al as WorldJourneyUpdate, am as WorldLayout, an as WorldLayoutBoundsField, ao as YieldEventInfo, ap as Zone, aq as ZoneEventInfo, ar as applyBoundsFieldUpdateToLayout, as as availableCellsForZone, at as boundingWorldRectForOccupancyPoints, au as boundsContain, av as buildRankedOccupancyPoints, aw as buildRankedOccupancyPointsForSpatialZone, ax as buildRankedOccupancyPointsForZone, ay as buildRankedOccupancyPointsInRect, az as cellsForZone, aA as centerOfZone, aB as clampWorldPosition, aC as computeTalkAgentPowerUpsEarned, aD as costForSeconds, aE as createInitialAgentRewardWallet, aF as createInitialPlayerWallet, aG as createVerticalStripSeedLayout, aH as desaturateColor, aI as enumerateIntegerCellsInRect, aJ as expandBoundsToMinimumPlayArea, aK as getStreetPoolEntryById, aL as getWalletBundleById, aM as isAgentSpawnOccupancyPointAvailable, aN as isAgentSpawnOccupancyPointAvailableInRect, aO as isAgentSpawnOccupancyPointAvailableInZone, aP as isItemAvailableForPurchase, aQ as isSpaceAnchorOccupancyPointAvailable, aR as isSpaceAnchorOccupancyPointAvailableInRect, aS as isSpaceAnchorOccupancyPointAvailableInZone, aT as listAllowedOccupancyPoints, aU as listOccupancyPointsForSpatialZone, aV as listOccupancyPointsForZone, aW as listOccupancyPointsInRect, aX as mergeSnapshotWithPlayerChainNode, aY as migrateWorldLayoutBounds, aZ as nextStreetFromPool, a_ as occupancyKeyForPosition, a$ as occupancyPointsGroupedBySpatialZone, b0 as occupancyPointsGroupedByZones, b1 as parsePlayerChainFanoutNotify, b2 as parsePlayerChainFanoutNotifyFromSsePayload, b3 as parsePlayerChainNodeRpcBody, b4 as pickZoneForGroup, b5 as pointCellInRect, b6 as pointCellInSpatialZone, b7 as pointCellInZone, b8 as primaryZoneForGroup, b9 as sortNodeRefsForSerializedFetch, ba as spatialZoneBounds, bb as spatialZoneCenter, bc as streetFromPoolEntry, bd as zonesForGroup } from './browser-da9E-kSP.js';
3
3
  import { WorldIntercomEventPayload, IntercomResponsePayload } from '@agent-play/intercom';
4
4
  export { AgentPlayAgentNodeEntry, AgentPlayCredentialsFile, NodeCredentialMaterial, createNodeCredentialMaterial, loadAgentPlayCredentialsFileFromPath, loadAgentPlayCredentialsFileFromPathSync, loadRootKey, nodeCredentialFromHumanPhrase, nodeCredentialFromPasswHash, nodeCredentialsMaterialFromHumanPassphrase, parseAgentPlayCredentialsJson, resolveAgentPlayCredentialsPath, verifyStoredNodeCredential } from '@agent-play/node-tools';
5
5
  import 'zod';
@@ -36,6 +36,8 @@ declare const WORLD_INTERACTION_EVENT = "world:interaction";
36
36
  declare const WORLD_AGENT_SIGNAL_EVENT = "world:agent_signal";
37
37
  /** Full journey + path update for a player. */
38
38
  declare const WORLD_JOURNEY_EVENT = "world:journey";
39
+ /** Ephemeral human positions (not persisted on the world snapshot). */
40
+ declare const WORLD_GEOGRAPHY_EVENT = "world:geography";
39
41
  /**
40
42
  * Payload for {@link WORLD_AGENT_SIGNAL_EVENT}.
41
43
  *
@@ -271,4 +273,4 @@ declare class RemotePlayWorld {
271
273
  */
272
274
  declare function intercomResultRecordFromLangChainInvokeOutput(output: unknown): Record<string, unknown>;
273
275
 
274
- export { AddAgentInput, AddPlayerInput, AgentPlaySnapshot, type IntercomToolExecutor, Journey, LangChainAgentRegistration, PLAYER_ADDED_EVENT, PlayerChainNodeResponse, RecordInteractionInput, RegisteredPlayer, RemotePlayWorld, type RemotePlayWorldConnectOptions, type RemotePlayWorldHold, RemotePlayWorldInitAudioOptions, type RemotePlayWorldLogging, type RemotePlayWorldNodeCredentials, type RemotePlayWorldOptions, type RemotePlayWorldSessionEvent, SESSION_CLOSED_EVENT, SESSION_CONNECTED_EVENT, SESSION_INVALID_EVENT, SESSION_SSE_ERROR_EVENT, SESSION_SSE_OPEN_EVENT, type SubscribeIntercomCommandsOptions, WORLD_AGENT_SIGNAL_EVENT, WORLD_INTERACTION_EVENT, WORLD_JOURNEY_EVENT, type WorldAgentSignalPayload, type WorldInteractionPayload, WorldInteractionRole, agentPlayDebug, configureAgentPlayDebug, intercomResultRecordFromLangChainInvokeOutput, isAgentPlayDebugEnabled, langchainRegistration, resetAgentPlayDebug };
276
+ export { AddAgentInput, AddPlayerInput, AgentPlaySnapshot, type IntercomToolExecutor, Journey, LangChainAgentRegistration, PLAYER_ADDED_EVENT, PlayerChainNodeResponse, RecordInteractionInput, RegisteredPlayer, RemotePlayWorld, type RemotePlayWorldConnectOptions, type RemotePlayWorldHold, RemotePlayWorldInitAudioOptions, type RemotePlayWorldLogging, type RemotePlayWorldNodeCredentials, type RemotePlayWorldOptions, type RemotePlayWorldSessionEvent, SESSION_CLOSED_EVENT, SESSION_CONNECTED_EVENT, SESSION_INVALID_EVENT, SESSION_SSE_ERROR_EVENT, SESSION_SSE_OPEN_EVENT, type SubscribeIntercomCommandsOptions, WORLD_AGENT_SIGNAL_EVENT, WORLD_GEOGRAPHY_EVENT, WORLD_INTERACTION_EVENT, WORLD_JOURNEY_EVENT, type WorldAgentSignalPayload, type WorldInteractionPayload, WorldInteractionRole, agentPlayDebug, configureAgentPlayDebug, intercomResultRecordFromLangChainInvokeOutput, isAgentPlayDebugEnabled, langchainRegistration, resetAgentPlayDebug };
package/dist/index.js CHANGED
@@ -4,17 +4,25 @@ import {
4
4
  DEFAULT_AGENT_SPAWN_MIN_DISTANCE,
5
5
  DEFAULT_PLAYER_WALLET_BALANCE_USD,
6
6
  MINIMUM_PLAY_WORLD_BOUNDS,
7
+ MINIMUM_STREET_LAYOUT_BOUNDS,
7
8
  OCCUPANCY_POINT_MULTIPLIER,
8
9
  PLAYER_CHAIN_GENESIS_STABLE_KEY,
9
10
  PLAYER_CHAIN_HEADER_STABLE_KEY,
10
11
  PlayerWalletSchema,
11
12
  PurchaseRecordSchema,
13
+ SPACE_STRUCTURE_ANCHOR_MIN_DISTANCE,
12
14
  SPATIAL_ZONE_INDEX_AGENTS,
13
15
  SPATIAL_ZONE_INDEX_SPACES,
14
16
  STREET_NAME_POOL,
15
17
  SaleStateSchema,
16
18
  ShopItemSchema,
17
19
  SupermarketItemSchema,
20
+ TALK_AGENT_PU_BILLED_SECONDS_PER_UNIT,
21
+ TALK_AGENT_PU_MAX_PER_LEG,
22
+ TALK_PRICE_PER_60S_USD,
23
+ TALK_PRICE_PER_SECOND_USD,
24
+ TALK_TICK_SECONDS,
25
+ WALLET_BUNDLE_OFFERS,
18
26
  applyBoundsFieldUpdateToLayout,
19
27
  availableCellsForZone,
20
28
  boundingWorldRectForOccupancyPoints,
@@ -26,12 +34,16 @@ import {
26
34
  cellsForZone,
27
35
  centerOfZone,
28
36
  clampWorldPosition,
37
+ computeTalkAgentPowerUpsEarned,
38
+ costForSeconds,
39
+ createInitialAgentRewardWallet,
29
40
  createInitialPlayerWallet,
30
41
  createVerticalStripSeedLayout,
31
42
  desaturateColor,
32
43
  enumerateIntegerCellsInRect,
33
44
  expandBoundsToMinimumPlayArea,
34
45
  getStreetPoolEntryById,
46
+ getWalletBundleById,
35
47
  isAgentSpawnOccupancyPointAvailable,
36
48
  isAgentSpawnOccupancyPointAvailableInRect,
37
49
  isAgentSpawnOccupancyPointAvailableInZone,
@@ -67,7 +79,7 @@ import {
67
79
  spatialZoneCenter,
68
80
  streetFromPoolEntry,
69
81
  zonesForGroup
70
- } from "./chunk-VWC7EE2F.js";
82
+ } from "./chunk-SLAPRNMF.js";
71
83
 
72
84
  // src/world-events.ts
73
85
  var SESSION_CONNECTED_EVENT = "session:connected";
@@ -79,6 +91,7 @@ var PLAYER_ADDED_EVENT = "world:player_added";
79
91
  var WORLD_INTERACTION_EVENT = "world:interaction";
80
92
  var WORLD_AGENT_SIGNAL_EVENT = "world:agent_signal";
81
93
  var WORLD_JOURNEY_EVENT = "world:journey";
94
+ var WORLD_GEOGRAPHY_EVENT = "world:geography";
82
95
 
83
96
  // src/lib/agent-play-debug.ts
84
97
  var configuredDebug;
@@ -1471,6 +1484,7 @@ export {
1471
1484
  DEFAULT_AGENT_SPAWN_MIN_DISTANCE,
1472
1485
  DEFAULT_PLAYER_WALLET_BALANCE_USD,
1473
1486
  MINIMUM_PLAY_WORLD_BOUNDS,
1487
+ MINIMUM_STREET_LAYOUT_BOUNDS,
1474
1488
  OCCUPANCY_POINT_MULTIPLIER,
1475
1489
  PLAYER_ADDED_EVENT,
1476
1490
  PLAYER_CHAIN_GENESIS_STABLE_KEY,
@@ -1483,13 +1497,21 @@ export {
1483
1497
  SESSION_INVALID_EVENT,
1484
1498
  SESSION_SSE_ERROR_EVENT,
1485
1499
  SESSION_SSE_OPEN_EVENT,
1500
+ SPACE_STRUCTURE_ANCHOR_MIN_DISTANCE,
1486
1501
  SPATIAL_ZONE_INDEX_AGENTS,
1487
1502
  SPATIAL_ZONE_INDEX_SPACES,
1488
1503
  STREET_NAME_POOL,
1489
1504
  SaleStateSchema,
1490
1505
  ShopItemSchema,
1491
1506
  SupermarketItemSchema,
1507
+ TALK_AGENT_PU_BILLED_SECONDS_PER_UNIT,
1508
+ TALK_AGENT_PU_MAX_PER_LEG,
1509
+ TALK_PRICE_PER_60S_USD,
1510
+ TALK_PRICE_PER_SECOND_USD,
1511
+ TALK_TICK_SECONDS,
1512
+ WALLET_BUNDLE_OFFERS,
1492
1513
  WORLD_AGENT_SIGNAL_EVENT,
1514
+ WORLD_GEOGRAPHY_EVENT,
1493
1515
  WORLD_INTERACTION_EVENT,
1494
1516
  WORLD_JOURNEY_EVENT,
1495
1517
  agentPlayDebug,
@@ -1504,7 +1526,10 @@ export {
1504
1526
  cellsForZone,
1505
1527
  centerOfZone,
1506
1528
  clampWorldPosition,
1529
+ computeTalkAgentPowerUpsEarned,
1507
1530
  configureAgentPlayDebug,
1531
+ costForSeconds,
1532
+ createInitialAgentRewardWallet,
1508
1533
  createInitialPlayerWallet,
1509
1534
  createNodeCredentialMaterial,
1510
1535
  createVerticalStripSeedLayout,
@@ -1512,6 +1537,7 @@ export {
1512
1537
  enumerateIntegerCellsInRect,
1513
1538
  expandBoundsToMinimumPlayArea,
1514
1539
  getStreetPoolEntryById,
1540
+ getWalletBundleById,
1515
1541
  intercomResultRecordFromLangChainInvokeOutput,
1516
1542
  isAgentPlayDebugEnabled,
1517
1543
  isAgentSpawnOccupancyPointAvailable,