feat(agents): add gpt-5.5 native deep category prompt
Hephaestus 5.5 was rewritten as an outcome-first delegation contract in c3fabaaf. The deep category (spawned as sisyphus-junior under gpt-5.5) now receives a matching prose-driven category context lifted from drafts/gpt-5-5/deep.md instead of the legacy gpt-5.4-era threat-frame version.
Selection happens via a new model-aware resolvePromptAppend hook on BuiltinCategoryDefinition. When the resolved category model is gpt-5.5 the new DEEP_CATEGORY_PROMPT_APPEND_GPT_5_5 is used; older models keep the legacy DEEP_CATEGORY_PROMPT_APPEND. User prompt_append remains preserved on top of either base.
This commit is contained in:
@@ -5,6 +5,7 @@ import type { FallbackEntry } from "../../shared/model-requirements"
|
||||
import { mergeCategories } from "../../shared/merge-categories"
|
||||
import { SISYPHUS_JUNIOR_AGENT } from "./sisyphus-junior-agent"
|
||||
import { resolveCategoryConfig } from "./categories"
|
||||
import { CATEGORY_PROMPT_APPEND_RESOLVERS } from "./constants"
|
||||
import { parseModelString } from "../../shared/model-string-parser"
|
||||
import { CATEGORY_MODEL_REQUIREMENTS } from "../../shared/model-requirements"
|
||||
import { normalizeFallbackModels, flattenToFallbackModelStrings } from "../../shared/model-resolver"
|
||||
@@ -26,6 +27,23 @@ function applyCategoryParams(base: DelegatedModelConfig, config: CategoryConfig)
|
||||
return result
|
||||
}
|
||||
|
||||
function resolveCategoryPromptAppendForModel(
|
||||
categoryName: string,
|
||||
actualModel: string | undefined,
|
||||
staticPromptAppend: string,
|
||||
userPromptAppend: string | undefined,
|
||||
): string | undefined {
|
||||
const dynamicResolver = CATEGORY_PROMPT_APPEND_RESOLVERS[categoryName]
|
||||
if (!dynamicResolver) {
|
||||
return staticPromptAppend || undefined
|
||||
}
|
||||
const dynamicBase = dynamicResolver(actualModel)
|
||||
if (!userPromptAppend) {
|
||||
return dynamicBase || undefined
|
||||
}
|
||||
return dynamicBase ? `${dynamicBase}\n\n${userPromptAppend}` : userPromptAppend
|
||||
}
|
||||
|
||||
export interface CategoryResolutionResult {
|
||||
agentToUse: string
|
||||
categoryModel: DelegatedModelConfig | undefined
|
||||
@@ -210,7 +228,12 @@ Available categories: ${allCategoryNames}`,
|
||||
const parsedModel = parseModelString(actualModel)
|
||||
categoryModel = parsedModel ?? undefined
|
||||
}
|
||||
const categoryPromptAppend = resolved.promptAppend || undefined
|
||||
const categoryPromptAppend = resolveCategoryPromptAppendForModel(
|
||||
args.category!,
|
||||
actualModel,
|
||||
resolved.promptAppend,
|
||||
userCategories?.[args.category!]?.prompt_append,
|
||||
)
|
||||
|
||||
if (!categoryModel && !actualModel && !isModelResolutionSkipped) {
|
||||
const categoryNames = Object.keys(enabledCategories)
|
||||
|
||||
Reference in New Issue
Block a user