refactor(model-core): inject bundled capabilities snapshot from harness

- remove bundled snapshot dependency on src/generated in model-core

- make shared harness provide runtime bundled snapshot

- update guardrail and capability tests to pass explicit snapshot

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-21 11:36:26 +09:00
parent 2462d7af29
commit e15461febc
8 changed files with 63 additions and 39 deletions
@@ -1,24 +1,14 @@
import bundledModelCapabilitiesSnapshotJson from "../../../../src/generated/model-capabilities.generated.json"
import { SUPPLEMENTAL_MODEL_CAPABILITIES } from "./supplemental-entries"
import type { ModelCapabilitiesSnapshot } from "./types"
function normalizeSnapshot(
snapshot: ModelCapabilitiesSnapshot | typeof bundledModelCapabilitiesSnapshotJson,
export function getBundledModelCapabilitiesSnapshot(
snapshotJson: ModelCapabilitiesSnapshot,
): ModelCapabilitiesSnapshot {
return snapshot as ModelCapabilitiesSnapshot
}
const normalizedBundledSnapshot = normalizeSnapshot(bundledModelCapabilitiesSnapshotJson)
const bundledModelCapabilitiesSnapshot: ModelCapabilitiesSnapshot = {
...normalizedBundledSnapshot,
models: {
...normalizedBundledSnapshot.models,
...SUPPLEMENTAL_MODEL_CAPABILITIES,
},
}
export function getBundledModelCapabilitiesSnapshot(): ModelCapabilitiesSnapshot {
return bundledModelCapabilitiesSnapshot
return {
...snapshotJson,
models: {
...snapshotJson.models,
...SUPPLEMENTAL_MODEL_CAPABILITIES,
},
}
}