fix: resolve publish blockers for v3.7.4→v3.8.0 release

- Fix #1991 crash: optional chaining for task-history sessionID access
- Fix #1992 think-mode: add antigravity entries to HIGH_VARIANT_MAP
- Fix #1949 Copilot premium misattribution: use createInternalAgentTextPart
- Fix #1982 load_skills: pass directory to discoverSkills for project-level skills
- Fix command priority: sort scopePriority before .find(), project-first return
- Fix Google provider transform: apply in userFallbackModels path
- Fix ralph-loop TUI: optional chaining for event handler
- Fix runtime-fallback: unify dual fallback engines, remove HTTP 400 from retry,
  fix pendingFallbackModel stuck state, add priority gate to skip model-fallback
  when runtime-fallback is active
- Fix Prometheus task system: exempt from todowrite/todoread deny
- Fix background_output: default full_session to true
- Remove orphan hooks: hashline-edit-diff-enhancer (redundant with hashline_edit
  built-in diff), task-reminder (dead code)
- Remove orphan config entries: 3 stale hook names from Zod schema
- Fix disabled_hooks schema: accept arbitrary strings for forward compatibility
- Register json-error-recovery hook in tool-guard pipeline
- Add disabled_hooks gating for question-label-truncator, task-resume-info,
  claude-code-hooks
- Update test expectations to match new behavior
This commit is contained in:
YeonGyu-Kim
2026-02-21 16:24:18 +09:00
parent ee5df1683e
commit fe415319e5
33 changed files with 179 additions and 770 deletions
+23 -3
View File
@@ -45,6 +45,24 @@ export function createChatMessageHandler(args: {
output: ChatMessageHandlerOutput
) => Promise<void> {
const { ctx, pluginConfig, firstMessageVariantGate, hooks } = args
const pluginContext = ctx as {
client: {
tui: {
showToast: (input: {
body: {
title: string
message: string
variant: "warning"
duration: number
}
}) => Promise<unknown>
}
}
}
const isRuntimeFallbackEnabled =
hooks.runtimeFallback !== null &&
hooks.runtimeFallback !== undefined &&
(pluginConfig.runtime_fallback?.enabled ?? true)
return async (
input: ChatMessageInput,
@@ -58,7 +76,9 @@ export function createChatMessageHandler(args: {
firstMessageVariantGate.markApplied(input.sessionID)
}
await hooks.modelFallback?.["chat.message"]?.(input, output)
if (!isRuntimeFallbackEnabled) {
await hooks.modelFallback?.["chat.message"]?.(input, output)
}
const modelOverride = output.message["model"]
if (
modelOverride &&
@@ -86,7 +106,7 @@ export function createChatMessageHandler(args: {
}
if (!hasConnectedProvidersCache()) {
ctx.client.tui
pluginContext.client.tui
.showToast({
body: {
title: "⚠️ Provider Cache Missing",
@@ -130,6 +150,6 @@ export function createChatMessageHandler(args: {
}
}
applyUltraworkModelOverrideOnMessage(pluginConfig, input.agent, output, ctx.client.tui, input.sessionID)
applyUltraworkModelOverrideOnMessage(pluginConfig, input.agent, output, pluginContext.client.tui, input.sessionID)
}
}