Documentation
¶
Index ¶
- Constants
- func IsReservedMetadataKey(key string) bool
- func RejectReservedSkillMetadata(metadata map[string]any) error
- func RejectReservedSkillMetadataShallow(metadata map[string]any) error
- func RejectReservedSkillMetadataValue(value any) error
- type ClassifyInput
- type Command
- type Decision
- type DecisionKind
- type Error
- type SkillIntent
- type Surface
Constants ¶
View Source
const ( CodeUnknownSlash = apperror.CodeSlashUnknownCommand CodeUnsupportedWebCommand = apperror.CodeSlashUnsupportedInWeb CodeInvalidSkillSlashSyntax = apperror.CodeSlashSkillSyntaxInvalid CodeRequestedSkillNotFound = apperror.CodeSlashSkillNotFound CodeRequestedSkillAmbiguous = apperror.CodeSlashSkillAmbiguous CodeRequestedSkillDisabled = apperror.CodeSlashSkillDisabled CodeRequestedSkillNotRuntimeUsable = apperror.CodeSlashSkillNotUsable CodeTooManyRequestedSkills = apperror.CodeSlashTooManySkills CodeRequestedSkillContextTooLarge = apperror.CodeSlashSkillContextTooLarge CodeSlashAttachmentsUnsupported = apperror.CodeSlashAttachmentsUnsupported CodeUnsupportedSkillSlashContext = apperror.CodeSlashSkillActivationUnsupported CodeUnsupportedLegacyEndpoint = apperror.CodeSlashRequiresWebSocket CodePermissionDenied = apperror.CodeSlashPermissionDenied CodeReservedSkillMetadata = apperror.CodeSlashReservedMetadata )
Refusals of a slash request. Each is the catalog code the refusal is answered with, on the Web composer and in IM channels alike.
Variables ¶
This section is empty.
Functions ¶
func IsReservedMetadataKey ¶
func RejectReservedSkillMetadataShallow ¶
RejectReservedSkillMetadataShallow rejects reserved keys only at the top level of a metadata map.
func RejectReservedSkillMetadataValue ¶
RejectReservedSkillMetadataValue rejects reserved skill metadata keys nested anywhere inside a JSON-like metadata value.
Types ¶
type ClassifyInput ¶
type Decision ¶
type Decision struct {
Kind DecisionKind
Code apperror.Code
Directed bool
Command Command
SkillIntent SkillIntent
Invocation *commandsyntax.Invocation
// AgentCommand is the exact runtime command selector a live-runtime
// admission check matched for a NormalChat decision. Carried so the
// session pool can re-validate it against the final runtime at prompt
// time; empty for every other decision source.
AgentCommand string
}
func Classify ¶
func Classify(input ClassifyInput) Decision
type DecisionKind ¶
type DecisionKind string
const ( DecisionNormalChat DecisionKind = "normal_chat" DecisionRejectNoop DecisionKind = "reject_noop" DecisionCommandAction DecisionKind = "command_action" DecisionUnsupportedCommand DecisionKind = "unsupported_command" DecisionSkillIntent DecisionKind = "skill_intent" DecisionUnknownSlash DecisionKind = "unknown_slash" DecisionReject DecisionKind = "reject" )
type Error ¶
Error is a slash request refused for Code. Callers in the process match it with errors.As; it unwraps to the catalog error for Code, so every boundary answers it with that code, also when it crosses an RPC.
type SkillIntent ¶
Click to show internal directories.
Click to hide internal directories.