Builder
public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements io.agentscope.controlplane.proto.ContextReportOrBuilder
io/agentscope/controlplane/proto/ContextReport.java:678–1686构建器,用于构建并配置目标实例。位于 io.agentscope.controlplane.proto 包,继承自 com.google.protobuf.GeneratedMessage.Builder<Builder>,实现 io.agentscope.controlplane.proto.ContextReportOrBuilder。核心成员包括 getDescriptor、internalGetFieldAccessorTable、clear、getDescriptorForType、getDefaultInstanceForType、build。
ContextReport is the Level-4 effective-context report, pushed on compaction
or when context_hash changes (debounced). Written into context_snapshots.
Protobuf type agentscope.protocol.v1.ContextReport
方法摘要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/ContextReport.java:682–685internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
返回 internalGetFieldAccessorTable 结果。
Returns the internal get field accessor table.
com.google.protobuf.GeneratedMessage.FieldAccessorTableio/agentscope/controlplane/proto/ContextReport.java:687–693clear
public Builder clear()
清空或重置内部状态。
Clears or resets internal state.
Builderio/agentscope/controlplane/proto/ContextReport.java:705–724getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
获取 getDescriptorForType。
Returns the descriptor for type.
com.google.protobuf.Descriptors.Descriptorio/agentscope/controlplane/proto/ContextReport.java:726–730getDefaultInstanceForType
public io.agentscope.controlplane.proto.ContextReport getDefaultInstanceForType()
获取默认实例用于类型。
Returns the default instance for type.
io.agentscope.controlplane.proto.ContextReportio/agentscope/controlplane/proto/ContextReport.java:732–735build
public io.agentscope.controlplane.proto.ContextReport build()
构建并返回最终实例。
Creates and returns an instance.
io.agentscope.controlplane.proto.ContextReportio/agentscope/controlplane/proto/ContextReport.java:737–744buildPartial
public io.agentscope.controlplane.proto.ContextReport buildPartial()
构建 buildPartial。
Builds the partial.
io.agentscope.controlplane.proto.ContextReportio/agentscope/controlplane/proto/ContextReport.java:746–752mergeFrom
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/ContextReport.java:800–808mergeFrom
public Builder mergeFrom(io.agentscope.controlplane.proto.ContextReport other)
设置该配置项。
Performs the merge from operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
other | io.agentscope.controlplane.proto.ContextReport | other(类型 `io.agentscope.controlplane.proto.ContextReport`)。The other. |
Builderio/agentscope/controlplane/proto/ContextReport.java:810–867isInitialized
public final boolean isInitialized()
判断是否已初始化。
Returns whether the initialized.
booleanio/agentscope/controlplane/proto/ContextReport.java:869–872mergeFrom
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/ContextReport.java:874–974getSessionId
public java.lang.String getSessionId()
获取会话标识。
string session_id = 1;
java.lang.Stringio/agentscope/controlplane/proto/ContextReport.java:982–993getSessionIdBytes
public com.google.protobuf.ByteString getSessionIdBytes()
获取会话标识字节。
string session_id = 1;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/ContextReport.java:998–1010setSessionId
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/ContextReport.java:1016–1023clearSessionId
public Builder clearSessionId()
清空会话标识。
string session_id = 1;
Builderio/agentscope/controlplane/proto/ContextReport.java:1028–1033setSessionIdBytes
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/ContextReport.java:1039–1047getContextHash
public java.lang.String getContextHash()
获取 getContextHash。
string context_hash = 2;
java.lang.Stringio/agentscope/controlplane/proto/ContextReport.java:1054–1065getContextHashBytes
public com.google.protobuf.ByteString getContextHashBytes()
获取 getContextHashBytes。
string context_hash = 2;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/ContextReport.java:1070–1082setContextHash
public Builder setContextHash(java.lang.String value)
设置该配置项。
string context_hash = 2;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | contextHash 到设置。The contextHash to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1088–1095clearContextHash
public Builder clearContextHash()
清空 clearContextHash。
string context_hash = 2;
Builderio/agentscope/controlplane/proto/ContextReport.java:1100–1105setContextHashBytes
public Builder setContextHashBytes(com.google.protobuf.ByteString value)
设置该配置项。
string context_hash = 2;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于 contextHash 到设置。The bytes for contextHash to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1111–1119getCapturedAt
public long getCapturedAt()
获取 getCapturedAt。
unix milliseconds int64 captured_at = 3;
longio/agentscope/controlplane/proto/ContextReport.java:1130–1133setCapturedAt
public Builder setCapturedAt(long value)
设置该配置项。
unix milliseconds int64 captured_at = 3;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | long | capturedAt 到设置。The capturedAt to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1143–1149clearCapturedAt
public Builder clearCapturedAt()
清空 clearCapturedAt。
unix milliseconds int64 captured_at = 3;
Builderio/agentscope/controlplane/proto/ContextReport.java:1158–1163getSystemPrompt
public java.lang.String getSystemPrompt()
获取系统提示词。
string system_prompt = 4;
java.lang.Stringio/agentscope/controlplane/proto/ContextReport.java:1170–1181getSystemPromptBytes
public com.google.protobuf.ByteString getSystemPromptBytes()
获取系统提示词字节。
string system_prompt = 4;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/ContextReport.java:1186–1198setSystemPrompt
public Builder setSystemPrompt(java.lang.String value)
设置设置系统提示词。
string system_prompt = 4;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | systemPrompt 到设置。The systemPrompt to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1204–1211clearSystemPrompt
public Builder clearSystemPrompt()
清空系统提示词。
string system_prompt = 4;
Builderio/agentscope/controlplane/proto/ContextReport.java:1216–1221setSystemPromptBytes
public Builder setSystemPromptBytes(com.google.protobuf.ByteString value)
设置设置系统提示词字节。
string system_prompt = 4;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于 systemPrompt 到设置。The bytes for systemPrompt to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1227–1235getMessages
public com.google.protobuf.ByteString getMessages()
获取消息。
JSON array of {role, content, is_compaction?} bytes messages = 5;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/ContextReport.java:1246–1249setMessages
public Builder setMessages(com.google.protobuf.ByteString value)
设置设置消息。
JSON array of {role, content, is_compaction?} bytes messages = 5;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 消息到设置。The messages to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1259–1265clearMessages
public Builder clearMessages()
清空消息。
JSON array of {role, content, is_compaction?} bytes messages = 5;
Builderio/agentscope/controlplane/proto/ContextReport.java:1274–1279getTools
public com.google.protobuf.ByteString getTools()
获取工具。
JSON array of ToolInfo bytes tools = 6;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/ContextReport.java:1290–1293setTools
public Builder setTools(com.google.protobuf.ByteString value)
设置设置工具。
JSON array of ToolInfo bytes tools = 6;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 工具到设置。The tools to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1303–1309clearTools
public Builder clearTools()
清空工具。
JSON array of ToolInfo bytes tools = 6;
Builderio/agentscope/controlplane/proto/ContextReport.java:1318–1323getIsCompacted
public boolean getIsCompacted()
获取 getIsCompacted。
bool is_compacted = 7;
booleanio/agentscope/controlplane/proto/ContextReport.java:1330–1333setIsCompacted
public Builder setIsCompacted(boolean value)
设置该配置项。
bool is_compacted = 7;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | boolean | isCompacted 到设置。The isCompacted to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1339–1345clearIsCompacted
public Builder clearIsCompacted()
清空 clearIsCompacted。
bool is_compacted = 7;
Builderio/agentscope/controlplane/proto/ContextReport.java:1350–1355getCompactionSummary
public java.lang.String getCompactionSummary()
获取压缩摘要。
string compaction_summary = 8;
java.lang.Stringio/agentscope/controlplane/proto/ContextReport.java:1362–1373getCompactionSummaryBytes
public com.google.protobuf.ByteString getCompactionSummaryBytes()
获取压缩摘要字节。
string compaction_summary = 8;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/ContextReport.java:1378–1390setCompactionSummary
public Builder setCompactionSummary(java.lang.String value)
设置设置压缩摘要。
string compaction_summary = 8;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | compactionSummary 到设置。The compactionSummary to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1396–1403clearCompactionSummary
public Builder clearCompactionSummary()
清空压缩摘要。
string compaction_summary = 8;
Builderio/agentscope/controlplane/proto/ContextReport.java:1408–1413setCompactionSummaryBytes
public Builder setCompactionSummaryBytes(com.google.protobuf.ByteString value)
设置设置压缩摘要字节。
string compaction_summary = 8;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 字节用于 compactionSummary 到设置。The bytes for compactionSummary to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1419–1427getOriginalMessageCount
public int getOriginalMessageCount()
获取 getOriginalMessageCount。
int32 original_message_count = 9;
intio/agentscope/controlplane/proto/ContextReport.java:1434–1437setOriginalMessageCount
public Builder setOriginalMessageCount(int value)
设置该配置项。
int32 original_message_count = 9;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | int | originalMessageCount 到设置。The originalMessageCount to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1443–1449clearOriginalMessageCount
public Builder clearOriginalMessageCount()
清空 clearOriginalMessageCount。
int32 original_message_count = 9;
Builderio/agentscope/controlplane/proto/ContextReport.java:1454–1459getCompactedAt
public long getCompactedAt()
获取 getCompactedAt。
unix milliseconds int64 compacted_at = 10;
longio/agentscope/controlplane/proto/ContextReport.java:1470–1473setCompactedAt
public Builder setCompactedAt(long value)
设置该配置项。
unix milliseconds int64 compacted_at = 10;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | long | compactedAt 到设置。The compactedAt to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1483–1489clearCompactedAt
public Builder clearCompactedAt()
清空 clearCompactedAt。
unix milliseconds int64 compacted_at = 10;
Builderio/agentscope/controlplane/proto/ContextReport.java:1498–1503getTotalTokens
public int getTotalTokens()
获取总数令牌数。
int32 total_tokens = 11;
intio/agentscope/controlplane/proto/ContextReport.java:1510–1513setTotalTokens
public Builder setTotalTokens(int value)
设置设置总数令牌数。
int32 total_tokens = 11;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | int | totalTokens 到设置。The totalTokens to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1519–1525clearTotalTokens
public Builder clearTotalTokens()
清空总数令牌数。
int32 total_tokens = 11;
Builderio/agentscope/controlplane/proto/ContextReport.java:1530–1535getMaxTokens
public int getMaxTokens()
获取最大令牌数。
int32 max_tokens = 12;
intio/agentscope/controlplane/proto/ContextReport.java:1542–1545setMaxTokens
public Builder setMaxTokens(int value)
设置设置最大令牌数。
int32 max_tokens = 12;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | int | maxTokens 到设置。The maxTokens to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1551–1557clearMaxTokens
public Builder clearMaxTokens()
清空最大令牌数。
int32 max_tokens = 12;
Builderio/agentscope/controlplane/proto/ContextReport.java:1562–1567getFramework
public java.lang.String getFramework()
获取 getFramework。
string framework = 13;
java.lang.Stringio/agentscope/controlplane/proto/ContextReport.java:1574–1585getFrameworkBytes
public com.google.protobuf.ByteString getFrameworkBytes()
获取 getFrameworkBytes。
string framework = 13;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/ContextReport.java:1590–1602setFramework
public Builder setFramework(java.lang.String value)
设置该配置项。
string framework = 13;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | java.lang.String | 值(类型 `java.lang.String`)。The framework to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1608–1615clearFramework
public Builder clearFramework()
清空 clearFramework。
string framework = 13;
Builderio/agentscope/controlplane/proto/ContextReport.java:1620–1625setFrameworkBytes
public Builder setFrameworkBytes(com.google.protobuf.ByteString value)
设置该配置项。
string framework = 13;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | 值(类型 `com.google.protobuf.ByteString`)。The bytes for framework to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1631–1639getFrameworkState
public com.google.protobuf.ByteString getFrameworkState()
获取 getFrameworkState。
framework-private JSON (graph state, session metadata, ...) bytes framework_state = 14;
com.google.protobuf.ByteStringio/agentscope/controlplane/proto/ContextReport.java:1650–1653setFrameworkState
public Builder setFrameworkState(com.google.protobuf.ByteString value)
设置该配置项。
framework-private JSON (graph state, session metadata, ...) bytes framework_state = 14;
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | com.google.protobuf.ByteString | frameworkState 到设置。The frameworkState to set. |
Builderio/agentscope/controlplane/proto/ContextReport.java:1663–1669clearFrameworkState
public Builder clearFrameworkState()
清空 clearFrameworkState。
framework-private JSON (graph state, session metadata, ...) bytes framework_state = 14;
Builderio/agentscope/controlplane/proto/ContextReport.java:1678–1683