PermissionDecision
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"behavior", "message", "decision_reason", "updated_input", "suggested_rules"}) public final class PermissionDecision
io/agentscope/core/permission/PermissionDecision.java:34–206权限决策,驱动智能体的推理、工具调用与会话执行。位于 io.agentscope.core.permission 包。核心成员包括 getBehavior、getMessage、getDecisionReason、getUpdatedInput、getSuggestedRules、allow。
Decision returned by a permission rule match or a tool self-check.
A decision carries the PermissionBehavior together with a human-readable message and
optional fields used by the engine (rewritten inputs, suggested follow-up rules).
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.core.permission that drives agent reasoning, tool calls and conversation execution. |
方法摘要Method Summary
方法详情Method Detail
getBehavior
public PermissionBehavior getBehavior()
获取行为。
Returns the behavior.
PermissionBehaviorio/agentscope/core/permission/PermissionDecision.java:72–75getMessage
public String getMessage()
获取消息。
Returns the message.
Stringio/agentscope/core/permission/PermissionDecision.java:77–80getDecisionReason
public String getDecisionReason()
获取决策推理。
Returns the decision reason.
Stringio/agentscope/core/permission/PermissionDecision.java:82–85getUpdatedInput
public Map<String, Object> getUpdatedInput()
获取已更新输入。
Returns the updated input.
Map<String, Object>io/agentscope/core/permission/PermissionDecision.java:87–90getSuggestedRules
public List<PermissionRule> getSuggestedRules()
获取 getSuggestedRules。
Returns the suggested rules.
List<PermissionRule>io/agentscope/core/permission/PermissionDecision.java:92–95allow
public static PermissionDecision allow(String message)
设置该参数。
Performs the allow operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
PermissionDecisionio/agentscope/core/permission/PermissionDecision.java:97–99deny
public static PermissionDecision deny(String message)
设置拒绝。
Performs the deny operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
PermissionDecisionio/agentscope/core/permission/PermissionDecision.java:101–103ask
public static PermissionDecision ask(String message)
设置该参数。
Performs the ask operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
PermissionDecisionio/agentscope/core/permission/PermissionDecision.java:105–107passthrough
public static PermissionDecision passthrough(String message)
设置该参数。
Performs the passthrough operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
PermissionDecisionio/agentscope/core/permission/PermissionDecision.java:109–111withSuggestedRules
public PermissionDecision withSuggestedRules(List<PermissionRule> suggestedRules)
执行 withSuggestedRules 方法。
Returns a copy of this decision with the given suggested rules attached.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
suggestedRules | List<PermissionRule> | suggested 规则(类型 `List`)。the rules to attach; may be null to clear |
PermissionDecisionio/agentscope/core/permission/PermissionDecision.java:119–127builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/core/permission/PermissionDecision.java:129–131equals
public boolean equals(Object o)
设置该参数。
Performs the equals operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
o | Object | o(类型 `Object`)。The o. |
booleanio/agentscope/core/permission/PermissionDecision.java:133–146hashCode
public int hashCode()
返回 hashCode 结果。
Returns the hash code.
intio/agentscope/core/permission/PermissionDecision.java:148–151toString
public String toString()
返回 toString 结果。
Returns the to string.
Stringio/agentscope/core/permission/PermissionDecision.java:153–166嵌套类详情Nested Class Detail
Builder
public static final class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.core.permission 包。核心成员包括 behavior、message、decisionReason、updatedInput、suggestedRules、build。
A class in io.agentscope.core.permission that drives agent reasoning, tool calls and conversation execution. Declared in io.agentscope.core.permission.