Record Class PlanModeView
java.lang.Object
java.lang.Record
io.agentscope.spring.boot.admin.dto.PlanModeView
public record PlanModeView(String sessionId, boolean planActive, String currentPlanFile, boolean planMiddlewareEnabled)
extends Record
Wire view of
PlanModeContextState, plus a server-side flag indicating whether the
PlanModeMiddleware was wired into the agent at build time.
planMiddlewareEnabled=false means toggling planActive only flips the
AgentState flag — the read-only enforcement chain is absent because the agent was built without
Builder.enablePlanMode(). Useful diagnostic when a write somehow slipped through during
"plan mode".
-
Constructor Summary
ConstructorsConstructorDescriptionPlanModeView(String sessionId, boolean planActive, String currentPlanFile, boolean planMiddlewareEnabled) Creates an instance of aPlanModeViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentPlanFilerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static PlanModeViewof(String sessionId, io.agentscope.core.state.PlanModeContextState state, boolean middlewareEnabled) booleanReturns the value of theplanActiverecord component.booleanReturns the value of theplanMiddlewareEnabledrecord component.Returns the value of thesessionIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlanModeView
public PlanModeView(String sessionId, boolean planActive, String currentPlanFile, boolean planMiddlewareEnabled) Creates an instance of aPlanModeViewrecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentplanActive- the value for theplanActiverecord componentcurrentPlanFile- the value for thecurrentPlanFilerecord componentplanMiddlewareEnabled- the value for theplanMiddlewareEnabledrecord component
-
-
Method Details
-
of
public static PlanModeView of(String sessionId, io.agentscope.core.state.PlanModeContextState state, boolean middlewareEnabled) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
planActive
public boolean planActive()Returns the value of theplanActiverecord component.- Returns:
- the value of the
planActiverecord component
-
currentPlanFile
Returns the value of thecurrentPlanFilerecord component.- Returns:
- the value of the
currentPlanFilerecord component
-
planMiddlewareEnabled
public boolean planMiddlewareEnabled()Returns the value of theplanMiddlewareEnabledrecord component.- Returns:
- the value of the
planMiddlewareEnabledrecord component
-