o2o-negosium-original/agent/tenants/_base/tenant.yaml
hbyang 1c8c4254a6 [feat] 협상 멘트 스타일 파이프라인(마커) + agent 카드 DB 소스 + supplier_items 연동
표현 아키텍처: agent 스크립트는 의미(텍스트)만 소유, 표현(굵기·색)은 프론트 소유.
Slate 는 negodata 에디터 내부에만 두고, 전송/저장은 마커 문자열 한 벌(구버전의 리치텍스트 이중관리 폐기).

- 트랙 A (negodata): serializeToMarker 추가 — Slate 마크(bold/underline/color)를 **/__/{{토큰}} 로
  인코딩해 nego_cards.script 저장. edit_script(Slate 원본)는 재편집 전용. 고정 3색 → 시맨틱 토큰(강조/안내).
- 트랙 B (agent): 카드 멘트 DB 소스 — ICardScriptRepository/CardScriptDbRepository(port+adapter),
  ScriptRepository.resolve_card_script 가 cards.source_type=backoffice_db 면 card.nego_cards.script 우선,
  없으면 파일 폴백. action_id→card_id→nego_cards.number 매칭.
- 트랙 C (양 프론트): renderEmphasis 재귀 파서 — **굵게**·__밑줄__·{{강조|빨강}}·{{안내|파랑}} 중첩 렌더.
  색은 시맨틱 토큰→디자인 토큰 클래스(다크모드 안전). negodata tokens.css 에 --info 신설. CardTable 미리보기 적용.
- supplier_items 연동: 유통코드=supplier_items.supply_type(→quotations.supplier_type 폴백),
  파트너유형=상품별 매핑 협력사 수(→세션 이력 폴백).
- 가격 수용률: 기존 공급가(item_price) 기준 양보율로 정정 — 첫 라운드부터 실값(첫 제시가 기준 0 아님).

테스트: agent 86/86, 공급사 frontend·negodata front tsc 통과.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 15:19:45 +09:00

79 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 공유 베이스 정책 (계획서 D). 신규 테넌트 cold-start 의 기준값.
# 모든 값은 우리 플랫폼의 중립 기본값이다(CLEANROOM.md). 특정 고객 운영값 복제 아님.
# 실제 운영값은 각 테넌트 YAML/DB 에서 주입한다. 차원 개수만 기능적 설계, 값/라벨은 우리 선택.
tenant_id: _base
inherits_base: false # 베이스는 자기 자신을 상속하지 않음
name: "Shared Base Policy"
state:
revenue:
thresholds: [10000000, 50000000] # 플랫폼 중립 기본 구간
weights: [0.3, 0.6, 1.0]
descriptions: ["low", "mid", "high"]
distribution:
code_map: {A: 0, B: 1, C: 2} # 중립 예시 코드(테넌트가 자사 코드로 오버라이드)
weights: [0.3, 0.6, 1.0]
descriptions: ["channel_a", "channel_b", "channel_c"]
partner:
weights: [0.5, 1.0, 0.3] # single, multiple, none
descriptions: ["single", "multiple", "none"]
acceptance:
thresholds: [0.03, 0.09]
weights: [0.3, 0.6, 1.0]
descriptions: ["low", "mid", "high"]
price_zone:
weights: [1.0, 0.5] # at_or_below_anchor(우선협상), above_anchor(협상지속)
descriptions: ["at_or_below_anchor", "above_anchor"]
# state_space_size 는 차원 곱으로 자동 산출: 3×3×3×3×2 = 162
reward:
beta: 0.2
success_reward: 1.0
ongoing_reward: 0.0
failure_penalty: -0.5
penalty_lambda: 0.02
w1: 0.2
w2: 0.2
w3: 0.2
w4: 0.2
w5: 0.2
min_weight: 0.2
max_weight: 0.8
policy:
type: ucb
learning_rate: 0.1 # 표준 기본값
gamma: 0.95
params:
exploration_constant: 1.4142135623730951 # sqrt(2) — 표준 UCB 상수
epsilon: 1.0e-6
action_mapping:
type: file
# 기본 9카드 — 자동 온보딩(신규 company_id) 테넌트가 물려받는 카드 공간(base 정책 162×9와 정합).
# 테넌트는 자사 카탈로그(card.nego_cards/tenant_action_cards)로 override 한다.
action_to_card:
"0": "NGC-001"
"1": "NGC-002"
"2": "NGC-003"
"3": "NGC-004"
"4": "NGC-005"
"5": "NGC-006"
"6": "NGC-007"
"7": "NGC-008"
"8": "NGC-009"
cards:
# file: scripts_cards.json(파일) 사용. backoffice_db: card.nego_cards.script(negodata 편집 정본)를
# 카드코드(action_to_card)로 조회, 없으면 파일 폴백. 테넌트가 자사 카드를 편집하면 backoffice_db 로 전환.
source_type: file
sync_interval_seconds: 300
connection: {}
llm:
enabled: false
resources:
language: ko
scripts_dir: resources