Files
kjh2064 3f293d8aa8
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s
V13-FE-006: consolidate approved UI and contract hardening
2026-08-13 02:41:00 +09:00

66 lines
1.5 KiB
TypeScript

export type KbxAiCapability = 'explain' | 'suggest' | 'draft' | 'execute'
export interface KbxAiScreenContext {
screenId: string
screenVersion: string
entityId?: string
selectedIds?: string[]
filters?: Record<string, unknown>
allowedCapabilities: KbxAiCapability[]
}
export interface KbxAiEvidence {
label: string
sourceType: 'domain' | 'api' | 'audit' | 'document' | 'rule'
reference?: string
}
export interface KbxAiProposalChange {
field: string
label: string
before?: unknown
after?: unknown
}
export type KbxAiProposalValidationState = 'pending' | 'validated' | 'invalid' | 'stale'
export interface KbxAiProposalValidation {
state: KbxAiProposalValidationState
message?: string
validatedAt?: string
}
export interface KbxAiProposal {
id: string
type: string
title: string
explanation: string
capability: Exclude<KbxAiCapability, 'explain'>
targets?: { entityType: string; entityId: string }[]
proposedChanges?: KbxAiProposalChange[]
evidence?: KbxAiEvidence[]
confidence?: number
requiredPermission?: string
validation?: KbxAiProposalValidation
}
export interface KbxAiAskRequest {
question: string
context: KbxAiScreenContext
}
export interface KbxAiAnswerAction {
id: string
label: string
kind: 'navigate' | 'filter' | 'proposal'
requiredCapability?: KbxAiCapability
requiredPermission?: string
}
export interface KbxAiAnswer {
answer: string
actions?: KbxAiAnswerAction[]
proposal?: KbxAiProposal
evidence?: KbxAiEvidence[]
}