58 lines
2.5 KiB
Go
58 lines
2.5 KiB
Go
package errcode
|
|
|
|
// 框架域。任何系统都可以直接使用,不表达产品语义。
|
|
const (
|
|
SysInternal Code = "sys.internal"
|
|
SysUnknownCode Code = "sys.unknown_code"
|
|
SysInvalidArgument Code = "sys.invalid_argument"
|
|
SysUnauthorized Code = "sys.unauthorized"
|
|
SysNotFound Code = "sys.not_found"
|
|
SysConflict Code = "sys.conflict"
|
|
SysRateLimited Code = "sys.rate_limited"
|
|
SysTimeout Code = "sys.timeout"
|
|
SysCancelled Code = "sys.cancelled"
|
|
SysUnavailable Code = "sys.unavailable"
|
|
)
|
|
|
|
// 智能体执行域。对齐 agent-native contract.ErrorCode,并承接 pitransport 历史码。
|
|
const (
|
|
AgentCanceled Code = "agent.canceled"
|
|
AgentDeadlineExceeded Code = "agent.deadline_exceeded"
|
|
AgentBudgetExceeded Code = "agent.budget_exceeded"
|
|
AgentProviderUnavailable Code = "agent.provider_unavailable"
|
|
AgentProviderRejected Code = "agent.provider_rejected"
|
|
AgentToolRejected Code = "agent.tool_rejected"
|
|
AgentPathOutsideWorkspace Code = "agent.path_outside_workspace"
|
|
AgentMissingCapability Code = "agent.missing_capability"
|
|
AgentMissingDeliverable Code = "agent.missing_deliverable"
|
|
AgentEmptyOutput Code = "agent.empty_output"
|
|
AgentUnknownOutcome Code = "agent.unknown_outcome"
|
|
AgentInternal Code = "agent.internal"
|
|
AgentPromptEmpty Code = "agent.prompt_empty"
|
|
AgentUnauthorized Code = "agent.unauthorized"
|
|
AgentTimeout Code = "agent.timeout"
|
|
AgentTransient Code = "agent.transient"
|
|
AgentRunFailed Code = "agent.run_failed"
|
|
)
|
|
|
|
// 小队编排域。对齐 agent-squad 现有失败场景,本轮不改动该仓库。
|
|
const (
|
|
SquadRoleNotFound Code = "squad.role_not_found"
|
|
SquadBlueprintNotFound Code = "squad.blueprint_not_found"
|
|
SquadRunNotFound Code = "squad.run_not_found"
|
|
SquadGoalRequired Code = "squad.goal_required"
|
|
SquadHitlPending Code = "squad.hitl_pending"
|
|
SquadPlanRejected Code = "squad.plan_rejected"
|
|
SquadUnknownBackend Code = "squad.unknown_backend"
|
|
SquadStepFailed Code = "squad.step_failed"
|
|
SquadQualityFailed Code = "squad.quality_failed"
|
|
SquadCancelled Code = "squad.cancelled"
|
|
)
|
|
|
|
// 意图识别域。对齐 agent-intent 核心包错误常量;消费方以 catalogcheck 对齐测试防止双权威。
|
|
const (
|
|
IntentInvalidSpec Code = "intent.invalid_spec"
|
|
IntentSpecProtected Code = "intent.spec_protected"
|
|
IntentLoadFailed Code = "intent.load_failed"
|
|
)
|