d65bc8730c
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.
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import type { CategoryConfig } from "../../config/schema"
|
|
import { ANTHROPIC_CATEGORIES } from "./anthropic-categories"
|
|
import type { BuiltinCategoryDefinition } from "./builtin-category-definition"
|
|
import { GOOGLE_CATEGORIES } from "./google-categories"
|
|
import { KIMI_CATEGORIES } from "./kimi-categories"
|
|
import { OPENAI_CATEGORIES } from "./openai-categories"
|
|
|
|
const BUILTIN_CATEGORIES: BuiltinCategoryDefinition[] = [
|
|
...GOOGLE_CATEGORIES,
|
|
...OPENAI_CATEGORIES,
|
|
...ANTHROPIC_CATEGORIES,
|
|
...KIMI_CATEGORIES,
|
|
]
|
|
|
|
function buildCategoryRecord<TValue>(
|
|
selector: (definition: BuiltinCategoryDefinition) => TValue
|
|
): Record<string, TValue> {
|
|
return Object.fromEntries(
|
|
BUILTIN_CATEGORIES.map((definition) => [definition.name, selector(definition)])
|
|
)
|
|
}
|
|
|
|
export const DEFAULT_CATEGORIES: Record<string, CategoryConfig> = buildCategoryRecord(
|
|
(definition) => definition.config
|
|
)
|
|
|
|
export const CATEGORY_PROMPT_APPENDS: Record<string, string> = buildCategoryRecord(
|
|
(definition) => definition.promptAppend
|
|
)
|
|
|
|
export const CATEGORY_DESCRIPTIONS: Record<string, string> = buildCategoryRecord(
|
|
(definition) => definition.description
|
|
)
|
|
|
|
export const CATEGORY_PROMPT_APPEND_RESOLVERS: Record<string, (model: string | undefined) => string> = Object.fromEntries(
|
|
BUILTIN_CATEGORIES
|
|
.filter((definition) => definition.resolvePromptAppend !== undefined)
|
|
.map((definition) => [definition.name, definition.resolvePromptAppend!]),
|
|
)
|