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
+5 -3
View File
@@ -29,6 +29,7 @@ import {
hasMoreFallbacks,
selectFallbackProvider,
} from "../../shared/model-error-classifier"
import { transformModelForProvider } from "../../shared/provider-model-id-transform"
import {
DEFAULT_MESSAGE_STALENESS_TIMEOUT_MS,
DEFAULT_STALE_TIMEOUT_MS,
@@ -364,7 +365,7 @@ export class BackgroundManager {
setSessionTools(sessionID, tools)
return tools
})(),
parts: [{ type: "text", text: input.prompt }],
parts: [createInternalAgentTextPart(input.prompt)],
},
}).catch((error) => {
log("[background-agent] promptAsync error:", error)
@@ -637,7 +638,7 @@ export class BackgroundManager {
setSessionTools(existingTask.sessionID!, tools)
return tools
})(),
parts: [{ type: "text", text: input.prompt }],
parts: [createInternalAgentTextPart(input.prompt)],
},
}).catch((error) => {
log("[background-agent] resume prompt error:", error)
@@ -1006,9 +1007,10 @@ export class BackgroundManager {
}
task.attemptCount = selectedAttemptCount
const transformedModelId = transformModelForProvider(providerID, nextFallback.model)
task.model = {
providerID,
modelID: nextFallback.model,
modelID: transformedModelId,
variant: nextFallback.variant,
}
task.status = "pending"
+3 -3
View File
@@ -1,7 +1,7 @@
import type { BackgroundTask, LaunchInput, ResumeInput } from "./types"
import type { OpencodeClient, OnSubagentSessionCreated, QueueItem } from "./constants"
import { TMUX_CALLBACK_DELAY_MS } from "./constants"
import { log, getAgentToolRestrictions, promptWithModelSuggestionRetry } from "../../shared"
import { log, getAgentToolRestrictions, promptWithModelSuggestionRetry, createInternalAgentTextPart } from "../../shared"
import { subagentSessions } from "../claude-code-session-state"
import { getTaskToastManager } from "../task-toast-manager"
import { isInsideTmux } from "../../shared/tmux"
@@ -146,7 +146,7 @@ export async function startTask(
question: false,
...getAgentToolRestrictions(input.agent),
},
parts: [{ type: "text", text: input.prompt }],
parts: [createInternalAgentTextPart(input.prompt)],
},
}).catch((error) => {
log("[background-agent] promptAsync error:", error)
@@ -230,7 +230,7 @@ export async function resumeTask(
question: false,
...getAgentToolRestrictions(task.agent),
},
parts: [{ type: "text", text: input.prompt }],
parts: [createInternalAgentTextPart(input.prompt)],
},
}).catch((error) => {
log("[background-agent] resume prompt error:", error)
@@ -59,7 +59,7 @@ export class TaskHistory {
if (list.length === 0) return null
const lines = list.map((e) => {
const desc = e.description.replace(/[\n\r]+/g, " ").trim()
const desc = e.description?.replace(/[\n\r]+/g, " ").trim() ?? ""
const parts = [
`- **${e.agent}**`,
e.category ? `[${e.category}]` : null,