Jev 내담자 평가·표현 v2와 속마음 공개

상담자 발화 판정(A)·감정(B)·표현(C) 20문항 질문 세트, 감쇠 없는 이번 턴 반응과 비대칭 기분 전이, 개방도 게이트로 생성 지시를 만들고 ccd.coping_strategy 전달 누락을 고친다.

trace v2와 고정 문구 속마음 요약(migration 24, AI 경로 차단 RLS)을 같은 트랜잭션에 저장하고 피드백 정책이 켜진 경우에만 done·TurnResponse·음성 reply·리뷰로 노출한다. 회기 화면 속마음 보기 토글, 리뷰 접힘 블록, 관리자 감정 관측 v2 표시를 추가한다.
This commit is contained in:
Yun Chan 2026-09-30 13:23:09 +09:00
parent 36cb847e38
commit 29c406d89f
39 changed files with 5726 additions and 343 deletions

View file

@ -2881,7 +2881,8 @@ export interface components {
created_at: string;
/** Seq */
seq: number;
trace: components["schemas"]["ClientAffectTraceV1"];
/** Trace */
trace: components["schemas"]["ClientAffectTraceV1"] | components["schemas"]["ClientAffectTraceV2"];
/** Turn Id */
turn_id: string;
};
@ -3987,6 +3988,31 @@ export interface components {
/** Task */
task: number;
};
/**
* AppraisalQuestionTraceV1
* @description A층 질문 하나의 판정 원자료(§8.1). 보내지 않은 질문은 항목 자체가 없다.
*/
AppraisalQuestionTraceV1: {
/** Choice */
choice?: string | null;
/** Confidence */
confidence?: number | null;
/** Decision */
decision: string;
/** Key */
key: string;
/**
* Kind
* @enum {string}
*/
kind: "noul" | "choice";
/** Probabilities */
probabilities?: {
[key: string]: number;
} | null;
/** Probability */
probability?: number | null;
};
/** ApprovedCatalogConsumerEntry */
ApprovedCatalogConsumerEntry: {
/**
@ -4651,6 +4677,40 @@ export interface components {
*/
version: "jev-affect-v1";
};
/**
* ClientAffectPolicyV2
* @description jev-affect-v2 비대칭 기분 전이 계수(공학적 기본값, §6.3).
*/
ClientAffectPolicyV2: {
/** Adjacent Probability Threshold */
adjacent_probability_threshold: number;
/** Min Confidence */
min_confidence: number;
/** Recovery Accepted Alpha */
recovery_accepted_alpha: number;
/** Recovery Accepted Cap */
recovery_accepted_cap: number;
/** Recovery Tentative Alpha */
recovery_tentative_alpha: number;
/** Recovery Tentative Cap */
recovery_tentative_cap: number;
/** Tentative Confidence Floor */
tentative_confidence_floor: number;
/**
* Version
* @constant
* @enum {string}
*/
version: "jev-affect-v2";
/** Worsening Accepted Alpha */
worsening_accepted_alpha: number;
/** Worsening Accepted Cap */
worsening_accepted_cap: number;
/** Worsening Tentative Alpha */
worsening_tentative_alpha: number;
/** Worsening Tentative Cap */
worsening_tentative_cap: number;
};
/** ClientAffectTraceV1 */
ClientAffectTraceV1: {
context: components["schemas"]["ClientAffectContextV1"];
@ -4678,6 +4738,40 @@ export interface components {
/** Turn Seq */
turn_seq: number;
};
/** ClientAffectTraceV2 */
ClientAffectTraceV2: {
/** Appraisal */
appraisal: components["schemas"]["AppraisalQuestionTraceV1"][];
context: components["schemas"]["ClientAffectContextV1"];
/** Cost Usd */
cost_usd?: number | null;
/** Dimensions */
dimensions: components["schemas"]["ClientAffectDimensionTraceV1"][];
expression: components["schemas"]["ExpressionTraceV1"];
/** Input Tokens */
input_tokens: number;
/** Latency Ms */
latency_ms: number;
/** Model */
model: string;
/** Output Tokens */
output_tokens: number;
policy: components["schemas"]["ClientAffectPolicyV2"];
/** Provider */
provider: string;
/** Reaction */
reaction: components["schemas"]["ReactionDimensionTraceV1"][];
/**
* Schema Version
* @constant
* @enum {integer}
*/
schema_version: 2;
/** Sore Spot Count */
sore_spot_count: number;
/** Turn Seq */
turn_seq: number;
};
/** ClientDiagnosticError */
ClientDiagnosticError: {
/** At */
@ -4743,6 +4837,58 @@ export interface components {
/** Visible Nodes */
visible_nodes?: number | null;
};
/** ClientInnerDisplayV1 */
ClientInnerDisplayV1: {
/**
* Code
* @enum {string}
*/
code: "as_felt" | "softened" | "covered_by_agreement" | "masked";
/** Label */
label: string;
};
/**
* ClientInnerFeelingV1
* @description 속마음 요약(§8.2)의 감정 한 항목.
*/
ClientInnerFeelingV1: {
/** Intensity */
intensity: string;
/** Label */
label: string;
};
/**
* ClientInnerReactionV1
* @description 학습자·교수자용 속마음 요약(§8.2). 고정 문구 표에서만 만든다.
*/
ClientInnerReactionV1: {
display?: components["schemas"]["ClientInnerDisplayV1"] | null;
/** Experienced */
experienced: string[];
/** Feelings */
feelings: components["schemas"]["ClientInnerFeelingV1"][];
/** Hidden Gap */
hidden_gap: boolean;
/**
* Schema Version
* @constant
* @enum {integer}
*/
schema_version: 1;
stance?: components["schemas"]["ClientInnerStanceV1"] | null;
/** Turn Seq */
turn_seq: number;
};
/** ClientInnerStanceV1 */
ClientInnerStanceV1: {
/**
* Code
* @enum {string}
*/
code: "engage" | "cautious" | "pull_back" | "push_back";
/** Label */
label: string;
};
/**
* ClientStateRead
* @description 내담자 상태 '읽기' — 학습자 발화 직후 내담자 응답에서 관측된 상태(읽기 채점 근거).
@ -5690,6 +5836,51 @@ export interface components {
/** Title Ko */
title_ko: string;
};
/**
* ExpressionChoiceTraceV1
* @description c_behavior·c_display choice 판정 원자료.
*/
ExpressionChoiceTraceV1: {
/** Choice */
choice: string;
/** Confidence */
confidence?: number | null;
/** Decision */
decision: string;
/** Probabilities */
probabilities: {
[key: string]: number;
};
};
/**
* ExpressionDiscloseTraceV1
* @description c_disclose_ready noul 판정 원자료.
*/
ExpressionDiscloseTraceV1: {
/** Confidence */
confidence?: number | null;
/** Decision */
decision: string;
/** Probability */
probability: number;
};
/**
* ExpressionTraceV1
* @description 표현 계획(§6.4) trace — 개방도 게이트 전/후 값을 함께 남긴다.
*/
ExpressionTraceV1: {
behavior: components["schemas"]["ExpressionChoiceTraceV1"];
disclose_ready: components["schemas"]["ExpressionDiscloseTraceV1"];
display: components["schemas"]["ExpressionChoiceTraceV1"];
/** Gate Reason */
gate_reason?: ("openness_closed" | "openness_guarded") | null;
/** Gated Behavior */
gated_behavior: string;
/** Hidden Gap */
hidden_gap: boolean;
/** Stance */
stance?: ("engage" | "cautious" | "pull_back" | "push_back") | null;
};
/** FusionCalibration */
FusionCalibration: {
/**
@ -9185,6 +9376,18 @@ export interface components {
*/
session_id: string;
};
/**
* ReactionDimensionTraceV1
* @description 이번 턴 반응(§6.2) 9축 고정 순서 trace.
*/
ReactionDimensionTraceV1: {
/** Included */
included: boolean;
/** Key */
key: string;
/** Value */
value?: number | null;
};
/** RedTeamFinding */
RedTeamFinding: {
/**
@ -9588,6 +9791,7 @@ export interface components {
ReviewTurn: {
/** Id */
id: string;
innerReaction?: components["schemas"]["ClientInnerReactionV1"] | null;
/** Nonverbal */
nonverbal?: components["schemas"]["ReviewNonverbalEvent"][];
note?: components["schemas"]["ReviewNote"] | null;
@ -11291,6 +11495,7 @@ export interface components {
crisis_resource?: components["schemas"]["CrisisResourceResponse"] | null;
/** Effective Openness */
effective_openness: number;
inner_reaction?: components["schemas"]["ClientInnerReactionV1"] | null;
/** Output Error */
output_error?: string | null;
progress?: components["schemas"]["SessionProgress"] | null;

View file

@ -231,6 +231,8 @@ export type SessionStageProgress = ApiSchema<"SessionStageProgress">;
/** POST /sessions/{id}/turn — sessions.py TurnResponse */
export type TurnResponse = ApiSchema<"TurnResponse">;
/** 내담자 속마음 요약(§8.2) — 회기 중·회기 후 노출 공통 형태 */
export type ClientInnerReactionV1 = ApiSchema<"ClientInnerReactionV1">;
export type LiveCoachRequest = ApiSchema<"LiveCoachRequest">;
export type LiveCoachCreditEvent = ApiSchema<"LiveCoachCreditEvent">;
export type LiveCoachEvent = ApiSchema<"LiveCoachEvent">;
@ -321,6 +323,8 @@ export interface SessionStreamDone {
output_error?: string | null;
/** P2 단계 누적 게이지·상세 수치 */
progress?: SessionProgress | null;
/** 내담자 속마음 요약(§8.2). 피드백 꺼짐·미저장이면 null */
inner_reaction?: ClientInnerReactionV1 | null;
}
function safeParse(data: string): unknown {
@ -391,6 +395,7 @@ export async function openSessionStream(
conversation_stopped: parsed.conversation_stopped,
output_error: parsed.output_error,
progress: parsed.progress ?? null,
inner_reaction: parsed.inner_reaction ?? null,
};
handlers.onDone?.(donePayload);
return;