DEV-000066 human response continuation semantics
CI / test (push) Successful in 21s
CI / test (pull_request) Successful in 16s

This commit is contained in:
m
2026-08-17 17:02:33 +03:00
parent e8e51ffdba
commit 8b9b841645
22 changed files with 1163 additions and 45 deletions
+86
View File
@@ -15,6 +15,8 @@ type AttentionRevision uint64
type CommittedActionIntentID ids.ID
type CommittedAuthorizedActionID ids.ID
type CommittedActionAttemptID ids.ID
type HumanResponseID ids.ID
type HumanResponseRevision uint64
type ProspectiveState string
@@ -46,6 +48,7 @@ const (
AttentionPending AttentionState = "PENDING"
AttentionDelivering AttentionState = "DELIVERING"
AttentionDelivered AttentionState = "DELIVERED"
AttentionResolved AttentionState = "RESOLVED"
AttentionSuppressed AttentionState = "SUPPRESSED"
AttentionExpired AttentionState = "EXPIRED"
AttentionFailed AttentionState = "FAILED"
@@ -106,6 +109,11 @@ type AttentionItem struct {
AuthorizedActionID CommittedAuthorizedActionID
ActionAttemptID CommittedActionAttemptID
DeliveryOutcome string
ResponseID HumanResponseID
ResponseUtteranceID string
ResponseOperation HumanResponseOperation
ResponseOutcome ResponseOutcome
RespondedAtUnixMillis int64
Revision AttentionRevision
}
@@ -121,12 +129,90 @@ type TodayItem struct {
HumanState string
DeliveryState string
SourceDescription string
ResponseHint string
}
type TodayResult struct {
Items []TodayItem
}
type HumanResponseOperation string
const (
ResponseAcknowledge HumanResponseOperation = "ACKNOWLEDGE"
ResponseComplete HumanResponseOperation = "COMPLETE"
ResponseSnooze HumanResponseOperation = "SNOOZE"
ResponseCancel HumanResponseOperation = "CANCEL"
ResponseDismiss HumanResponseOperation = "DISMISS"
ResponseContinue HumanResponseOperation = "CONTINUE"
ResponseReject HumanResponseOperation = "REJECT"
ResponseUnknown HumanResponseOperation = "UNKNOWN"
)
type ResponseTargetKind string
const (
ResponseTargetAttentionItem ResponseTargetKind = "ATTENTION_ITEM"
ResponseTargetProspectiveItem ResponseTargetKind = "PROSPECTIVE_ITEM"
ResponseTargetWorkTask ResponseTargetKind = "WORK_TASK"
ResponseTargetCapabilityGap ResponseTargetKind = "CAPABILITY_GAP"
ResponseTargetInteractionContext ResponseTargetKind = "INTERACTION_CONTEXT"
ResponseTargetUnknown ResponseTargetKind = "UNKNOWN"
)
type ResponseResolutionState string
const (
ResponseResolved ResponseResolutionState = "RESOLVED"
ResponseAmbiguous ResponseResolutionState = "AMBIGUOUS"
ResponseNoTarget ResponseResolutionState = "NO_TARGET"
ResponseNoop ResponseResolutionState = "NOOP"
)
type ResponseOutcome string
const (
ResponseOutcomeUserReportedComplete ResponseOutcome = "USER_REPORTED_COMPLETE"
ResponseOutcomeSnoozed ResponseOutcome = "SNOOZED"
ResponseOutcomeCancelled ResponseOutcome = "CANCELLED"
ResponseOutcomeDismissed ResponseOutcome = "DISMISSED"
ResponseOutcomeClarificationNeeded ResponseOutcome = "CLARIFICATION_NEEDED"
ResponseOutcomeNoop ResponseOutcome = "NOOP"
)
type HumanResponse struct {
ID HumanResponseID
OwnerPrincipalID identity.PrincipalID
ScopeID authority.ScopeID
SourceUtteranceID string
SourceIntentID string
Operation HumanResponseOperation
TargetKind ResponseTargetKind
TargetAttentionID AttentionItemID
TargetProspectiveID ProspectiveItemID
TargetExternalRef string
ResolutionState ResponseResolutionState
Outcome ResponseOutcome
Clarification string
SnoozeUntilUnixMillis int64
UserReportedNotVerified bool
RecordedAtUnixMillis int64
Revision HumanResponseRevision
}
type HumanResponseRequest struct {
SourceUtteranceID string
SourceIntentID string
Message string
RequestedAtUnixMillis int64
}
type HumanResponseResult struct {
Response HumanResponse
Handled bool
Reply string
}
// SatisfyDeliveredSubject is the complete serializable operation subject. It
// is distinct from a Work TaskTarget, which remains the live justification.
type SatisfyDeliveredSubject struct {