v4.3.30: 기본 날씨 2종을 스킬 게이트에서 해제 — 일상 질문에 스킬 토글 불필요
"내일 날씨"는 일상 질문인데 9개 날씨 도구가 전부 meteorologist 스킬 뒤에 있어, 스킬이 꺼진 계정에서는 날씨 도구가 하나도 없이 web_search로 폴백하고 있었음. 두 단계로 분리: - 기본(키워드만 요구, 스킬 불필요): weather_kma, weather_openmeteo — 합 446토큰, 날씨 키워드가 있을 때만 붙음. 둘이서 한국(관측 기반)과 해외(강수확률·시간별)를 모두 커버함 - 전문(스킬+키워드 유지): ERA5/CDS/CMIP6/NASA POWER 재분석·기후 아카이브, 대기질(airpollution/airkorea), 그리고 weather_search — openmeteo와 스키마 비용은 같은데(290토큰) 담는 데이터는 적은 중복 폴백이라 전문 쪽에 둠 배포 후 확인(스킬 여전히 꺼진 상태): - "내일 구미 날씨" → weather_kma, 강수확률 20% 포함 - "내일 파리 날씨" → weather_openmeteo, 16시·18시 뇌우 등 시간별 예보 반영 어제 계획했던 한국=기상청 / 해외=openmeteo 라우팅이 스킬 토글 없이 성립함. 테스트 123개 통과(날씨 게이트 3종 신규/갱신). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f99dab941
commit
0c75b946d9
2 files changed
+31
-5
No files matched your search
@@ -55,7 +55,17 @@ export function buildSkillToolFilter(input: ToolScopeInput): (toolName: string)
|
||||
const userWorkspace = input.userWorkspace;
|
||||
const isSkillEnabledForUser = input.isSkillEnabledForUser;
|
||||
|
||||
const weatherToolNames = new Set(['weather_search', 'weather_airpollution', 'weather_openmeteo', 'weather_kma', 'weather_airkorea', 'weather_nasa_power', 'weather_era5', 'weather_cds', 'weather_cmip6']);
|
||||
// Weather comes in two tiers (2026-07-29). "내일 날씨" is an everyday question, not a
|
||||
// specialist one, but all nine weather tools sat behind the meteorologist skill — so with the
|
||||
// skill off a plain weather question had no weather tool at all and fell back to web_search.
|
||||
// These two cover the ordinary case between them (weather_kma = Korean observations,
|
||||
// weather_openmeteo = everywhere else, both with precipitation chance) for 446 tokens, and
|
||||
// only when a weather keyword is present. They need no skill toggle.
|
||||
const basicWeatherToolNames = new Set(['weather_kma', 'weather_openmeteo']);
|
||||
// The rest stay behind the skill: reanalysis/climate archives (ERA5, CDS, CMIP6, NASA POWER)
|
||||
// are genuinely specialist, air quality is a separate concern, and weather_search is a
|
||||
// redundant fallback whose schema costs as much as openmeteo while carrying less data.
|
||||
const weatherToolNames = new Set(['weather_search', 'weather_airpollution', 'weather_airkorea', 'weather_nasa_power', 'weather_era5', 'weather_cds', 'weather_cmip6']);
|
||||
const legalToolNames = new Set(['korean_law_search', 'korean_law_fetch', 'us_case_search']);
|
||||
const pptxToolNames = new Set(['create_presentation', 'edit_presentation']);
|
||||
// In practice these are only ever used while building an academic presentation (gather
|
||||
@@ -166,6 +176,7 @@ export function buildSkillToolFilter(input: ToolScopeInput): (toolName: string)
|
||||
if (dormantDesktopTools.has(name)) return false;
|
||||
if (name.startsWith('mcp__dental-dict-sqlite__') && !isDentalAppSession) return false;
|
||||
if ((name.startsWith('mcp__psychotherapy-cases-sqlite__') || name.startsWith('mcp__psychiatry-cases-sqlite__')) && !isMindAppSession) return false;
|
||||
if (basicWeatherToolNames.has(name) && !isWeatherAppSession && !hasWeatherKeyword) return false;
|
||||
if (weatherToolNames.has(name) && !isWeatherAppSession && !(meteorologistEnabled && hasWeatherKeyword)) return false;
|
||||
// Windy map screenshots only make sense inside the dedicated weather app tab (the
|
||||
// model there has already generated the embed.windy.com URL to capture) — unlike the
|
||||
|
||||
@@ -51,10 +51,25 @@ describe('키워드 게이트 — 필요할 때 확실히 나타난다', () => {
|
||||
assert.equal(filterFor('오늘 미국 주요 뉴스')('news_search'), true);
|
||||
});
|
||||
|
||||
test('날씨는 스킬+키워드 둘 다 필요', () => {
|
||||
// 스킬이 꺼져 있으면 키워드만으로는 안 열린다.
|
||||
assert.equal(filterFor('내일 날씨 어때')('weather_kma'), false);
|
||||
assert.equal(buildSkillToolFilter({ ...allSkills, message: '내일 날씨 어때' })('weather_kma'), true);
|
||||
test('기본 날씨 2종은 스킬 없이 키워드만으로 열린다 — 일상 질문이므로', () => {
|
||||
// "내일 날씨"는 전문가 기능이 아니다. 이 둘이 한국(관측)+해외(강수확률)를 커버한다.
|
||||
const f = filterFor('내일 날씨 어때');
|
||||
assert.equal(f('weather_kma'), true);
|
||||
assert.equal(f('weather_openmeteo'), true);
|
||||
});
|
||||
|
||||
test('전문 날씨 도구는 여전히 스킬을 요구한다', () => {
|
||||
// 재분석·기후 아카이브(ERA5/CMIP6/CDS/NASA POWER)와 대기질은 일상 질문이 아니다.
|
||||
const f = filterFor('내일 날씨 어때');
|
||||
for (const n of ['weather_era5', 'weather_cmip6', 'weather_cds', 'weather_nasa_power', 'weather_airkorea', 'weather_search']) {
|
||||
assert.equal(f(n), false, `${n} 이(가) 스킬 없이 노출됨`);
|
||||
}
|
||||
assert.equal(buildSkillToolFilter({ ...allSkills, message: '내일 날씨 어때' })('weather_era5'), true);
|
||||
});
|
||||
|
||||
test('날씨 키워드가 없으면 기본 날씨 도구도 안 열린다', () => {
|
||||
assert.equal(filterFor('안녕')('weather_kma'), false);
|
||||
assert.equal(filterFor('안녕')('weather_openmeteo'), false);
|
||||
});
|
||||
|
||||
test('코드 관련 표현이면 편집/셸 도구가 열린다', () => {
|
||||
|
||||
Reference in new issue
Block a user