载入中...
搜索中...
未找到
AgentDevelopmentSession.hpp
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include <cstdint>
6#include <string>
7#include <string_view>
8#include <vector>
9
10namespace eve::dev {
11
14
17 std::string id;
18 std::string description;
19 bool required = true;
20 bool passed = false;
21};
22
25 std::uint64_t sequence = 0;
26 std::string criterionId;
27 std::string kind;
28 std::string status;
29 std::string summary;
30 std::string artifact;
31};
32
34struct [[nodiscard]] AgentDevelopmentResult {
35 std::string code;
36 std::string message;
37
39 bool isAccepted() const { return code == "applied"; }
40};
41
51public:
53 static AgentDevelopmentSession& instance();
54
56 [[nodiscard]] AgentDevelopmentResult start(std::string objective,
57 std::vector<AgentAcceptanceCriterion> criteria);
59 [[nodiscard]] AgentDevelopmentResult advance(std::string_view sessionId, AgentDevelopmentPhase phase);
61 [[nodiscard]] AgentDevelopmentResult record(std::string_view sessionId, AgentDevelopmentEvidence evidence);
63 [[nodiscard]] AgentDevelopmentResult complete(std::string_view sessionId, std::string summary);
65 [[nodiscard]] AgentDevelopmentResult abort(std::string_view sessionId, std::string reason);
67 void reset();
68
70 bool active() const;
72 const std::string& sessionId() const { return sessionId_; }
74 AgentDevelopmentPhase phase() const { return phase_; }
76 const std::string& objective() const { return objective_; }
78 const std::string& summary() const { return summary_; }
80 const std::vector<AgentAcceptanceCriterion>& criteria() const { return criteria_; }
82 const std::vector<AgentDevelopmentEvidence>& evidence() const { return evidence_; }
84 bool readyToComplete() const;
85
86private:
87 AgentDevelopmentSession() = default;
88
89 std::string sessionId_;
90 std::string objective_;
91 std::string summary_;
92 AgentDevelopmentPhase phase_ = AgentDevelopmentPhase::Aborted;
93 std::vector<AgentAcceptanceCriterion> criteria_;
94 std::vector<AgentDevelopmentEvidence> evidence_;
95 std::uint64_t nextSession_ = 1;
96 std::uint64_t nextEvidence_ = 1;
97};
98
102[[nodiscard]] AgentDevelopmentResult parseAgentDevelopmentPhase(std::string_view name,
104
105} // namespace eve::dev
Duration start
bool & active
float phase
Definition CaveMesh.cpp:58
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
DiagnosticCode code
std::string name
Process-owned state machine and evidence ledger for Agent game development.
const std::string & summary() const
Terminal summary or abort reason.
const std::string & objective() const
User-supplied objective.
const std::vector< AgentAcceptanceCriterion > & criteria() const
Immutable acceptance snapshot owned by this session.
AgentDevelopmentPhase phase() const
Current workflow phase.
const std::string & sessionId() const
Stable process-local session identity, invalidated by reset.
const std::vector< AgentDevelopmentEvidence > & evidence() const
Immutable evidence snapshot owned by this session.
AgentDevelopmentResult parseAgentDevelopmentPhase(std::string_view name, AgentDevelopmentPhase *phase)
Parse a stable JSON protocol phase name.
AgentDevelopmentPhase
Ordered stage of an Agent-driven game-development session.
std::string_view agentDevelopmentPhaseName(AgentDevelopmentPhase phase)
Stable JSON protocol name for a development phase.
One explicit acceptance condition for a development objective.
Immutable evidence recorded against an acceptance condition.
Structured result for development-session state transitions.
bool isAccepted() const
Whether the requested transition was accepted.