Compare commits

..

4 commits

Author SHA1 Message Date
Yun Chan
fe0989c456 chore(release): v1.15.3
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Failing after 21s
ci / 워크스페이스 빌드 검증 (push) Has been skipped
ci / 모바일 린트·타입·Jest (push) Successful in 48s
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 27s
ci / .NET API 서버 테스트 (push) Successful in 15s
deploy-site / deploy (push) Successful in 25s
release / release-windows (push) Failing after 13m41s
portable-unsigned / portable-windows (push) Failing after 13m46s
2026-10-31 04:46:38 +09:00
Yun Chan
02d0d0c6c1 fix(desktop): resolve Ctrl+Alt+Enter accept drops and duplicate typo LLM checks 2026-10-31 04:45:55 +09:00
Yun Chan
2a62f2496a chore(release): v1.15.2 2026-10-31 04:20:30 +09:00
Yun Chan
41901c1ec5 fix(desktop): prevent modifier key buffer resets, clipboard race on terminal accept, and redundant UIA settle snapshots 2026-10-31 04:19:53 +09:00
44 changed files with 476 additions and 80 deletions

View file

@ -12,6 +12,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Additional Whisper model management UI - Additional Whisper model management UI
- Plugin system for custom pipelines - Plugin system for custom pipelines
## [1.15.3] - 2026-10-31
> Published from an annotated tag. Installer and update metadata are served by the
> canonical Forgejo feed; no binaries are committed to this repository.
### Fixed
- **`Ctrl + Alt + Enter` suggestion acceptance reliability (`@d3ro/core/keybinding-runtime`, `KeyBindingService`, `SuggestionService`, `bootstrap`).**
- Fixes `ChordStateMachine.keyUp` so releasing a shared modifier (`Ctrl` or `RightAlt`) releases all held chords in `_isDown` that depend on that modifier instead of stopping after the first match (`command` `Ctrl+RightAlt`), preventing `suggestion-accept` (`Ctrl+Alt+Enter`) from remaining stuck in `_isDown` and silently dropping subsequent presses as auto-repeat.
- Maps `UiohookKey.NumpadEnter` and numpad navigation keys in `UIOHOOK_TO_VK` and adds a 25 ms OS `globalShortcut` fallback trigger in `KeyBindingService._syncSuggestionCapture` so `Ctrl+Alt+Enter` still fires even if `uiohook` misses a key event.
- Keeps OS suggestion shortcut capture active while the `"생성 중..."` pending indicator or an accept is in flight (`isOverlayOrCaptureActive`), and when `Ctrl+Alt+Enter` is pressed while candidate #1 is still streaming (`_inFlight` / `_generating` / `_pending`), waits up to 2.5 s for candidate #1 to finish and immediately accepts it instead of ignoring the key press.
- **Duplicate typo-model check elimination (`TypoCorrectionService.propose`).**
- Skips re-running `_askModel` in `TypoCorrectionService.propose` when `handleTypingContext` has already verified the same region (`_isRegionChecked(region)`), preventing a redundant 336-token LLM call during suggestion candidate filling from evicting Ollama's suggestion KV cache.
## [1.15.2] - 2026-10-31
> Published from an annotated tag. Installer and update metadata are served by the
> canonical Forgejo feed; no binaries are committed to this repository.
### Fixed
- **Modifier key (`Ctrl` / `Alt` / `Shift` / `Win`) classification & terminal buffer preservation (`@d3ro/core/input-intelligence`, `@d3ro/core/terminal-prompt`, `InputTelemetryService`).**
- Fixes `classifyKeyStroke` so modifier virtual keycodes (`0x10..0x12`, `0x5b..0x5c`, `0xa0..0xa5`) are classified as `'modifier'` before checking `modifiers.ctrl || modifiers.alt || modifiers.meta` (which `uiohook-napi` sets to `true` on the modifier keydown itself). Previously, pressing or holding `Ctrl` / `Alt` was misclassified as `'shortcut'` (`key=shortcut+C+A`), wiping out `TerminalKeystrokeTracker`'s active line buffer (`prefixLen=0`), clearing `_typedInCurrentFocus`, and triggering repeated UIA snapshots on every key-repeat tick.
- Ignores standalone modifier keydowns and D3RO Voice's own `Ctrl+Alt` suggestion navigation/accept chords (`Ctrl+Alt+Up/Down/Left/Right/Enter/Space/Backspace`) in `InputTelemetryService._handleKeyDown` and `TerminalKeystrokeTracker.onKeyDown` without advancing `_inputRevision` / `_lastKeyAt` or resetting the tracked terminal line.
- **Terminal suggestion acceptance without clipboard race (`SuggestionService._insertAccepted`).**
- Uses direct Unicode keyboard injection (`insertMethod = 'keyboard'` via `SendInput(KEYEVENTF_UNICODE)`) instead of clipboard `Ctrl+V` when accepting a suggestion in terminal mode (`terminalMode === true` or `isTerminalApp(appName)`, including `xterm-helper-textarea`, `WindowsTerminal`, and `Kitedesk`), preventing delayed terminal paste processing from pasting the restored previous clipboard content (such as copied URLs) and synchronizing `TerminalKeystrokeTracker` via `applyProgrammaticReplacement`.
- Stops the background candidate fill loop (`_fillRemainingCandidates`) immediately when `SuggestionService.accept()` is triggered so new candidates do not continue streaming while waiting for modifier release.
- **UIA snapshot timer optimization (`InputTelemetryService._scheduleTextSnapshot`, `_readTextSnapshot`).**
- Skips scheduling the 780 ms `_settleTimer` UIA snapshot on non-typing keys (`Enter`, `Arrow`, `Shortcut`, `Navigation`, `Function`, `Tab`) and automatically cancels any pending `_settleTimer` once the 380 ms `_textTimer` snapshot determines the field cannot trigger a suggestion (`prefixLen < minPrefixChars`, non-editable, or password), cutting redundant UIA bridge calls in half during everyday typing and navigation.
## [1.15.1] - 2026-10-31 ## [1.15.1] - 2026-10-31
> Published from an annotated tag. Installer and update metadata are served by the > Published from an annotated tag. Installer and update metadata are served by the

View file

@ -3,7 +3,7 @@
"info": { "info": {
"title": "D3RO-VOICE Admin API", "title": "D3RO-VOICE Admin API",
"description": "Admin CRM Edge Functions for user management, subscription CRUD, payment history, and audit logs.", "description": "Admin CRM Edge Functions for user management, subscription CRUD, payment history, and audit logs.",
"version": "1.15.1" "version": "1.15.3"
}, },
"servers": [ "servers": [
{ {

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/admin", "name": "@d3ro/admin",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"description": "D3RO Voice Admin CRM — SaaS 관리 도구", "description": "D3RO Voice Admin CRM — SaaS 관리 도구",
"scripts": { "scripts": {

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net10.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<Version>1.15.1</Version> <Version>1.15.3</Version>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup> </PropertyGroup>

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/desktop", "name": "@d3ro/desktop",
"version": "1.15.1", "version": "1.15.3",
"productName": "d3ro-voice", "productName": "d3ro-voice",
"description": "로컬 AI 음성 어시스턴트 (Electron)", "description": "로컬 AI 음성 어시스턴트 (Electron)",
"main": "./out/main/index.js", "main": "./out/main/index.js",

View file

@ -284,7 +284,7 @@ async function initInputIntelligence(): Promise<void> {
// 제안 창이 떠 있는 동안만 제안 단축키를 OS 에서 잡는다 — Ctrl+Alt+Enter 가 앱에도 전달돼 // 제안 창이 떠 있는 동안만 제안 단축키를 OS 에서 잡는다 — Ctrl+Alt+Enter 가 앱에도 전달돼
// 개행이 들어가던 문제(2026-10-03). 창이 사라지면 바로 푼다. // 개행이 들어가던 문제(2026-10-03). 창이 사라지면 바로 푼다.
const syncSuggestionKeyCapture = (): void => const syncSuggestionKeyCapture = (): void =>
getKeyBindingService().setSuggestionCaptureActive(suggestion.isPresentationActive) getKeyBindingService().setSuggestionCaptureActive(suggestion.isOverlayOrCaptureActive)
suggestion.on('updated', (state) => { suggestion.on('updated', (state) => {
overlay.onUpdated(state) overlay.onUpdated(state)
syncSuggestionKeyCapture() syncSuggestionKeyCapture()
@ -319,7 +319,7 @@ async function initInputIntelligence(): Promise<void> {
trackModifierKeys() trackModifierKeys()
uIOhook.on('keydown', (event: UiohookKeyboardEvent) => { uIOhook.on('keydown', (event: UiohookKeyboardEvent) => {
if (uiohookCodeToVk(event.keycode) !== VK.Escape) return if (uiohookCodeToVk(event.keycode) !== VK.Escape) return
const shouldDismiss = shouldDismissOnEscape(suggestion.isPresentationActive, { const shouldDismiss = shouldDismissOnEscape(suggestion.isOverlayOrCaptureActive, {
ctrl: event.ctrlKey === true, ctrl: event.ctrlKey === true,
alt: event.altKey === true, alt: event.altKey === true,
shift: event.shiftKey === true, shift: event.shiftKey === true,

View file

@ -40,6 +40,7 @@ import {
isTerminalApp, isTerminalApp,
manhattanDistance, manhattanDistance,
mergeActivityBucket, mergeActivityBucket,
normalizeRequestPrefix,
rankFlowWindows, rankFlowWindows,
recommendAppExclusion, recommendAppExclusion,
summarizeActivity, summarizeActivity,
@ -532,8 +533,6 @@ class InputTelemetryService extends EventEmitter {
// ── 이벤트 수집 ──────────────────────────────────────── // ── 이벤트 수집 ────────────────────────────────────────
private _handleKeyDown(event: UiohookKeyboardEvent): void { private _handleKeyDown(event: UiohookKeyboardEvent): void {
// 합성 키도 화면을 바꾼다. 통계 제외 여부와 무관하게 이전 UIA 응답은 무효다.
this._inputRevision += 1
this._syncModifiers(event) this._syncModifiers(event)
// Win32 SendInput(KEYEVENTF_UNICODE) 가 보내는 합성 유니코드 키는 uiohook 에서 keycode=0 으로 들어온다. // Win32 SendInput(KEYEVENTF_UNICODE) 가 보내는 합성 유니코드 키는 uiohook 에서 keycode=0 으로 들어온다.
// 사용자 키스트로크나 IME 입력으로 처리하면 버퍼와 타이머를 교란하므로 즉시 무시한다. // 사용자 키스트로크나 IME 입력으로 처리하면 버퍼와 타이머를 교란하므로 즉시 무시한다.
@ -553,6 +552,7 @@ class InputTelemetryService extends EventEmitter {
vk === 0xa2 || vk === 0xa2 ||
vk === 0xa3 vk === 0xa3
if (isExpectedProgrammaticKey) { if (isExpectedProgrammaticKey) {
this._inputRevision += 1
this._programmaticKeys -= 1 this._programmaticKeys -= 1
if (this._programmaticKeys === 0) { if (this._programmaticKeys === 0) {
this._scheduleTextSnapshot() this._scheduleTextSnapshot()
@ -560,6 +560,24 @@ class InputTelemetryService extends EventEmitter {
return return
} }
} }
// 순수 수정자 키(Ctrl/Alt/Shift/Win) 단독 눌림·키 반복은 화면 텍스트를 바꾸지 않는다.
// 여기서 _inputRevision·_lastKeyAt·스냅샷 타이머를 건드리면 수정자 키를 쥐고 있는 동안
// 진행 중 UIA 스냅샷이 버려지고 유휴 시간(idleMs)과 터미널 버퍼가 리셋된다.
if (vk !== null && classifyKeyStroke(vk, this._modifiers) === 'modifier') {
return
}
// D3RO Voice 전역 제안 탐색/수락 단축키(Ctrl+Alt+방향키/Enter/Space/Backspace)는
// OS globalShortcut 이 가로채므로 대상 앱 텍스트를 바꾸지 않는다.
const isSuggestionChord =
this._modifiers.ctrl &&
this._modifiers.alt &&
!this._modifiers.meta &&
(vk === 0x0d || vk === 0x20 || vk === 0x08 || (vk !== null && vk >= 0x25 && vk <= 0x28))
if (isSuggestionChord) {
return
}
// 실제 키 입력은 화면을 바꾼다 — 이전 UIA 응답은 무효다.
this._inputRevision += 1
this._registerInput(true) this._registerInput(true)
const bucket = this._bucket() const bucket = this._bucket()
// 한글·일본어 IME 가 켜져 있으면 Windows 는 글자 키를 VK_PROCESSKEY 로 넘기고, uiohook 은 그것을 // 한글·일본어 IME 가 켜져 있으면 Windows 는 글자 키를 VK_PROCESSKEY 로 넘기고, uiohook 은 그것을
@ -836,11 +854,15 @@ class InputTelemetryService extends EventEmitter {
}, INPUT_TELEMETRY_DEFAULTS.textSnapshotDebounceMs) }, INPUT_TELEMETRY_DEFAULTS.textSnapshotDebounceMs)
this._textTimer.unref?.() this._textTimer.unref?.()
// 제안 트리거 지연(기본 1000ms)이 스냅샷 디바운스(700ms)보다 크다. 스냅샷이 // 제안 트리거 지연(기본 600ms)이 스냅샷 디바운스(380ms)보다 크다. 스냅샷이
// 디바운스에만 돌면 "타이핑을 멈춘 뒤 N ms" 조건이 결코 충족되지 않아 // 디바운스에만 돌면 "타이핑을 멈춘 뒤 N ms" 조건이 결코 충족되지 않아
// 제안이 영원히 요청되지 않는다(실측: debounce 로그만 반복). 그래서 // 제안이 영원히 요청되지 않는다(실측: debounce 로그만 반복). 그래서
// 트리거 지연을 넘긴 시점에 한 번 더 스냅샷을 돌려 게이트를 연다. // 실제 글자/편집 입력이 있었고 제안이 켜져 있을 때만 트리거 지연을 넘긴 시점에 한 번 더 스냅샷을 돌린다.
if (this._settleTimer) clearTimeout(this._settleTimer) if (this._settleTimer) {
clearTimeout(this._settleTimer)
this._settleTimer = null
}
if ((!keyClass || TYPING_KEY_CLASSES.has(keyClass)) && configGet('suggestionEnabled') === true) {
// 조합 중(한글은 멈출 때 거의 늘 조합 중이다)에 필요한 유휴 시간을 막 넘긴 순간에 찍는다 — 예전엔 // 조합 중(한글은 멈출 때 거의 늘 조합 중이다)에 필요한 유휴 시간을 막 넘긴 순간에 찍는다 — 예전엔
// 지연+400ms(=1초)라 멈춘 뒤 제안이 그만큼 늦게 시작됐다(실측 2026-10-17: "빠릿하지 않다"). // 지연+400ms(=1초)라 멈춘 뒤 제안이 그만큼 늦게 시작됐다(실측 2026-10-17: "빠릿하지 않다").
const settleDelay = Math.max( const settleDelay = Math.max(
@ -853,6 +875,7 @@ class InputTelemetryService extends EventEmitter {
}, settleDelay) }, settleDelay)
this._settleTimer.unref?.() this._settleTimer.unref?.()
} }
}
/** /**
* 포커스 입력창 스냅샷을 읽어 (1) 타이핑 통계를 갱신하고 * 포커스 입력창 스냅샷을 읽어 (1) 타이핑 통계를 갱신하고
@ -1141,6 +1164,21 @@ class InputTelemetryService extends EventEmitter {
} }
this._lastContext = context this._lastContext = context
if (this._settleTimer) {
const minPrefixChars = configGet('suggestionMinPrefixChars') || SUGGESTION_DEFAULTS.minPrefixChars
const canTriggerSuggestion =
configGet('suggestionEnabled') === true &&
context.available &&
context.isEditable &&
!context.isPassword &&
context.editedSinceFocus &&
context.typedRecently &&
normalizeRequestPrefix(context.prefix).length + (context.isComposing ? 1 : 0) >= minPrefixChars
if (!canTriggerSuggestion) {
clearTimeout(this._settleTimer)
this._settleTimer = null
}
}
this.emit('typed-context', context) this.emit('typed-context', context)
// 진단 줄이 즉시 갱신되도록 상태 변경을 알린다 (키 입력마다가 아니라 스냅샷마다). // 진단 줄이 즉시 갱신되도록 상태 변경을 알린다 (키 입력마다가 아니라 스냅샷마다).
this._emitState() this._emitState()

View file

@ -17,7 +17,11 @@ import { getLogger } from './LoggerService'
import { acquireGlobalInputHook } from './global-input-hook' import { acquireGlobalInputHook } from './global-input-hook'
import { forgetHeldModifiers } from './modifier-state' import { forgetHeldModifiers } from './modifier-state'
import { configGet, loadKeyBindings, onConfigChanged } from './ConfigService' import { configGet, loadKeyBindings, onConfigChanged } from './ConfigService'
import { acceleratorsToReserve, suggestionCaptureAccelerators } from './keybinding-accelerator-policy' import {
acceleratorsToReserve,
bindingToAccelerator,
suggestionCaptureAccelerators
} from './keybinding-accelerator-policy'
import type { ReservableBinding } from './keybinding-accelerator-policy' import type { ReservableBinding } from './keybinding-accelerator-policy'
import { D3ROError, ErrorCode } from '@d3ro/core/errors' import { D3ROError, ErrorCode } from '@d3ro/core/errors'
import { import {
@ -33,7 +37,12 @@ import type {
ChordClock, ChordClock,
ChordTriggerEvent ChordTriggerEvent
} from '@d3ro/core/keybinding-runtime' } from '@d3ro/core/keybinding-runtime'
import type { KeyBinding, KeyBindingActionSpec, MouseButtonCode } from '@d3ro/core/types' import type {
KeyBinding,
KeyBindingActionId,
KeyBindingActionSpec,
MouseButtonCode
} from '@d3ro/core/types'
const logger = getLogger('KeyBindingService') const logger = getLogger('KeyBindingService')
@ -205,9 +214,22 @@ const VK_TO_UIOHOOK: ReadonlyMap<number, number> = new Map([
[VK.NumLock, UiohookKey.NumLock] [VK.NumLock, UiohookKey.NumLock]
]) ])
const UIOHOOK_TO_VK: ReadonlyMap<number, number> = new Map( const UIOHOOK_TO_VK: ReadonlyMap<number, number> = new Map([
Array.from(VK_TO_UIOHOOK, ([vk, uiohookCode]) => [uiohookCode, vk] as const) ...Array.from(VK_TO_UIOHOOK, ([vk, uiohookCode]) => [uiohookCode, vk] as const),
) // 넘패드 확장 키(NumpadEnter / Numpad 방향키)는 Windows VK 에 별도 코드가 없어
// 일반 Enter / 방향키 VK 로 합류시킨다 — 넘패드 Enter 로도 Ctrl+Alt+Enter 수락이 동작하도록 한다.
[UiohookKey.NumpadEnter, VK.Enter],
[UiohookKey.NumpadArrowLeft, VK.ArrowLeft],
[UiohookKey.NumpadArrowUp, VK.ArrowUp],
[UiohookKey.NumpadArrowRight, VK.ArrowRight],
[UiohookKey.NumpadArrowDown, VK.ArrowDown],
[UiohookKey.NumpadHome, VK.Home],
[UiohookKey.NumpadEnd, VK.End],
[UiohookKey.NumpadPageUp, VK.PageUp],
[UiohookKey.NumpadPageDown, VK.PageDown],
[UiohookKey.NumpadInsert, VK.Insert],
[UiohookKey.NumpadDelete, VK.Delete]
])
/** /**
* uiohook 이트 키코드 → Windows VK (정본 좌표계). * uiohook 이트 키코드 → Windows VK (정본 좌표계).
@ -263,7 +285,12 @@ class KeyBindingService extends EventEmitter {
/** press / release · 더블프레스 · AltGr 보류 판정 (순수 정책, core) */ /** press / release · 더블프레스 · AltGr 보류 판정 (순수 정책, core) */
private readonly _machine = new ChordStateMachine({ private readonly _machine = new ChordStateMachine({
clock: systemClock, clock: systemClock,
onTrigger: (event) => this.emit('triggered', event), onTrigger: (event) => {
if (event.type === 'pressed') {
this._lastPressedAt.set(event.actionId, Date.now())
}
this.emit('triggered', event)
},
debug: (message) => logger.debug(message) debug: (message) => logger.debug(message)
}) })
@ -279,6 +306,8 @@ class KeyBindingService extends EventEmitter {
/** 제안 창이 떠 있는 동안만 잡는 제안 단축키 (키를 앱에 넘기지 않으려고) */ /** 제안 창이 떠 있는 동안만 잡는 제안 단축키 (키를 앱에 넘기지 않으려고) */
private _suggestionCaptureWanted = false private _suggestionCaptureWanted = false
private _capturedAccelerators: Set<string> = new Set() private _capturedAccelerators: Set<string> = new Set()
private _lastPressedAt: Map<KeyBindingActionId, number> = new Map()
private _captureFallbackTimers: Set<ReturnType<typeof setTimeout>> = new Set()
/** 상태 머신에 등록한 바인딩과 액션 — accelerator 예약 정책의 입력 */ /** 상태 머신에 등록한 바인딩과 액션 — accelerator 예약 정책의 입력 */
private _reservable: ReservableBinding[] = [] private _reservable: ReservableBinding[] = []
@ -509,7 +538,9 @@ class KeyBindingService extends EventEmitter {
for (const accelerator of suggestionCaptureAccelerators(this._reservable, process.platform, this._ownedAccelerators)) { for (const accelerator of suggestionCaptureAccelerators(this._reservable, process.platform, this._ownedAccelerators)) {
try { try {
const ok = globalShortcut.register(accelerator, () => { const ok = globalShortcut.register(accelerator, () => {
// noop — 동작은 uiohook 이 낸다. 등록 목적은 키를 앱에 넘기지 않는 것이다. // 기본 경로는 uiohook 이나, 관리자 창(UIPI)·수정자 비동기 등으로 uiohook 이 놓쳤을 때
// OS 핫키만 삼켜지고 동작이 안 나가는 일을 막기 위해 25ms 뒤 폴백 트리거를 보낸다.
this._scheduleCapturedSuggestionFallback(accelerator)
}) })
if (ok) this._capturedAccelerators.add(accelerator) if (ok) this._capturedAccelerators.add(accelerator)
else logger.debug(`제안 단축키를 잡지 못함 (다른 곳에서 사용 중): ${accelerator}`) else logger.debug(`제안 단축키를 잡지 못함 (다른 곳에서 사용 중): ${accelerator}`)
@ -519,7 +550,37 @@ class KeyBindingService extends EventEmitter {
} }
} }
private _scheduleCapturedSuggestionFallback(accelerator: string): void {
const timer = setTimeout(() => {
this._captureFallbackTimers.delete(timer)
if (!this._suggestionCaptureWanted || !this._isRunning) return
const now = Date.now()
for (const { actionId, binding } of this._reservable) {
if (bindingToAccelerator(binding, process.platform) !== accelerator) continue
const lastPressed = this._lastPressedAt.get(actionId) ?? 0
if (now - lastPressed <= 250) continue
this._lastPressedAt.set(actionId, now)
logger.info(`제안 단축키 OS 캡처 폴백 발동: ${actionId} (${accelerator})`)
this.emit('triggered', {
actionId,
type: 'pressed',
isDoublePress: false,
holdMode: false,
timestamp: now,
durationMs: 0,
binding: { ...binding }
})
}
}, 25)
timer.unref?.()
this._captureFallbackTimers.add(timer)
}
private _releaseSuggestionCapture(): void { private _releaseSuggestionCapture(): void {
for (const timer of this._captureFallbackTimers) {
clearTimeout(timer)
}
this._captureFallbackTimers.clear()
for (const accelerator of this._capturedAccelerators) { for (const accelerator of this._capturedAccelerators) {
try { try {
globalShortcut.unregister(accelerator) globalShortcut.unregister(accelerator)

View file

@ -86,6 +86,8 @@ export interface SuggestionLearningPort {
recordAccepted(text: string, meta: { appName: string | null; windowTitle: string | null }): void recordAccepted(text: string, meta: { appName: string | null; windowTitle: string | null }): void
/** 곧 보낼 프로그램 키 수(교정 수락의 백스페이스 등) — 입력 통계에서 뺀다. */ /** 곧 보낼 프로그램 키 수(교정 수락의 백스페이스 등) — 입력 통계에서 뺀다. */
expectProgrammaticKeys?(count: number): void expectProgrammaticKeys?(count: number): void
/** 터미널 키스트로크 버퍼에 프로그램 치환/삽입을 반영한다. */
applyProgrammaticReplacement?(deleteCount: number, insertText: string, baseLength?: number): void
} }
/** /**
@ -132,6 +134,8 @@ export function createDefaultSuggestionServiceDeps(): SuggestionServiceDeps {
learning: { learning: {
expectProgrammaticInsert: (text) => getInputTelemetryService().expectProgrammaticInsert(text), expectProgrammaticInsert: (text) => getInputTelemetryService().expectProgrammaticInsert(text),
expectProgrammaticKeys: (count) => getInputTelemetryService().expectProgrammaticKeys(count), expectProgrammaticKeys: (count) => getInputTelemetryService().expectProgrammaticKeys(count),
applyProgrammaticReplacement: (deleteCount, insertText, baseLength) =>
getInputTelemetryService().applyProgrammaticReplacement(deleteCount, insertText, baseLength),
recordAccepted: (text, meta) => recordAccepted: (text, meta) =>
getInputTelemetryService().recordExternalText(text, { ...meta, source: 'suggestion' }) getInputTelemetryService().recordExternalText(text, { ...meta, source: 'suggestion' })
} }
@ -464,6 +468,11 @@ export class SuggestionService extends EventEmitter {
return this.isVisible || this._generating || this._warmingUp || this._partialText.length > 0 return this.isVisible || this._generating || this._warmingUp || this._partialText.length > 0
} }
/** 오버레이가 화면에 떠 있거나("생성 중" 보류·수락 대기 포함) 제안 단축키 캡처가 필요한 상태인가 */
get isOverlayOrCaptureActive(): boolean {
return this.isPresentationActive || this._pending || this._acceptInFlight
}
get activeText(): string | null { get activeText(): string | null {
return this._candidates[this._activeIndex]?.text ?? null return this._candidates[this._activeIndex]?.text ?? null
} }
@ -2112,6 +2121,26 @@ export class SuggestionService extends EventEmitter {
if (index !== undefined && index >= 0 && index < this._candidates.length) { if (index !== undefined && index >= 0 && index < this._candidates.length) {
this._activeIndex = index this._activeIndex = index
} }
if (!this._candidates[this._activeIndex] && (this._inFlight || this._generating || this._pending)) {
if (this._pending && !this._inFlight && this._lastContext) {
const config = this.readPolicyConfig()
const prefix = normalizeRequestPrefix(this._lastContext.prefix)
if (prefix.length > 0) {
this._clearPending(false)
void this._generate(prefix, this._lastContext, config.maxCandidates, config.maxChars)
}
}
logger.info('제안 수락 대기: 첫 후보 생성 중 — 완료 즉시 수락합니다')
this._acceptInFlight = true
try {
await this._waitForFirstCandidate(2500)
} finally {
this._acceptInFlight = false
}
if (index !== undefined && index >= 0 && index < this._candidates.length) {
this._activeIndex = index
}
}
const candidate = this._candidates[this._activeIndex] const candidate = this._candidates[this._activeIndex]
if (!candidate) { if (!candidate) {
// 창이 이미 닫힌 뒤의 클릭·단축키 — 조용히 끝나면 "골라도 안 들어간다" 의 원인이 안 보인다. // 창이 이미 닫힌 뒤의 클릭·단축키 — 조용히 끝나면 "골라도 안 들어간다" 의 원인이 안 보인다.
@ -2146,11 +2175,22 @@ export class SuggestionService extends EventEmitter {
const anchorKind = this._anchorKind const anchorKind = this._anchorKind
const provenance = this._provenance const provenance = this._provenance
const composing = this._lastContext?.isComposing === true const composing = this._lastContext?.isComposing === true
const terminalMode = this._lastContext?.terminalMode === true
const appName = this._appName const appName = this._appName
const windowTitle = this._windowTitle const windowTitle = this._windowTitle
const targetWindow = this._windowHandle const targetWindow = this._windowHandle
const sessionRecordId = this._sessionRecordId const sessionRecordId = this._sessionRecordId
// 수락이 시작된 순간 추가 후보 채우기 루프는 즉시 멈춘다 — 손을 떼길 기다리는 동안
// 2/12, 3/12 후보가 계속 스트리밍되면 사용자가 아직 선택 중이라 오인해 Ctrl+Alt 를 계속 쥐고 있게 된다.
if (this._filling) {
this._filling = false
this._fillAbort?.abort()
this._fillAbort = null
if (!this._inFlight) this._generating = false
this.emit('updated', this.getState())
}
// 단축키로 수락했다면 사용자가 아직 키를 쥐고 있다. 그대로 Ctrl+V 를 보내면 대상 앱에 Ctrl+Alt+V 가 들어가 // 단축키로 수락했다면 사용자가 아직 키를 쥐고 있다. 그대로 Ctrl+V 를 보내면 대상 앱에 Ctrl+Alt+V 가 들어가
// 붙여넣기가 되지 않는다. 창을 띄워 둔 채 손을 다 뗄 때까지 기다린다(최대 5초) — 창이 먼저 사라지면 사용자는 // 붙여넣기가 되지 않는다. 창을 띄워 둔 채 손을 다 뗄 때까지 기다린다(최대 5초) — 창이 먼저 사라지면 사용자는
// "들어가는 중" 이라 여기고 계속 쥐고 있었다(2026-10-25). 클릭 수락은 기다림 없이 바로 지나간다. // "들어가는 중" 이라 여기고 계속 쥐고 있었다(2026-10-25). 클릭 수락은 기다림 없이 바로 지나간다.
@ -2173,6 +2213,7 @@ export class SuggestionService extends EventEmitter {
text, text,
deleteCount, deleteCount,
composing, composing,
terminalMode,
appName, appName,
windowTitle, windowTitle,
targetWindow, targetWindow,
@ -2188,6 +2229,34 @@ export class SuggestionService extends EventEmitter {
} }
} }
private _waitForFirstCandidate(timeoutMs: number): Promise<boolean> {
if (this._candidates.length > 0) return Promise.resolve(true)
if (!this._inFlight && !this._generating && !this._pending) return Promise.resolve(false)
return new Promise<boolean>((resolve) => {
let settled = false
const finish = (ok: boolean): void => {
if (settled) return
settled = true
clearTimeout(timer)
this.off('updated', onUpdated)
this.off('cleared', onCleared)
resolve(ok)
}
const onUpdated = (): void => {
if (this._candidates.length > 0) {
finish(true)
} else if (!this._inFlight && !this._generating && !this._pending) {
finish(false)
}
}
const onCleared = (): void => finish(false)
const timer = setTimeout(() => finish(this._candidates.length > 0), timeoutMs)
timer.unref?.()
this.on('updated', onUpdated)
this.on('cleared', onCleared)
})
}
/** 단어 단위 수락 뒤 남은 문장을 같은 자리에 다시 띄운다 — 세션 접두는 방금 넣은 글까지로 맞춘다. */ /** 단어 단위 수락 뒤 남은 문장을 같은 자리에 다시 띄운다 — 세션 접두는 방금 넣은 글까지로 맞춘다. */
private _presentRemainder( private _presentRemainder(
prefixAfterInsert: string, prefixAfterInsert: string,
@ -2222,6 +2291,7 @@ export class SuggestionService extends EventEmitter {
text: string text: string
deleteCount: number deleteCount: number
composing: boolean composing: boolean
terminalMode?: boolean
appName: string | null appName: string | null
windowTitle: string | null windowTitle: string | null
targetWindow: number | null targetWindow: number | null
@ -2230,7 +2300,17 @@ export class SuggestionService extends EventEmitter {
/** 수락한 문장을 사용자 문체 표본으로 배운다 (단어 단위 수락은 false) */ /** 수락한 문장을 사용자 문체 표본으로 배운다 (단어 단위 수락은 false) */
learn?: boolean learn?: boolean
}): Promise<SuggestionRequestResult> { }): Promise<SuggestionRequestResult> {
const { text, deleteCount, composing, appName, windowTitle, targetWindow, sessionRecordId, candidateText } = params const {
text,
deleteCount,
composing,
terminalMode = false,
appName,
windowTitle,
targetWindow,
sessionRecordId,
candidateText
} = params
// 붙여넣기(Ctrl+V)는 그 순간의 포그라운드 창으로 간다. 오버레이는 다음 스냅샷이 와야 // 붙여넣기(Ctrl+V)는 그 순간의 포그라운드 창으로 간다. 오버레이는 다음 스냅샷이 와야
// 닫히므로, 그사이 다른 앱으로 옮겨 간 뒤 수락하면 엉뚱한 창에 삽입됐다 — 세션을 만든 // 닫히므로, 그사이 다른 앱으로 옮겨 간 뒤 수락하면 엉뚱한 창에 삽입됐다 — 세션을 만든
// 창이 아니면 삽입하지 않는다 (창을 알 수 없으면 기존처럼 진행한다). // 창이 아니면 삽입하지 않는다 (창을 알 수 없으면 기존처럼 진행한다).
@ -2247,7 +2327,11 @@ export class SuggestionService extends EventEmitter {
// 삽입 직후의 텍스트 스냅샷 diff 가 이 텍스트를 "타이핑" 으로 다시 학습하지 않도록 알린다. // 삽입 직후의 텍스트 스냅샷 diff 가 이 텍스트를 "타이핑" 으로 다시 학습하지 않도록 알린다.
const cancelExpectedInsert = this._learning.expectProgrammaticInsert(text) const cancelExpectedInsert = this._learning.expectProgrammaticInsert(text)
const method = configGet('insertMethod') const method = configGet('insertMethod')
const insertMethod = method === 'keyboard' ? 'keyboard' : 'clipboard' // 터미널(xterm-helper-textarea, Windows Terminal, Kitedesk 등)에서는 Ctrl+V 붙여넣기가
// 클립보드 복원 타이밍(250ms)과 경합해 이전 클립보드(URL 등)가 대신 붙여넣어지거나 ^V 가 입력될 수 있으므로
// 클립보드를 건드리지 않는 직접 유니코드 키보드 주입('keyboard')을 사용한다.
const isTerminal = terminalMode || isTerminalApp(appName)
const insertMethod = method === 'keyboard' || isTerminal ? 'keyboard' : 'clipboard'
try { try {
if (deleteCount > 0) { if (deleteCount > 0) {
// 확정용 Space(+1)·백스페이스·붙여넣기(Ctrl, V) 키는 사용자 입력 통계에서 뺀다. // 확정용 Space(+1)·백스페이스·붙여넣기(Ctrl, V) 키는 사용자 입력 통계에서 뺀다.
@ -2266,6 +2350,9 @@ export class SuggestionService extends EventEmitter {
logger.warn(`제안 삽입 실패 (method=${result.method}, len=${result.textLength})`) logger.warn(`제안 삽입 실패 (method=${result.method}, len=${result.textLength})`)
return { ok: false, reason: 'generation-failed' } return { ok: false, reason: 'generation-failed' }
} }
if (isTerminal) {
this._learning.applyProgrammaticReplacement?.(deleteCount, text)
}
} catch (error) { } catch (error) {
cancelExpectedInsert() cancelExpectedInsert()
logger.warn(`제안 삽입 예외: ${error instanceof Error ? error.message : String(error)}`) logger.warn(`제안 삽입 예외: ${error instanceof Error ? error.message : String(error)}`)

View file

@ -368,7 +368,12 @@ export class TypoCorrectionService extends EventEmitter {
let fromModel: TypoCorrection[] = [] let fromModel: TypoCorrection[] = []
const model = configGet('typoAutoCorrectUseModel') !== false ? this._deps.warmModel() : null const model = configGet('typoAutoCorrectUseModel') !== false ? this._deps.warmModel() : null
const worthAsking = hasSuspiciousTypo(region) || (options.thorough === true && this._worthModelCheck(region)) // handleTypingContext 의 자동 교정(_runModelCheck)이 이미 같은 구간을 모델로 검사해
// 교정 사항 없음으로 확인했다면, 제안 채우기 중(_proposeLateCorrection) 같은 구간을
// 다시 모델에 물어 Ollama KV 캐시를 밀어내지 않는다.
const worthAsking =
!this._isRegionChecked(region) &&
(hasSuspiciousTypo(region) || (options.thorough === true && this._worthModelCheck(region)))
if (model && worthAsking) { if (model && worthAsking) {
const abort = new AbortController() const abort = new AbortController()
const forward = (): void => abort.abort() const forward = (): void => abort.abort()
@ -377,6 +382,9 @@ export class TypoCorrectionService extends EventEmitter {
timer.unref?.() timer.unref?.()
try { try {
fromModel = await this._askModel(model, prefix, abort.signal, ignoredWords, vocabulary.known) fromModel = await this._askModel(model, prefix, abort.signal, ignoredWords, vocabulary.known)
if (!abort.signal.aborted && fromModel.length === 0) {
this._markRegionChecked(region)
}
} catch (error) { } catch (error) {
if (!abort.signal.aborted) { if (!abort.signal.aborted) {
logger.debug(`제안용 오타 검사 실패: ${error instanceof Error ? error.message : String(error)}`) logger.debug(`제안용 오타 검사 실패: ${error instanceof Error ? error.message : String(error)}`)

View file

@ -507,5 +507,35 @@ describe('KeyBindingService', () => {
expect.any(Function), expect.any(Function),
) )
}) })
it('triggers suggestion-accept for NumpadEnter and via OS capture fallback when uiohook misses the key', () => {
vi.useFakeTimers()
try {
const service = getKeyBindingService()
const triggered: KeyBindingTriggerPayload[] = []
service.on('triggered', (payload) => triggered.push(payload))
service.loadFromConfig()
service.start()
service.setSuggestionCaptureActive(true)
// 1) NumpadEnter via uiohook
hook.keydown({ keycode: UiohookKey.NumpadEnter, ctrlKey: true, altKey: true })
hook.keyup({ keycode: UiohookKey.NumpadEnter, ctrlKey: true, altKey: true })
expect(triggered.filter((t) => t.actionId === 'suggestion-accept' && t.type === 'pressed')).toHaveLength(1)
// 2) OS globalShortcut callback fires without a recent uiohook press (e.g. elevated window / UIPI)
vi.advanceTimersByTime(300)
const returnCall = vi
.mocked(globalShortcut.register)
.mock.calls.find(([accelerator]) => accelerator === 'Control+Alt+Return')
const callback = returnCall?.[1] as (() => void) | undefined
expect(callback).toBeDefined()
callback?.()
vi.advanceTimersByTime(30)
expect(triggered.filter((t) => t.actionId === 'suggestion-accept' && t.type === 'pressed')).toHaveLength(2)
} finally {
vi.useRealTimers()
}
})
}) })
}) })

View file

@ -108,10 +108,15 @@ describe('classifyKeyStroke', () => {
expect(classifyKeyStroke(0xe5, NO_MODS)).toBe('ime') expect(classifyKeyStroke(0xe5, NO_MODS)).toBe('ime')
}) })
it('수정자 조합은 단축키로 다', () => { it('수정자 조합은 단축키로 분류하되, 수정자 키 자체(Ctrl/Alt/Shift/Win)는 플래그가 켜져 있어도 modifier 로 분류한다', () => {
expect(classifyKeyStroke(0x41, { ...NO_MODS, ctrl: true })).toBe('shortcut') expect(classifyKeyStroke(0x41, { ...NO_MODS, ctrl: true })).toBe('shortcut')
expect(classifyKeyStroke(0x41, { ...NO_MODS, alt: true })).toBe('shortcut') expect(classifyKeyStroke(0x41, { ...NO_MODS, alt: true })).toBe('shortcut')
expect(classifyKeyStroke(0x41, { ...NO_MODS, meta: true })).toBe('shortcut') expect(classifyKeyStroke(0x41, { ...NO_MODS, meta: true })).toBe('shortcut')
expect(classifyKeyStroke(0x11, { ...NO_MODS, ctrl: true })).toBe('modifier')
expect(classifyKeyStroke(0xa2, { ...NO_MODS, ctrl: true })).toBe('modifier')
expect(classifyKeyStroke(0x12, { ...NO_MODS, ctrl: true, alt: true })).toBe('modifier')
expect(classifyKeyStroke(0xa4, { ...NO_MODS, alt: true })).toBe('modifier')
expect(classifyKeyStroke(0x5b, { ...NO_MODS, meta: true })).toBe('modifier')
}) })
it('알 수 없는 키는 other 이며 키 내용을 담지 않는다', () => { it('알 수 없는 키는 other 이며 키 내용을 담지 않는다', () => {

View file

@ -169,4 +169,32 @@ describe('단축키 수락 — 손을 뗄 때까지 창을 띄워 두고 기다
await first await first
expect(harness.insertText).toHaveBeenCalledTimes(1) expect(harness.insertText).toHaveBeenCalledTimes(1)
}) })
it('첫 후보가 스트리밍 중일 때 Ctrl+Alt+Enter 를 누르면 첫 후보가 완성되는 즉시 수락한다', async () => {
let finishStream: () => void = () => undefined
harness.streamGenerate.mockImplementation(async function* () {
yield ' 내일'
await new Promise<void>((resolve) => {
finishStream = resolve
})
yield ' 다시 볼게.'
})
const service = create()
const context = typingContext()
;(service as unknown as Internal)._lastContext = context
const genPromise = (service as unknown as Internal)._generate(PREFIX, context, 1, 160)
await vi.waitFor(() => expect(service.getState().partialText).toBe('내일'))
expect(service.getState().candidates).toHaveLength(0)
const acceptPromise = service.accept()
finishStream()
await genPromise
const result = await acceptPromise
expect(result.ok).toBe(true)
expect(harness.insertText).toHaveBeenCalledTimes(1)
expect(harness.insertText.mock.calls[0]?.[0]).toContain('내일 다시 볼게.')
})
}) })

View file

@ -239,4 +239,29 @@ describe('제안 + 오타 교정', () => {
expect(options).toEqual(expect.objectContaining({ raw: true })) expect(options).toEqual(expect.objectContaining({ raw: true }))
} }
}) })
it('터미널 모드(terminalMode=true)에서 수락하면 클립보드(Ctrl+V)를 건드리지 않고 keyboard 방식으로 넣으며 터미널 버퍼를 동기화한다', async () => {
const expectKeys = vi.fn()
const applyReplacement = vi.fn()
const customDeps = deps(expectKeys)
customDeps.learning.applyProgrammaticReplacement = applyReplacement
const service = new SuggestionService(customDeps)
services.push(service)
service.setTypoProposer(proposer)
const context = typingContext({ terminalMode: true })
const internal = service as unknown as Internal
internal._lastContext = context
await internal._generate(context.prefix, context, 3, 160)
const result = await service.accept()
expect(result).toEqual({ ok: true })
expect(harness.replaceBeforeCaret).toHaveBeenCalledWith(
TYPO.length,
'안녕하세요.? 오늘 회의 자료 공유드립니다.',
'keyboard',
{ commitComposition: false }
)
expect(applyReplacement).toHaveBeenCalledWith(TYPO.length, '안녕하세요.? 오늘 회의 자료 공유드립니다.')
})
}) })

View file

@ -151,8 +151,8 @@ def versionSettingsValid = configuredVersionName != null &&
configuredVersionName ==~ strictSemver && configuredVersionName ==~ strictSemver &&
configuredVersionCodeValue != null && configuredVersionCodeValue != null &&
configuredVersionCodeValue <= 2100000000L configuredVersionCodeValue <= 2100000000L
def resolvedVersionName = versionSettingsValid ? configuredVersionName : "1.15.1" def resolvedVersionName = versionSettingsValid ? configuredVersionName : "1.15.3"
def resolvedVersionCode = versionSettingsValid ? configuredVersionCodeValue.toInteger() : 1150100 def resolvedVersionCode = versionSettingsValid ? configuredVersionCodeValue.toInteger() : 1150300
def requiredReleaseSettings = [ def requiredReleaseSettings = [
D3RO_RELEASE_STORE_FILE: releaseStoreFilePath, D3RO_RELEASE_STORE_FILE: releaseStoreFilePath,

View file

@ -257,7 +257,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1150100; CURRENT_PROJECT_VERSION = 1150300;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = D3ROVoice/Info.plist; INFOPLIST_FILE = D3ROVoice/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.1; IPHONEOS_DEPLOYMENT_TARGET = 15.1;
@ -265,7 +265,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.15.1; MARKETING_VERSION = 1.15.3;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
@ -287,14 +287,14 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1150100; CURRENT_PROJECT_VERSION = 1150300;
INFOPLIST_FILE = D3ROVoice/Info.plist; INFOPLIST_FILE = D3ROVoice/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.1; IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.15.1; MARKETING_VERSION = 1.15.3;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",

View file

@ -0,0 +1 @@
Stability and performance improvements.

View file

@ -0,0 +1 @@
Stability and performance improvements.

View file

@ -0,0 +1 @@
안정성과 성능을 개선했습니다.

View file

@ -0,0 +1 @@
안정성과 성능을 개선했습니다.

View file

@ -1,12 +1,12 @@
{ {
"name": "@d3ro/mobile-rn", "name": "@d3ro/mobile-rn",
"version": "1.15.1", "version": "1.15.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@d3ro/mobile-rn", "name": "@d3ro/mobile-rn",
"version": "1.15.1", "version": "1.15.3",
"dependencies": { "dependencies": {
"@d3ro/api-client": "file:../../packages/api-client", "@d3ro/api-client": "file:../../packages/api-client",
"@d3ro/core": "file:../../packages/core", "@d3ro/core": "file:../../packages/core",
@ -62,7 +62,7 @@
}, },
"../..": { "../..": {
"name": "d3ro-voice-monorepo", "name": "d3ro-voice-monorepo",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"workspaces": [ "workspaces": [
"apps/desktop", "apps/desktop",
@ -81,7 +81,7 @@
}, },
"../../packages/api-client": { "../../packages/api-client": {
"name": "@d3ro/api-client", "name": "@d3ro/api-client",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@d3ro/core": "*", "@d3ro/core": "*",
@ -98,7 +98,7 @@
}, },
"../../packages/core": { "../../packages/core": {
"name": "@d3ro/core", "name": "@d3ro/core",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"docx": "^9.6.1" "docx": "^9.6.1"
@ -109,7 +109,7 @@
}, },
"../../packages/i18n": { "../../packages/i18n": {
"name": "@d3ro/i18n", "name": "@d3ro/i18n",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@types/react": "^19.0.0" "@types/react": "^19.0.0"
@ -120,7 +120,7 @@
}, },
"../../packages/ui-native": { "../../packages/ui-native": {
"name": "@d3ro/ui-native", "name": "@d3ro/ui-native",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@types/react": "*" "@types/react": "*"

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/mobile-rn", "name": "@d3ro/mobile-rn",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"scripts": { "scripts": {
"android": "react-native run-android", "android": "react-native run-android",

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/web", "name": "@d3ro/web",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"description": "D3RO Voice 웹 앱 — Next.js 기반 SaaS 인터페이스", "description": "D3RO Voice 웹 앱 — Next.js 기반 SaaS 인터페이스",
"scripts": { "scripts": {

View file

@ -139,7 +139,7 @@ export function Sidebar(): React.ReactElement {
</PhosphorText> </PhosphorText>
</Box> </Box>
<Box sx={{ fontSize: '11px', fontFamily: 'var(--d3-font-mono)', color: d3roPalette.text.muted }}> <Box sx={{ fontSize: '11px', fontFamily: 'var(--d3-font-mono)', color: d3roPalette.text.muted }}>
v1.15.1 v1.15.3
</Box> </Box>
</Box> </Box>

View file

@ -2,7 +2,7 @@
> Status: ACTIVE > Status: ACTIVE
> Last full audit: 2026-09-13 > Last full audit: 2026-09-13
> Last update: 2026-10-31 — **v1.15.1 릴리스 + 터미널·xterm.js 환경 한글 1글자씩 씹힘 근본 해결(`INPUT-04`, `INPUT-19`, `GAP-INPUT-08`, `GAP-INPUT-11`).** 터미널(`Agent Switchboard.exe` `xterm-helper-textarea`, `WindowsTerminal.exe`, `Kitedesk.exe`, `pwsh.exe`, `cmd.exe` 등)에서 한글 연속 타이핑 시 글자가 한 글자씩 씹히던 4가지 원인을 전수 제거했다: (1) `InputTelemetryService._handleKeyDown`에서 터미널 표면일 때 매 키다운마다 호출하던 크로스-프로세스 `isForegroundKoreanIme`(`SendMessageTimeoutW(WM_IME_CONTROL)`)가 Windows TSF/DefIME 조합 상태를 흔들던 문제를 제거하고 유휴 스냅샷 시점 1회 동기화(`TerminalKeystrokeTracker.syncKoreanIme`)로 전환, (2) `sidecar/uia_bridge.py`에서 `xterm-helper-textarea` 조회 시 Chromium 렌더러 메인 스레드를 최대 1,500ms 블로킹하고 `comp=True` 고착을 유발하던 `GetTopLevelControl()`·`TextPattern.GetSelection()`·`ExpandToEnclosingUnit(Character)`·`TextEditPattern.GetActiveComposition()` 호출을 건너뛰는 고속 경로 추가 및 `_WAKE_TTL_SECONDS` 60s→86,400s 연장, (3) 일반 한글 단어(`"근데 "`, `"터미널 "` 등) 입력 중 공백 직후 40ms 경계 스냅샷·680ms 중복 타이머·800ms 타이핑 중 폴링 억제(`_shouldRunFastTerminalBoundarySnapshot`, `_sampleWhileTyping`), (4) `TypoCorrectionService`에서 터미널의 공백 전 완성형 한글 음절(`[가-힣]$`)에 대해 `commitComposition`(`VK_SPACE`+`VK_BACK`) 주입을 원천 차단. 직전 같은 날 `v1.15.0`: `CommandsPage.tsx` 다단계 명령 파이프라인 복수 선택·순서 조정 UI 및 단일 패스 합성 실행(`AI-05`, `AI-07`). > Last update: 2026-10-31 — **v1.15.2 릴리스 + `Ctrl+Alt+Enter` 제안 수락 불발 근본 해결 + 터미널·xterm.js 한글 씹힘 및 UIA·LLM 캐시 최적화(`INPUT-04`, `INPUT-06`, `INPUT-19`, `GAP-INPUT-08`, `GAP-INPUT-11`).** (1) **`Ctrl+Alt+Enter` 제안 수락 근본 해결:** ① `classifyKeyStroke`가 수정자 VK(`0x10..0x12`, `0x5b..0x5c`, `0xa0..0xa5`)보다 수정자 플래그를 먼저 검사해 `Ctrl`/`Alt`를 누르는 순간 `'shortcut'`(`key=shortcut+C+A`)으로 분류되어 `TerminalKeystrokeTracker` 버퍼가 `prefixLen=0`으로 초기화되고 `Enter`를 누르기 전에 제안 창이 닫히던 버그 수정, ② `ChordStateMachine.keyUp`에서 `Ctrl` 또는 `RightAlt`를 먼저 놓았을 때 `command`(`Ctrl+RightAlt`)만 해제하고 `break`/`return`으로 빠져나가 `suggestion-accept`(`Ctrl+Alt+Enter`)가 `_isDown`에 영구 고착되어 이후 입력이 auto-repeat으로 무시되던 버그 수정, ③ `KeyBindingService`에 `UiohookKey.NumpadEnter` 매핑 및 OS `globalShortcut` 캡처 25ms 폴백 트리거 추가, ④ `"생성 중..."` 또는 첫 후보 스트리밍 중 `Ctrl+Alt+Enter`를 누르면 무시하지 않고 첫 후보 완성(최대 2.5s) 즉시 수락(`_waitForFirstCandidate`)하도록 개선, ⑤ 터미널(`terminalMode` / `isTerminalApp`) 수락 시 클립보드 `Ctrl+V` 경합 대신 `KEYEVENTF_UNICODE` 직접 주입 및 백그라운드 채우기 루프 즉시 중단. (2) **UIA·Ollama 최적화:** 비타이핑 키 및 짧은 입력에서 780ms 중복 `_settleTimer` 스냅샷을 취소하고, `TypoCorrectionService.propose`가 이미 검사 완료된 구간(`_isRegionChecked`)에 대해 336토큰 오타 LLM 호출을 중복 실행해 제안 KV 캐시를 밀어내던 문제를 제거했다. (3) 직전 `v1.15.1`: 터미널 `WM_IME_CONTROL` 키다운 호출 제거 및 `uia_bridge.py` `xterm-helper-textarea` 고속 경로 적용.
> >
> Previous update: 2026-10-30 — **백로그 26건 일괄 해소 (`GAP-INPUT-03`, `GAP-LLM-01`, `GAP-UX-01/02/03/05/06/07`, `GAP-I18N-01`, `GAP-REL-11/14/15`, `GAP-INFRA-01/02/04/06`, `GAP-OPS-01`, `GAP-QA-02`, `GAP-KEY-01/03`, `GAP-ADS-02`, `GAP-ID-01/02`, `GAP-TEAM-02`, `GAP-SHELL-01`, `GAP-PUSH-03`, `GAP-MTG-01`, `DOC-01`) + 입력 누락 검증 인프라 및 서비스 결함 재현(`INPUT-04/19`, `INFRA-20`, `GAP-INPUT-11`).** (1) **백로그 26건 해소:** CJK 무공백 어절 집계(`countWords`), 12개 번역 대상 언어 설정(`targetLanguage`), 12개 로케일 2,716개 키 100% 동기화(`sync-i18n-locales.mjs`), 데스크톱 strict 타입체크 0 에러(`tsconfig.node.json` + `tsconfig.web.json`), Forgejo 릴리스 태그 푸시 순서·SHA 고정(`GAP-REL-14`), 포터블 워크플로 매니페스트 검증(`GAP-REL-11`), 네이티브 ABI 스위처(`rebuild:app`/`rebuild:test`), Supabase 마이그레이션 정합성 검사기(`check:migrations`), NAS 배포 런북(`nas-deploy-runbook.md`), 오프라인 격리 테스트 하네스(`GAP-QA-02`), `KeyBindingService` 단위 테스트·`command` 전용 액션 핸들러, 데스크톱 광고 보상 쿼터 연동(`grantRewardQuota`), 회의 종료 후 메모 추가·노트패드 동기화, 이력 SQLite 커서 페이지네이션·인라인 편집·전체 내보내기, 회의 요약 `[MM:SS]` 타임스탬프 인용·클릭 시크 연동(데스크톱·웹·모바일), `resolveEntitlement` 정본 통일, 통합 검색(`UnifiedSearchService`) 취소·세그먼트 검색·페이로드 경량화, 웹 팀 초대 수락(`/app/accept-invite`), 관리자 고객지원 콘솔(`/support`), Web Push 서비스워커(`sw.js`)·iOS APNs 토큰 등록을 완료했다. (2) **입력 누락 검증 인프라(`GAP-INPUT-11`):** `typing-race-proof.mjs`가 체크아웃을 바꾸지 않고 3개 서비스만 HEAD `f49acf0`와 수정본으로 바꿔 같은 현재 의존성·시험에서 비교했다: HEAD 1/17, 수정본 17/17. 3개 문자열 손상 사례와 13개 스냅샷·메타데이터·조회 병합 계약 실패를 구분했고, 정상 교정 대조군은 양쪽 모두 통과했다. `typing-fixture`(scan-code·IME·CPU 부하)와 `typing-runtime`(별도 로컬 프로필·실제 제품 번들)을 준비했으며, 실제 GUI·IME·CPU·모델 cold/warm 시험은 아직 미실행이다. 증거: `test-results/typing-load/race-proof-2026-10-30T00-50-32-284Z/report.json`; 실행 명령은 `02` §3, 검증 경계는 `04` §6과 `11` GAP-INPUT-11. > Previous update: 2026-10-30 — **백로그 26건 일괄 해소 (`GAP-INPUT-03`, `GAP-LLM-01`, `GAP-UX-01/02/03/05/06/07`, `GAP-I18N-01`, `GAP-REL-11/14/15`, `GAP-INFRA-01/02/04/06`, `GAP-OPS-01`, `GAP-QA-02`, `GAP-KEY-01/03`, `GAP-ADS-02`, `GAP-ID-01/02`, `GAP-TEAM-02`, `GAP-SHELL-01`, `GAP-PUSH-03`, `GAP-MTG-01`, `DOC-01`) + 입력 누락 검증 인프라 및 서비스 결함 재현(`INPUT-04/19`, `INFRA-20`, `GAP-INPUT-11`).** (1) **백로그 26건 해소:** CJK 무공백 어절 집계(`countWords`), 12개 번역 대상 언어 설정(`targetLanguage`), 12개 로케일 2,716개 키 100% 동기화(`sync-i18n-locales.mjs`), 데스크톱 strict 타입체크 0 에러(`tsconfig.node.json` + `tsconfig.web.json`), Forgejo 릴리스 태그 푸시 순서·SHA 고정(`GAP-REL-14`), 포터블 워크플로 매니페스트 검증(`GAP-REL-11`), 네이티브 ABI 스위처(`rebuild:app`/`rebuild:test`), Supabase 마이그레이션 정합성 검사기(`check:migrations`), NAS 배포 런북(`nas-deploy-runbook.md`), 오프라인 격리 테스트 하네스(`GAP-QA-02`), `KeyBindingService` 단위 테스트·`command` 전용 액션 핸들러, 데스크톱 광고 보상 쿼터 연동(`grantRewardQuota`), 회의 종료 후 메모 추가·노트패드 동기화, 이력 SQLite 커서 페이지네이션·인라인 편집·전체 내보내기, 회의 요약 `[MM:SS]` 타임스탬프 인용·클릭 시크 연동(데스크톱·웹·모바일), `resolveEntitlement` 정본 통일, 통합 검색(`UnifiedSearchService`) 취소·세그먼트 검색·페이로드 경량화, 웹 팀 초대 수락(`/app/accept-invite`), 관리자 고객지원 콘솔(`/support`), Web Push 서비스워커(`sw.js`)·iOS APNs 토큰 등록을 완료했다. (2) **입력 누락 검증 인프라(`GAP-INPUT-11`):** `typing-race-proof.mjs`가 체크아웃을 바꾸지 않고 3개 서비스만 HEAD `f49acf0`와 수정본으로 바꿔 같은 현재 의존성·시험에서 비교했다: HEAD 1/17, 수정본 17/17. 3개 문자열 손상 사례와 13개 스냅샷·메타데이터·조회 병합 계약 실패를 구분했고, 정상 교정 대조군은 양쪽 모두 통과했다. `typing-fixture`(scan-code·IME·CPU 부하)와 `typing-runtime`(별도 로컬 프로필·실제 제품 번들)을 준비했으며, 실제 GUI·IME·CPU·모델 cold/warm 시험은 아직 미실행이다. 증거: `test-results/typing-load/race-proof-2026-10-30T00-50-32-284Z/report.json`; 실행 명령은 `02` §3, 검증 경계는 `04` §6과 `11` GAP-INPUT-11.
> >

View file

@ -84,7 +84,7 @@ Singleton + `EventEmitter` pattern (`getXService()` accessors).
| Service / file | Purpose | | Service / file | Purpose |
|---|---| |---|---|
| `InputTelemetryService` | Global input telemetry and context observer: keystroke/click/scroll counters, mouse travel (Manhattan sum of per-axis deltas), active time, per-hour-per-app buckets flushed every 5 s; typed-text learning via UIA snapshot diffs. **Since 2026-10-26**, the UIA context observer runs by default whenever `typoAutoCorrectEnabled !== false` (or `suggestionEnabled === true`), while SQLite `input_activity` persistence only runs when `inputTelemetryEnabled === true` (opt-in). **Since 2026-10-27**, includes `TerminalKeystrokeTracker` (`@d3ro/core/input-intelligence`) + `isForegroundKoreanIme` (`utils/win32-foreground.ts`) to reconstruct the active terminal/Vim line (`reconcileWithScreen` for UIA screen buffers like Windows Terminal/pwsh/cmd, `reconcileWithXtermValue` for `xterm.js` `<textarea class="xterm-helper-textarea">` controls in Agent Switchboard/VS Code/Cursor where `.value` stays populated until Enter/Ctrl+C, and `getSnapshot` for canvas/remote terminals with `len=0` like Kitedesk/WezTerm/Alacritty), preserving trailing spaces stripped by grid terminals and tracking Vim modes (`insert`, `normal`, `command`). Programmatic keys (`_programmaticKeys`) no longer advance `_lastKeyAt`, and `Enter`-triggered chat submissions that clear or shrink the input field rebase focus text immediately so cleared/toolbar text does not trigger post-send suggestions. **Since 2026-10-29**, tracks `_typedInCurrentFocus` and `_lastTypedHwnd` and forces immediate foreground sampling on the first keystroke after a mouse click (`_rebaseFocusText`) or window switch, so typing `pc` (`ㅔㅊ`) immediately after clicking into a search box or new field sets `editedSinceFocus = true` on the very first snapshot. It extends the telemetry store with Flow Radar (hourly activity density + chars + edit stability; a potential-focus score, **not** a real session), Edit Friction (chars/backspaces; edits per 100 chars), App Quality (per-app suggestion total/accepted/accept rate/average latency), Privacy Receipt (actual row counts and retention), and Smart Exclusion evidence. Raw key events, key codes and content streams are never retained; separately, opt-in learned text may be retained in `typing_samples` and `personal_phrases` under the stated receipt policy. | | `InputTelemetryService` | Global input telemetry and context observer: keystroke/click/scroll counters, mouse travel (Manhattan sum of per-axis deltas), active time, per-hour-per-app buckets flushed every 5 s; typed-text learning via UIA snapshot diffs. **Since 2026-10-26**, the UIA context observer runs by default whenever `typoAutoCorrectEnabled !== false` (or `suggestionEnabled === true`), while SQLite `input_activity` persistence only runs when `inputTelemetryEnabled === true` (opt-in). **Since 2026-10-27**, includes `TerminalKeystrokeTracker` (`@d3ro/core/input-intelligence`) + `isForegroundKoreanIme` (`utils/win32-foreground.ts`) to reconstruct the active terminal/Vim line (`reconcileWithScreen` for UIA screen buffers like Windows Terminal/pwsh/cmd, `reconcileWithXtermValue` for `xterm.js` `<textarea class="xterm-helper-textarea">` controls in Agent Switchboard/VS Code/Cursor where `.value` stays populated until Enter/Ctrl+C, and `getSnapshot` for canvas/remote terminals with `len=0` like Kitedesk/WezTerm/Alacritty), preserving trailing spaces stripped by grid terminals and tracking Vim modes (`insert`, `normal`, `command`). Programmatic keys (`_programmaticKeys`) no longer advance `_lastKeyAt`, and `Enter`-triggered chat submissions that clear or shrink the input field rebase focus text immediately so cleared/toolbar text does not trigger post-send suggestions. **Since 2026-10-29**, tracks `_typedInCurrentFocus` and `_lastTypedHwnd` and forces immediate foreground sampling on the first keystroke after a mouse click (`_rebaseFocusText`) or window switch, so typing `pc` (`ㅔㅊ`) immediately after clicking into a search box or new field sets `editedSinceFocus = true` on the very first snapshot. It extends the telemetry store with Flow Radar (hourly activity density + chars + edit stability; a potential-focus score, **not** a real session), Edit Friction (chars/backspaces; edits per 100 chars), App Quality (per-app suggestion total/accepted/accept rate/average latency), Privacy Receipt (actual row counts and retention), and Smart Exclusion evidence. Raw key events, key codes and content streams are never retained; separately, opt-in learned text may be retained in `typing_samples` and `personal_phrases` under the stated receipt policy. |
| `TypoCorrectionService` | Built-in automatic Han/Eng layout conversion and typo auto-correction (`INPUT-19`). Runs on each `typed-context`: Araso-style layout conversions (`source: 'layout'`) fire after 25 ms on word boundaries (Space/punctuation, 40 ms quick snapshot) or 135 ms at token tail (150 ms quick snapshot, even when Chromium/Discord keeps `isComposing=true`, committing IME composition first only when the trailing character is Hangul/jamo), replacing 2-set Han/Eng layout errors, mixed English+Korean words (`githubdp`→`github에`, `PDFvkdlf`→`PDF파일`, `ㅖㅇㄹ파일`→`PDF파일`), lingering Shift on double consonants (`djEJs`→`어떤`), reverse Hangul-to-English (`ㅎ샤ㅗㅕㅠ에`→`github에`, `ㅑㄹ ㅑ 쇼ㅔㄷ ㅗ디ㅣㅐ 소두 ㅑㅅ 초뭏ㄷㄴ ㅑㅜ 10 ㄴㄷ채ㅜㅇㄴ`→`if I type hello then it changes in 10 seconds`), lookahead English clauses (`새 ㅠㄷ `→`to be `, `새 애 this `→`to do this `), and partially-converted tokens (`안녕gktpdy`→`안녕하세요`). **In terminals and Vim (`terminalMode: true`)**, layout-only conversion stays active while spelling/model checks are suppressed: converts CLI commands (`퍄ㅡ `→`vim `, `ㅜ퍄ㅡ `→`nvim `, `ㅎ샤 `→`git `, `ㅣㄴ `→`ls `, `채ㅜㄴㅅ `→`const `), Vim Insert-mode typing (stripping leading `i/a/o/I/A/O/s/S` mode-entry keys when present in raw keystroke buffers), and Vim Command-line ex-commands (`:ㅈㅂ`→`:wq`, `:ㅈㅂ!`→`:wq!`, `:ㅈ`→`:w`, `:ㅂ`→`:q`, `:ㅂ!`→`:q!`, `:ㅌ`→`:x`, `:ㅍ네`→`:vsp`, `:네`→`:sp`, `:ㅜㅐㅗ`→`:noh`, preserving `:`), while blocking all conversions in Vim Normal mode (`vimMode === 'normal'`). **Since 2026-10-28**, on Windows, `TextInsertService.replaceBeforeCaret` (`method === 'keyboard'`) executes an atomic single-syscall `sendWin32UnicodeReplacement` (`utils/win32-unicode-input.ts`) packing `(optional VK_SPACE) + N × VK_BACK + M × KEYEVENTF_UNICODE` into one `SendInput` call (zero JS sleep, zero clipboard access), and `TypoCorrectionService` delta-rebases replacement plans (`rebaseTypoReplacementPlan`) when the user appends characters while an async snapshot or LLM check is in flight. Both Stage 1 (deterministic layout/spelling) and Stage 2 (tail-anchored `trailingWordOnly: true` Gemma check) run seamlessly even when `SuggestionService` is enabled. | | `TypoCorrectionService` | Built-in automatic Han/Eng layout conversion and typo auto-correction (`INPUT-19`). Runs on each `typed-context`: Araso-style layout conversions (`source: 'layout'`) fire after 25 ms on word boundaries (Space/punctuation, 40 ms quick snapshot) or 135 ms at token tail (150 ms quick snapshot, even when Chromium/Discord keeps `isComposing=true`, committing IME composition first only when the trailing character is Hangul/jamo), replacing 2-set Han/Eng layout errors, mixed English+Korean words (`githubdp`→`github에`, `PDFvkdlf`→`PDF파일`, `ㅖㅇㄹ파일`→`PDF파일`), lingering Shift on double consonants (`djEJs`→`어떤`), reverse Hangul-to-English (`ㅎ샤ㅗㅕㅠ에`→`github에`, `ㅑㄹ ㅑ 쇼ㅔㄷ ㅗ디ㅣㅐ 소두 ㅑㅅ 초뭏ㄷㄴ ㅑㅜ 10 ㄴㄷ채ㅜㅇㄴ`→`if I type hello then it changes in 10 seconds`), lookahead English clauses (`새 ㅠㄷ `→`to be `, `새 애 this `→`to do this `), and partially-converted tokens (`안녕gktpdy`→`안녕하세요`). **In terminals and Vim (`terminalMode: true`)**, layout-only conversion stays active while spelling/model checks are suppressed: converts CLI commands (`퍄ㅡ `→`vim `, `ㅜ퍄ㅡ `→`nvim `, `ㅎ샤 `→`git `, `ㅣㄴ `→`ls `, `채ㅜㄴㅅ `→`const `), Vim Insert-mode typing (stripping leading `i/a/o/I/A/O/s/S` mode-entry keys when present in raw keystroke buffers), and Vim Command-line ex-commands (`:ㅈㅂ`→`:wq`, `:ㅈㅂ!`→`:wq!`, `:ㅈ`→`:w`, `:ㅂ`→`:q`, `:ㅂ!`→`:q!`, `:ㅌ`→`:x`, `:ㅍ네`→`:vsp`, `:네`→`:sp`, `:ㅜㅐㅗ`→`:noh`, preserving `:`), while blocking all conversions in Vim Normal mode (`vimMode === 'normal'`). **Since 2026-10-28**, on Windows, `TextInsertService.replaceBeforeCaret` (`method === 'keyboard'`) executes an atomic single-syscall `sendWin32UnicodeReplacement` (`utils/win32-unicode-input.ts`) packing `(optional VK_SPACE) + N × VK_BACK + M × KEYEVENTF_UNICODE` into one `SendInput` call (zero JS sleep, zero clipboard access), and `TypoCorrectionService` delta-rebases replacement plans (`rebaseTypoReplacementPlan`) when the user appends characters while an async snapshot or LLM check is in flight. **Since 2026-10-31 (`v1.15.2`)**, `propose()` checks `!this._isRegionChecked(region)` before calling `_askModel`, avoiding duplicate 336-token LLM checks when `handleTypingContext` already verified the same region. Both Stage 1 (deterministic layout/spelling) and Stage 2 (tail-anchored `trailingWordOnly: true` Gemma check) run seamlessly even when `SuggestionService` is enabled. |
| `UiaContextService` | Client for the sidecar UIA bridge (`GET /uia/focus`): focused text, caret rect/offset, `IsPassword`, IME composition state and `hasSelection`. The sidecar derives `hasSelection` only by comparing the TextPattern selection range Start/End endpoints: it does not call `GetText` on that range or add a separate selected-text payload (the existing focused-field text can still include a selection). Fail-closed on password/unavailable; transient failures back off for 1.5/3/6/12/30 s and permanent failures for 5 min. | | `UiaContextService` | Client for the sidecar UIA bridge (`GET /uia/focus`): focused text, caret rect/offset, `IsPassword`, IME composition state and `hasSelection`. The sidecar derives `hasSelection` only by comparing the TextPattern selection range Start/End endpoints: it does not call `GetText` on that range or add a separate selected-text payload (the existing focused-field text can still include a selection). Fail-closed on password/unavailable; transient failures back off for 1.5/3/6/12/30 s and permanent failures for 5 min. |
| `SuggestionService` | Next-sentence ghost text: 600 ms debounce, then `buildSuggestionPrompt` → `LocalLLMService.streamGenerate` with a caller-owned `AbortSignal` → candidate ranking and accept (via `TextInsertService`). Presentation-active includes candidates plus `generating`, `warmingUp` and `partialText`; clear/dismiss aborts the active request, invalidates its generation token, clears TTL state, then emits `cleared`/hide so a spinner-only popup closes. A successful final candidate payload resets `generating=false` and `partialText=null`. App DNA extends phrase ranking with `appName` context and a 1.75× same-app bonus; Memory Decay uses a 30-day half-life plus frequency. Why This Suggestion exposes only `local-model`/`local-memory` provenance and continuation/related/phrase/appPhrase **counts** to the overlay, never raw evidence text. Instant Recall uses local-memory provenance without another model-budget spend only when the model is unavailable, raises a non-cancellation error, truly times out, or returns empty; it never publishes after dismiss, new typing, token/context mismatch or staleness. Its runaway limits are a 5 s minimum interval, 6 requests/min default (hard-config maximum 12), 3 candidates, 64 output tokens, 12-character regeneration growth and an 8 s timeout; app startup does not warm the model and suggestion requests use `keep_alive: 2m`. | | `SuggestionService` | Next-sentence ghost text: 600 ms debounce, then `buildSuggestionPrompt` → `LocalLLMService.streamGenerate` with a caller-owned `AbortSignal` → candidate ranking and accept (via `TextInsertService`). Presentation-active includes candidates plus `generating`, `warmingUp` and `partialText`; clear/dismiss aborts the active request, invalidates its generation token, clears TTL state, then emits `cleared`/hide so a spinner-only popup closes. A successful final candidate payload resets `generating=false` and `partialText=null`. App DNA extends phrase ranking with `appName` context and a 1.75× same-app bonus; Memory Decay uses a 30-day half-life plus frequency. Why This Suggestion exposes only `local-model`/`local-memory` provenance and continuation/related/phrase/appPhrase **counts** to the overlay, never raw evidence text. Instant Recall uses local-memory provenance without another model-budget spend only when the model is unavailable, raises a non-cancellation error, truly times out, or returns empty; it never publishes after dismiss, new typing, token/context mismatch or staleness. Its runaway limits are a 5 s minimum interval, 6 requests/min default (hard-config maximum 12), 3 candidates, 64 output tokens, 12-character regeneration growth and an 8 s timeout; app startup does not warm the model and suggestion requests use `keep_alive: 2m`. |
| `global-input-hook.ts` | Ref-counted owner of the single process-wide `uiohook` hook so `KeyBindingService` and telemetry can both attach without one stopping the other. | | `global-input-hook.ts` | Ref-counted owner of the single process-wide `uiohook` hook so `KeyBindingService` and telemetry can both attach without one stopping the other. |

View file

@ -168,9 +168,9 @@ end-to-end behaviour has **not been verified by typing in a real app** (`11` GAP
| INPUT-01 | Keyboard/mouse telemetry capture (opt-in) | [~] | [-] | [-] | [-] | `InputTelemetryService` — keystroke/click/scroll counters, mouse travel as the Manhattan sum of per-axis pixel deltas, active time, per-hour×app buckets flushed every 5 s. Key **contents** are never stored (ActivityWatch `aw-watcher-input` data-minimisation policy, adopted deliberately — see `11` §7). Hook ownership is ref-counted so `KeyBindingService` keeps working (`global-input-hook.ts`). | | INPUT-01 | Keyboard/mouse telemetry capture (opt-in) | [~] | [-] | [-] | [-] | `InputTelemetryService` — keystroke/click/scroll counters, mouse travel as the Manhattan sum of per-axis pixel deltas, active time, per-hour×app buckets flushed every 5 s. Key **contents** are never stored (ActivityWatch `aw-watcher-input` data-minimisation policy, adopted deliberately — see `11` §7). Hook ownership is ref-counted so `KeyBindingService` keeps working (`global-input-hook.ts`). |
| INPUT-02 | Foreground-app attribution | [~] | [-] | [-] | [-] | `utils/win32-foreground.ts` via `koffi` FFI (title/pid/exe/bounds), sampled at most 1×/s. `get-windows` was rejected: it needs an install script this repo does not run. | | INPUT-02 | Foreground-app attribution | [~] | [-] | [-] | [-] | `utils/win32-foreground.ts` via `koffi` FFI (title/pid/exe/bounds), sampled at most 1×/s. `get-windows` was rejected: it needs an install script this repo does not run. |
| INPUT-03 | Weekly input insights | [~] | [-] | [-] | [-] | `INPUT_TELEMETRY.getSummary` aggregates `input_activity` into totals, daily series, top hours and top apps; rendered in Settings → Input and as a dashboard card. Daily average mouse travel is converted px → m using the display scale factor. | | INPUT-03 | Weekly input insights | [~] | [-] | [-] | [-] | `INPUT_TELEMETRY.getSummary` aggregates `input_activity` into totals, daily series, top hours and top apps; rendered in Settings → Input and as a dashboard card. Daily average mouse travel is converted px → m using the display scale factor. |
| INPUT-04 | Typed-text learning (UIA, password-excluded) | [~] | [-] | [-] | [-] | Text is read from the focused field via `GET /uia/focus` (sidecar UIA bridge) and diffed longest-common-prefix/suffix, so **IME-committed Hangul/kana is counted correctly** — keycodes cannot reconstruct CJK text. UIA sends `hasSelection` only, derived by TextPattern range Start/End comparison without calling `GetText` on the selection range or adding a selected-text payload; the existing focused-field text can still include a selection. A non-collapsed selection immediately clears suggestions as `selection-active`. `IsPassword` is checked before any read (fail-closed); IME composition suppresses both stats and suggestions. **2026-09-24:** text equal to the control name (empty-field placeholder, e.g. "메시지 입력") is treated as empty (`withoutPlaceholderText`); a suggestion requires `editedSinceFocus` + typing within `recentTypingWindowMs` (8 s), otherwise `not-typing` — clicking into a pre-filled field no longer triggers suggestions. **2026-10-29:** `_typedInCurrentFocus` and `_lastTypedHwnd` track whether a typing keystroke occurred after the latest click/focus rebase (`_rebaseFocusText`), and `_sampleForeground` forces immediate foreground sampling on that first keystroke, so typing immediately after clicking into a search box or new window sets `editedSinceFocus = true` on the very first snapshot. **2026-10-24:** typed deltas are no longer saved per snapshot (that stored mid-word fragments every 0.4–0.8 s). They are buffered per field and saved as one baseline→latest diff on 2 s idle, sentence-ending punctuation, 150-char growth, field clear (send), focus change or stop. Typed samples under 4 non-space chars, URL/query-like lines, trailing incomplete jamo and PUA/lone-surrogate chars (emoji truncated to 16 bits upstream, root cause unconfirmed) are dropped. Rows already in the DB are pruned on start by the same rule (`isLearnableTypedText` in `_pruneUnlearnableCorpus`, typed source only; dry count on the dev DB 2026-10-24: 1,235/2,664 samples, 285/1,209 phrases). Expressive jamo runs (ㅋㅋ, ㅠㅠ, ㅇㅇ) and space-less questions are kept. Mid-word fragments of 4+ chars cannot be detected and remain until the 30-day retention. **2026-10-30: UIA reads are single-flight and discarded after input/focus/lifecycle changes, stale capture times, or changed native GetLastInputInfo tokens; contexts carry inputRevision/nativeInputTick for replacement-time validation (InputTelemetryService, win32-input-activity). See GAP-INPUT-11 for load-test gate.** | | INPUT-04 | Typed-text learning (UIA, password-excluded) | [~] | [-] | [-] | [-] | Text is read from the focused field via `GET /uia/focus` (sidecar UIA bridge) and diffed longest-common-prefix/suffix, so **IME-committed Hangul/kana is counted correctly** — keycodes cannot reconstruct CJK text. UIA sends `hasSelection` only, derived by TextPattern range Start/End comparison without calling `GetText` on the selection range or adding a selected-text payload; the existing focused-field text can still include a selection. A non-collapsed selection immediately clears suggestions as `selection-active`. `IsPassword` is checked before any read (fail-closed); IME composition suppresses both stats and suggestions. **2026-09-24:** text equal to the control name (empty-field placeholder, e.g. "메시지 입력") is treated as empty (`withoutPlaceholderText`); a suggestion requires `editedSinceFocus` + typing within `recentTypingWindowMs` (8 s), otherwise `not-typing` — clicking into a pre-filled field no longer triggers suggestions. **2026-10-29:** `_typedInCurrentFocus` and `_lastTypedHwnd` track whether a typing keystroke occurred after the latest click/focus rebase (`_rebaseFocusText`), and `_sampleForeground` forces immediate foreground sampling on that first keystroke, so typing immediately after clicking into a search box or new window sets `editedSinceFocus = true` on the very first snapshot. **2026-10-24:** typed deltas are no longer saved per snapshot (that stored mid-word fragments every 0.4–0.8 s). They are buffered per field and saved as one baseline→latest diff on 2 s idle, sentence-ending punctuation, 150-char growth, field clear (send), focus change or stop. Typed samples under 4 non-space chars, URL/query-like lines, trailing incomplete jamo and PUA/lone-surrogate chars (emoji truncated to 16 bits upstream, root cause unconfirmed) are dropped. Rows already in the DB are pruned on start by the same rule (`isLearnableTypedText` in `_pruneUnlearnableCorpus`, typed source only; dry count on the author machine 2026-10-24: 1,235/2,664 samples, 285/1,209 phrases). Expressive jamo runs (ㅋㅋ, ㅠㅠ, ㅇㅇ) and space-less questions are kept. Mid-word fragments of 4+ chars cannot be detected and remain until the 30-day retention. **2026-10-30..31: UIA reads are single-flight and discarded after input/focus/lifecycle changes, stale capture times, or changed native GetLastInputInfo tokens; contexts carry inputRevision/nativeInputTick for replacement-time validation (`InputTelemetryService`, `win32-input-activity`). Standalone modifier keydowns/key-repeats (`Ctrl`/`Alt`/`Shift`/`Win`) and `Ctrl+Alt` suggestion navigation chords are ignored in `_handleKeyDown` without advancing `_inputRevision`/`_lastKeyAt` or scheduling UIA snapshots (`classifyKeyStroke` checks modifier VKs before modifier flags), and `_settleTimer` (780 ms) is skipped on non-typing keys and auto-cancelled when the 380 ms `_textTimer` snapshot cannot trigger a suggestion (`prefixLen < minPrefixChars`). See GAP-INPUT-11.** |
| INPUT-05 | Personal phrase corpus (typed + voice) | [~] | [-] | [-] | [-] | Sentence-level phrases from typed text and from voice history (`HistoryService.create` feeds `recordExternalText`), ranked by frequency/recency as prompt hints; users can delete individual phrases. **2026-09-24:** typed text from `LEARNING_EXCLUDED_APPS` (terminals, code editors, Agent Switchboard) is never learned, and every phrase must pass `isLearnablePhrase` (no box/block/geometric glyphs, ≥60 % letters). `_pruneUnlearnableCorpus` re-applies both rules to existing phrases/samples/edges on start and every retention cycle (first run on the author machine removed 69 phrases / 91 samples of terminal status lines and agent chats). **2026-10-25:** Agent Switchboard moved from `LEARNING_EXCLUDED_APPS` to `APP_SCOPED_LEARNING_APPS` — its text is kept only as `typing_samples` (with app name), never in shared phrases/graph, and is used only for suggestions inside that same app (`findContinuationHints(..., { appName })` feeds `continuationHints`). It is the user's most-typed app; the 2026-09-24 exclusion was about dev instructions leaking into KakaoTalk suggestions, which scoping prevents. | | INPUT-05 | Personal phrase corpus (typed + voice) | [~] | [-] | [-] | [-] | Sentence-level phrases from typed text and from voice history (`HistoryService.create` feeds `recordExternalText`), ranked by frequency/recency as prompt hints; users can delete individual phrases. **2026-09-24:** typed text from `LEARNING_EXCLUDED_APPS` (terminals, code editors, Agent Switchboard) is never learned, and every phrase must pass `isLearnablePhrase` (no box/block/geometric glyphs, ≥60 % letters). `_pruneUnlearnableCorpus` re-applies both rules to existing phrases/samples/edges on start and every retention cycle (first run on the author machine removed 69 phrases / 91 samples of terminal status lines and agent chats). **2026-10-25:** Agent Switchboard moved from `LEARNING_EXCLUDED_APPS` to `APP_SCOPED_LEARNING_APPS` — its text is kept only as `typing_samples` (with app name), never in shared phrases/graph, and is used only for suggestions inside that same app (`findContinuationHints(..., { appName })` feeds `continuationHints`). It is the user's most-typed app; the 2026-09-24 exclusion was about dev instructions leaking into KakaoTalk suggestions, which scoping prevents. |
| INPUT-06 | Next-sentence suggestion (ghost text) | [~] | [-] | [-] | [-] | `SuggestionService` + `buildSuggestionPrompt` (`llm-prompts.ts` SSOT, instruction stays in the system prompt). The 2026-09-22 guard contract is 600 ms debounce, ≥5 s between requests, 6 requests/min by default (hard-config maximum 12), 3 candidates, 64 output tokens, 12-character growth before regeneration, 8 s request timeout and `keep_alive: 2m`; boot warmup is removed. Each request has its own cancellation signal. Presentation-active includes candidates, `generating`, `warmingUp` and `partialText`; clear/dismiss aborts, invalidates the generation token, clears TTL state and emits `cleared`/hide, and a final success resets `generating=false`/`partialText=null`. Focused evidence for the lifecycle and Windows-child-process change: five test files / 80 tests passed; desktop typecheck/lint, Python `py_compile`, and `git diff --check` exited 0 (core 131-test pass was independently verified earlier). Status remains `[~]`: this is not app-restart, GUI overlay, or real automatic-typing evidence. **2026-09-24 (supersedes the numbers above):** `keep_alive: 10m`, warm-up on boot, on Ollama reconnect and whenever the model is presumed cold (cold reload measured 11.4 s > 8 s timeout); a session asks for 1 candidate, then a sequential fill loop appends one unique candidate at a time up to `maxCandidatesTotal` 12 (avoid-list in the prompt, stops after 2 empty fills); only the first request consumes rate/daily budget; stale aborts refund the budget; any further typing ends the session (`matchesSessionPrefix`, IME last-syllable tolerant); prompt forbids assistant-style questions. Terminals (`TERMINAL_APPS`) never get suggestions. **2026-10-24 accept fix:** `waitForModifiersReleased` now trusts OS `GetAsyncKeyState` (`utils/win32-key-state.ts`) over the uiohook-tracked set. A missed keyup made acceptance wait the full 1.5 s and then paste Ctrl+V while modifiers were still considered held; in the logged case the field length stayed 15 after "inserted" (6 chars). New suggestions are also suppressed while an accept is in flight, so the overlay no longer reappears during the wait. **2026-10-24~25 experiment, reverted:** an n-gram-first / confidence-gated / short-candidate rework raised offline next-word precision (3%→33%) but made suggestions rare, and the user judged the app much worse. Suggestion behaviour is back to v1.10.1. Kept: suggestions that copy on-screen text are rejected (`copiesContext`), no suggestions while typing an address/path (`isAddressInput`, skip reason `address-input`). Lessons and data: `docs/evidence/2026-10-24-suggestion-accuracy-research.md` §9; replay harness `tests/eval/`. **2026-10-25 additive upgrades (frequency unchanged):** (1) `suggestion-accept-word` (default Ctrl+Alt+Space) inserts only the first word and keeps the rest on screen (`splitFirstWord`; partial accepts are not learned as full sentences). (2) a confident personal n-gram candidate (`PersonalNgramIndex`, strict `PERSONAL_NGRAM_SETTINGS`) is shown instantly as candidate #1 while the model generates; model candidates are appended after it, and it survives an empty/failed/timed-out model run (no "no suggestions" notice then). Agent Switchboard text never enters this shared n-gram. Hotkey accept now force-releases held Ctrl/Alt/Shift after 200 ms (`prepareModifiersForPaste`). **2026-10-28 extreme personalization & n-gram upgrades (frequency unchanged):** `PersonalNgramModel` now weights repeated `personalPhrases` (`count >= 2`) and falls back to a Korean stemmed-word bigram index (`_stemBigram` via `stemTerm`, e.g. matching `"배포를 완료했습니다"` when typing `"배포가 "`), and `SuggestionService._fillOne` reranks newly generated LLM candidates by `scoreCandidatePersonalization` (overlap with personal graph `continuations`/`followUps`/`related`/`phrases` + register match) while preserving the instant n-gram slot at index 0. | | INPUT-06 | Next-sentence suggestion (ghost text) | [~] | [-] | [-] | [-] | `SuggestionService` + `buildSuggestionPrompt` (`llm-prompts.ts` SSOT, instruction stays in the system prompt). The 2026-09-22 guard contract is 600 ms debounce, ≥5 s between requests, 6 requests/min by default (hard-config maximum 12), 3 candidates, 64 output tokens, 12-character growth before regeneration, 8 s request timeout and `keep_alive: 2m`; boot warmup is removed. Each request has its own cancellation signal. Presentation-active includes candidates, `generating`, `warmingUp` and `partialText`; clear/dismiss aborts, invalidates the generation token, clears TTL state and emits `cleared`/hide, and a final success resets `generating=false`/`partialText=null`. Focused evidence for the lifecycle and Windows-child-process change: five test files / 80 tests passed; desktop typecheck/lint, Python `py_compile`, and `git diff --check` exited 0 (core 131-test pass was independently verified earlier). Status remains `[~]`: this is not app-restart, GUI overlay, or real automatic-typing evidence. **2026-09-24 (supersedes the numbers above):** `keep_alive: 10m`, warm-up on boot, on Ollama reconnect and whenever the model is presumed cold (cold reload measured 11.4 s > 8 s timeout); a session asks for 1 candidate, then a sequential fill loop appends one unique candidate at a time up to `maxCandidatesTotal` 12 (avoid-list in the prompt, stops after 2 empty fills); only the first request consumes rate/daily budget; stale aborts refund the budget; any further typing ends the session (`matchesSessionPrefix`, IME last-syllable tolerant); prompt forbids assistant-style questions. Terminals (`TERMINAL_APPS`) never get suggestions. **2026-10-24 accept fix:** `waitForModifiersReleased` now trusts OS `GetAsyncKeyState` (`utils/win32-key-state.ts`) over the uiohook-tracked set. A missed keyup made acceptance wait the full 1.5 s and then paste Ctrl+V while modifiers were still considered held; in the logged case the field length stayed 15 after "inserted" (6 chars). New suggestions are also suppressed while an accept is in flight, so the overlay no longer reappears during the wait. **2026-10-24~25 experiment, reverted:** an n-gram-first / confidence-gated / short-candidate rework raised offline next-word precision (3%→33%) but made suggestions rare, and the user judged the app much worse. Suggestion behaviour is back to v1.10.1. Kept: suggestions that copy on-screen text are rejected (`copiesContext`), no suggestions while typing an address/path (`isAddressInput`, skip reason `address-input`). Lessons and data: `docs/evidence/2026-10-24-suggestion-accuracy-research.md` §9; replay harness `tests/eval/`. **2026-10-25 additive upgrades (frequency unchanged):** (1) `suggestion-accept-word` (default Ctrl+Alt+Space) inserts only the first word and keeps the rest on screen (`splitFirstWord`; partial accepts are not learned as full sentences). (2) a confident personal n-gram candidate (`PersonalNgramIndex`, strict `PERSONAL_NGRAM_SETTINGS`) is shown instantly as candidate #1 while the model generates; model candidates are appended after it, and it survives an empty/failed/timed-out model run (no "no suggestions" notice then). Agent Switchboard text never enters this shared n-gram. Hotkey accept now force-releases held Ctrl/Alt/Shift after 200 ms (`prepareModifiersForPaste`). **2026-10-28 extreme personalization & n-gram upgrades (frequency unchanged):** `PersonalNgramModel` now weights repeated `personalPhrases` (`count >= 2`) and falls back to a Korean stemmed-word bigram index (`_stemBigram` via `stemTerm`, e.g. matching `"배포를 완료했습니다"` when typing `"배포가 "`), and `SuggestionService._fillOne` reranks newly generated LLM candidates by `scoreCandidatePersonalization` (overlap with personal graph `continuations`/`followUps`/`related`/`phrases` + register match) while preserving the instant n-gram slot at index 0. **2026-10-31 (`v1.15.2`) `Ctrl+Alt+Enter` reliability & terminal accept fix:** (1) `ChordStateMachine.keyUp` releases all held bindings sharing a released modifier (`Ctrl`/`RightAlt`) so `suggestion-accept` never stays stuck in `_isDown` after `command` (`Ctrl+RightAlt`), (2) `KeyBindingService` maps `UiohookKey.NumpadEnter` and adds a 25 ms `globalShortcut` fallback trigger while `isOverlayOrCaptureActive` is true, (3) `SuggestionService.accept()` waits up to 2.5 s (`_waitForFirstCandidate`) when invoked while candidate #1 is still generating/pending, and (4) in `terminalMode` / `isTerminalApp`, `_insertAccepted` uses `'keyboard'` (`KEYEVENTF_UNICODE`) instead of `'clipboard'` (`Ctrl+V`), syncs `TerminalKeystrokeTracker` via `applyProgrammaticReplacement`, and stops `_fillRemainingCandidates` immediately (`suggestion-accept-hold.test.ts` 4/4, `KeyBindingService.test.ts` 12/12, `keybinding-runtime.test.ts` 29/29 PASS). |
| INPUT-07 | Caret-anchored suggestion overlay | [~] | [-] | [-] | [-] | `suggestion-overlay` popup placed by `anchorFloatingPanel` (caret → element → cursor fallback, flip above when the caret is near the bottom, clamped to the work area). Non-focusable; click-through unless `suggestionOverlayInteractive`. While actually visible it continues periodic UIA validation after 5 s and revalidates 120 ms after mouse-up; unavailable/non-editable focus or a non-collapsed selection aborts and hides it. X first hides the renderer panel, then main IPC directly hides `BrowserWindow` and dismisses the service, so late tokened results cannot revive it. Accept/next/prev/dismiss are four global key bindings (`suggestion-accept`/`next`/`prev`/`dismiss`, default `Ctrl+Alt+→/↓/↑/←`), and the overlay has a mouse close button. Up to three candidates are shown in a scrollable list with a warm-up/generating spinner. **2026-09-24:** one page of 3 fixed-height (2-line) numbered items, footer = range/progress + source + key guide derived from the live bindings (`buildSuggestionKeyHints`, shared modifier shown once). Keys: Ctrl+Alt+↑/↓ move (the page follows the active item; at the last item `next` waits while filling, otherwise wraps; the 1.6.0 Left/Right page actions were removed as unreachable before a page filled and colliding with Intel display rotation), Ctrl+Alt+Enter accept, plain Esc closes while visible (overlay-scoped, not a binding), Ctrl+Alt+Backspace secondary dismiss; old default bindings migrate at tuning revision 5. Streaming updates never reposition/re-present the window (`decideSuggestionOverlayAction`); placement uses `anchorKind` — caret: below the line, element: outside the element (below → above → right → left → inner bottom-right). Navigation re-arms the visible TTL. Window 460×208. | | INPUT-07 | Caret-anchored suggestion overlay | [~] | [-] | [-] | [-] | `suggestion-overlay` popup placed by `anchorFloatingPanel` (caret → element → cursor fallback, flip above when the caret is near the bottom, clamped to the work area). Non-focusable; click-through unless `suggestionOverlayInteractive`. While actually visible it continues periodic UIA validation after 5 s and revalidates 120 ms after mouse-up; unavailable/non-editable focus or a non-collapsed selection aborts and hides it. X first hides the renderer panel, then main IPC directly hides `BrowserWindow` and dismisses the service, so late tokened results cannot revive it. Accept/next/prev/dismiss are four global key bindings (`suggestion-accept`/`next`/`prev`/`dismiss`, default `Ctrl+Alt+→/↓/↑/←`), and the overlay has a mouse close button. Up to three candidates are shown in a scrollable list with a warm-up/generating spinner. **2026-09-24:** one page of 3 fixed-height (2-line) numbered items, footer = range/progress + source + key guide derived from the live bindings (`buildSuggestionKeyHints`, shared modifier shown once). Keys: Ctrl+Alt+↑/↓ move (the page follows the active item; at the last item `next` waits while filling, otherwise wraps; the 1.6.0 Left/Right page actions were removed as unreachable before a page filled and colliding with Intel display rotation), Ctrl+Alt+Enter accept, plain Esc closes while visible (overlay-scoped, not a binding), Ctrl+Alt+Backspace secondary dismiss; old default bindings migrate at tuning revision 5. Streaming updates never reposition/re-present the window (`decideSuggestionOverlayAction`); placement uses `anchorKind` — caret: below the line, element: outside the element (below → above → right → left → inner bottom-right). Navigation re-arms the visible TTL. Window 460×208. |
| INPUT-08 | Per-app exclusions & consent controls | [~] | [-] | [-] | [-] | `inputExcludedApps` (executable names, case-insensitive) blocks both collection context and suggestions; telemetry master switch, pause, text-learning toggle and "delete collected data" all live in Settings → Input. 30-day retention prune runs on start. | | INPUT-08 | Per-app exclusions & consent controls | [~] | [-] | [-] | [-] | `inputExcludedApps` (executable names, case-insensitive) blocks both collection context and suggestions; telemetry master switch, pause, text-learning toggle and "delete collected data" all live in Settings → Input. 30-day retention prune runs on start. |
| INPUT-09 | Flow Radar | [~] | [-] | [-] | [-] | `rankFlowWindows` ranks hourly aggregate activity density, character volume and edit stability into potential-focus time windows. It is not a real-session detector or session record. | | INPUT-09 | Flow Radar | [~] | [-] | [-] | [-] | `rankFlowWindows` ranks hourly aggregate activity density, character volume and edit stability into potential-focus time windows. It is not a real-session detector or session record. |

File diff suppressed because one or more lines are too long

20
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "d3ro-voice-monorepo", "name": "d3ro-voice-monorepo",
"version": "1.15.1", "version": "1.15.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "d3ro-voice-monorepo", "name": "d3ro-voice-monorepo",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"workspaces": [ "workspaces": [
"apps/desktop", "apps/desktop",
@ -25,7 +25,7 @@
}, },
"apps/admin": { "apps/admin": {
"name": "@d3ro/admin", "name": "@d3ro/admin",
"version": "1.15.1", "version": "1.15.3",
"dependencies": { "dependencies": {
"@d3ro/api-client": "*", "@d3ro/api-client": "*",
"@d3ro/core": "*", "@d3ro/core": "*",
@ -109,7 +109,7 @@
}, },
"apps/desktop": { "apps/desktop": {
"name": "@d3ro/desktop", "name": "@d3ro/desktop",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@d3ro/core": "*", "@d3ro/core": "*",
@ -161,7 +161,7 @@
}, },
"apps/web": { "apps/web": {
"name": "@d3ro/web", "name": "@d3ro/web",
"version": "1.15.1", "version": "1.15.3",
"dependencies": { "dependencies": {
"@d3ro/api-client": "*", "@d3ro/api-client": "*",
"@d3ro/core": "*", "@d3ro/core": "*",
@ -17216,7 +17216,7 @@
}, },
"packages/api-client": { "packages/api-client": {
"name": "@d3ro/api-client", "name": "@d3ro/api-client",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@d3ro/core": "*", "@d3ro/core": "*",
@ -17233,7 +17233,7 @@
}, },
"packages/core": { "packages/core": {
"name": "@d3ro/core", "name": "@d3ro/core",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"docx": "^9.6.1" "docx": "^9.6.1"
@ -17244,7 +17244,7 @@
}, },
"packages/i18n": { "packages/i18n": {
"name": "@d3ro/i18n", "name": "@d3ro/i18n",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@types/react": "^19.0.0" "@types/react": "^19.0.0"
@ -17255,7 +17255,7 @@
}, },
"packages/ui": { "packages/ui": {
"name": "@d3ro/ui", "name": "@d3ro/ui",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@d3ro/core": "*" "@d3ro/core": "*"
@ -17275,7 +17275,7 @@
}, },
"packages/ui-native": { "packages/ui-native": {
"name": "@d3ro/ui-native", "name": "@d3ro/ui-native",
"version": "1.15.1", "version": "1.15.3",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@types/react": "*" "@types/react": "*"

View file

@ -1,6 +1,6 @@
{ {
"name": "d3ro-voice-monorepo", "name": "d3ro-voice-monorepo",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"description": "D3RO Voice — 멀티플랫폼 AI 음성 어시스턴트 (Monorepo)", "description": "D3RO Voice — 멀티플랫폼 AI 음성 어시스턴트 (Monorepo)",
"author": "D3RO", "author": "D3RO",

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/api-client", "name": "@d3ro/api-client",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"description": "D3RO Voice API 클라이언트 — Supabase 래퍼 (web/desktop/mobile 공유)", "description": "D3RO Voice API 클라이언트 — Supabase 래퍼 (web/desktop/mobile 공유)",
"license": "MIT", "license": "MIT",

View file

@ -438,6 +438,31 @@ describe('ChordStateMachine — AltGr chord guard', () => {
machine.keyUp(ctrlRightAlt, VK.AltRight) machine.keyUp(ctrlRightAlt, VK.AltRight)
expect(events.map(label)).toEqual(['command:pressed', 'command:released']) expect(events.map(label)).toEqual(['command:pressed', 'command:released'])
}) })
it('releasing Ctrl or RightAlt first releases both command and suggestion-accept so the next Ctrl+Alt+Enter is never swallowed', () => {
machine.setBindings(defaultEntries())
const ctrlAltEnter = keyOf(VK.Enter, { ctrl: true, alt: true })
// 1st press: Ctrl+RightAlt held -> Enter pressed -> Ctrl released first -> RightAlt released (Enter keyup missed or released after)
machine.keyDown(ctrlRightAlt)
machine.keyDown(ctrlAltEnter)
machine.keyUp(keyOf(VK.CtrlLeft, { alt: true }), VK.CtrlLeft)
machine.keyUp(keyOf(VK.AltRight), VK.AltRight)
// 2nd press: Ctrl+RightAlt held -> Enter pressed -> RightAlt released first
machine.keyDown(ctrlRightAlt)
machine.keyDown(ctrlAltEnter)
machine.keyUp(ctrlRightAlt, VK.AltRight)
// 3rd press: must still fire suggestion-accept:pressed
machine.keyDown(ctrlRightAlt)
machine.keyDown(ctrlAltEnter)
const acceptPressedCount = events.filter(
(e) => e.actionId === 'suggestion-accept' && e.type === 'pressed'
).length
expect(acceptPressedCount).toBe(3)
})
}) })
// ============================================================ // ============================================================

View file

@ -354,6 +354,42 @@ describe('terminal prompt extraction', () => {
expect(tracker.hasObservedImeForHwnd(hwnd)).toBe(true) expect(tracker.hasObservedImeForHwnd(hwnd)).toBe(true)
expect(tracker.currentPrefix()).toBe('ㅔㅊ ') expect(tracker.currentPrefix()).toBe('ㅔㅊ ')
}) })
it('Ctrl/Alt/Shift 단독 키 반복이나 Ctrl+Alt 제안 탐색 단축키는 터미널 버퍼를 초기화하지 않는다', () => {
const tracker = new TerminalKeystrokeTracker()
const hwnd = 9902
for (const vk of [0x47, 0x49, 0x54, 0x20]) {
tracker.onKeyDown({
hwnd,
windowTitle: 'Agent Switchboard',
vk,
shift: false,
ctrl: false,
alt: false,
meta: false
})
}
expect(tracker.currentPrefix()).toBe('git ')
// Ctrl 누름(uiohook 은 ctrl=true 로 전달) + Alt 누름(ctrl=true, alt=true) + Ctrl+Alt+Down/Enter
for (const ev of [
{ vk: 0xa2, ctrl: true, alt: false },
{ vk: 0xa4, ctrl: true, alt: true },
{ vk: 0x28, ctrl: true, alt: true },
{ vk: 0x0d, ctrl: true, alt: true }
]) {
tracker.onKeyDown({
hwnd,
windowTitle: 'Agent Switchboard',
vk: ev.vk,
shift: false,
ctrl: ev.ctrl,
alt: ev.alt,
meta: false
})
}
expect(tracker.currentPrefix()).toBe('git ')
})
}) })
describe('a visible suggestion survives a typing pause', () => { describe('a visible suggestion survives a typing pause', () => {

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/core", "name": "@d3ro/core",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"description": "D3RO Voice 공유 비즈니스 로직 — 타입, 에러, IPC 채널, 상수, 유틸", "description": "D3RO Voice 공유 비즈니스 로직 — 타입, 에러, IPC 채널, 상수, 유틸",
"license": "MIT", "license": "MIT",

View file

@ -119,6 +119,8 @@ export function classifyKeyStroke(
code: number, code: number,
modifiers: { ctrl: boolean; alt: boolean; meta: boolean } modifiers: { ctrl: boolean; alt: boolean; meta: boolean }
): KeyStrokeClass { ): KeyStrokeClass {
if (code >= 0xa0 && code <= 0xa5) return 'modifier'
if (code === 0x5b || code === 0x5c || code === 0x10 || code === 0x11 || code === 0x12) return 'modifier'
if (modifiers.ctrl || modifiers.alt || modifiers.meta) return 'shortcut' if (modifiers.ctrl || modifiers.alt || modifiers.meta) return 'shortcut'
if (code >= 0x41 && code <= 0x5a) return 'letter' if (code >= 0x41 && code <= 0x5a) return 'letter'
if (code >= 0x30 && code <= 0x39) return 'digit' if (code >= 0x30 && code <= 0x39) return 'digit'
@ -131,8 +133,6 @@ export function classifyKeyStroke(
if (code >= 0x25 && code <= 0x28) return 'arrow' if (code >= 0x25 && code <= 0x28) return 'arrow'
if (code >= 0x21 && code <= 0x24) return 'navigation' if (code >= 0x21 && code <= 0x24) return 'navigation'
if (code >= 0x70 && code <= 0x87) return 'function' if (code >= 0x70 && code <= 0x87) return 'function'
if (code >= 0xa0 && code <= 0xa5) return 'modifier'
if (code === 0x5b || code === 0x5c || code === 0x10 || code === 0x11 || code === 0x12) return 'modifier'
if (code === 0x1b) return 'navigation' if (code === 0x1b) return 'navigation'
if (code >= 0xba && code <= 0xc0) return 'symbol' if (code >= 0xba && code <= 0xc0) return 'symbol'
if (code >= 0xdb && code <= 0xde) return 'symbol' if (code >= 0xdb && code <= 0xde) return 'symbol'

View file

@ -379,7 +379,6 @@ export class ChordStateMachine {
): void { ): void {
if (eventKey !== null && this._isDown.has(eventKey)) { if (eventKey !== null && this._isDown.has(eventKey)) {
this._release(eventKey) this._release(eventKey)
return
} }
const released = toReleasedComponent(component) const released = toReleasedComponent(component)
if (released === null) return if (released === null) return
@ -391,7 +390,6 @@ export class ChordStateMachine {
if (first === undefined) continue if (first === undefined) continue
if (isChordComponentOf(released, first.binding)) { if (isChordComponentOf(released, first.binding)) {
matches.push(key) matches.push(key)
if (released.device === 'keyboard') break
} }
} }
for (const key of matches) this._release(key) for (const key of matches) this._release(key)

View file

@ -558,6 +558,29 @@ export class TerminalKeystrokeTracker {
const { vk, shift, ctrl, alt, meta } = input const { vk, shift, ctrl, alt, meta } = input
// 순수 수정자 키(Shift/Ctrl/Alt/Win) 단독 눌림·키 반복은 버퍼나 조합 상태를 바꾸지 않는다.
if (
vk === 0x10 ||
vk === 0x11 ||
vk === 0x12 ||
vk === 0x5b ||
vk === 0x5c ||
(vk !== null && vk >= 0xa0 && vk <= 0xa5)
) {
return
}
// D3RO Voice 전역 제안/음성 단축키(Ctrl+Alt+방향키/Enter/Space/Backspace)는 OS globalShortcut 이 가로채므로
// 터미널 입력 줄 버퍼를 초기화하지 않는다.
if (
ctrl &&
alt &&
!meta &&
(vk === 0x0d || vk === 0x20 || vk === 0x08 || (vk !== null && vk >= 0x25 && vk <= 0x28))
) {
return
}
// Escape 또는 Ctrl+[ / Ctrl+C → 현재 줄 초기화 (실제 Esc/Ctrl+[ 만 _afterEscape 설정) // Escape 또는 Ctrl+[ / Ctrl+C → 현재 줄 초기화 (실제 Esc/Ctrl+[ 만 _afterEscape 설정)
const isRealEscape = vk === 0x1b || (ctrl && !alt && !meta && vk === 0xdb) const isRealEscape = vk === 0x1b || (ctrl && !alt && !meta && vk === 0xdb)
const isCtrlC = ctrl && !alt && !meta && vk === 0x43 const isCtrlC = ctrl && !alt && !meta && vk === 0x43

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/i18n", "name": "@d3ro/i18n",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"description": "D3RO Voice 공유 i18n — 12개 locale, 타입 안전 키, Context, 포맷 유틸", "description": "D3RO Voice 공유 i18n — 12개 locale, 타입 안전 키, Context, 포맷 유틸",
"license": "MIT", "license": "MIT",

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/ui-native", "name": "@d3ro/ui-native",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"description": "D3RO Voice React Native DS — MetalCard/PhosphorText/Led/WaveBars etc.", "description": "D3RO Voice React Native DS — MetalCard/PhosphorText/Led/WaveBars etc.",
"license": "MIT", "license": "MIT",

View file

@ -1,6 +1,6 @@
{ {
"name": "@d3ro/ui", "name": "@d3ro/ui",
"version": "1.15.1", "version": "1.15.3",
"private": true, "private": true,
"description": "D3RO Voice 공유 UI — 디자인 시스템 컴포넌트 + 테마 토큰 + CSS 변수 맵", "description": "D3RO Voice 공유 UI — 디자인 시스템 컴포넌트 + 테마 토큰 + CSS 변수 맵",
"license": "MIT", "license": "MIT",

View file

@ -1,8 +1,8 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"version": "1.15.1", "version": "1.15.3",
"androidVersionCode": 1150100, "androidVersionCode": 1150300,
"iosBuildNumber": 1150100, "iosBuildNumber": 1150300,
"releaseDate": "2026-10-31", "releaseDate": "2026-10-31",
"desktopLicensePublicKeyId": "5c52b765135ee2531c681b53cd4dc0e96fff8737f496c0b04ba8334fc81a887f" "desktopLicensePublicKeyId": "5c52b765135ee2531c681b53cd4dc0e96fff8737f496c0b04ba8334fc81a887f"
} }

View file

@ -1,12 +1,12 @@
{ {
"name": "d3ro-voice-site", "name": "d3ro-voice-site",
"version": "1.15.1", "version": "1.15.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "d3ro-voice-site", "name": "d3ro-voice-site",
"version": "1.15.1", "version": "1.15.3",
"dependencies": { "dependencies": {
"react": "^19.0.0", "react": "^19.0.0",
"react-dom": "^19.0.0" "react-dom": "^19.0.0"

View file

@ -1,7 +1,7 @@
{ {
"name": "d3ro-voice-site", "name": "d3ro-voice-site",
"private": true, "private": true,
"version": "1.15.1", "version": "1.15.3",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite --port 5199 --host", "dev": "vite --port 5199 --host",

View file

@ -5,7 +5,7 @@
// NAS 배포는 바이너리를 포함하지 않으므로 `/releases/...` 같은 로컬 경로는 // NAS 배포는 바이너리를 포함하지 않으므로 `/releases/...` 같은 로컬 경로는
// 실제 배포 환경에서 404가 된다. // 실제 배포 환경에서 404가 된다.
export const DESKTOP_VERSION = '1.15.1' export const DESKTOP_VERSION = '1.15.3'
/** 릴리스 게시일. `release/product-version.json`의 releaseDate와 같아야 한다. */ /** 릴리스 게시일. `release/product-version.json`의 releaseDate와 같아야 한다. */
export const DESKTOP_RELEASE_DATE = '2026-10-31' export const DESKTOP_RELEASE_DATE = '2026-10-31'