载入中...
搜索中...
未找到
GameWorldContext.hpp 文件参考

Runtime game-world Discover snapshot for MCP / Play Host. 更多...

#include "common/Export.h"
#include "common/Result.h"
#include "common/Value.h"
#include <cstdint>
#include <string>
#include <string_view>
#include <vector>

浏览源代码.

类

struct  eve::dev::GameWorldSnapshotInput
 Inputs used to assemble one Discover snapshot. @ownership Callers own the pointed-to Values; they are not retained. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::dev
 

类型定义

typedef struct SQVM * HSQUIRRELVM
 

函数

Result< Value > eve::dev::parseWorldObject (const Value &world)
 Validate one runtime-published world object.
 
Result< void > eve::dev::publishWorldContext (Value world)
 Replace the runtime world brief published by the live game script.
 
void eve::dev::clearWorldContext ()
 Drop the runtime world brief (soft restart with script reload).
 
bool eve::dev::hasWorldContext () noexcept
 Whether a runtime brief is currently published.
 
const Value * eve::dev::runtimeWorldContext () noexcept
 Current runtime brief, or null when none is published. @ownership Borrowed; valid until the next publish/clear on this thread.
 
Result< Value > eve::dev::buildGameWorldSnapshot (const GameWorldSnapshotInput &input)
 Assemble runtime world brief plus live system lists.
 
std::string eve::dev::readConfigTitle (HSQUIRRELVM vm)
 Read config.title from the attached VM root.
 
std::vector< std::string > eve::dev::readConfiguredModules (HSQUIRRELVM vm)
 Read config.modules / optionalModules from the attached VM root.
 
std::vector< std::string > eve::dev::readLiveModules (HSQUIRRELVM vm)
 List instantiated module slots declared in eve.moduleList.
 
Result< Value > eve::dev::liveGameWorldSnapshot ()
 Build the Discover snapshot against the live engine.
 

变量

constexpr std::string_view eve::dev::kGameWorldSchemaId = "evengine.game-world"
 Schema id for the game-world snapshot returned to agents.
 
constexpr std::int64_t eve::dev::kGameWorldSchemaVersion = 1
 Schema version for the game-world snapshot.
 

详细描述

Runtime game-world Discover snapshot for MCP / Play Host.

After scripts initialize dynamically configured systems, agents need a first-class MCP path to learn what is actually live — not a second copy of on-disk prose. This module owns:

  • config.title and config.modules / optionalModules from the live VM
  • live module slots / gameplay domains
  • an optional script brief (eve.dev.publishWorldContext) for summary / genre / tags / dimensions / perspective (and any title override)
  • the snapshot for eve_play status, eve_game_world, and eve://game-world

Authored files such as game.agent.json are not a world authority here; agents that want static prose can read those files directly.

在文件 GameWorldContext.hpp 中定义.

类型定义说明

◆ HSQUIRRELVM

typedef struct SQVM* HSQUIRRELVM

在文件 GameWorldContext.hpp 第 31 行定义.