Builder
public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements io.agentscope.controlplane.proto.SessionCommandOrBuilder
io/agentscope/controlplane/proto/SessionCommand.java:359–717构建器,用于构建并配置目标实例。位于 io.agentscope.controlplane.proto 包,继承自 com.google.protobuf.GeneratedMessage.Builder<Builder>,实现 io.agentscope.controlplane.proto.SessionCommandOrBuilder。核心成员包括 getDescriptor、internalGetFieldAccessorTable、clear、getDescriptorForType、getDefaultInstanceForType、build。
SessionCommand is a control-plane → data-plane session instruction.
`command` is a string (not an enum) so new verbs can be added without
breaking wire compatibility. Known values and HTTP parity
(see docs/zh/controlplane/contract.md):
compress ↔ POST /agentscope/sessions/{id}/compress (capability: session-command)
terminate ↔ POST /agentscope/sessions/{id}/terminate (capability: session-command)
abort ↔ POST /agentscope/sessions/{id}/abort (capability: session-abort)
undo ↔ POST /agentscope/sessions/{id}/undo (capability: session-undo, optional)
redo ↔ POST /agentscope/sessions/{id}/redo (capability: session-redo, optional)
Success / error semantics match the HTTP Command contract
(accepted/commandId/phase/result;501 unsupported, 409 busy/wait_idle,
404 not_found, 503 unreachable on CP, 500 failed).
Protobuf type agentscope.protocol.v1.SessionCommand
方法摘要Method Summary
方法详情Method Detail
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
获取描述符。
Returns the descriptor.
com.google.protobuf.Descriptors.Descriptorio/agentscope/controlplane/proto/SessionCommand.java:363–366internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
返回 internalGetFieldAccessorTable 结果。
Returns the internal get field accessor table.
com.google.protobuf.GeneratedMessage.FieldAccessorTableio/agentscope/controlplane/proto/SessionCommand.java:368–374clear
public Builder clear()
清空或重置内部状态。
Clears or resets internal state.
Builderio/agentscope/controlplane/proto/SessionCommand.java:386–394getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
获取 getDescriptorForType。
Returns the descriptor for type.
com.google.protobuf.Descriptors.Descriptorio/agentscope/controlplane/proto/SessionCommand.java:396–400getDefaultInstanceForType
public io.agentscope.controlplane.proto.SessionCommand getDefaultInstanceForType()
获取默认实例用于类型。
Returns the default instance for type.
io.agentscope.controlplane.proto.SessionCommandio/agentscope/controlplane/proto/SessionCommand.java:402–405build
public io.agentscope.controlplane.proto.SessionCommand build()
构建并返回最终实例。
Creates and returns an instance.
io.agentscope.controlplane.proto.SessionCommandio/agentscope/controlplane/proto/SessionCommand.java:407–414buildPartial
public io.agentscope.controlplane.proto.SessionCommand buildPartial()
构建 buildPartial。
Builds the partial.
io.agentscope.controlplane.proto.SessionCommandio/agentscope/controlplane/proto/SessionCommand.java:416–422mergeFrom
public Builder mergeFrom(com.google.protobuf.Message other)
设置该配置项。
Performs the merge from operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
other | com.google.protobuf.Message | other(类型 `com.google.protobuf.Message`)。The other. |
Builderio/agentscope/controlplane/proto/SessionCommand.java:437–445mergeFrom
public Builder mergeFrom(io.agentscope.controlplane.proto.SessionCommand other)
设置该配置项。
Performs the merge from operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
other | io.agentscope.controlplane.proto.SessionCommand | other(类型 `io.agentscope.controlplane.proto.SessionCommand`)。The other. |
Builderio/agentscope/controlplane/proto/SessionCommand.java:447–465isInitialized
public final boolean isInitialized()
判断是否已初始化。
Returns whether the initialized.
booleanio/agentscope/controlplane/proto/SessionCommand.java:467–470mergeFrom
public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
设置该配置项。
Performs the merge from operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
input | com.google.protobuf.CodedInputStream | 输入消息(类型 `com.google.protobuf.CodedInputStream`)。The input. |
extensionRegistry | com.google.protobuf.ExtensionRegistryLite | 扩展注册表(类型 `com.google.protobuf.ExtensionRegistryLite`)。The extension registry. |
Builderjava.io.IOException可能抛出 `java.io.IOException`。Thrown when the operation cannot be completed.
io/agentscope/controlplane/proto/SessionCommand.java:472–517getSessionId
public java.lang.String getSessionId()
获取会话标识。
string session_id = 1;
java.lang.Stringio/agentscope/controlplane/proto/SessionCommand.java:525–536getSessionIdBytes
public com.google.protobuf.ByteString getSessionIdBytes()
获取会话标识字节。
string session_id = 1;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/SessionCommand.java:541–553setSessionId
public Builder setSessionId(java.lang.String value)
设置设置会话标识。
string session_id = 1;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | 会话标识到设置。The sessionId to set. |
Builderio/agentscope/controlplane/proto/SessionCommand.java:559–566clearSessionId
public Builder clearSessionId()
清空会话标识。
string session_id = 1;
Builderio/agentscope/controlplane/proto/SessionCommand.java:571–576setSessionIdBytes
public Builder setSessionIdBytes(com.google.protobuf.ByteString value)
设置设置会话标识字节。
string session_id = 1;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于会话标识到设置。The bytes for sessionId to set. |
Builderio/agentscope/controlplane/proto/SessionCommand.java:582–590getCommand
public java.lang.String getCommand()
获取命令。
compress | terminate | abort | undo | redo | ...
java.lang.Stringio/agentscope/controlplane/proto/SessionCommand.java:601–612getCommandBytes
public com.google.protobuf.ByteString getCommandBytes()
获取命令字节。
compress | terminate | abort | undo | redo | ...
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/SessionCommand.java:621–633setCommand
public Builder setCommand(java.lang.String value)
设置设置命令。
compress | terminate | abort | undo | redo | ...
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | 命令到设置。The command to set. |
Builderio/agentscope/controlplane/proto/SessionCommand.java:643–650clearCommand
public Builder clearCommand()
清空命令。
compress | terminate | abort | undo | redo | ...
Builderio/agentscope/controlplane/proto/SessionCommand.java:659–664setCommandBytes
public Builder setCommandBytes(com.google.protobuf.ByteString value)
设置设置命令字节。
compress | terminate | abort | undo | redo | ...
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于命令到设置。The bytes for command to set. |
Builderio/agentscope/controlplane/proto/SessionCommand.java:674–682getParams
public com.google.protobuf.ByteString getParams()
获取参数。
bytes params = 3;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/SessionCommand.java:689–692setParams
public Builder setParams(com.google.protobuf.ByteString value)
设置设置参数。
bytes params = 3;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 参数到设置。The params to set. |
Builderio/agentscope/controlplane/proto/SessionCommand.java:698–704clearParams
public Builder clearParams()
清空参数。
bytes params = 3;
Builderio/agentscope/controlplane/proto/SessionCommand.java:709–714