@agent-play/sdk 3.3.9 → 3.4.0

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-Djc4apJO.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-Djc4apJO.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-DhKo5Hv7.js';
2
+ export { e as ANALYTICS_EVENT_NAMES, f as APU_TOKEN, g as AgentPlayWorldLayout, h as AgentPlayWorldLayoutZone, i as AgentPlayWorldMap, j as AgentPlayWorldMapAgentOccupant, k as AgentPlayWorldMapBounds, l as AgentPlayWorldMapMcpOccupant, m as AnalyticsContext, n as AnalyticsContextSchema, o as AnalyticsEvent, p as AnalyticsEventName, q as AnalyticsEventSchema, r as AnalyticsMigrationState, s as AnalyticsMigrationStateSchema, t as AnalyticsPropertyValue, u as AnalyticsPropertyValueSchema, v as AnalyticsTraits, w as AnalyticsTraitsSchema, x as ApplyGameOutcomeInput, y as ApplyGameOutcomeInputSchema, z as AssistToolFieldType, B as AssistToolParameterSpec, C as AssistToolSpec, D as CONTINUOUS_RENDER_OFFSET, E as CarWashCar, F as CarWashCarSchema, G as ComputeTalkAgentPowerUpsEarnedInput, H as DAILY_GAME_PU_CAP, I as DEFAULT_AGENT_SPAWN_MIN_DISTANCE, K as DEFAULT_PLAYER_WALLET_BALANCE_USD, M as DestinationJourneyStep, N as GAME_CABINET_CATALOG, O as GameCabinetEntry, Q as GameEvent, S as GameEventSchema, T as GameId, U as GamePerTitleStats, V as GamePerTitleStatsSchema, X as GameStats, Y as GameStatsSchema, Z as JourneyStep, _ as MINIMUM_PLAY_WORLD_BOUNDS, $ as MINIMUM_STREET_LAYOUT_BOUNDS, a0 as OCCUPANCY_POINT_MULTIPLIER, a1 as OccupancyGridPoint, a2 as OccupantGroup, a3 as OriginJourneyStep, a4 as P2aEnableFlag, a5 as PLAYABLE_GAME_IDS, a6 as PLAYER_CHAIN_GENESIS_STABLE_KEY, a7 as PLAYER_CHAIN_HEADER_STABLE_KEY, a8 as PlatformAgentInformation, a9 as PlayAgentInformation, aa as PlayerChainFanoutNotify, ab as PlayerChainGenesisNode, ac as PlayerChainHeaderNode, ad as PlayerChainNotifyNodeRef, ae as PlayerChainOccupantPresentNode, af as PlayerChainOccupantRemovedNode, ag as PlayerWallet, ah as PlayerWalletSchema, ai as PositionedStep, aj as PurchaseRecord, ak as PurchaseRecordSchema, al as RealtimeWebrtcClientSecret, am as RegisteredAgentSummary, an as RemotePlayWorldOpenAiAudioOptions, ao as SPACE_STRUCTURE_ANCHOR_MIN_DISTANCE, ap as SPATIAL_ZONE_INDEX_AGENTS, aq as SPATIAL_ZONE_INDEX_SPACES, ar as STREAK_BONUS_PU, as as STREAK_BONUS_THRESHOLD_DAYS, at as STREET_NAME_POOL, au as SaleState, av as SaleStateSchema, aw as ScannerBlockRecord, ax as ScannerBlockRecordSchema, ay as ScannerHead, az as ScannerHeadSchema, aA as ScannerMigrationState, aB as ScannerMigrationStateSchema, aC as ScannerMigrationStatus, aD as ScannerMigrationStatusSchema, aE as ScannerNodeProfile, aF as ScannerNodeProfileSchema, aG as ScannerTxOp, aH as ScannerTxOpSchema, aI as ScannerTxRecord, aJ as ScannerTxRecordSchema, aK as ScannerWalletSnapshot, aL as ScannerWalletSnapshotSchema, aM as ShopItem, aN as ShopItemSchema, aO as SpaceContentItem, aP as Street, aQ as StreetPoolEntry, aR as StructureJourneyStep, aS as SupermarketItem, aT as SupermarketItemSchema, aU as TALK_AGENT_PU_BILLED_SECONDS_PER_UNIT, aV as TALK_AGENT_PU_MAX_PER_LEG, aW as TALK_PRICE_PER_60S_USD, aX as TALK_PRICE_PER_SECOND_USD, aY as TALK_TICK_SECONDS, aZ as WALLET_BUNDLE_OFFERS, a_ as WalletBundleId, a$ as WalletBundleOffer, b0 as WorldBounds, b1 as WorldJourneyUpdate, b2 as WorldLayout, b3 as WorldLayoutBoundsField, b4 as YieldEventInfo, b5 as Zone, b6 as ZoneEventInfo, b7 as applyBoundsFieldUpdateToLayout, b8 as availableCellsForZone, b9 as boundingWorldRectForOccupancyPoints, ba as boundsContain, bb as buildAmenityPurchaseApuFields, bc as buildApuWalletTransaction, bd as buildRankedOccupancyPoints, be as buildRankedOccupancyPointsForSpatialZone, bf as buildRankedOccupancyPointsForZone, bg as buildRankedOccupancyPointsInRect, bh as buildWalletBundleApuFields, bi as cellsForZone, bj as centerOfZone, bk as clampWorldPosition, bl as computeEventPuDelta, bm as computeRoundPuDelta, bn as computeTalkAgentPowerUpsEarned, bo as costForSeconds, bp as createEmptyGameStats, bq as createInitialAgentRewardWallet, br as createInitialPlayerWallet, bs as createVerticalStripSeedLayout, bt as desaturateColor, bu as enumerateIntegerCellsInRect, bv as expandBoundsToMinimumPlayArea, bw as featuredGameIdForUtcDate, bx as getGameCabinetByGameId, by as getGameCabinetById, bz as getStreetPoolEntryById, bA as getWalletBundleById, bB as isAgentSpawnOccupancyPointAvailable, bC as isAgentSpawnOccupancyPointAvailableInRect, bD as isAgentSpawnOccupancyPointAvailableInZone, bE as isGameId, bF as isItemAvailableForPurchase, bG as isSpaceAnchorOccupancyPointAvailable, bH as isSpaceAnchorOccupancyPointAvailableInRect, bI as isSpaceAnchorOccupancyPointAvailableInZone, bJ as listAllowedOccupancyPoints, bK as listOccupancyPointsForSpatialZone, bL as listOccupancyPointsForZone, bM as listOccupancyPointsInRect, bN as mergeSnapshotWithPlayerChainNode, bO as migrateWorldLayoutBounds, bP as nextStreetFromPool, bQ as occupancyKeyForPosition, bR as occupancyPointsGroupedBySpatialZone, bS as occupancyPointsGroupedByZones, bT as parsePlayerChainFanoutNotify, bU as parsePlayerChainFanoutNotifyFromSsePayload, bV as parsePlayerChainNodeRpcBody, bW as pickZoneForGroup, bX as pointCellInRect, bY as pointCellInSpatialZone, bZ as pointCellInZone, b_ as primaryZoneForGroup, b$ as sortNodeRefsForSerializedFetch, c0 as spatialZoneBounds, c1 as spatialZoneCenter, c2 as streetFromPoolEntry, c3 as utcDateKey, c4 as zonesForGroup } from './browser-DhKo5Hv7.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
@@ -1,11 +1,25 @@
1
1
  import {
2
+ ANALYTICS_EVENT_NAMES,
3
+ APU_TOKEN,
4
+ AnalyticsContextSchema,
5
+ AnalyticsEventSchema,
6
+ AnalyticsMigrationStateSchema,
7
+ AnalyticsPropertyValueSchema,
8
+ AnalyticsTraitsSchema,
9
+ ApplyGameOutcomeInputSchema,
2
10
  CONTINUOUS_RENDER_OFFSET,
3
11
  CarWashCarSchema,
12
+ DAILY_GAME_PU_CAP,
4
13
  DEFAULT_AGENT_SPAWN_MIN_DISTANCE,
5
14
  DEFAULT_PLAYER_WALLET_BALANCE_USD,
15
+ GAME_CABINET_CATALOG,
16
+ GameEventSchema,
17
+ GamePerTitleStatsSchema,
18
+ GameStatsSchema,
6
19
  MINIMUM_PLAY_WORLD_BOUNDS,
7
20
  MINIMUM_STREET_LAYOUT_BOUNDS,
8
21
  OCCUPANCY_POINT_MULTIPLIER,
22
+ PLAYABLE_GAME_IDS,
9
23
  PLAYER_CHAIN_GENESIS_STABLE_KEY,
10
24
  PLAYER_CHAIN_HEADER_STABLE_KEY,
11
25
  PlayerWalletSchema,
@@ -13,8 +27,18 @@ import {
13
27
  SPACE_STRUCTURE_ANCHOR_MIN_DISTANCE,
14
28
  SPATIAL_ZONE_INDEX_AGENTS,
15
29
  SPATIAL_ZONE_INDEX_SPACES,
30
+ STREAK_BONUS_PU,
31
+ STREAK_BONUS_THRESHOLD_DAYS,
16
32
  STREET_NAME_POOL,
17
33
  SaleStateSchema,
34
+ ScannerBlockRecordSchema,
35
+ ScannerHeadSchema,
36
+ ScannerMigrationStateSchema,
37
+ ScannerMigrationStatusSchema,
38
+ ScannerNodeProfileSchema,
39
+ ScannerTxOpSchema,
40
+ ScannerTxRecordSchema,
41
+ ScannerWalletSnapshotSchema,
18
42
  ShopItemSchema,
19
43
  SupermarketItemSchema,
20
44
  TALK_AGENT_PU_BILLED_SECONDS_PER_UNIT,
@@ -27,26 +51,36 @@ import {
27
51
  availableCellsForZone,
28
52
  boundingWorldRectForOccupancyPoints,
29
53
  boundsContain,
54
+ buildAmenityPurchaseApuFields,
55
+ buildApuWalletTransaction,
30
56
  buildRankedOccupancyPoints,
31
57
  buildRankedOccupancyPointsForSpatialZone,
32
58
  buildRankedOccupancyPointsForZone,
33
59
  buildRankedOccupancyPointsInRect,
60
+ buildWalletBundleApuFields,
34
61
  cellsForZone,
35
62
  centerOfZone,
36
63
  clampWorldPosition,
64
+ computeEventPuDelta,
65
+ computeRoundPuDelta,
37
66
  computeTalkAgentPowerUpsEarned,
38
67
  costForSeconds,
68
+ createEmptyGameStats,
39
69
  createInitialAgentRewardWallet,
40
70
  createInitialPlayerWallet,
41
71
  createVerticalStripSeedLayout,
42
72
  desaturateColor,
43
73
  enumerateIntegerCellsInRect,
44
74
  expandBoundsToMinimumPlayArea,
75
+ featuredGameIdForUtcDate,
76
+ getGameCabinetByGameId,
77
+ getGameCabinetById,
45
78
  getStreetPoolEntryById,
46
79
  getWalletBundleById,
47
80
  isAgentSpawnOccupancyPointAvailable,
48
81
  isAgentSpawnOccupancyPointAvailableInRect,
49
82
  isAgentSpawnOccupancyPointAvailableInZone,
83
+ isGameId,
50
84
  isItemAvailableForPurchase,
51
85
  isSpaceAnchorOccupancyPointAvailable,
52
86
  isSpaceAnchorOccupancyPointAvailableInRect,
@@ -78,8 +112,9 @@ import {
78
112
  spatialZoneBounds,
79
113
  spatialZoneCenter,
80
114
  streetFromPoolEntry,
115
+ utcDateKey,
81
116
  zonesForGroup
82
- } from "./chunk-SLAPRNMF.js";
117
+ } from "./chunk-Z2PYRHFU.js";
83
118
 
84
119
  // src/world-events.ts
85
120
  var SESSION_CONNECTED_EVENT = "session:connected";
@@ -1543,13 +1578,27 @@ import {
1543
1578
  verifyStoredNodeCredential
1544
1579
  } from "@agent-play/node-tools";
1545
1580
  export {
1581
+ ANALYTICS_EVENT_NAMES,
1582
+ APU_TOKEN,
1583
+ AnalyticsContextSchema,
1584
+ AnalyticsEventSchema,
1585
+ AnalyticsMigrationStateSchema,
1586
+ AnalyticsPropertyValueSchema,
1587
+ AnalyticsTraitsSchema,
1588
+ ApplyGameOutcomeInputSchema,
1546
1589
  CONTINUOUS_RENDER_OFFSET,
1547
1590
  CarWashCarSchema,
1591
+ DAILY_GAME_PU_CAP,
1548
1592
  DEFAULT_AGENT_SPAWN_MIN_DISTANCE,
1549
1593
  DEFAULT_PLAYER_WALLET_BALANCE_USD,
1594
+ GAME_CABINET_CATALOG,
1595
+ GameEventSchema,
1596
+ GamePerTitleStatsSchema,
1597
+ GameStatsSchema,
1550
1598
  MINIMUM_PLAY_WORLD_BOUNDS,
1551
1599
  MINIMUM_STREET_LAYOUT_BOUNDS,
1552
1600
  OCCUPANCY_POINT_MULTIPLIER,
1601
+ PLAYABLE_GAME_IDS,
1553
1602
  PLAYER_ADDED_EVENT,
1554
1603
  PLAYER_CHAIN_GENESIS_STABLE_KEY,
1555
1604
  PLAYER_CHAIN_HEADER_STABLE_KEY,
@@ -1564,8 +1613,18 @@ export {
1564
1613
  SPACE_STRUCTURE_ANCHOR_MIN_DISTANCE,
1565
1614
  SPATIAL_ZONE_INDEX_AGENTS,
1566
1615
  SPATIAL_ZONE_INDEX_SPACES,
1616
+ STREAK_BONUS_PU,
1617
+ STREAK_BONUS_THRESHOLD_DAYS,
1567
1618
  STREET_NAME_POOL,
1568
1619
  SaleStateSchema,
1620
+ ScannerBlockRecordSchema,
1621
+ ScannerHeadSchema,
1622
+ ScannerMigrationStateSchema,
1623
+ ScannerMigrationStatusSchema,
1624
+ ScannerNodeProfileSchema,
1625
+ ScannerTxOpSchema,
1626
+ ScannerTxRecordSchema,
1627
+ ScannerWalletSnapshotSchema,
1569
1628
  ShopItemSchema,
1570
1629
  SupermarketItemSchema,
1571
1630
  TALK_AGENT_PU_BILLED_SECONDS_PER_UNIT,
@@ -1583,16 +1642,22 @@ export {
1583
1642
  availableCellsForZone,
1584
1643
  boundingWorldRectForOccupancyPoints,
1585
1644
  boundsContain,
1645
+ buildAmenityPurchaseApuFields,
1646
+ buildApuWalletTransaction,
1586
1647
  buildRankedOccupancyPoints,
1587
1648
  buildRankedOccupancyPointsForSpatialZone,
1588
1649
  buildRankedOccupancyPointsForZone,
1589
1650
  buildRankedOccupancyPointsInRect,
1651
+ buildWalletBundleApuFields,
1590
1652
  cellsForZone,
1591
1653
  centerOfZone,
1592
1654
  clampWorldPosition,
1655
+ computeEventPuDelta,
1656
+ computeRoundPuDelta,
1593
1657
  computeTalkAgentPowerUpsEarned,
1594
1658
  configureAgentPlayDebug,
1595
1659
  costForSeconds,
1660
+ createEmptyGameStats,
1596
1661
  createInitialAgentRewardWallet,
1597
1662
  createInitialPlayerWallet,
1598
1663
  createNodeCredentialMaterial,
@@ -1600,6 +1665,9 @@ export {
1600
1665
  desaturateColor,
1601
1666
  enumerateIntegerCellsInRect,
1602
1667
  expandBoundsToMinimumPlayArea,
1668
+ featuredGameIdForUtcDate,
1669
+ getGameCabinetByGameId,
1670
+ getGameCabinetById,
1603
1671
  getStreetPoolEntryById,
1604
1672
  getWalletBundleById,
1605
1673
  intercomResultRecordFromLangChainInvokeOutput,
@@ -1607,6 +1675,7 @@ export {
1607
1675
  isAgentSpawnOccupancyPointAvailable,
1608
1676
  isAgentSpawnOccupancyPointAvailableInRect,
1609
1677
  isAgentSpawnOccupancyPointAvailableInZone,
1678
+ isGameId,
1610
1679
  isItemAvailableForPurchase,
1611
1680
  isSpaceAnchorOccupancyPointAvailable,
1612
1681
  isSpaceAnchorOccupancyPointAvailableInRect,
@@ -1643,6 +1712,7 @@ export {
1643
1712
  spatialZoneBounds,
1644
1713
  spatialZoneCenter,
1645
1714
  streetFromPoolEntry,
1715
+ utcDateKey,
1646
1716
  verifyStoredNodeCredential,
1647
1717
  zonesForGroup
1648
1718
  };