@agent-play/sdk 3.3.3 → 3.3.5

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';
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-BCDEUIYP.js";
71
83
 
72
84
  // src/world-events.ts
73
85
  var SESSION_CONNECTED_EVENT = "session:connected";
@@ -1471,6 +1483,7 @@ export {
1471
1483
  DEFAULT_AGENT_SPAWN_MIN_DISTANCE,
1472
1484
  DEFAULT_PLAYER_WALLET_BALANCE_USD,
1473
1485
  MINIMUM_PLAY_WORLD_BOUNDS,
1486
+ MINIMUM_STREET_LAYOUT_BOUNDS,
1474
1487
  OCCUPANCY_POINT_MULTIPLIER,
1475
1488
  PLAYER_ADDED_EVENT,
1476
1489
  PLAYER_CHAIN_GENESIS_STABLE_KEY,
@@ -1483,12 +1496,19 @@ export {
1483
1496
  SESSION_INVALID_EVENT,
1484
1497
  SESSION_SSE_ERROR_EVENT,
1485
1498
  SESSION_SSE_OPEN_EVENT,
1499
+ SPACE_STRUCTURE_ANCHOR_MIN_DISTANCE,
1486
1500
  SPATIAL_ZONE_INDEX_AGENTS,
1487
1501
  SPATIAL_ZONE_INDEX_SPACES,
1488
1502
  STREET_NAME_POOL,
1489
1503
  SaleStateSchema,
1490
1504
  ShopItemSchema,
1491
1505
  SupermarketItemSchema,
1506
+ TALK_AGENT_PU_BILLED_SECONDS_PER_UNIT,
1507
+ TALK_AGENT_PU_MAX_PER_LEG,
1508
+ TALK_PRICE_PER_60S_USD,
1509
+ TALK_PRICE_PER_SECOND_USD,
1510
+ TALK_TICK_SECONDS,
1511
+ WALLET_BUNDLE_OFFERS,
1492
1512
  WORLD_AGENT_SIGNAL_EVENT,
1493
1513
  WORLD_INTERACTION_EVENT,
1494
1514
  WORLD_JOURNEY_EVENT,
@@ -1504,7 +1524,10 @@ export {
1504
1524
  cellsForZone,
1505
1525
  centerOfZone,
1506
1526
  clampWorldPosition,
1527
+ computeTalkAgentPowerUpsEarned,
1507
1528
  configureAgentPlayDebug,
1529
+ costForSeconds,
1530
+ createInitialAgentRewardWallet,
1508
1531
  createInitialPlayerWallet,
1509
1532
  createNodeCredentialMaterial,
1510
1533
  createVerticalStripSeedLayout,
@@ -1512,6 +1535,7 @@ export {
1512
1535
  enumerateIntegerCellsInRect,
1513
1536
  expandBoundsToMinimumPlayArea,
1514
1537
  getStreetPoolEntryById,
1538
+ getWalletBundleById,
1515
1539
  intercomResultRecordFromLangChainInvokeOutput,
1516
1540
  isAgentPlayDebugEnabled,
1517
1541
  isAgentSpawnOccupancyPointAvailable,