载入中...
搜索中...
未找到
McpRuntimeTools.cpp
浏览该文件的文档.
4
11
12#include "common/Capability.h"
13#include "common/CrashLog.h"
15
16#include <Poco/Dynamic/Var.h>
17#include <Poco/JSON/Array.h>
18#include <Poco/JSON/Object.h>
19
20#include <algorithm>
21#include <cstdint>
22#include <filesystem>
23#include <fstream>
24#include <sstream>
25#include <string>
26#include <vector>
27
28namespace eve::dev {
29namespace {
30
31constexpr int kDefaultConsoleRead = 200;
32constexpr int kMaxConsoleRead = 1000;
33
34constexpr int kDefaultScreenshotBytes = 2 * 1024 * 1024;
35constexpr int kMinScreenshotBytes = 1024;
36constexpr int kMaxScreenshotBytes = 32 * 1024 * 1024;
37
39const std::vector<std::string>& consoleLevels() {
40 static const std::vector<std::string> levels{"debug", "info", "warn", "error", "print", "cmd", "result", "engine"};
41 return levels;
42}
43
45const std::vector<std::string>& markerLevels() {
46 static const std::vector<std::string> levels{"debug", "info", "warn", "error"};
47 return levels;
48}
49
50bool isListed(const std::vector<std::string>& allowed, const std::string& value) {
51 return std::find(allowed.begin(), allowed.end(), value) != allowed.end();
52}
53
54std::string joined(const std::vector<std::string>& values) {
55 std::string out;
56 for (const auto& value : values) {
57 if (!out.empty()) out += '|';
58 out += value;
59 }
60 return out;
61}
62
64std::int64_t getArgSeq(Poco::JSON::Object::Ptr args, const char* key) {
65 const long long value = getArgInt64(args, key, 0);
66 return value > 0 ? static_cast<std::int64_t>(value) : 0;
67}
68
69std::string textPayload(Poco::JSON::Object::Ptr object, bool isError = false) {
70 return textContentResult(mcpStringify(Poco::Dynamic::Var(object)), isError);
71}
72
73std::string errorPayload(const std::string& message) {
74 Poco::JSON::Object::Ptr out = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
75 out->set("ok", false);
76 out->set("error", message);
77 return textPayload(out, true);
78}
79
80std::string consoleRead(Poco::JSON::Object::Ptr args) {
81 const std::string level = getArgString(args, "level");
82 if (!level.empty() && !isListed(consoleLevels(), level)) {
83 return errorPayload("unknown level '" + level + "'; expected one of " + joined(consoleLevels()));
84 }
85 const int limit = std::clamp(getArgInt(args, "limit", kDefaultConsoleRead), 1, kMaxConsoleRead);
86 const std::uint64_t afterSeq = static_cast<std::uint64_t>(getArgSeq(args, "sinceSeq"));
87
88 const ConsoleSlice slice = ConsolePanel::instance().read(afterSeq, static_cast<std::size_t>(limit), level);
89
90 Poco::JSON::Object::Ptr out = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
91 out->set("ok", true);
92 out->set("attached", ConsolePanel::instance().isAttached());
93 out->set("stderrCaptured", ConsolePanel::instance().isCapturingStderr());
94 out->set("firstSeq", static_cast<Poco::Int64>(slice.firstSeq));
95 // `cursor` is the resumable value for the next sinceSeq; `nextSeq` is only
96 // the seq the next appended line will get, which is not a valid cursor.
97 out->set("cursor", static_cast<Poco::Int64>(slice.cursor));
98 out->set("nextSeq", static_cast<Poco::Int64>(slice.nextSeq));
99 out->set("droppedThrough", static_cast<Poco::Int64>(slice.droppedThrough));
100 out->set("truncated", slice.truncated);
101 out->set("count", static_cast<int>(slice.lines.size()));
102 Poco::JSON::Array::Ptr lines = Poco::JSON::Array::Ptr(new Poco::JSON::Array());
103 for (const auto& line : slice.lines) {
104 Poco::JSON::Object::Ptr item = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
105 item->set("seq", static_cast<Poco::Int64>(line.seq));
106 item->set("time", line.timestamp);
107 item->set("level", line.level);
108 item->set("text", line.text);
109 lines->add(item);
110 }
111 out->set("lines", lines);
112 return textPayload(out);
113}
114
115std::string consoleWrite(Poco::JSON::Object::Ptr args) {
116 const std::string text = getArgString(args, "text");
117 if (text.empty()) return errorPayload("missing text");
118 const std::string level = getArgString(args, "level", "info");
119 if (!isListed(markerLevels(), level)) {
120 return errorPayload("unknown level '" + level + "'; expected one of " + joined(markerLevels()));
121 }
122
123 ConsolePanel& console = ConsolePanel::instance();
124 console.addLog(level, text);
125
126 Poco::JSON::Object::Ptr out = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
127 out->set("ok", true);
128 out->set("seq", static_cast<Poco::Int64>(console.nextSeq() - 1));
129 out->set("nextSeq", static_cast<Poco::Int64>(console.nextSeq()));
130 return textPayload(out);
131}
132
133std::string consoleClear() {
134 ConsolePanel& console = ConsolePanel::instance();
135 console.clear();
136
137 Poco::JSON::Object::Ptr out = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
138 out->set("ok", true);
139 out->set("nextSeq", static_cast<Poco::Int64>(console.nextSeq()));
140 out->set("droppedThrough", static_cast<Poco::Int64>(console.droppedThrough()));
141 return textPayload(out);
142}
143
144// ---------------------------------------------------------------------------
145// Crash / previous-session evidence
146//
147// The server dies with the process it serves, so "why did the last run die" is
148// only answerable from the persistent log written by common/CrashLog.h.
149// ---------------------------------------------------------------------------
150
151// One window is enough to answer the question; a runaway log is never loaded
152// whole.
153constexpr std::size_t kCrashLogWindowBytes = 512 * 1024;
154
155struct CrashLogScan {
156 bool exists = false;
157 std::uint64_t bytes = 0;
158 std::uint64_t scannedBytes = 0;
159 int sessions = 0;
160 int crashes = 0;
161 std::string lastCrashAt;
162 bool hasPreviousSession = false;
165 std::vector<std::string> tail;
166};
167
169struct SessionSegment {
170 bool ended = false;
171 bool crashed = false;
172};
173
174bool contains(const std::string& haystack, const char* needle) { return haystack.find(needle) != std::string::npos; }
175
177std::string readLogWindow(const std::string& path, std::uint64_t* totalBytes) {
178 std::ifstream in(path, std::ios::binary);
179 if (!in) return {};
180 in.seekg(0, std::ios::end);
181 const std::streamoff size = in.tellg();
182 if (size < 0) return {};
183 *totalBytes = static_cast<std::uint64_t>(size);
184
185 const std::streamoff window = static_cast<std::streamoff>(kCrashLogWindowBytes);
186 const std::streamoff start = size > window ? size - window : 0;
187 in.seekg(start);
188 std::ostringstream buffer;
189 buffer << in.rdbuf();
190 std::string text = buffer.str();
191 if (start > 0) {
192 const auto newline = text.find('\n');
193 text.erase(0, newline == std::string::npos ? text.size() : newline + 1);
194 }
195 return text;
196}
197
198CrashLogScan scanCrashLog(int tailLines) {
199 CrashLogScan scan;
200 const std::string path = eve::crashLogPath();
201 std::error_code ec;
202 if (path.empty() || !std::filesystem::exists(path, ec)) return scan;
203 scan.exists = true;
204
205 const std::string window = readLogWindow(path, &scan.bytes);
206 scan.scannedBytes = window.size();
207
208 std::istringstream stream(window);
209 std::string line;
210 std::vector<std::string> all;
211 std::vector<SessionSegment> segments;
212 while (std::getline(stream, line)) {
213 if (!line.empty() && line.back() == '\r') line.pop_back();
214 all.push_back(line);
215 if (contains(line, eve::kSessionStartMarker)) {
216 ++scan.sessions;
217 segments.emplace_back();
218 continue;
219 }
220 if (segments.empty()) continue; // pre-session noise in a truncated window
221 if (contains(line, eve::kSessionEndMarker)) {
222 segments.back().ended = true;
223 continue;
224 }
225 if (contains(line, "] crash | ")) {
226 ++scan.crashes;
227 segments.back().crashed = true;
228 const auto open = line.find('[');
229 const auto close = line.find(']');
230 if (open != std::string::npos && close != std::string::npos && close > open + 1)
231 scan.lastCrashAt = line.substr(open + 1, close - open - 1);
232 }
233 }
234
235 // The newest start marker belongs to the session that is reading this log, so
236 // the interesting verdict is about the one before it: "did the run that came
237 // before me finish, or die?".
238 if (segments.size() >= 2) {
239 const SessionSegment& previous = segments[segments.size() - 2];
240 scan.hasPreviousSession = true;
241 scan.previousSessionEnded = previous.ended;
242 scan.previousSessionCrashed = previous.crashed;
243 }
244
245 const std::size_t keep = tailLines > 0 ? static_cast<std::size_t>(tailLines) : 0;
246 const std::size_t from = all.size() > keep ? all.size() - keep : 0;
247 scan.tail.assign(all.begin() + static_cast<std::ptrdiff_t>(from), all.end());
248 return scan;
249}
250
251Poco::JSON::Object::Ptr crashLogScanObject(const CrashLogScan& scan) {
252 Poco::JSON::Object::Ptr out = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
253 out->set("path", eve::crashLogPath());
254 out->set("exists", scan.exists);
255 out->set("bytes", static_cast<Poco::Int64>(scan.bytes));
256 out->set("scannedBytes", static_cast<Poco::Int64>(scan.scannedBytes));
257 out->set("sessions", scan.sessions);
258 out->set("crashes", scan.crashes);
259 if (!scan.lastCrashAt.empty()) out->set("lastCrashAt", scan.lastCrashAt);
260 if (scan.hasPreviousSession) {
261 out->set("previousSessionEnded", scan.previousSessionEnded);
262 out->set("previousSessionCrashed", scan.previousSessionCrashed);
263 }
264 return out;
265}
266
267std::string crashReport(Poco::JSON::Object::Ptr args) {
268 const int lines = std::clamp(getArgInt(args, "lines", 200), 1, 2000);
269 CrashLogScan scan = scanCrashLog(lines);
270
271 Poco::JSON::Object::Ptr out = crashLogScanObject(scan);
272 out->set("ok", true);
273 Poco::JSON::Array::Ptr tail = Poco::JSON::Array::Ptr(new Poco::JSON::Array());
274 for (const auto& line : scan.tail) tail->add(line);
275 out->set("tail", tail);
276 if (!scan.exists)
277 out->set("message",
278 "no crash/error log yet; common/CrashLog.h opens it at process start (EVE_LOG_DIR overrides the "
279 "directory)");
280 return textPayload(out);
281}
282
283std::string screenshotImage(Poco::JSON::Object::Ptr args) {
284 auto* capture = eve::cap::query<eve::IRenderCapture>();
285 if (!capture) return errorPayload("graphics module not available");
286
287 const int budget =
288 std::clamp(getArgInt(args, "maxBytes", kDefaultScreenshotBytes), kMinScreenshotBytes, kMaxScreenshotBytes);
289
290 static const std::string kDataUrlPrefix = "data:image/png;base64,";
291 const std::string dataUrl = capture->capturePngDataUrl();
292 if (dataUrl.size() <= kDataUrlPrefix.size() || dataUrl.compare(0, kDataUrlPrefix.size(), kDataUrlPrefix) != 0) {
293 // Enabling readback and reading it back cannot happen inside one
294 // presented frame: the swapchain copy is recorded by the next present.
295 // This is a retryable state, not a failed call, so isError stays false.
296 Poco::JSON::Object::Ptr out =
297 mcpFailureObject("no-presented-frame",
298 "Wait for one rendered frame and call eve_screenshot_image again "
299 "(eve_render_status.readbackEnabled flips to true after enable)",
300 true, {"eve_render_status", "eve_screenshot_image"});
301 out->set("reason", "no-presented-frame");
302 out->set("readbackEnabled", capture->status().readbackEnabled);
303 out->set("message",
304 "readback was just enabled or no frame has been presented yet; wait for one rendered "
305 "frame and call again (eve_render_status.readbackEnabled flips to true)");
306 return textPayload(out);
307 }
308
309 const std::string payload = dataUrl.substr(kDataUrlPrefix.size());
310 if (static_cast<int>(payload.size()) > budget) {
311 Poco::JSON::Object::Ptr out = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
312 out->set("ok", false);
313 out->set("retryable", false);
314 out->set("reason", "image-too-large");
315 out->set("base64Bytes", static_cast<Poco::Int64>(payload.size()));
316 out->set("maxBytes", budget);
317 out->set("message", "raise maxBytes or use eve_screenshot with a path");
318 return textPayload(out);
319 }
320
321 const eve::RenderStatusInfo status = capture->status();
322 Poco::JSON::Object::Ptr caption = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
323 caption->set("ok", true);
324 caption->set("mimeType", "image/png");
325 caption->set("width", status.width);
326 caption->set("height", status.height);
327 caption->set("base64Bytes", static_cast<Poco::Int64>(payload.size()));
328 caption->set("backend", status.backend);
329 return imageContentResult(payload, "image/png", mcpStringify(Poco::Dynamic::Var(caption)));
330}
331
332std::string softRestart(Poco::JSON::Object::Ptr args) {
334 if (!vm) return errorPayload("no VM attached; start the game with eve run --mcp-port ...");
335
336 SoftRestartRequest request;
337 request.reloadScripts = getArgBool(args, "reloadScripts", true);
338 if (args && args->has("args")) {
339 try {
340 request.args = args->getObject("args");
341 } catch (...) {
342 return errorPayload("args must be a JSON object");
343 }
344 }
345
346 auto result = executeSoftRestart(vm, std::move(request));
347 if (!result) {
348 const auto& status = result.status();
349 const auto* diag = status.primaryDiagnostic();
350 return errorPayload(diag && !diag->message().empty() ? diag->message()
352 }
353
354 const SoftRestartReport& report = result.value();
355 Poco::JSON::Object::Ptr out = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
356 out->set("ok", true);
357 out->set("keptResources", true);
358 out->set("resourceCountBefore", static_cast<Poco::Int64>(report.resourceCountBefore));
359 out->set("resourceCountAfter", static_cast<Poco::Int64>(report.resourceCountAfter));
360 out->set("scriptsReloaded", report.scriptsReloaded);
361 out->set("initCalled", report.initCalled);
362 out->set("args", report.args ? Poco::Dynamic::Var(report.args) : Poco::Dynamic::Var(Poco::JSON::Object::Ptr(new Poco::JSON::Object())));
363 return textPayload(out);
364}
365
366} // namespace
367
368std::string gameWorld() {
370 if (!snapshot) {
371 const auto* diag = snapshot.status().primaryDiagnostic();
372 return errorPayload(diag && !diag->message().empty() ? diag->message()
373 : std::string(statusCodeName(snapshot.code())));
374 }
375 auto json = snapshot.value().toJson();
376 if (!json) {
377 const auto* diag = json.status().primaryDiagnostic();
378 return errorPayload(diag && !diag->message().empty() ? diag->message() : "game world JSON failed");
379 }
380 return textContentResult(json.value(), false);
381}
382
383bool isMcpRuntimeTool(std::string_view name) {
384 if (isMcpFrameCaptureTool(name)) return true;
385 return name == "eve_console_read" || name == "eve_console_write" || name == "eve_console_clear" ||
386 name == "eve_screenshot_image" || name == "eve_crash_report" || name == "eve_restart" ||
387 name == "eve_game_world";
388}
389
390std::string callMcpRuntimeTool(std::string_view name, Poco::JSON::Object::Ptr args) {
392 if (name == "eve_console_read") return consoleRead(args);
393 if (name == "eve_console_write") return consoleWrite(args);
394 if (name == "eve_console_clear") return consoleClear();
395 if (name == "eve_screenshot_image") return screenshotImage(args);
396 if (name == "eve_crash_report") return crashReport(args);
397 if (name == "eve_restart") return softRestart(args);
398 if (name == "eve_game_world") return gameWorld();
399 return errorPayload("unknown runtime tool '" + std::string(name) + "'");
400}
401
402Poco::JSON::Object::Ptr crashLogSummary() {
403 // Cheap by design: `eve_status` must not read the whole log. Counts and the
404 // tail come from eve_crash_report.
405 Poco::JSON::Object::Ptr out = Poco::JSON::Object::Ptr(new Poco::JSON::Object());
406 const std::string path = eve::crashLogPath();
407 out->set("path", path);
408 std::error_code ec;
409 const bool exists = !path.empty() && std::filesystem::exists(path, ec);
410 out->set("exists", exists);
411 Poco::Int64 bytes = 0;
412 if (exists) {
413 const auto size = std::filesystem::file_size(path, ec);
414 if (!ec) bytes = static_cast<Poco::Int64>(size);
415 }
416 out->set("bytes", bytes);
417 return out;
418}
419
420std::string_view mcpRuntimeToolSchemas() {
421 return R"json({"name":"eve_console_read","description":"Read retained runtime console lines: Squirrel print/error, engine stderr (level engine), eve.dev.console.* and agent markers. Lines carry a monotonic seq; pass the returned cursor back as sinceSeq for an incremental read (sinceSeq=0 reads the newest lines). truncated=true means lines were dropped before sinceSeq.","inputSchema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000},"sinceSeq":{"type":"integer","minimum":0},"level":{"type":"string","enum":["debug","info","warn","error","print","cmd","result","engine"]}}}},{"name":"eve_console_write","description":"Append one agent marker line to the runtime console so it shares the game's ordered diagnosis stream.","inputSchema":{"type":"object","properties":{"text":{"type":"string"},"level":{"type":"string","enum":["debug","info","warn","error"]}},"required":["text"]}},{"name":"eve_console_clear","description":"Drop retained console lines. The sequence cursor keeps advancing, so an existing sinceSeq never re-reads or stalls.","inputSchema":{"type":"object","properties":{}}},{"name":"eve_screenshot_image","description":"Capture the presented frame and return it as an MCP image content item, so a client without filesystem access can look at the game. After readback is enabled the first call reports ok=false with retryable=true; wait one rendered frame and call again.","inputSchema":{"type":"object","properties":{"maxBytes":{"type":"integer","minimum":1024,"maximum":33554432,"description":"base64 payload budget (default 2097152)"}}}},{"name":"eve_crash_report","description":"Explain why a previous run ended: reads the persistent eve.log written by common/CrashLog.h and returns session/crash counts (window-scoped), the last crash timestamp, whether the session before the current one ended cleanly or crashed, and a bounded tail. Use it after reconnecting to a restarted game, since the MCP server dies with the process it served.","inputSchema":{"type":"object","properties":{"lines":{"type":"integer","minimum":1,"maximum":2000,"description":"tail lines to return (default 200)"}}}},{"name":"eve_restart","description":"Soft-restart the running game without unloading cached resources or killing the process (keeps Vulkan/MCP/ResourceManager). Optional args become eve.restartArgs for eve_init / eve_before_restart / eve_after_restart. Prefer this over relaunching eve when iterating on gameplay.","inputSchema":{"type":"object","properties":{"args":{"type":"object","description":"Game restart parameters (seed, scene, level, ...)"},"reloadScripts":{"type":"boolean","description":"Re-dofile tracked scripts and clear persist roots before eve_init (default true). When false, only reset native providers and call eve_restart(args) if present else eve_init()."}}}},{"name":"eve_game_world","description":"Discover what kind of game world is running at runtime: eve.dev.publishWorldContext, live gameplay domains, and dynamically configured / instantiated modules. Prefer this (or eve://game-world / eve_play op=status.gameWorld) over guessing from screenshots or eve_eval; do not treat on-disk prose as world authority.","inputSchema":{"type":"object","properties":{}}})json";
422}
423
424} // namespace eve::dev
425
426namespace eve::dev {
428} // namespace eve::dev
Value::Object payload
Duration start
struct SQVM * HSQUIRRELVM
Persistent, thread-safe record of engine crash and problem events.
HSQUIRRELVM vm
Definition ECS.cpp:38
SQObjectPtr key
Definition ECS.cpp:155
std::string name
Definition ECS.cpp:154
Runtime game-world Discover snapshot for MCP / Play Host.
std::string message
DiagnosticCode code
const GltfImportRequest & request
wgpu::PopErrorScopeStatus status
std::string from
Poco::JSON::Object::Ptr result
Snapshot snapshot
bool previousSessionCrashed
std::uint64_t scannedBytes
std::uint64_t bytes
int sessions
bool exists
bool hasPreviousSession
bool crashed
int crashes
std::string lastCrashAt
bool previousSessionEnded
std::vector< std::string > tail
bool ended
#define EVE_MCP_TOOL_FAMILY(Id, Schemas, Handler, Payload)
Declare one family beside its implementation; CMake derives composition from compiled sources.
bool all
int level
std::shared_ptr< const OceanSprayFrame > previous
std::unique_ptr< gpgpu::GpuBuffer > buffer
Definition OnnxGpgpu.cpp:26
std::string path
Definition PlayHost.cpp:111
std::set< std::string > values
Object::Ptr value
unsigned line
std::string text
ScriptStructure out
std::string string
Soft-restart a live game without unloading the resource cache.
int limit
Definition TreeMesh.cpp:166
int segments
Definition TreeMesh.cpp:281
float size
Definition TreeMesh.cpp:158
std::vector< std::string_view > lines
static ConsolePanel & instance()
ConsoleSlice read(std::uint64_t afterSeq, size_t max=64, const std::string &level={}) const
Read retained lines relative to a sequence cursor.
HSQUIRRELVM vm() const
Definition Debugger.hpp:96
static Debugger & instance()
Definition Debugger.cpp:387
Files scan(const std::filesystem::path &root, const Files &previous, Object::Ptr stats)
Bounded filesystem scan. Parses only changed files; symlinks are excluded.
bool getArgBool(Poco::JSON::Object::Ptr args, const char *key, bool def=false)
Boolean argument, or def when absent or not convertible.
Definition McpArgs.hpp:65
bool isMcpRuntimeTool(std::string_view name)
Whether name belongs to the MCP runtime console / frame-capture surface.
std::string mcpStringify(const Poco::Dynamic::Var &value)
Compact single-line JSON text for a newline-framed MCP payload.
Definition McpJson.hpp:24
std::string textContentResult(const std::string &text, bool isError=false)
MCP tools/call result object carrying one text content item.
Definition McpJson.hpp:84
std::string imageContentResult(const std::string &base64Png, const std::string &mimeType, const std::string &caption)
MCP tools/call result object carrying one image content item.
Definition McpJson.hpp:102
Result< Value > liveGameWorldSnapshot()
Build the Discover snapshot against the live engine.
Result< SoftRestartReport > executeSoftRestart(HSQUIRRELVM vm, SoftRestartRequest request)
Soft-restart the game attached to vm.
Poco::JSON::Object::Ptr crashLogSummary()
Summary of the persistent crash/error log (eve.log).
std::string callMcpRuntimeTool(std::string_view name, Poco::JSON::Object::Ptr args)
Execute one runtime tool.
Poco::JSON::Object::Ptr mcpFailureObject(const std::string &error, const std::string &hint={}, bool retryable=false, const std::vector< std::string > &nextTools={})
Structured tool failure object for agent self-correction.
Definition McpJson.hpp:63
std::string callMcpFrameCaptureTool(std::string_view name, Object::Ptr args)
long long getArgInt64(Poco::JSON::Object::Ptr args, const char *key, long long def=0)
64-bit integer argument (sequence numbers, handles), or def.
Definition McpArgs.hpp:45
std::string gameWorld()
std::string_view mcpRuntimeToolSchemas()
Comma-separated MCP tool schema fragments without surrounding array brackets.
int getArgInt(Poco::JSON::Object::Ptr args, const char *key, int def=0)
Integer argument, or def when absent or not convertible.
Definition McpArgs.hpp:35
bool isMcpFrameCaptureTool(std::string_view name)
True for the frame snapshot MCP family.
std::string getArgString(Poco::JSON::Object::Ptr args, const char *key, const std::string &def={})
String argument, or def when absent or not convertible.
Definition McpArgs.hpp:25
ForceVector add(ForceVector a, ForceVector b)
Definition ForceMath.h:13
WidgetDesc window(std::string title, std::vector< WidgetDesc > children, std::string id)
Top-level window widget with a title bar.
Definition Widget.cpp:326
constexpr const char * kSessionStartMarker
Marker text that opens a session block in eve.log.
Definition CrashLog.h:39
constexpr const char * kSessionEndMarker
Marker text that closes a session block (followed by the exit code). @ownership Borrowed pointer to a...
Definition CrashLog.h:46
constexpr std::string_view statusCodeName(StatusCode code) noexcept
Return the stable protocol spelling of a status code.
Definition Status.h:46
std::string crashLogPath()
Path of the open crash/error log file.
Definition CrashLog.cpp:89
Render surface / frame state snapshot (value type).